/* Nuano marketing website: this page's own layout and choreography only. Every value is a design-system token, and the
   tokens and shared components (Button, Text Field, Link, states) come from design/ through website/design-system.css
   (generated by tools/design_tokens.py; never copied here). Checked by python3 tools/tokens_check.py.
   Figma: "My app idea" › Marketing Website. */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
/* Theme blend (design system, proposed: foundations/motion.md): the page has ONE background, and the nav takes its
   colours from the same values. site.js mixes them between the modes of the sections on screen as you scroll
   (data-theme on each section); without JS they stay Peach. */
:root {
  --page-bg: var(--bg-peach-primary);
  --page-ink: var(--text-peach-primary);
  --page-inverted-bg: var(--bg-peach-inverted);
  --page-inverted-ink: var(--text-peach-inverted);
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--page-bg);
  color: var(--text-peach-primary);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-16);
  line-height: var(--line-height-140);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* geometry: the standard visually-hidden box */
.skip-link {
  position: absolute; left: var(--space-16); top: var(--space-16); z-index: var(--layer-popup);
  padding: var(--space-12) var(--space-16); border-radius: var(--radius-full);
  background: var(--bg-peach-inverted); color: var(--text-peach-inverted); font-weight: var(--font-weight-semibold);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: var(--border-width-2) solid var(--mode-text-primary); outline-offset: var(--space-4); }
.site-nav :focus-visible { outline-color: var(--page-ink); }


/* ── Navigation (Figma "Navigation": 96 high, gutter 64, gap 32) ── */
/* Sticky and transparent: always visible at the top, the page shows through, and its text, wordmark and button take
   the mode of the page under it (--page-*, Theme blend). Contents kept to the 1440 frame. */
.site-nav {
  position: sticky; top: 0; z-index: var(--layer-nav);
  display: flex; align-items: center; gap: var(--space-32);
  height: var(--layout-site-nav-height);
  padding-block: var(--space-24);
  padding-inline: max(var(--layout-site-gutter), calc((100% - var(--layout-site-max-width)) / 2 + var(--layout-site-gutter)));
  color: var(--page-ink);
}
.site-nav .btn { --surface: var(--page-inverted-bg); --on-surface: var(--page-inverted-ink); }
.site-nav { --edge-surface: var(--page-bg); }   /* its Scroll edge takes the page's (blended) colour */
/* The nav's ink switches modes at the middle of a Theme blend; it cross-fades over time, not with the scroll. */
.site-nav { transition: color var(--duration-default-300) var(--easing-standard); }
.brand-mark { transition: fill var(--duration-default-300) var(--easing-standard); }
.site-nav .btn { transition: background-color var(--duration-default-300) var(--easing-standard), color var(--duration-default-300) var(--easing-standard), transform var(--motion-hover-duration) var(--motion-hover-easing); }
.brand { position: relative; display: block; flex: none; width: 110px; height: 22.72px; transform-origin: 0 0; } /* geometry: the wordmark's place in the nav, Figma 1:1 (110 × 22.72) */
/* The mark sits on top of its place. During the intro site.js draws it at its big size and shrinks it into the nav: an
   element scaled UP is drawn at its small size and stretched (pixelated dots); scaled down it stays sharp. */
.brand-mark { position: absolute; left: 0; top: 0; display: block; width: 110px; height: auto; overflow: visible; fill: var(--page-ink); } /* geometry: 1:1 */
.glyph { transform: translateX(calc(var(--shift) * -1px)); }   /* tight wordmark: each letter moves left by its spaced → tight offset */
.glyph-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.glyph-letter { transform-box: fill-box; transform-origin: center; }
.nav-links { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-32); }
/* Wordmark hover: the letters open out to the spaced variant (the Figma component "nuano", spaced variant), a nod to the intro. */
@media (hover: hover) and (pointer: fine) {
  .glyph { transition: transform var(--duration-default-300) var(--easing-spring-soft); }
  .brand:hover .glyph { transform: none; }
}

/* ── Hero (Figma "Hero — bold opening": 810 high under the nav; copy 790 wide, device on the right) ── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--layout-site-nav-height));
  display: flex; align-items: center;
}
.hero-inner {
  position: relative; z-index: var(--layer-raise-1);
  width: 100%; max-width: var(--layout-site-max-width); margin: 0 auto;
  padding: var(--space-64) var(--layout-site-gutter);
  display: grid; grid-template-columns: minmax(0, 790fr) minmax(0, 470fr); gap: var(--space-32); align-items: center;
}
.layer { will-change: transform; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-32); }
.hero-copy .hero-lead { margin-top: calc(var(--layout-copy-gap) - var(--space-32)); }   /* headline → lead is the shared copy gap; the form and note keep 32 */
.hero-title {
  margin: 0;
  font-size: clamp(var(--font-size-40), 5.6vw, var(--font-size-80));
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-105);
  letter-spacing: var(--letter-spacing-display);
}
.line { display: block; }
/* Caption reveal (motion pattern, design/foundation-tokens.css --motion-caption-*): site.js wraps each headline word
   in .word and plays them in at speech pace. */
