/* ==========================================================================
   WAKA public site. One stylesheet, no build.
   Sources for every value:
   - app theme tokens: C:/Dev/.../app/globals.css (night ground, warm ramp, rimu)
   - WAKA Design System, Foundations & Components (type scale, 4px grid,
     48px targets, 16px radius, motion durations and easing, reduced motion)
   - round 9 banner (headline tracking, emboss offsets, koru mask method)
   Spec: 09_WAKA/SPECS/WAKA-SITE-UX.md
   ========================================================================== */

/* ---- 1. Fonts (self-hosted, OFL; no outside call, see spec section 7) ---- */
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  /* Only the ten macron vowels and the combining macron: whānau, hapū. */
  font-family: "Sora";
  src: url("../fonts/sora-macron.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0100-0101, U+0112-0113, U+012A-012B, U+014C-014D, U+016A-016B, U+0304;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-macron.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-0101, U+0112-0113, U+012A-012B, U+014C-014D, U+016A-016B, U+0304;
}
@font-face {
  /* The wordmark only: subset to W, A, K (5.4 KB). */
  font-family: "Fraunces";
  src: url("../fonts/fraunces-wordmark.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0041, U+004B, U+0057;
}

/* ---- 2. Tokens ------------------------------------------------------------ */
:root {
  /* Primitive palette, copied from app/globals.css (not re-derived). */
  --n-00: #fffcf7;
  --n-05: #faf6f0;
  --n-10: #f3eade;
  --n-20: #e6d9c6;
  --n-30: #c9b79b;
  --n-40: #9a8465;
  --n-50: #7a6851;
  --n-60: #5c4e3c;
  --n-70: #453b2e;
  --n-80: #2e271e;
  --n-90: #211c17;
  --rimu-30: #d99878;
  --rimu-40: #bc7050;
  --rimu-50: #9a4e33;
  --rimu-60: #7a3b28;
  --rimu-70: #5e2c1e;
  --night-ground: #08101e;
  --night-ground-high: #1a2840;
  --night-charcoal: #17191c;
  --night-moonlit: #e6ebf0;
  --night-secondary: #c5ccd4;
  --night-muted: #a4adb7;
  --night-shell-border: #697586;
  --night-panel-border: #7c899a;
  --danger-light: #b81e11;
  --danger-dark: #f38d81;
  --success-light: #2c6644;
  --success-dark: #7cc49a;

  /* Spacing: 4px base, root-2 scale, grid-snapped (Design System 2.2). */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* Type: base 18, ratio 1.25, 15px floor (Design System 5.4). */
  --font-heading: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-wordmark: "Fraunces", "Times New Roman", serif;
  --t-caption: 15px; --t-caption-lh: 20px;
  --t-body: 18px; --t-body-lh: 28px;
  --t-lead: 23px; --t-lead-lh: 36px;
  --t-h3: 28px; --t-h3-lh: 36px;
  --t-h2: clamp(35px, 2.4vw + 20px, 44px); --t-h2-lh: 1.18;
  /* Hero: fluid up to 112px. Line height 1.0 as the banner, tracking -0.04em
     as the banner's Manrope 800 setting. 52px from 406px wide up to 634px,
     then 8.2vw. Below 406px the size follows the column (12.8vw) because the
     widest first word, "Remembered", measures 6.67px per px of font size and
     the column at 390 is 342px (measured 2026-11-18, round 2). */
  --t-hero: min(112px, max(min(12.8vw, 52px), 8.2vw));

  /* Radius: three values, derived from the mark (Design System 6.3). */
  --r-0: 0; --r-1: 16px; --r-full: 999px;

  /* Motion (Design System 7.1, 7.2). Scroll-linked values are set in JS. */
  --m-quick: 120ms; --m-base: 200ms; --m-move: 320ms; --m-settle: 600ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-settle: cubic-bezier(0.05, 0.7, 0.1, 1);

  /* The two artworks, named once (the app names its koru --pattern-image too). */
  --pattern-image: url("../brand/koru-linework.png");
  --mark-image: url("../brand/waka-vert-final.png");

  --header-h: 64px;
  --container: 1200px;
  --gutter: 24px;
  --measure: 62ch;
  --thread-x: 14px;
}
@media (min-width: 760px) {
  /* 72px gutter leaves room for the thread 32px left of the text. */
  :root { --gutter: 72px; --thread-x: calc(max(72px, (100vw - var(--container)) / 2) - 32px); }
}

/* Band themes. Dark is the app's navy room; light is the app's paper.
   Each band sets its own role tokens, so a component never knows which
   band it is in. Every pair below is computed in the digest. */
.band-dark, .theme-dark {
  color-scheme: dark;
  --ground: var(--night-ground);
  --ground-top: var(--night-ground-high);
  --ground-gradient: linear-gradient(to top, var(--night-ground) 0%, var(--night-ground-high) 100%);
  --ink: var(--night-moonlit);          /* 12.32:1 on the top stop */
  --text-2: var(--night-secondary);     /* 9.12:1 */
  --text-3: var(--night-muted);         /* 6.50:1 */
  --accent: var(--rimu-40);             /* fill; charcoal label 4.67:1 */
  --accent-hover: var(--rimu-30);
  --accent-on: var(--night-charcoal);
  --accent-text: var(--rimu-30);        /* 6.13:1 on the top stop */
  --line: var(--night-panel-border);    /* 4.15:1, control edges */
  --line-soft: rgb(124 137 154 / 0.45); /* decorative rules only */
  --surface: rgb(230 235 240 / 0.05);
  --surface-solid: #1e2a42;
  --danger: var(--danger-dark);
  --success: var(--success-dark);
  --focus-ring: var(--rimu-30);
  --focus-halo: var(--night-ground);
  --weight-body: 350;
  --weight-heading: 550;
  /* Emboss fringe colours and strengths: the app's dark theme values
     (globals.css, dark: shadow is the night ground mixed half to black at
     0.35, light is moonlit at 0.14). */
  --pattern-shadow: color-mix(in srgb, var(--night-ground) 50%, black);
  --pattern-shadow-a: 0.35;
  --pattern-light: var(--night-moonlit);
  --pattern-light-a: 0.14;
  --logo-a: 0.07;
  --logo-colour: var(--rimu-30);
}
.band-light, .theme-light {
  color-scheme: light;
  /* The app's light ground: the N ramp from N00 at the top of the band to
     N20 at its foot (globals.css light --ground-gradient, copied). N20 is
     the worst case for text and every light pair below is computed on it. */
  --ground: var(--n-05);
  --ground-top: var(--n-00);
  --ground-gradient: linear-gradient(to top, var(--n-20) 0%, var(--n-10) 38%, var(--n-05) 72%, var(--n-00) 100%);
  --ink: var(--n-90);                    /* 12.15:1 on N20, 9.63:1 over the shadow fringe (computed 2026-11-18) */
  --text-2: var(--n-60);                 /* 5.79:1 on N20, 4.59:1 over the shadow fringe */
  --text-3: var(--n-60);                 /* N50 is 3.85:1 on N20, so muted stays N60 as in the app */
  --accent: var(--rimu-60);              /* fill; N05 label 7.86:1 */
  --accent-hover: var(--rimu-70);
  --accent-on: var(--n-05);
  --accent-text: var(--rimu-60);         /* 6.08:1 on N20, 4.82:1 over the shadow fringe */
  --line: var(--n-50);                   /* 3.85:1 on N20, 3.05:1 over the shadow fringe; control edges need 3:1 */
  --line-soft: var(--n-30);
  --surface: var(--n-00);
  --surface-solid: var(--n-00);
  --danger: var(--danger-light);
  --success: var(--success-light);
  --focus-ring: var(--rimu-60);
  --focus-halo: var(--n-05);
  --weight-body: 400;
  --weight-heading: 600;
  /* The app's light theme fringe: rimu timber shadow at 0.16 so the relief
     reads as carved wood, N00 light at 0.9 (globals.css light). */
  --pattern-shadow: var(--rimu-60);
  --pattern-shadow-a: 0.16;
  --pattern-light: var(--n-00);
  --pattern-light-a: 0.9;
  --logo-a: 0.06;
  --logo-colour: var(--rimu-60);
}

/* ---- 3. Reset and base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* WCAG 2.2 2.4.11: a focused anchor target must clear the sticky header. */
  scroll-padding-top: calc(var(--header-h) + var(--s4));
  background: var(--night-ground);
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--t-body-lh);
  font-weight: 400;
  color: var(--ink);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-halo);
  border-radius: var(--r-1);
}
::selection { background: color-mix(in srgb, var(--rimu-40) 40%, transparent); }
[lang="mi"] { font-style: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---- 4. Type ---------------------------------------------------------------- */
.band p, .band li, .band dd, .band summary, .band label { font-weight: var(--weight-body); }
h1, h2, h3, .h3 { font-family: var(--font-heading); font-weight: var(--weight-heading); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: var(--t-h2-lh); }
h3, .h3 { font-size: var(--t-h3); line-height: var(--t-h3-lh); }
.lead { font-size: var(--t-lead); line-height: var(--t-lead-lh); max-width: 44ch; text-wrap: pretty; }
.caption { font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-2); }
.eyebrow {
  font-family: var(--font-heading); font-size: var(--t-caption); line-height: var(--t-caption-lh);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text);
  margin-bottom: var(--s4);
}
.measure { max-width: var(--measure); text-wrap: pretty; }
.section-head { max-width: 760px; margin-bottom: var(--s8); }
.section-head p { margin-top: var(--s4); color: var(--text-2); }
.accent { color: var(--accent-text); }

/* Wordmark: Fraunces 600, spaced, as the banner lockup. */
.lockup { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; color: inherit; min-height: 48px; }
.lockup .mark { width: 10px; height: 36px; background: var(--accent-text);
  -webkit-mask: var(--mark-image) center / contain no-repeat; mask: var(--mark-image) center / contain no-repeat; }
.lockup .word { font-family: var(--font-wordmark); font-weight: 600; font-size: 20px; letter-spacing: 0.35em; margin-right: -0.35em; color: var(--accent-text); line-height: 1; font-variation-settings: "opsz" 20; }

/* ---- 5. Layout ------------------------------------------------------------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.band { position: relative; isolation: isolate; color: var(--ink); background-color: var(--ground); background-image: var(--ground-gradient); padding-block: clamp(80px, 9vw, 128px); }
.band > .container { position: relative; z-index: 2; }
.band + .band { border-top: 0; }

/* Emboss plane: the app's own technique (globals.css .vn-ground, the
   milestone-1 letterpress), not a printed pattern. The koru linework is a
   luminance mask, and each fringe is the artwork MINUS a copy of itself
   moved 2px: mask-composite subtract leaves only a 2px edge on one side,
   so the line interiors contribute nothing and only pressed-in relief
   renders. ::before is the shadow on the upper edge, ::after the light on
   the lower edge (light from above). A third mask layer fades the relief
   out toward the top of the plane, so it is strongest at the foot of the
   band (full in the lower 30 percent, gone by 85) and quiet behind the
   heading. The plane is pinned to the band's foot and is at most 1100px
   tall, so a long band does not stretch one koru across it. A browser
   without mask-composite gets the plain gradient, as in the app. */