.word { display: inline-block; }
.hero-lead {
  margin: 0; max-width: 640px;   /* geometry: Figma's measure for the lead */
  font-size: clamp(var(--font-size-18), 1.7vw, var(--font-size-24));
  line-height: var(--line-height-145);
}
[hidden] { display: none !important; }   /* a hidden form stays hidden, whatever its own display */
.beta-form { display: flex; align-items: center; gap: var(--space-12); }
.beta-form .text-field { width: 342px; }   /* geometry: Figma's field width */
.hero-note { margin: 0; font-size: var(--font-size-14); line-height: var(--line-height-140); }

.hero-device { display: flex; justify-content: center; }
.device { width: auto; height: min(650px, 74svh); }   /* geometry: Figma's device presentation is 650 high */

/* The device's stage: the background kanji always sits behind the device, centred on it (Figma 1053:80841), on every
   screen size; the stage, not the hero, is its frame. */
.hero-stage { position: relative; display: grid; place-items: center; }
.hero-stage > * { grid-area: 1 / 1; }
.hero-device { position: relative; z-index: var(--layer-raise-1); }


/* ── Sections after the hero (Figma: 96 top and bottom, gutter 64, gap 48; content centred, 960 max) ── */
.section {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-48);
  max-width: var(--layout-site-max-width); margin: 0 auto;
  padding: var(--space-96) var(--layout-site-gutter);
}
.section-copy { display: flex; flex-direction: column; align-items: center; gap: var(--layout-copy-gap); max-width: 960px; text-align: center; }   /* geometry: Figma's 960 measure */
.section-title {
  margin: 0;
  font-size: clamp(var(--font-size-40), 4.45vw, var(--font-size-section-title));
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-105);
  letter-spacing: var(--letter-spacing-display);
}
.section-lead { font-size: clamp(var(--font-size-18), 1.7vw, var(--font-size-24)); line-height: var(--line-height-145); }
.section-lead, .section-lead p { margin: 0; }   /* the copy gap alone sets the space under the headline */

/* The problem (Black mode): its copy; the card under it lives in the journey that follows. */
.problem { padding-bottom: var(--space-48); color: var(--text-black-primary); }

/* The journey (problem → answer): the pin sticks a little above the middle of the screen and takes no room itself
   (height 0; the card hangs below it, the guide line above). After --layout-journey-run of scroll the next section
   arrives and scrolls up over it: its heading passes in front; site.js fades the pin out as the marquee reaches it. */
.kakeru-journey { position: relative; }
.journey-pin {
  position: sticky; top: 36svh;   /* geometry: where the card hangs while pinned, a little above the middle */
  z-index: var(--layer-base); height: 0;
  display: flex; flex-direction: column; align-items: center;
}
.journey-pin .guide-line { position: absolute; bottom: 100%; height: 100svh; transform: scaleY(0); }
/* While "One word" or the marquee passes over it, it stays very see-through (owner, 2026-11-29); once the mastery stage
   has taken it over it hides at once (the stage's かけます is in the same spot, equally dim). */
.journey-pin { transition: opacity var(--duration-default-300) var(--easing-standard); }
.journey-pin.is-behind { opacity: var(--opacity-16); }
.journey-pin.is-handed { opacity: var(--opacity-0); transition: none; }
.journey-run { height: calc(var(--layout-journey-pin) + var(--layout-journey-run)); }

/* The answer (Black mode), in front of the pinned card; the marquee that follows it opens the mastery section. */
.solution { z-index: var(--layer-raise-1); color: var(--text-black-primary); }
.solution .marquee { width: 100vw; }   /* full bleed: wider than the section, centred on it */



/* ── Put in the work (Figma Chapter 01, Black mode). The finished layout: the marquee, then the mastery panel across
   the top, the copy on the left, the card stack on the right (Figma: panel at 96, copy and stack 323 below). site.js
   turns it into a pinned stage on desktop (.is-staged). ── */