.emboss { position: absolute; left: 0; right: 0; bottom: 0; height: min(100%, 1100px); z-index: 0; pointer-events: none; overflow: hidden; }
@supports (mask-composite: subtract) and (mask-mode: luminance) {
  .emboss::before, .emboss::after {
    content: ""; position: absolute; inset: 0;
    /* Layer order matters: fade INTERSECT (art SUBTRACT offset art). */
    mask-image: linear-gradient(to top, black 0%, black 30%, transparent 85%), var(--pattern-image), var(--pattern-image);
    mask-size: 100% 100%, cover, cover;
    mask-repeat: no-repeat;
    mask-mode: alpha, luminance, luminance;
    mask-composite: intersect, subtract;
  }
  .emboss::before { background: var(--pattern-shadow); opacity: var(--pattern-shadow-a); mask-position: 50% 100%, 50% 100%, 50% calc(100% + 2px); }
  .emboss::after  { background: var(--pattern-light);  opacity: var(--pattern-light-a);  mask-position: 50% 100%, 50% 100%, 50% calc(100% - 2px); }
  /* Below 640px the app crops the artwork instead of cover-fitting it (VU-14):
     sized to twice the plane's height and placed so one whole koru fills the
     width (x 24 percent, foot-aligned). The fade runs to the top edge. */
  @media (max-width: 639px) {
    .emboss { height: min(100%, 100svh); }
    .emboss::before, .emboss::after {
      mask-image: linear-gradient(to top, black 0%, black 30%, transparent 100%), var(--pattern-image), var(--pattern-image);
      mask-size: 100% 100%, auto 200%, auto 200%;
    }
    .emboss::before { mask-position: 50% 100%, 24% 100%, 24% calc(100% + 2px); }
    .emboss::after  { mask-position: 50% 100%, 24% 100%, 24% calc(100% - 2px); }
  }
}

/* The upright mark, large and faint, at the right as on the banner.
   Moved by transform only (parallax at a third of scroll speed, JS). */
.band-logo { position: absolute; z-index: 0; right: clamp(-40px, 4vw, 120px); top: -10%; width: clamp(140px, 18vw, 280px); aspect-ratio: 122 / 440; opacity: var(--logo-a); background: var(--logo-colour); pointer-events: none; will-change: transform;
  -webkit-mask: var(--mark-image) center / contain no-repeat; mask: var(--mark-image) center / contain no-repeat; }
/* The mark stays at the right on every band, as on the banner, so it never sits behind the left-aligned text (quiet-zone rule). */

/* ---- 6. Header ---------------------------------------------------------------- */
.skip-link { position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: var(--s3) var(--s4); background: var(--n-05); color: var(--n-90); border-radius: var(--r-1); font-weight: 500; }
.skip-link:focus { top: var(--s2); outline-color: var(--rimu-60); }

.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); /* Solid, not translucent: without a blur (ruled out for device cost) a translucent bar only shows ghosted text. */
  background: var(--ground-top); border-bottom: 1px solid var(--line-soft); transition: background-color var(--m-base) var(--ease-standard), color var(--m-base) var(--ease-standard); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.site-nav ul { display: flex; gap: var(--s1); }
.site-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s3); border-radius: var(--r-1); color: var(--text-2); text-decoration: none; font-weight: 500; position: relative; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="location"] { color: var(--ink); }
.site-nav a[aria-current="location"]::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 6px; height: 2px; background: var(--accent-text); border-radius: 1px; }
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.btn.menu-toggle { display: none; }
[hidden] { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
@media (max-width: 919px) {
  .site-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--ground); background-image: var(--ground-gradient); padding: var(--s5) var(--gutter); display: none; overflow: auto; z-index: 49; }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { min-height: 56px; font-size: var(--t-lead); width: 100%; }
  .site-nav a[aria-current="location"]::after { left: 0; width: 3px; right: auto; top: var(--s3); bottom: var(--s3); height: auto; }
  .site-nav .pause-wrap { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line-soft); }
  .btn.menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}
@media (min-width: 920px) { .site-nav .pause-wrap { display: none; } }

/* ---- 7. Buttons (Design System 9.1: five variants, 48/56 heights) -------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s4); border-radius: var(--r-1); border: 1px solid transparent; font-weight: 500; font-size: var(--t-body); line-height: 1; text-decoration: none; cursor: pointer; background: none; color: var(--ink); transition: background-color var(--m-quick) var(--ease-standard), border-color var(--m-quick) var(--ease-standard), transform var(--m-quick) var(--ease-standard), color var(--m-quick) var(--ease-standard); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 56px; padding: 0 var(--s5); }
.btn--primary { background: var(--accent); color: var(--accent-on); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { border-color: var(--line); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--tertiary { color: var(--accent-text); padding-inline: var(--s3); }
.btn--quiet { color: var(--text-2); }
.btn[aria-busy="true"] { cursor: progress; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.btn-icon { width: 20px; height: 20px; flex: none; }
.pause-motion { color: var(--text-2); }
.pause-motion[aria-pressed="true"] .when-playing, .pause-motion[aria-pressed="false"] .when-paused { display: none; }
@media (max-width: 759px) { .actions .btn { width: 100%; } }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---- 8. Hero ---------------------------------------------------------------- */
.hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; padding-block: clamp(64px, 8vw, 112px); overflow: clip; }
/* The headline column is not capped: "by the rangatira." at 112px needs about
   1000px, inside the 1200px container. The lead keeps its own 44ch measure. */
/* A canvas is a replaced element: inset alone leaves it at 300 by 150, so width and height are explicit. */
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero h1 { font-size: var(--t-hero); line-height: 1; letter-spacing: -0.04em; font-weight: 800; text-wrap: initial; }
.hero h1 .line { display: block; }
/* Two slots, the first word and the last. JS locks each slot's min-width to
   its widest word, so a change never re-wraps the line or moves the lead. */
.rotator { display: inline-block; position: relative; vertical-align: top; min-height: 1em; white-space: nowrap; text-align: left; }
.rotator .word { display: inline-block; }
.rotator .word[aria-hidden="true"] { position: absolute; left: 0; top: 0; }
.rotator .word.is-leaving { animation: wordOut var(--m-move) var(--ease-exit) forwards; }
.rotator .word.is-entering { animation: wordIn var(--m-move) var(--ease-standard) both; }
@keyframes wordOut { to { opacity: 0; transform: translateY(-0.28em); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(0.28em); } }
.hero .lead { color: var(--text-2); margin-top: var(--s5); }
.hero .actions { margin-top: var(--s6); }
.hero .pause-wrap { margin-top: var(--s4); }
.scroll-cue { position: absolute; z-index: 3; left: calc(var(--thread-x) - 1px); bottom: var(--s6); display: inline-flex; align-items: center; gap: var(--s3); color: var(--text-2); text-decoration: none; font-weight: 500; min-height: 48px; }
.scroll-cue .cue-line { width: 2px; height: 48px; background: var(--line); border-radius: 1px; position: relative; overflow: hidden; }
.scroll-cue .cue-line::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--accent-text); animation: cueDraw 2400ms var(--ease-standard) infinite; }
@keyframes cueDraw { 0% { top: -100%; } 45% { top: 0; } 70% { top: 100%; } 100% { top: 100%; } }