.mastery { position: relative; color: var(--text-black-primary); }
.mastery-stage {
  /* The owner's final layout (2026-11-29, replacing Figma 1053:85963): the open panel centred across the top; below it
     the copy on the left and the card stack on the right. */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-32); row-gap: var(--space-48);
  grid-template-areas: "marquee marquee" "panel panel" "copy stack"; grid-template-rows: auto auto auto;
  max-width: var(--layout-site-max-width); margin: 0 auto;
  padding: var(--space-96) var(--layout-site-gutter);
}
.mastery .marquee { grid-area: marquee; width: 100vw; justify-self: center; margin-bottom: var(--space-48); }
.mastery-panel { grid-area: panel; justify-self: center; align-self: end; }   /* centred, compact or open (owner: centred all the way through) */
.mastery-panel .guide-line { position: absolute; bottom: 100%; left: 50%; height: 100svh; transform: scaleY(0); }
.mastery-copy { grid-area: copy; display: flex; flex-direction: column; gap: var(--layout-copy-gap); align-self: center; }
.mastery-copy .section-title { margin: 0; }
.guide-elbow { display: none; }

/* The stack: the top card, with two narrower cards peeking below it (Figma: 384, 352, 320 wide, 20 apart). */
.mastery-stack { grid-area: stack; position: relative; justify-self: center; align-self: center; width: min(384px, 100%); padding-bottom: var(--space-40); }   /* geometry: the top card's width */
.mastery-stack .kakeru-card { position: relative; z-index: var(--layer-raise-2); }
.stack-back {
  position: absolute; left: 50%; bottom: 0; height: calc(100% - var(--space-40)); border-radius: var(--radius-24);   /* as tall as the top card (the stack's own height less its bottom padding), at any size */
  background: var(--bg-zinc-primary); border-bottom: var(--border-width-1) solid var(--border-zinc-default);
}
.stack-back:nth-child(1) { width: calc(100% - var(--space-64)); transform: translateX(-50%); z-index: var(--layer-base); }   /* Figma's back card: 320 of 384 */
.mastery-stack .correct-badge { position: absolute; z-index: var(--layer-raise-3); visibility: hidden; }   /* on the card's right edge (Figma Chapter 01) */
.mastery-stack [data-badge="meaning"] { top: var(--space-8); left: calc(100% - var(--space-64)); }
.mastery-stack [data-badge="form"] { top: calc(var(--space-64) + var(--space-6)); left: calc(100% - var(--space-64) - var(--space-14)); }
.stack-back { transition: width var(--motion-card-arrive) var(--motion-card-arrive-easing), bottom var(--motion-card-arrive) var(--motion-card-arrive-easing), opacity var(--motion-card-arrive) var(--motion-card-arrive-easing); }
.stack-back:nth-child(2) { width: calc(100% - var(--space-32)); bottom: var(--space-20); transform: translateX(-50%); z-index: var(--layer-raise-1); }   /* Figma's middle card: 352 of 384 */

/* The stage (desktop with motion; site.js adds .is-staged): the section is --layout-mastery-run taller than the
   screen and its stage pins for that scroll. The marquee floats over the stage; the step classes .at-1 … .at-5 (set from
   the scroll by site.js, cumulative) move it on: 1 かけます glides out from behind the marquee; 2 the cards gather into
   the stack; then, with the scroll itself, it rises straight up, centred, to its place under the nav (--move-y) while the
   stack drifts up; 3 it opens, straight from the word to the full panel; 4 the copy plays the Section reveal. Transitions use the
   motion tokens; each step reverses. */
.mastery.is-staged { height: calc(100svh + var(--layout-mastery-run)); margin-top: calc(var(--space-96) * -1); }   /* its empty top overlaps the space under "One word", so it pins while that lead is still fading under the nav */
.is-staged .mastery-stage {
  position: sticky; top: 0; height: 100svh; overflow: clip;
  max-width: none;   /* full width, so the marquee runs off both edges on any screen; content kept to the 1440 frame: */
  padding-inline: max(var(--layout-site-gutter), calc((100% - var(--layout-site-max-width)) / 2 + var(--layout-site-gutter)));
  grid-template-areas: "panel panel" "copy stack"; grid-template-rows: auto auto; align-content: start;
  row-gap: calc(var(--space-96) + var(--space-32));   /* Figma 1113:87202: the panel just under the nav, copy and stack 128 below */
  padding-top: calc(var(--layout-site-nav-height) + var(--space-8)); padding-bottom: var(--space-48);   /* Figma: the open panel 8 under the nav */
}
.is-staged .marquee { position: absolute; top: calc(var(--layout-site-nav-height) + var(--space-64)); left: 50%; margin-left: -50vw; z-index: var(--layer-raise-4); }   /* lower in the stage, so the stage pins (and the cards gather) while the lead above is still fading under the nav (owner, 2026-11-29) */
.solution:has(+ .mastery.is-staged) { padding-bottom: 0; }   /* the marquee follows its heading as closely as before */
.is-staged .mastery-panel {
  z-index: var(--layer-raise-3); opacity: var(--opacity-0);
  transform: translate(var(--hang-x, 0px), var(--hang-y0, 0px));
  transition: opacity var(--duration-moderate-500) var(--easing-standard), transform var(--motion-flip-duration) var(--motion-flip-easing);
}
/* pinned (step 0): it takes over the journey's card in its spot, just as dim, with no fade (a seamless swap) */
.is-staged.at-0 .mastery-panel { opacity: var(--opacity-16); transition: transform var(--motion-flip-duration) var(--motion-flip-easing); }
/* In the stage, its line is the one drawn path (.guide-elbow) from the hook at the top centre straight down to the
   card's top, redrawn every frame by site.js as the card rises; centred all the way, so it stays a straight line. */
.is-staged .mastery-panel .guide-line { display: none; }
.is-staged.at-0 .guide-elbow { opacity: var(--opacity-16); transition: none; }
.is-staged.at-1 .guide-elbow { opacity: var(--opacity-100); transition: opacity var(--duration-moderate-500) var(--easing-standard); }
.is-staged.at-3 .guide-elbow { opacity: var(--opacity-0); }   /* once it opens, the line has done its job (Figma's final frame has none) */
.is-staged .mastery-stack, .is-staged .guide-elbow {
  opacity: var(--opacity-0);
  transition: opacity var(--duration-dramatic-600) var(--easing-standard), transform var(--duration-dramatic-600) var(--easing-standard);
}
.is-staged .mastery-stack { transition-duration: var(--duration-quick-250); }   /* it appears as the cards land on it, quickly */
.is-staged .mastery-stack { transform: scale(var(--motion-scale-press)); translate: 0 calc(var(--layout-mastery-drift) * (1 - var(--move-y, 0))); }   /* it drifts up into place with the move */
.is-staged .guide-elbow { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: var(--layer-base); }
.guide-elbow path { fill: none; stroke: var(--mode-bg-tertiary); stroke-width: var(--border-width-5); stroke-dasharray: var(--space-8) var(--space-12); }
.is-staged.at-1 .mastery-panel {   /* step 1: in the same spot, it comes back to full strength as the cards gather around it */
  opacity: var(--opacity-100); transform: translate(var(--hang-x, 0px), var(--hang-y, 0px));
  transition: opacity var(--duration-moderate-500) var(--easing-standard), transform var(--motion-flip-duration) var(--motion-flip-easing);
}
/* the rise: with the scroll, not on a timer, the card rises straight up, still centred, from where it hung to its place
   under the nav (--move-y 0 → 1, set by site.js between two scroll points; no transition, so it follows the scroll) */
.is-staged.at-2 .mastery-panel {
  transform: translate(var(--hang-x, 0px), calc(var(--hang-y, 0px) * (1 - var(--move-y, 0))));
  transition: opacity var(--duration-moderate-500) var(--easing-standard);
}
.is-staged.at-2 .mastery-stack { opacity: var(--opacity-100); transform: none; }   /* timed by site.js: as the first gathered card lands */
.gather-layer { position: absolute; inset: 0; z-index: var(--layer-raise-4); pointer-events: none; }   /* the gathering cards fly over everything in the stage */
.gather-layer .kakeru-card { will-change: transform, opacity; }
/* step 5: the copy uses the Section reveal pattern like every section (heading word by word, the lead a beat later),
   played by site.js, not a fade of its own */

/* ── 04 · The next review moves farther away (Figma 1099:8767): a queue of review cards from the front (bottom right)
   back to the top-left corner along a dotted path, each further back smaller and dimmer (site.js places them from the
   Figma frame); the copy in the right column. Still, it is this picture; with motion its parts join the mastery stage
   (.is-merged) and play there. ── */