/* ---- 9. Thread (I4): one line down the page, drawn by scroll ----------------- */
.thread { position: absolute; top: 0; left: calc(var(--thread-x) - 12px); width: 24px; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.thread path { fill: none; stroke: var(--rimu-30); stroke-width: 1.5; opacity: 0.9; }
.thread .track { stroke: rgb(124 137 154 / 0.28); }
/* Each node is a link to its section (the founder clicked them expecting
   something to happen). The visible dot is 8px; the hit circle around it is
   24px, the WCAG 2.5.8 minimum, and is the only part that takes the pointer. */
.thread a { pointer-events: all; cursor: pointer; outline: none; }
.thread .hit { fill: transparent; stroke: none; }
.thread .dot { fill: transparent; stroke: rgb(124 137 154 / 0.7); stroke-width: 1.5; transition: fill var(--m-settle) var(--ease-settle), stroke var(--m-settle) var(--ease-settle), r var(--m-quick) var(--ease-standard); }
.thread .dot.lit { fill: var(--rimu-30); stroke: var(--rimu-30); }
.thread a:hover .dot, .thread a:focus-visible .dot { r: 6; stroke: var(--rimu-30); }
.thread a:focus-visible .hit { stroke: var(--rimu-30); stroke-width: 2; }
@media (max-width: 759px) { .thread path { stroke-width: 1; } }

/* ---- 10. Cards and grids ------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-1); padding: var(--s5); }
.cards-4 { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card h3 { font-size: var(--t-lead); line-height: 32px; margin-bottom: var(--s2); }
.card p { color: var(--text-2); }
.card .who { display: inline-block; margin-bottom: var(--s3); }
.card .who .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-text); margin-right: var(--s2); vertical-align: 1px; }
.for-funders { margin-top: var(--s6); color: var(--text-2); }

/* ---- 11. Story (I3) ------------------------------------------------------------ */
.story-grid { display: grid; gap: var(--s6); }
.beat { padding-block: var(--s6); }
.beat .num { font-family: var(--font-heading); font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.08em; color: var(--accent-text); display: block; margin-bottom: var(--s3); }
.beat h3 { margin-bottom: var(--s3); }
.beat p { color: var(--text-2); font-size: var(--t-lead); line-height: var(--t-lead-lh); max-width: 38ch; }
.beat .status { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s4); font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-3); }
.beat-strip { width: 100%; height: 180px; border-radius: var(--r-1); border: 1px solid var(--line-soft); margin-bottom: var(--s5); background: rgb(8 16 30 / 0.5); touch-action: pan-y; }
.stage { display: none; }
@media (min-width: 920px) {
  .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: start; }
  .beats { padding-top: 10vh; }
  .beat { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.4; transition: opacity var(--m-settle) var(--ease-settle); }
  .beat.is-active { opacity: 1; }
  .beat-strip { display: none; }
  .stage { display: block; position: sticky; top: calc(var(--header-h) + var(--s5)); height: calc(100svh - var(--header-h) - var(--s7)); border-radius: var(--r-1); border: 1px solid var(--line-soft); overflow: hidden; background: rgb(8 16 30 / 0.5); }
  .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
  .stage .rail { position: absolute; right: var(--s4); top: 50%; transform: translateY(-50%); display: grid; gap: var(--s1); z-index: 2; }
  .stage .rail a { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: var(--text-3); text-decoration: none; font-family: var(--font-heading); font-size: var(--t-caption); font-weight: 600; position: relative; }
  .stage .rail a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transition: transform var(--m-base) var(--ease-standard), background-color var(--m-base); }
  .stage .rail a span { position: absolute; right: 100%; white-space: nowrap; padding-right: var(--s2); opacity: 0; transition: opacity var(--m-quick); color: var(--text-2); }
  .stage .rail a:hover span, .stage .rail a:focus-visible span, .stage .rail a[aria-current="step"] span { opacity: 1; }
  .stage .rail a:hover::before, .stage .rail a:focus-visible::before { transform: scale(1.5); color: var(--ink); }
  .stage .rail a[aria-current="step"]::before { background: var(--accent-text); transform: scale(1.5); }
  .stage .stage-label { position: absolute; left: var(--s5); bottom: var(--s4); font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-3); z-index: 2; }
}