.queue { position: relative; color: var(--text-black-primary); }
.queue.is-merged { display: none; }
.queue-stage { position: relative; height: min(906px, 100svh); overflow: clip; }   /* geometry: Figma's frame height */
.queue-cards { position: absolute; inset: 0; pointer-events: none; }
html:not(.js) .queue-cards { display: none; }
.queue-list { margin: 0; padding: 0; list-style: none; }
.queue-list .kakeru-card { position: absolute; left: 0; top: 0; width: 384px; min-height: 220px; box-sizing: border-box; transform-origin: 0 0; will-change: transform; }   /* geometry: Figma's front card, at least; taller when its sentence needs it (furigana on the second line: 後でかけ直します); site.js scales each to its place by its real height */
.queue-dots { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.queue-dots circle { fill: var(--text-black-primary); }
.queue-copy {
  position: absolute; z-index: var(--layer-raise-3);
  bottom: calc(var(--space-96) + var(--space-12)); left: max(var(--layout-site-gutter), calc((100% - var(--layout-site-max-width)) / 2 + var(--layout-site-gutter)));
  width: min(640px, calc(50% - var(--layout-site-gutter)));   /* the owner's lockup (2026-11-30): bottom left, its last line level with the front card's bottom; geometry: the 640 copy column */
  display: flex; flex-direction: column; gap: var(--layout-copy-gap);
}
.queue-copy .section-title { margin: 0; }
/* in the stage: the queue takes over from the stack at step 9 (the panel and the copy before it fade out) */
.is-staged .queue-cards { z-index: var(--layer-raise-2); opacity: var(--opacity-0); transition: opacity var(--duration-dramatic-600) var(--easing-standard); }
.is-staged.at-9 .queue-cards { opacity: var(--opacity-100); transition: none; }
.is-staged .mastery-copy { transition: opacity var(--duration-default-400) var(--easing-standard); }
.is-staged.at-9 .mastery-panel, .is-staged.at-9 .mastery-copy { opacity: var(--opacity-0); }
.is-staged.at-9 .mastery-stack { opacity: var(--opacity-0); transition: none; }

/* ── 05 · Features (Figma 1144:14026): on the black page, the blue listening card on the left (its art over the copy),
   the peach and lemon cards stacked on the right; each card square at the top left, the other corners --radius-48. ── */
.features.section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-32); align-items: stretch; padding: var(--space-96) var(--layout-site-gutter); }
.features-col { display: flex; flex-direction: column; gap: var(--space-32); }
.feature { display: flex; flex-direction: column; overflow: hidden; border-radius: 0 var(--radius-48) var(--radius-48) var(--radius-48); background: var(--mode-bg-primary); color: var(--mode-text-primary); text-align: left; }
.feature-grow { flex: 1; }
.feature-text { display: flex; flex-direction: column; gap: var(--space-24); padding: var(--space-48); }
.feature-title { margin: 0; font-size: var(--font-size-40); font-weight: var(--font-weight-bold); line-height: var(--line-height-105); letter-spacing: var(--letter-spacing-display); }
.feature-text p { margin: 0; font-size: var(--font-size-18); line-height: var(--line-height-145); }
.feature-art {
  /* the device's width sets the whole band, so its play control and waves stay on the screen's own at any size */
  --phone-w: 316px; position: relative; height: calc(var(--space-20) + var(--phone-w) * 282 / 316); overflow: hidden;   /* geometry: Figma's device and art band (302 tall at 316) */
  background: linear-gradient(var(--bg-blue-primary), color-mix(in srgb, var(--bg-blue-primary), var(--text-blue-tertiary) calc(var(--opacity-35) * 100%)));
}
.feature-phone { position: absolute; left: 50%; top: var(--space-20); transform: translateX(-50%); }
.waves { position: absolute; left: 0; top: calc(var(--space-20) + var(--phone-w) * 204 / 316 - 54px); width: 100%; height: 108px; overflow: visible; }   /* geometry: Figma's wave band (108 tall), centred on the play control */
.wave { fill: none; stroke-width: var(--border-width-2); stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 var(--blur-md) var(--text-black-primary)); }   /* Figma's 2.3–2.5 strokes with their cream glow (radius 9) */
.wave-a { stroke: var(--text-blue-tertiary); }    /* Figma "Wave · silver" */
.wave-b { stroke: var(--text-blue-inverted); }    /* "Wave · yellow" */
.wave-c { stroke: var(--text-blue-secondary); }   /* "Wave · cyan" */
.feature-play { position: absolute; left: 50%; top: calc(var(--space-20) + var(--phone-w) * 173 / 316); width: calc(var(--phone-w) * 64 / 316); height: auto; transform: translateX(-50%); border-radius: var(--radius-full); box-shadow: var(--shadow-lift); }   /* geometry: Figma's play control on the waves */

/* ── 06 · Take a look inside (Figma 1144:14052): the phones on a stage; site.js places each from its distance to the
   front (flat in front, then turned away, smaller and lower, Figma's 316 / 274 / 244 wide). ── */
.gallery.section { max-width: none; padding: var(--space-96) 0; gap: var(--space-48); overflow: clip; }
.gallery-hint { margin: 0; font-size: var(--font-size-16); color: var(--mode-text-secondary); }
.gallery-track { position: relative; width: 100%; height: 760px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }   /* geometry: Figma's gallery height */
.gallery-track:active { cursor: grabbing; }
.gallery-track:focus-visible { outline: var(--border-width-2) solid var(--mode-text-primary); outline-offset: var(--space-8); }
.gallery-list { margin: 0; padding: 0; list-style: none; height: 100%; perspective: 1800px; }   /* the perspective sits on the phones' own parent: on the track (a grandparent) it never reached them, and each turn flattened into a squash (choreography) */
.gallery-item { position: absolute; left: 50%; top: 0; margin-left: -158px; --phone-w: 316px; transform-origin: 50% 50%; will-change: transform; }   /* geometry: the front phone, centred */
.gallery-item img { pointer-events: none; -webkit-user-drag: none; }

/* ── 07 · Good questions (Figma 1144:14094), Zinc mode. ── */
/* the FAQ, the beta form and the footer have solid backgrounds with hard edges, full width (owner, 2026-11-30) */
.section[data-blend="solid"] {
  max-width: none; background: var(--mode-bg-primary); color: var(--mode-text-primary);
  padding-inline: max(var(--layout-site-gutter), calc((100% - var(--layout-site-max-width)) / 2 + var(--layout-site-gutter)));
}
.faq.section { align-items: stretch; text-align: left; gap: var(--space-48); }
.faq-title { margin: 0; font-size: var(--font-size-80); font-weight: var(--font-weight-bold); line-height: var(--line-height-105); letter-spacing: var(--letter-spacing-display); }
.faq-list { display: flex; flex-direction: column; gap: var(--space-32); }
.faq-item { display: flex; flex-direction: column; gap: var(--space-16); padding-bottom: var(--space-16); border-bottom: var(--border-width-1) solid var(--mode-border-default); }
.faq-q { margin: 0; font-size: var(--font-size-27); font-weight: var(--font-weight-bold); line-height: var(--line-height-125); }
.faq-a { margin: 0; max-width: 1120px; font-size: var(--font-size-18); line-height: var(--line-height-145); color: var(--mode-text-secondary); }   /* geometry: Figma's answer measure */

/* ── 08 · Beta conversion (Figma 1144:14121), Peach mode. ── */
.join.section { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: var(--space-64); text-align: left; }
.join-title { margin: 0; flex: none; font-size: var(--font-size-80); font-weight: var(--font-weight-bold); line-height: var(--line-height-105); letter-spacing: var(--letter-spacing-display); }
.join-body { display: flex; flex-direction: column; gap: var(--space-32); }
.join-lead { margin: 0; max-width: 780px; font-size: var(--font-size-24); line-height: var(--line-height-145); }   /* geometry: Figma's lead measure */
.join-note { margin: 0; font-size: var(--font-size-14); line-height: var(--line-height-140); }

/* ── 09 · Footer (Figma 1144:14129): the line and the links, then the wordmark at full size. ── */
.site-footer {
  display: flex; flex-direction: column; gap: var(--space-96);
  background: var(--mode-bg-primary); color: var(--mode-text-primary);   /* its own black, a hard edge under the peach (Figma) */
  padding-block: var(--space-48) var(--space-96);
  padding-inline: max(var(--layout-site-gutter), calc((100% - var(--layout-site-max-width)) / 2 + var(--layout-site-gutter)));
}
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-24); }
.footer-line { margin: 0; font-size: var(--font-size-12); font-weight: var(--font-weight-semibold); text-transform: uppercase; letter-spacing: var(--letter-spacing-caps); color: var(--mode-text-secondary); }
.footer-links { margin: 0; display: flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-16); font-weight: var(--font-weight-semibold); }
/* Instagram (owner, 2026-12-02): the 24 px outline icon after the links, in their colour; its tap area is --size-36 */
.footer-social { display: inline-flex; align-items: center; justify-content: center; width: var(--size-36); height: var(--size-36); margin-left: var(--space-8); border-radius: var(--radius-full); }
.footer-social:focus-visible { outline: var(--border-width-2) solid var(--text-black-primary); outline-offset: var(--space-2); }
.footer-icon { width: var(--size-24); height: var(--size-24); display: block; }
.footer-mark { display: block; width: min(896px, 100%); height: auto; overflow: visible; }   /* geometry: Figma's wordmark width */
.footer-letter { fill: var(--mode-text-primary); }



/* ── Privacy and Contact (website/privacy.html, contact.html): the nav and footer of the home page over a cream (Zinc)
   page; one readable column, the headline as large as a section title. ── */
:root.doc-page { --page-bg: var(--bg-zinc-primary); --page-ink: var(--text-zinc-primary); --page-inverted-bg: var(--bg-zinc-inverted); --page-inverted-ink: var(--text-zinc-inverted); }
.doc { padding: var(--space-48) var(--layout-site-gutter) var(--space-96); background: var(--mode-bg-primary); color: var(--mode-text-primary); }
.doc-body { max-width: 760px; margin: 0 auto; }   /* geometry: a readable measure */
.doc-head { display: flex; flex-direction: column; gap: var(--layout-copy-gap); padding-bottom: var(--space-48); margin-bottom: var(--space-48); border-bottom: var(--border-width-1) solid var(--mode-border-default); }
.doc-title { margin: 0; font-size: var(--font-size-section-title); font-weight: var(--font-weight-bold); line-height: var(--line-height-105); letter-spacing: var(--letter-spacing-display); }
.doc-lead { margin: 0; font-size: var(--font-size-24); line-height: var(--line-height-145); }
.doc-meta { margin: 0; font-size: var(--font-size-14); color: var(--mode-text-secondary); }
.doc-section { display: flex; flex-direction: column; gap: var(--space-16); padding-bottom: var(--space-32); margin-bottom: var(--space-32); border-bottom: var(--border-width-1) solid var(--mode-border-default); }
.doc-section:last-child { border-bottom: 0; margin-bottom: 0; }
.doc-h2 { margin: 0; font-size: var(--font-size-27); font-weight: var(--font-weight-bold); line-height: var(--line-height-125); }
.doc p, .doc li { font-size: var(--font-size-18); line-height: var(--line-height-145); }
.doc-section p, .doc-section li { margin: 0; color: var(--mode-text-secondary); }
.doc strong { color: var(--mode-text-primary); }
.doc-list { margin: 0; padding-left: var(--space-24); display: flex; flex-direction: column; gap: var(--space-8); }
.contact-form { display: flex; flex-direction: column; gap: var(--space-24); margin-bottom: var(--space-64); }
.contact-form .btn { align-self: flex-start; }
.contact-label { font-size: var(--font-size-14); font-weight: var(--font-weight-semibold); }
.contact-status { margin: 0; font-size: var(--font-size-14); }