/* Try it (I6) */
.try-it { margin-top: var(--s8); }
.try-it .card { padding: var(--s5); }
.try-it h3 { margin-bottom: var(--s2); }
.try-it .layers { display: grid; gap: var(--s1); margin-top: var(--s4); }
@media (min-width: 560px) { .try-it .layers { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s2); border-radius: var(--r-1); cursor: pointer; }
.check:hover { background: var(--surface); }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); flex: none; }
.try-it .live { margin-top: var(--s4); color: var(--text-2); min-height: 56px; }
.try-strip { width: 100%; height: 220px; border-radius: var(--r-1); border: 1px solid var(--line-soft); background: rgb(8 16 30 / 0.5); margin-bottom: var(--s4); touch-action: pan-y; }
@media (min-width: 920px) { .try-strip { display: none; } }

/* ---- 12. See it (I5): tabs ------------------------------------------------------- */
.tabs { display: grid; gap: var(--s5); }
.tablist { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--s1); -webkit-overflow-scrolling: touch; }
.tablist::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 48px; padding: 0 var(--s4); border-radius: var(--r-1); border: 1px solid transparent; background: none; color: var(--text-2); font-weight: 500; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--line); background: var(--surface); }
.tabpanel[hidden] { display: none; }
.tabpanel { animation: fadeIn var(--m-base) var(--ease-standard); }
@keyframes fadeIn { from { opacity: 0; } }
.screen { position: relative; border-radius: var(--r-1); border: 1px solid var(--line); overflow: hidden; background: var(--n-05); box-shadow: 0 8px 32px rgb(33 28 23 / 0.12); }
.screen img, .screen .placeholder { aspect-ratio: 1120 / 787; width: 100%; height: auto; }
.screen .placeholder { display: grid; place-items: center; text-align: center; padding: var(--s5); background: repeating-linear-gradient(135deg, var(--n-10) 0 12px, var(--n-05) 12px 24px); color: var(--n-60); }
.screen .placeholder strong { display: block; font-family: var(--font-heading); color: var(--n-90); font-size: var(--t-lead); margin-bottom: var(--s2); }
/* Hotspots: a 48px target around a 20px dot. The halo breathes once every
   2400ms (the scroll cue's period) so the dot reads as something to press;
   it stops under Pause and reduced motion. The note opens IN the frame, next
   to the dot, because the caption under the figure was off-screen on a phone
   and a tap looked like it did nothing. Without JS the dots are not drawn. */
.hotspot { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; z-index: 2; }
.hotspot::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--rimu-60); border: 3px solid var(--n-00); box-shadow: 0 0 0 2px var(--rimu-60), 0 0 0 2px rgb(122 59 40 / 0.35); transition: transform var(--m-quick) var(--ease-standard), background-color var(--m-quick); animation: halo 2400ms var(--ease-standard) infinite; }
.hotspot:nth-of-type(2)::before { animation-delay: 800ms; }
.hotspot:nth-of-type(3)::before { animation-delay: 1600ms; }
@keyframes halo { 0% { box-shadow: 0 0 0 2px var(--rimu-60), 0 0 0 2px rgb(122 59 40 / 0.35); } 60% { box-shadow: 0 0 0 2px var(--rimu-60), 0 0 0 14px rgb(122 59 40 / 0); } 100% { box-shadow: 0 0 0 2px var(--rimu-60), 0 0 0 14px rgb(122 59 40 / 0); } }
.hotspot:hover::before, .hotspot[aria-expanded="true"]::before { transform: scale(1.2); animation: none; }
.hotspot[aria-expanded="true"]::before { background: var(--n-00); border-color: var(--rimu-60); }
.no-js .hotspot { display: none; }
.hotspot-note { position: absolute; z-index: 3; width: min(320px, calc(100% - 32px)); padding: var(--s3) var(--s4); border-radius: var(--r-1); background: var(--n-00); color: var(--n-90); border: 1px solid var(--n-50); box-shadow: 0 8px 24px rgb(33 28 23 / 0.16); font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: 400; animation: fadeIn var(--m-base) var(--ease-standard); }
.hotspot-note[hidden] { display: none; }
.hotspot-note::before { content: ""; position: absolute; width: 12px; height: 12px; background: inherit; border-left: 1px solid var(--n-50); border-top: 1px solid var(--n-50); transform: rotate(45deg); left: calc(var(--arrow-x, 50%) - 6px); top: -7px; }
.hotspot-note.is-above::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.hotspot-note .close { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--n-60); }
.hotspot-note .close:hover { background: var(--n-10); color: var(--n-90); }
.hotspot-note .body { display: block; padding-right: var(--s6); }
.hotspot-hint { margin-top: var(--s3); min-height: 20px; color: var(--text-3); }
.no-js .hotspot-hint { display: none; }
.screen-caption { margin-top: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: space-between; }
@media (min-width: 920px) { .tabs { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } .tablist { flex-direction: column; overflow: visible; } .tab { text-align: left; } }