/* A form's sent state (beta and contact forms, owner 2026-12-02): it takes the form's place with a short confirmation,
   in the section's own mode, and a link back to an empty form. Rises in like the Section reveal's copy. */
.form-sent { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-8); }
.form-sent[hidden] { display: none; }
.form-sent:focus { outline: none; }   /* focus is moved here for screen readers, not by the visitor */
.form-sent:not([hidden]) { animation: form-sent-in var(--duration-default-400) var(--easing-standard) both; }
@keyframes form-sent-in { from { opacity: var(--opacity-0); transform: translateY(var(--motion-rise-md)); } }
.form-sent .form-sent-title { margin: 0; font-size: var(--font-size-24); font-weight: var(--font-weight-bold); line-height: var(--line-height-normal); }
.form-sent .form-sent-text { margin: 0; font-size: var(--font-size-18); line-height: var(--line-height-145); }   /* the size of the page's body copy */
.form-sent-email { font-weight: var(--font-weight-semibold); overflow-wrap: anywhere; }
.form-sent-again { margin-top: var(--space-8); }
.doc .form-sent { margin-bottom: var(--space-64); }   /* the space the contact form leaves above "Before you write" */
.beta-form[hidden], .contact-form[hidden] { display: none; }   /* both are flex boxes, which would outrank [hidden] */
@media (prefers-reduced-motion: reduce) { .form-sent:not([hidden]) { animation: none; } }

/* ── Intro: until site.js plays it, everything but the logo waits hidden (only when JS runs) ── */
.js.intro-pending .reveal { opacity: var(--opacity-0); }
.js.intro-pending .brand { opacity: var(--opacity-0); }
.js.intro-playing { overflow: hidden; overscroll-behavior: none; }   /* no scrolling until the hero has fully arrived (site.js also holds wheel and touch) */