/* ---- 13. Ready now / coming next (I7) -------------------------------------------- */
.status-cols { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .status-cols { grid-template-columns: 1fr 1fr; gap: var(--s8); } }
.status-cols h3 { margin-bottom: var(--s4); display: flex; align-items: center; gap: var(--s3); }
.status-cols h3 .pill { font-family: var(--font-body); font-size: var(--t-caption); line-height: 1; font-weight: 500; padding: 6px 12px; border-radius: var(--r-full); border: 1px solid var(--line); color: var(--text-2); letter-spacing: 0; }
.rows details { border-top: 1px solid var(--line-soft); }
.rows details:last-child { border-bottom: 1px solid var(--line-soft); }
.rows summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; padding: var(--s3) var(--s2); border-radius: var(--r-1); }
.rows summary::-webkit-details-marker { display: none; }
.rows summary .t { font-weight: 500; }
.rows summary .sub { display: block; color: var(--text-2); font-weight: var(--weight-body); }
.rows summary .chev { flex: none; width: 20px; height: 20px; transition: transform var(--m-base) var(--ease-standard); color: var(--text-3); }
.rows details[open] summary .chev { transform: rotate(180deg); }
.rows .more { padding: 0 var(--s2) var(--s4); color: var(--text-2); max-width: 56ch; }
.status-word { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-caption); color: var(--text-3); white-space: nowrap; }
.status-word::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.status-word.ready::before { background: var(--success); border-color: var(--success); }

/* ---- 14. Documents (I8) ---------------------------------------------------------- */
.doc-cols { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .doc-cols { grid-template-columns: 1fr 1fr; gap: var(--s8); } }
.doc-cols h3 { margin-bottom: var(--s3); }
.doc-cols .note { color: var(--text-2); max-width: 46ch; }
.pack-card { margin-top: var(--s4); }
.pack-card .state { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-caption); color: var(--text-3); margin-bottom: var(--s3); }
.pack-card .btn { margin-top: var(--s4); }
.doc-list li { border-top: 1px solid var(--line-soft); padding: var(--s4) 0; display: grid; gap: var(--s1); }
.doc-list li:last-child { border-bottom: 1px solid var(--line-soft); }

/* ---- 15. Behind ------------------------------------------------------------------ */
.behind { display: grid; gap: var(--s6); }
@media (min-width: 920px) { .behind { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s9); align-items: end; } }
.behind .facts { display: grid; gap: var(--s3); }
.behind .facts div { border-top: 1px solid var(--line-soft); padding-top: var(--s3); }
.behind .facts dt { font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-3); }
.behind .facts dd { margin: var(--s1) 0 0; }

/* ---- 16. Form (I9, Design System 9.2) -------------------------------------------- */
.contact-grid { display: grid; gap: var(--s6); }
@media (min-width: 920px) { .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s9); } }
.form { display: grid; gap: var(--s5); }
.field { display: grid; gap: var(--s1); }
.field label, .field .legend { font-weight: 500; }
.reach .legend { margin-bottom: var(--s2); }
.field .opt { color: var(--text-2); font-weight: var(--weight-body); }
.field .hint { font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-2); }
.control { min-height: 48px; width: 100%; padding: var(--s3); border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface-solid); color: var(--ink); }
textarea.control { min-height: 144px; resize: vertical; }
select.control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%237a6851' stroke-width='1.6'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--s3) center; padding-right: var(--s7); }
.control:focus-visible { border-color: var(--focus-ring); outline-offset: 1px; border-radius: var(--r-1); }
.control::placeholder { color: var(--text-3); }
.field[data-invalid="true"] .control { border: 2px solid var(--danger); }
.field .msg { min-height: 20px; font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--danger); display: flex; gap: 6px; align-items: flex-start; }
.field .msg:empty { display: block; }
.reach { display: grid; gap: var(--s4); }
@media (min-width: 560px) { .reach .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); } }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { padding: var(--s4); border-radius: var(--r-1); background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); font-size: var(--t-caption); line-height: var(--t-caption-lh); }
.privacy-note a { color: var(--accent-text); }
.error-summary { border: 2px solid var(--danger); border-radius: var(--r-1); padding: var(--s4); }
.error-summary h3 { font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--danger); margin-bottom: var(--s2); }
.error-summary a { color: var(--ink); }
.error-summary[hidden] { display: none; }
.form-result { padding: var(--s5); border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface-solid); }
.form-result[hidden] { display: none; }
.form-result h3 { margin-bottom: var(--s2); }
.form-result p { color: var(--text-2); }
.form-result .actions { margin-top: var(--s4); }
.other-way { margin-top: var(--s5); color: var(--text-2); }
.other-way .addr { font-weight: 500; color: var(--ink); word-break: break-word; }

/* ---- 17. Footer ------------------------------------------------------------------ */
.site-footer { padding-block: var(--s8) var(--s6); }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s8); } }
.footer-grid h3 { font-size: var(--t-caption); line-height: var(--t-caption-lh); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s3); font-family: var(--font-heading); font-weight: 600; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text-2); text-decoration: none; }
.footer-grid li a:hover { color: var(--ink); text-decoration: underline; }
.footer-grid p { color: var(--text-2); max-width: 40ch; margin-top: var(--s4); }
.footer-base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); justify-content: space-between; align-items: center; color: var(--text-3); font-size: var(--t-caption); line-height: var(--t-caption-lh); }

/* ---- 18. Small pages (privacy, accessibility) --------------------------------------- */
.page-narrow { max-width: 720px; }
.page-narrow h1 { font-size: var(--t-h2); line-height: var(--t-h2-lh); margin-bottom: var(--s5); }
.page-narrow h2 { font-size: var(--t-h3); line-height: var(--t-h3-lh); margin-top: var(--s7); margin-bottom: var(--s3); }
.page-narrow p + p, .page-narrow ul + p { margin-top: var(--s4); }
.page-narrow ul { list-style: disc; padding-left: 1.2em; margin-top: var(--s3); }
.page-narrow ul li + li { margin-top: var(--s1); }
.placeholder-text { background: color-mix(in srgb, var(--rimu-40) 18%, transparent); border-radius: 4px; padding: 0 4px; }

/* ---- 19. Motion and preference paths ------------------------------------------------- */
/* Paused (the Pause movement control): every self-running movement stops;
   state changes a person causes (hover, open, focus) keep their timing. */
html[data-motion="paused"] .scroll-cue .cue-line::after,
html[data-motion="paused"] .hotspot::before,
html[data-motion="paused"] .rotator .word { animation: none !important; }
html[data-motion="paused"] .band-logo { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Design System 7.3: transform, translate, scale and blur removed;
     opacity retained at motion-quick. The headline does not rotate at all
     (founder, 2026-11-18): a still line, the first pair. */
  .rotator .word.is-leaving, .rotator .word.is-entering, .hotspot::before { animation: none !important; }
  .scroll-cue .cue-line::after { animation: none; top: 0; }
  .band-logo { transform: none !important; }
  .beat { transition-duration: var(--m-quick); }
  .tabpanel { animation-duration: var(--m-quick); }
  .rows summary .chev, .hotspot::before, .btn, .stage .rail a::before { transition: none; }
  .thread circle { transition: none; }
  .btn .spin { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

@media (prefers-contrast: more) {
  .band-dark, .theme-dark { --text-2: var(--night-moonlit); --text-3: var(--night-secondary); --line-soft: var(--night-panel-border); --logo-a: 0.04; --pattern-light-a: 0.08; }
  .band-light, .theme-light { --text-2: var(--n-80); --text-3: var(--n-70); --line-soft: var(--n-40); --logo-a: 0.04; }
}
@media (forced-colors: active) {
  .card, .screen, .control, .btn, .tab, .pack-card, .form-result, .privacy-note, .stage, .beat-strip, .try-strip { border: 1px solid CanvasText; }
  .btn--primary { border: 2px solid CanvasText; }
  .emboss, .band-logo, .constellation, .thread { display: none; }
  .status-word::before, .hotspot::before, .check input { forced-color-adjust: none; }
  .hotspot-note { border: 1px solid CanvasText; }
}

/* ---- 20. Print (I10): a clean text document a hapū can hand round ----------------- */
@media print {
  @page { margin: 18mm; }
  html, body, .band, .band-dark, .band-light, .site-header, .site-footer { background: #fff !important; color: #000 !important; }
  .band { padding-block: 10mm; page-break-inside: avoid; --ink: #000; --text-2: #222; --text-3: #333; --accent-text: #000; }
  .emboss, .band-logo, .constellation, .thread, .stage, .beat-strip, .try-strip, .pause-wrap, .scroll-cue, .menu-toggle, .header-cta, .hotspot, .hotspot-note, .hotspot-hint, .site-nav, .skip-link, .try-it { display: none !important; }
  .site-header { position: static; height: auto; border: 0; }
  .beat { opacity: 1 !important; min-height: 0; }
  .btn { border: 1px solid #000; color: #000 !important; background: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 12px; }
  .rows details { display: block; } .rows details > *:not(summary) { display: block; }
  .screen { box-shadow: none; }
}