/* ── Smaller screens: copy, then the device ── */
@media (max-width: 960px) {
  .site-nav { padding: var(--space-16) var(--layout-gutter-bar); height: auto; }
  .nav-link { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: var(--space-32) var(--layout-gutter-bar) var(--space-64); gap: var(--space-48); }
  .beta-form { flex-direction: column; align-items: stretch; width: 100%; }
  .beta-form .text-field { width: 100%; }
  .hero-device { justify-content: center; }
  .device { height: min(560px, 70svh); }   /* geometry: device height on phones */
  .bg-kanji { font-size: 48vw; }
  .mastery-stage { grid-template-columns: 1fr; grid-template-areas: "marquee" "panel" "copy" "stack"; grid-template-rows: auto; row-gap: var(--space-48); padding: var(--space-64) var(--layout-gutter-bar); }
  /* the slim Mastery panel (owner, 2026-11-30): the word on the left, the dots and % on the right, the split bar
     under them; no letters, no Score chips */
  .mastery-panel { display: grid; grid-template-columns: auto auto; grid-template-areas: "word total" "split split"; justify-content: space-between; align-items: center; column-gap: var(--space-16); row-gap: var(--space-12); }
  .mastery-panel:not([data-level="0"]) { width: 100%; }
  .mp-word { grid-area: word; }
  .mp-meanings { display: none; }
  .score-chip { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* geometry: visually hidden; screen readers still get the two scores */
  .mastery-panel:not([data-level="0"]):not([data-level="1"]) .mp-stats { display: contents; }
  .mp-total { grid-area: total; flex-direction: row; align-items: center; gap: var(--space-12); }
  .mastery-panel:not([data-level="0"]):not([data-level="1"]) .mp-split { display: block; grid-area: split; }
  .mastery-stack { justify-self: stretch; }
  /* the stage on a phone (owner, 2026-11-30): the stack at the top (the marquee's cards gather straight into it), the
     panel in the middle, the copy at the bottom; the Correct badges on the card's bottom-right corner, towards the panel */
  .mastery.is-staged { margin-top: 0; }
  .is-staged .mastery-stage {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "stack" "panel" "copy"; row-gap: var(--space-24);
    padding: calc(var(--space-64) + var(--space-8)) var(--layout-gutter-bar) var(--space-24);
  }
  .is-staged .marquee { top: calc(var(--space-64) + var(--space-8)); }
  .is-staged .guide-elbow { display: none; }
  .is-staged .mastery-stack { translate: none; z-index: var(--layer-raise-1); }   /* it forms in place (no drift past the pill below it) */
  .is-staged .mastery-panel { align-self: start; }
  .is-staged .mastery-copy { align-self: start; margin-top: var(--space-8); }
  .mastery-stack [data-badge="meaning"] { top: auto; left: auto; right: calc(var(--space-8) * -1); bottom: var(--space-64); }
  .mastery-stack [data-badge="form"] { top: auto; left: auto; right: calc(var(--space-8) * -1); bottom: var(--space-16); }
  .queue-copy { left: var(--layout-gutter-bar); right: var(--layout-gutter-bar); width: auto; top: calc(var(--space-64) + var(--space-8)); bottom: auto; }   /* phones: the copy on top, the queue below it */
  .features.section { grid-template-columns: minmax(0, 1fr); padding: var(--space-64) var(--layout-gutter-bar); }   /* as .section here (its own desktop rule outranks .section's) */
  .gallery.section { padding-block: var(--space-64); }
  .section[data-blend="solid"] { padding-inline: var(--layout-gutter-bar); }
  .join.section { flex-direction: column; gap: var(--space-32); }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .section { padding: var(--space-64) var(--layout-gutter-bar); }
}

/* ── Phones (up to 600, = --layout-max-width-fold): a step smaller all round (owner, 2026-11-30), and nothing wider
   than the screen ── */
@media (max-width: 600px) {   /* geometry: the phone breakpoint, = --layout-max-width-fold */
  .site-nav { padding-block: var(--space-12); }
  .brand, .brand-mark { width: 88px; }   /* geometry: the wordmark at 80% (110 × 22.72 → 88 × 18.18) */
  .brand { height: 18.18px; }   /* geometry: as above */
  .site-nav .btn { height: var(--size-36); min-height: var(--size-36); padding: var(--space-8) var(--space-14); font-size: var(--font-size-14); }
  .hero-title { font-size: var(--font-size-40); }
  .hero-lead, .section-lead { font-size: var(--font-size-16); }
  .section-title, .faq-title, .join-title, .doc-title { font-size: var(--font-size-32); }
  .doc { padding: var(--space-32) var(--layout-gutter-bar) var(--space-64); }
  .doc-lead { font-size: var(--font-size-18); }
  .doc p, .doc li { font-size: var(--font-size-16); }
  .form-sent .form-sent-text { font-size: var(--font-size-16); }
  .doc-h2 { font-size: var(--font-size-24); }
  .feature-title { font-size: var(--font-size-27); }
  .feature-text { padding: var(--space-32) var(--space-24); gap: var(--space-16); }
  .features.section { padding: var(--space-48) var(--layout-gutter-bar); gap: var(--space-16); }   /* its desktop padding outranked .section's: the cards were 262 wide on a 390 screen */
  .gallery.section { padding-block: var(--space-48); gap: var(--space-32); }   /* the same: as .section on a phone */
  .feature { border-radius: 0 var(--radius-24) var(--radius-24) var(--radius-24); }
  .feature-art { --phone-w: 248px; }   /* geometry: the device on a phone, inside the narrowest card (288 at 320) */
  .feature-text p, .faq-a { font-size: var(--font-size-16); }
  .faq-q { font-size: var(--font-size-18); }
  .join-lead { font-size: var(--font-size-18); }
  .gallery-track { height: 520px; }   /* geometry: the gallery on a phone */
  .gallery-item { --phone-w: 220px; margin-left: -110px; }   /* geometry: the front phone on a phone */
  .site-footer { padding: var(--space-32) var(--layout-gutter-bar) var(--space-48); gap: var(--space-48); }
  .section { padding: var(--space-48) var(--layout-gutter-bar); gap: var(--space-32); }
  .journey-pin { padding-inline: var(--layout-gutter-bar); }
  .journey-pin .flashcard:not([data-compact]) { width: 100%; }
  .solution { padding-bottom: var(--space-32); }
  .mastery-stage { grid-template-columns: minmax(0, 1fr); padding-top: 0; row-gap: var(--space-32); }   /* the full-bleed marquee doesn't widen the column */
  .mastery .marquee { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .layer { will-change: auto; }
}
