/* ultimate-frontend-skills/core.css - the editorial ground layer. Copy verbatim into the project.
   Put per-project choices in site.css, loaded after this. Never edit this file
   inside a project; if a rule is wrong for the brief, override it in site.css. */

/* ================================================================= tokens == */
:root {
  color-scheme: light;

  /* --- colour ----------------------------------------------------------- */
  /* Every neutral lives in hue 60-95. Mixing a cool grey into this makes both
     read as dirty. Never #fff, never #000, never chroma 0.                   */
  --bone-50:   oklch(97.0% 0.008 92);   /* raised surface                    */
  --bone-100:  oklch(95.2% 0.011 91);   /* THE GROUND                        */
  --bone-200:  oklch(92.5% 0.014 90);   /* sunken / alternating band         */
  --bone-300:  oklch(88.0% 0.017 88);   /* body text ON ink                  */
  --sand-400:  oklch(78.0% 0.021 85);   /* muted text on ink                 */
  --stone-500: oklch(62.0% 0.020 80);   /* 3.2:1 on bone - RULES ONLY        */
  --stone-600: oklch(50.0% 0.018 75);   /* 5.2:1 on bone - secondary text    */
  --ink-700:   oklch(38.0% 0.016 70);
  --ink-800:   oklch(27.0% 0.014 65);   /* body text on bone - 12.4:1        */
  --ink-900:   oklch(19.0% 0.010 62);   /* raised surface on ink             */
  --ink-950:   oklch(15.5% 0.008 60);   /* THE DARK GROUND                   */

  /* One accent. Take its HUE from the hero photograph, keep L and C as set:
     a photo's own lightness/chroma is never usable as UI colour.             */
  --accent-h: 62;
  --accent:        oklch(58% 0.072 var(--accent-h));
  --accent-weak:   oklch(92% 0.018 var(--accent-h));
  --accent-strong: oklch(44% 0.079 var(--accent-h));

  /* semantic - only these are used below */
  --bg:        var(--bone-100);
  --bg-raised: var(--bone-50);
  --bg-sunken: var(--bone-200);
  --fg:        var(--ink-800);
  --fg-muted:  var(--stone-600);
  --fg-faint:  var(--stone-500);
  --on-accent: var(--bone-50);
  /* --on-accent on --accent is 4.00:1 - it fails 4.5:1 for a button's own
     label. The accent-filled button that passes is --on-accent on
     --accent-strong (7.28:1). Computed in references/ui.md; use that pair. */
  --accent-fill: var(--accent-strong);
  /* Status. One lightness-and-chroma pair per ground, hue the only variable,
     so it sits inside the palette instead of arriving as a framework red.
     There is deliberately NO warning colour: at this chroma amber clips out
     of sRGB, and hue 75 is too close to the accent to read as a signal. A
     warning is an icon and a word on the ordinary ground. Status never
     travels by colour alone (WCAG 1.4.1) and is only present while live. */
  --danger:  oklch(48% 0.14 28);    /* 6.10:1 on --bone-100 */
  --success: oklch(52% 0.13 150);   /* 4.51:1 on --bone-100 */
  --rule:      color-mix(in oklab, var(--ink-800) 14%, transparent);
  --rule-soft: color-mix(in oklab, var(--ink-800) 8%, transparent);

  /* --- type ------------------------------------------------------------- */
  --font-display: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --font-text:    "Newsreader", "Newsreader Fallback", Georgia, serif;
  --font-ui:      "Instrument Sans", "Switzer", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Fluid scale, 360px -> 1600px. Landed exactly on min at 360 and max at 1600.
     A second, flatter phase above 1600 is defined further down.              */
  --step--2: clamp(0.6875rem, 0.6694rem + 0.0806vw, 0.75rem);   /* 11 -> 12  label   */
  --step--1: clamp(0.8125rem, 0.7944rem + 0.0806vw, 0.875rem);  /* 13 -> 14  caption */
  --step-0:  clamp(1rem,      0.9637rem + 0.1613vw, 1.125rem);  /* 16 -> 18  body    */
  --step-1:  clamp(1.1875rem, 1.0968rem + 0.4032vw, 1.5rem);    /* 19 -> 24  lead    */
  --step-2:  clamp(1.4375rem, 1.2742rem + 0.7258vw, 2rem);      /* 23 -> 32  h4      */
  --step-3:  clamp(1.75rem,   1.4597rem + 1.2903vw, 2.75rem);   /* 28 -> 44  h3      */
  --step-4:  clamp(2.0625rem, 1.6089rem + 2.0161vw, 3.625rem);  /* 33 -> 58  h2      */
  --step-5:  clamp(2.5rem,    1.8468rem + 2.9032vw, 4.75rem);   /* 40 -> 76  h1      */
  --step-6:  clamp(3rem,      1.9839rem + 4.5161vw, 6.5rem);    /* 48 -> 104 hero    */
  --step-7:  clamp(3.5rem,    1.9758rem + 6.7742vw, 8.75rem);   /* 56 -> 140 mega    */

  --measure:       62ch;
  --measure-tight: 52ch;
  --measure-lead:  38ch;
  --measure-display: 16ch;   /* forcing the hero to 3 lines is what makes the space */

  /* --- space ------------------------------------------------------------ */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;   --s-11: 12rem;
  --section-y: clamp(5rem, 3rem + 9vw, 11rem);
  --gutter:    clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --wrap:      78rem;
  --wrap-text: 44rem;

  --radius: 2px;          /* editorial is almost square */
  --radius-lg: 14px;      /* cards and media only */
  --radius-pill: 999px;

  /* --- motion ----------------------------------------------------------- */
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 180ms; --dur-2: 380ms; --dur-3: 720ms; --dur-4: 1200ms;
}

/* Above 1600px keep growing, but far more slowly. Continuous at the seam. */
@media (min-width: 100rem) {
  :root {
    --step-6: clamp(6.5rem, 3.1667rem + 3.3333vw, 8.5rem);    /* 104 -> 136 */
    --step-7: clamp(8.75rem, 4.5833rem + 4.1667vw, 11.25rem); /* 140 -> 180 */
  }
}

/* Dark ground. Sections opt in with data-tone="dark"; the tokens flip, nothing
   else changes. Body text goes to bone-300, not bone-100: full bone on ink is
   18:1 and glares.                                                           */
[data-tone="dark"] {
  color-scheme: dark;
  --bg:        var(--ink-950);
  --bg-raised: var(--ink-900);
  --bg-sunken: #0a0806;
  --fg:        var(--bone-300);
  --fg-muted:  var(--sand-400);
  --fg-faint:  var(--stone-500);
  --rule:      color-mix(in oklab, var(--bone-300) 16%, transparent);
  --rule-soft: color-mix(in oklab, var(--bone-300) 9%, transparent);
  --danger:  oklch(72% 0.13 28);    /* 7.47:1 on --ink-950 */
  --success: oklch(72% 0.13 150);   /* 8.31:1 on --ink-950 */
  -webkit-font-smoothing: antialiased;   /* only on dark: serifs fatten otherwise */
  -moz-osx-font-smoothing: grayscale;
}

/* Metric-matched fallback: kills the swap shift while the webfont loads. */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Times");
  size-adjust: 103.5%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ================================================================== reset == */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-synthesis: none;          /* a missing italic must fail loudly, not shear */
  font-kerning: normal;
  font-optical-sizing: auto;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.62;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, li { overflow-wrap: break-word; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); }

/* A tint of the accent with the ink kept as the text colour reads as a
   highlighter mark on paper. A solid accent block reads as an OS selection. */
::selection      { background: color-mix(in srgb, var(--accent) 22%, transparent);
                   color: var(--fg); text-shadow: none; }
::-moz-selection { background: color-mix(in srgb, var(--accent) 22%, transparent);
                   color: var(--fg); text-shadow: none; }

/* 2px ring + a ground-coloured halo so it survives a busy backdrop. Animate the
   offset, never the opacity. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: inherit;
  box-shadow: 0 0 0 5px var(--bg);
  transition: outline-offset 120ms var(--ease);
}
:focus:not(:focus-visible) { outline: none; }
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText; outline-offset: 2px; box-shadow: none; }
}

/* A fixed header must not cover the thing an anchor jumps to. */
:where([id]) { scroll-margin-top: calc(var(--nav-h, 4.5rem) + 1rem); }

/* =================================================================== type == */
/* Display sets BELOW line-height 1 and with real negative tracking. This one
   pair of numbers separates editorial from template more than the font does. */
.t-mega, .t-hero, h1, h2, h3, .t-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
  text-box: trim-both cap alphabetic;   /* additive; ignored where unsupported */
}
.t-mega { font-size: var(--step-7); line-height: 0.88; letter-spacing: -0.035em; }
.t-hero, h1 { font-size: var(--step-6); line-height: 0.92; letter-spacing: -0.030em;
              max-width: var(--measure-display); }
h2 { font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.018em; max-width: 22ch; }
h3, .t-h3 { font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.012em; }
h4 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2);
     line-height: 1.18; letter-spacing: -0.006em; }

/* Display weight stays 300-400. Presence comes from size and air, never bold. */
.t-mega, .t-hero, h1 { font-variation-settings: "opsz" 72, "wght" 320; }
h2, h3 { font-variation-settings: "opsz" 48, "wght" 360; }

/* The house move: one italic phrase per page, on a verb or an abstract noun,
   never on a product name. font-variation-settings overrides weight, so both
   axes must be restated here.                                                */
.it, .t-hero em, h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: "opsz" 72, "wght" 300;
  letter-spacing: -0.022em;
  padding-inline-end: 0.06em;   /* stop the exit stroke touching the next word */
}

.lead {
  font-size: var(--step-1); line-height: 1.42; letter-spacing: -0.002em;
  color: var(--fg-muted); max-width: var(--measure-lead); text-wrap: pretty;
}
.prose {
  max-width: var(--measure); color: var(--fg-muted); text-wrap: pretty;
  font-variant-numeric: oldstyle-nums proportional-nums;
  hyphens: auto; hyphenate-limit-chars: 8 4 4;
}
.prose--tight { max-width: var(--measure-tight); }
.prose > * + * { margin-top: 1em; }
.caption { font-size: var(--step--1); line-height: 1.45; letter-spacing: 0.004em;
           color: var(--fg-muted); }
.num, .data { font-variant-numeric: lining-nums tabular-nums;
              font-feature-settings: "tnum" 1, "lnum" 1; }

/* The eyebrow. 500 not 600 - 600 reads shouty at 11px. The negative margin
   cancels the trailing letterspace so the label aligns optically.            */
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--step--2); font-weight: 500; line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.18em; margin-inline-end: -0.18em;
  color: var(--fg-muted);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-box: trim-both cap alphabetic;
}
.eyebrow--ruled { display: flex; align-items: center; gap: 1rem; }
.eyebrow--ruled::after { content: ""; flex: 1 1 auto; height: 1px;
  background: color-mix(in oklab, currentColor 40%, transparent); }
.eyebrow .idx { font-family: var(--font-mono); letter-spacing: 0.06em; opacity: 0.7; }

/* ================================================================= layout == */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: var(--wrap-text); }

/* 12 columns with named breakout lines. Children sit in the content band
   unless they ask for `full`.                                               */
.grid {
  display: grid;
  grid-template-columns:
    [full-start] var(--gutter)
    [content-start] repeat(12, minmax(0, 1fr))
    [content-end] var(--gutter) [full-end];
  column-gap: clamp(0.75rem, 1.4vw, 1.5rem);
  width: 100%;
}
.grid > * { grid-column: content; }
.grid > .bleed { grid-column: full; }
@media (max-width: 48rem) {
  .grid { grid-template-columns:
    [full-start] var(--gutter) [content-start] repeat(4, minmax(0,1fr)) [content-end] var(--gutter) [full-end]; }
  /* every explicit column span collapses on small screens */
  .grid > [style*="grid-column"] { grid-column: content !important; }
}

.section { padding-block: var(--section-y); background: var(--bg); color: var(--fg); }
.section--tight { padding-block: calc(var(--section-y) * 0.55); }
.section--flush { padding-block: 0; }
.stack > * + * { margin-top: var(--flow, var(--s-5)); }
.rule { border: 0; border-top: 1px solid var(--rule); }

/* ================================================================= header == */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  padding: var(--s-4) var(--gutter);
  font-family: var(--font-ui); font-size: var(--step--1);
  color: var(--nav-ink, var(--bone-50));
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease),
              padding var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
/* The light default assumes a photograph, a canvas or a dark ground under the
   header. A hero with none of those - hero-split's type-and-object opener on
   the bone ground - was getting bone-50 text on bone, near-invisible until the
   nav stuck. Flat heroes take the page ink instead. */
body:has(.hero:not(:has(.hero__media, canvas, .on-media)):not([data-tone="dark"])) .nav:not(.is-stuck) {
  color: var(--nav-ink, var(--fg));
}
.nav__brand { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.04em; }
.nav__links { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); list-style: none; padding: 0; }
.nav a { text-decoration: none; opacity: 0.86; }
.nav a:hover { opacity: 1; }
.nav.is-stuck {
  background: color-mix(in oklab, var(--bone-100) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: var(--ink-800); border-bottom-color: var(--rule-soft);
  padding-block: calc(var(--s-4) * 0.62);
}
/* The phone navigation.
   A nav that vanishes under a breakpoint is not responsive, it is broken, and
   `.nav__links { display: none }` on its own was exactly that. The disclosure
   below replaces them. It is a <details>, so it opens with JavaScript off and
   the summary already carries the button role and the expanded state. */
.nav__menu { display: none; }
.nav__menu > summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; margin-right: -10px;       /* 44px: a real target */
  border-radius: 999px; color: inherit;
}
.nav__menu > summary::-webkit-details-marker { display: none; }
.nav__menu > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.nav__menu[open] > summary .nav__bar1 { transform: translateY(5px) rotate(45deg); }
.nav__menu[open] > summary .nav__bar2 { opacity: 0; }
.nav__menu[open] > summary .nav__bar3 { transform: translateY(-5px) rotate(-45deg); }
.nav__menu svg path { transform-origin: center; transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .12s linear; }
.nav__panel {
  position: fixed; inset: var(--nav-h, 68px) 0 auto 0;
  background: var(--bg); color: var(--fg);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 6vw, 2.5rem) var(--gutter, 1.25rem) clamp(2rem, 8vw, 3rem);
  max-height: calc(100dvh - var(--nav-h, 68px)); overflow-y: auto;
}
.nav__panel ul { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .25rem; }
.nav__panel a { display: block; padding: .7rem 0; font-size: 1.375rem; opacity: 1; }
.nav__panel > .btn { width: 100%; justify-content: center; }

@media (max-width: 46rem) {
  .nav__links { display: none; }
  /* The header CTA duplicates the one inside the panel; keeping both puts two
     identical links in the tab order two elements apart. */
  .nav__cta { display: none; }
  .nav__menu { display: block; }
}
@media (prefers-reduced-motion: reduce) { .nav__menu svg path { transition: none; } }

/* ================================================================ buttons == */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-ui); font-size: var(--step--1); font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: 0.72em 1.4em; border-radius: var(--radius-pill);
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.btn:hover { transform: translateY(-1px); opacity: 0.88; }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: currentColor; color: var(--bg); opacity: 1; }

/* Underline that grows in from the left and retreats to the right. The trick is
   that background-position is NOT transitioned, so the anchor flips instantly.
   background-size (not a ::after) is what makes it work on a wrapped link. */
.link {
  text-decoration: none; padding-bottom: 2px;
  background-image: linear-gradient(currentColor 0 0);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 100% calc(100% - 0.06em);
  transition: background-size var(--dur-2) var(--ease), background-position 0s;
}
.link:hover, .link:focus-visible {
  background-size: 100% 1px;
  background-position: 0% calc(100% - 0.06em);
}

/* Body links that are not .link get a considered default: the rule sits low and
   is quieter than the text. */
.prose a:not(.btn):not(.link) {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color var(--dur-1) var(--ease);
}
.prose a:not(.btn):not(.link):hover { text-decoration-color: currentColor; }

/* =================================================================== hero == */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center;
        isolation: isolate; overflow: clip; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover;
        filter: saturate(0.86) contrast(1.04) brightness(0.94); }

/* Eased scrim. A two-stop black gradient produces a visible Mach band; this
   approximates an ease-out and is tinted with the ink, never pure black.     */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top in oklab,
    rgb(15 11 9 / 0.86) 0%,  rgb(15 11 9 / 0.83) 8%,  rgb(15 11 9 / 0.75) 17%,
    rgb(15 11 9 / 0.63) 27%, rgb(15 11 9 / 0.48) 38%, rgb(15 11 9 / 0.34) 50%,
    rgb(15 11 9 / 0.21) 62%, rgb(15 11 9 / 0.12) 74%, rgb(15 11 9 / 0.05) 86%,
    rgb(15 11 9 / 0)   100%);
}
.hero__inner { position: relative; padding-block: var(--s-10); }
.hero__inner.center { text-align: center; }
.hero__inner.center h1, .hero__inner.center .t-hero { margin-inline: auto; }

/* Second line pushed right - the staggered launch-page headline. */
.display__b { display: block; padding-inline-start: clamp(0rem, 12vw, 9rem); }

/* Type sitting directly on photography. The halo is zero-offset and very wide:
   a small offset with a small blur is a drop shadow and reads as a slide deck. */
.on-media { color: var(--bone-100); }
.on-media h1, .on-media h2, .on-media .t-hero, .on-media .t-mega {
  text-shadow: 0 0 40px rgb(15 11 9 / 0.42), 0 0 12px rgb(15 11 9 / 0.24),
               0 1px 2px rgb(15 11 9 / 0.14);
}
.on-media .eyebrow { color: color-mix(in oklab, var(--bone-100) 78%, transparent); }
.on-media .lead, .on-media .prose, .on-media .caption,
.on-media .stat__label { color: color-mix(in oklab, var(--bone-100) 86%, transparent); }
/* A paragraph on a photo gets a local backdrop instead of a shadow. */
.on-media__block { background: rgb(15 11 9 / 0.18); padding: var(--s-5) var(--s-6);
  -webkit-backdrop-filter: blur(14px) saturate(0.85) brightness(0.7);
  backdrop-filter: blur(14px) saturate(0.85) brightness(0.7); }

/* =========================================================== index leaders == */
.index { list-style: none; padding: 0; max-width: 36rem; font-size: var(--step--1); }
.index li { display: flex; align-items: baseline; gap: 0.6rem; padding-block: 0.42rem; }
/* the row is the target: 24px minimum, per WCAG 2.5.8 */
.index a { padding-block: 0.2rem; }
.index__n { flex: none; font-family: var(--font-mono); font-size: 0.9em; opacity: 0.7;
            font-variant-numeric: tabular-nums; }
.index__dots { flex: 1 1 auto; height: 0.62em; min-width: 2rem;
               border-bottom: 1px dotted currentColor; opacity: 0.42; }
.index__label { flex: none; }
.index a { text-decoration: none; }
.index li:hover .index__dots { opacity: 0.75; }

/* ================================================================== stats == */
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(2rem, 7vw, 6rem);
         list-style: none; padding: 0; }
.stat { text-align: center; max-width: 15rem; }
.stat__n { font-family: var(--font-display); font-size: var(--step-4); font-weight: 400;
           line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat__label { margin-top: var(--s-3); font-family: var(--font-ui); font-size: var(--step--2);
               font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em;
               line-height: 1.5; color: var(--fg-muted); }

/* ================================================================== cards == */
.cards { display: grid; gap: var(--s-4); list-style: none; padding: 0;
         grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cards--rail { display: flex; gap: var(--s-4); overflow-x: auto; list-style: none;
               scroll-snap-type: x mandatory; padding: 0 0 var(--s-4);
               scrollbar-width: thin; overscroll-behavior-x: contain; }
.cards--rail > * { flex: 0 0 min(20rem, 74vw); scroll-snap-align: start; }

.card { padding: var(--s-5); border-radius: var(--radius-lg);
        background: color-mix(in oklab, var(--bg-raised) 92%, transparent);
        border: 1px solid var(--rule-soft);
        transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
.card:hover { transform: translateY(-3px); border-color: var(--rule); }
.card--glass {
  background: rgb(255 255 255 / 0.13); color: var(--bone-50);
  border: 1px solid rgb(255 255 255 / 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 22px 50px -28px rgb(15 11 9 / 0.6);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card--glass { background: rgb(15 11 9 / 0.66); }
}

/* ================================================================== media == */
.frame { position: relative; background: var(--bg-sunken); border: 1px solid var(--rule-soft);
         border-radius: var(--radius); overflow: clip; }
.frame > img { width: 100%; }
figcaption { margin-top: var(--s-3); font-family: var(--font-ui); font-size: var(--step--2);
             font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
             color: var(--fg-muted); }

/* Annotation: a dot on the object, a hairline, a label. */
.callout { position: absolute; display: flex; align-items: center; font-family: var(--font-ui);
           font-size: var(--step--2); font-weight: 500; letter-spacing: 0.12em;
           text-transform: uppercase; color: var(--fg-muted); }
.callout::before { content: ""; width: 5px; height: 5px; border-radius: 50%;
                   background: currentColor; flex: none; }
.callout::after { content: ""; height: 1px; width: var(--leader, 3.5rem);
                  background: currentColor; opacity: 0.55; }
.callout > span { padding-inline-start: 0.5rem; white-space: nowrap; }
.callout[data-side="left"] { flex-direction: row-reverse; }
.callout[data-side="left"] > span { padding-inline: 0 0.5rem; }

/* ======================================================== layered "3D" ===== */
/* Depth without a 3D engine: one grid cell, several layers, each pulled at a
   different rate by data-px. This is the exploded view and the parallax hero. */
.layers { position: relative; display: grid; isolation: isolate; }
.layers > * { grid-area: 1 / 1; }
.layer { will-change: transform; }
.layer--fg { z-index: 3; } .layer--mid { z-index: 2; } .layer--bg { z-index: 1; }
[data-tilt] { transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
              transition: transform 400ms var(--ease); }

.exploded { position: relative; aspect-ratio: 4 / 5; max-width: 34rem; margin-inline: auto; }
.exploded .part { position: absolute; inset-inline: 0; margin-inline: auto;
                  filter: drop-shadow(0 26px 40px rgb(15 11 9 / 0.45)); }

.wordmark { font-family: var(--font-display); font-weight: 400;
            font-size: clamp(3.5rem, 14vw, 15rem); line-height: 0.86;
            letter-spacing: 0.06em; text-transform: uppercase;
            color: color-mix(in oklab, var(--bone-50) 90%, transparent);
            text-align: center; user-select: none; max-width: none; }

/* ================================================== tables, steps, faq ===== */
.spec { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.spec th, .spec td { text-align: start; padding: var(--s-4) 0;
                     border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.spec th { font-family: var(--font-ui); font-weight: 500; font-size: var(--step--2);
           text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-muted);
           width: 34%; padding-inline-end: var(--s-5); }
.spec td { font-variant-numeric: lining-nums tabular-nums; }

.steps { counter-reset: step; display: grid; gap: 0; list-style: none; padding: 0; }
.steps > li { counter-increment: step; display: grid; gap: var(--s-2);
              grid-template-columns: 3.5rem 1fr; padding-block: var(--s-6);
              border-top: 1px solid var(--rule-soft); }
.steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono);
              font-size: var(--step--2); letter-spacing: 0.1em; color: var(--fg-faint);
              padding-top: 0.65em; }
.steps > li > * { grid-column: 2; }
@media (max-width: 34rem) { .steps > li { grid-template-columns: 2.5rem 1fr; } }

.faq > details { border-top: 1px solid var(--rule-soft); }
.faq > details:last-of-type { border-bottom: 1px solid var(--rule-soft); }
.faq summary { display: flex; justify-content: space-between; gap: var(--s-4);
               align-items: baseline; cursor: pointer; padding-block: var(--s-5);
               font-family: var(--font-display); font-size: var(--step-3);
               line-height: 1.2; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-ui); font-size: 1rem;
                      color: var(--fg-faint); transition: transform var(--dur-2) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { padding-block-end: var(--s-6); }

.field { display: grid; gap: var(--s-2); }
.field > label { font-family: var(--font-ui); font-size: var(--step--2); font-weight: 500;
                 text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-muted); }
.field input, .field textarea, .field select {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: var(--s-3) 0; border-radius: 0; font-family: var(--font-text);
  transition: border-color var(--dur-1) var(--ease); }
.field :is(input, textarea, select):focus { border-bottom-color: var(--accent); }
/* Keyboard focus keeps a real ring. Removing the outline and leaning on a
   border colour is the single most common focus defect there is. */
.field :is(input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Validation, with no script. :user-invalid matches only after the visitor
   has interacted with the field, so the error never appears on a keystroke
   before the first blur - the timing rule in references/craft.md, enforced by
   the browser. The message is in the markup, tied by aria-describedby, and
   the colour reinforces it rather than carrying it. Native bubbles still
   fire on submit as the fallback for anything :user-invalid misses. */
.field__error { display: none; margin: 0; font-family: var(--font-ui); font-size: var(--step--2); color: var(--danger); }
.field:has(:user-invalid) .field__error { display: block; }
.field :is(input, textarea, select):user-invalid { border-bottom-color: var(--danger); }

.marquee { overflow: clip; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee > * { display: inline-block; padding-inline-end: 2em; animation: slide 32s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ================================================================ texture == */
/* 35mm grain. fractalNoise + saturate 0 + stitchTiles are all mandatory.
   If you can see it, it is too strong.                                      */
.grain { position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-repeat: repeat; opacity: 0.055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-tone="dark"] .grain, .grain--ink { opacity: 0.13; mix-blend-mode: overlay; }

/* Camera vignette: centre above the middle, zero out to 48%, peak under 0.4. */
.vignette::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(125% 95% at 50% 42% in oklab,
    rgb(15 11 9 / 0) 0%, rgb(15 11 9 / 0) 48%, rgb(15 11 9 / 0.05) 63%,
    rgb(15 11 9 / 0.13) 76%, rgb(15 11 9 / 0.24) 88%, rgb(15 11 9 / 0.36) 100%); }

/* ================================================================ reveals == */
/* The default state is VISIBLE. Motion is added inside the guards, so a browser
   that supports none of this shows a finished page rather than a blank one.
   Stagger comes from --i, because animation-delay does nothing on a scroll
   timeline - the range has to move instead.                                  */
.r { --i: 0; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .r {
      opacity: 0;
      animation: rise linear both;   /* linear: the scroll position IS the easing */
      animation-timeline: view();    /* must come AFTER the shorthand, which resets it */
      animation-range: entry calc(8% + var(--i) * 5%) cover calc(28% + var(--i) * 5%);
    }
  }
  html.js-reveal .r {
    opacity: 0; transform: translateY(16px);
    transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
    transition-delay: calc(var(--i) * 90ms);
  }
  html.js-reveal .r.is-in { opacity: 1; transform: none; }
}
.r-2 { --i: 1; } .r-3 { --i: 2; } .r-4 { --i: 3; } .r-5 { --i: 4; }
/* A list of reveals numbers itself: put .stagger on the list, not on a section
   that also holds the heading. sibling-index() is Baseline newly available
   since 2026-08-18 (Chrome 138, Firefox 154, Safari 26.2). It is 1-based and
   counts every element sibling, hence the -1. Capped at 6 steps, 540 ms on the
   IntersectionObserver path; past that the rest arrive together. A browser
   without it drops this rule: .r-2 ... .r-5 on the items are the fallback and
   give the same numbers, and with neither the items reveal together.       */
@supports (order: sibling-index()) {
  .stagger > .r { --i: min(sibling-index() - 1, 6); }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.progress { position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 2px;
            width: 100%; transform-origin: 0 50%; transform: scaleX(0);
            background: var(--accent); z-index: 60; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root block); }
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================== utilities == */
.center { text-align: center; margin-inline: auto; }
.caps { text-transform: uppercase; letter-spacing: 0.18em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sr-skip { position: fixed; top: -100%; left: var(--gutter); z-index: 100;
  background: var(--ink-800); color: var(--bone-50); padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); }
.sr-skip:focus { top: var(--s-3); }

/* One global brake. Every animation in the project must survive this. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
    animation-timeline: auto !important;
  }
  .r, .layer, .part, [data-px] { opacity: 1 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════ WebGL gradient (gradient.js) ══ */
.gradient { position: absolute; inset: 0; width: 100%; height: 100%;
            display: block; z-index: -2; }
.gradient--fixed { position: fixed; }

/* ═════════════════════════════════════════════ three-plane depth (depth.js) ══ */
/* Every plane in one grid cell. The signed data-depth decides rate, blur and
   haze together, so a far plane cannot accidentally look near. */
.depth { position: relative; display: grid; isolation: isolate; overflow: clip; }
.depth > * { grid-area: 1 / 1; }
.depth .plane { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
/* A plane that translates must overscan, or its edge walks into frame. */
.depth .plane { scale: 1.12; }
.depth__gl { width: 100%; height: 100%; display: block; }

/* ═══════════════════════════════════════════ exploded view (exploded.js) ══ */
.exploded { position: relative; width: 100%; aspect-ratio: 1 / 1;
            max-width: 40rem; margin-inline: auto; }
.exploded__gl { position: absolute; inset: 0; }
.exploded__gl canvas { width: 100% !important; height: 100% !important; display: block; }
.exploded__tags { position: absolute; inset: 0; pointer-events: none; overflow: clip; }
.exploded__tag {
  position: absolute; top: 0; left: 0; opacity: 0; white-space: nowrap;
  font-family: var(--font-ui); font-size: var(--step--2); font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted);
  transition: opacity 240ms var(--ease);
}
.exploded__tag > span { position: relative; padding-left: 2.4rem; }
.exploded__tag > span::before { content: ""; position: absolute; left: 0; top: 50%;
  width: 2rem; height: 1px; background: currentColor; opacity: .5; }
.exploded__tag > span::after { content: ""; position: absolute; left: -3px; top: 50%;
  width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--accent); }

/* The list is the content AND the fallback. It only hides once 3D is live. */
.exploded__list { counter-reset: l; list-style: none; padding: 0; margin: 0;
  display: grid; align-content: center; height: 100%; }
.exploded__list li { counter-increment: l; border-top: 1px solid var(--rule-soft);
  padding-block: var(--s-4); font-family: var(--font-ui); font-size: var(--step--1); }
.exploded__list li::before { content: counter(l, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-faint);
  margin-right: var(--s-4); }
.exploded.is-live .exploded__list { display: none; }

@media (prefers-reduced-motion: reduce) {
  .depth .plane { transform: none !important; scale: 1; }
}

/* ══════════════════════════════════════════ the launch-page sky (sky.js) ══ */
.sky { position: absolute; inset: 0; z-index: -2;
       background: linear-gradient(178deg in oklab, #2f6fb8, #e8d3b4); }
.sky__gl { position: absolute; inset: 0; }
.sky__gl canvas { width: 100% !important; height: 100% !important; display: block; }
/* the palette dots: the page's one piece of chrome, bottom-left like the
   reference, and operable by keyboard because they are real buttons */
.sky__dots { position: absolute; left: var(--gutter); bottom: var(--s-5);
             display: flex; gap: var(--s-3); z-index: 2; }
.sky__dot { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
            background: transparent; cursor: pointer; display: grid; place-items: center; }
/* the visible dot is 14px; the target around it is 26px, per WCAG 2.5.8 */
.sky__dot::before { content: ""; width: 14px; height: 14px; border-radius: 50%;
            background: var(--dot); border: 1px solid rgb(255 255 255 / .45);
            transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.sky__dot[aria-pressed="true"]::before { box-shadow: 0 0 0 3px rgb(255 255 255 / .5); }
.sky__dot:hover::before { transform: scale(1.15); }
.sky__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* sky.js near plane: the branch in the lower-right corner, out of focus. The
   engine sets the blur radius inline as a fraction of the frame height; this
   value only holds until it does.                                           */
.sky__near { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  filter: blur(2.6px); opacity: .92; }
/* The reference has no scrim at all: its clouds part behind the type. Keep
   only enough to hold the contents list; more greys the horizon the engine
   just painted.                                                             */
.hero:has([data-sky]) .hero__scrim { opacity: .18; }
/* exploded.js: a vignette, so the object sits in a lit space and not on a flat fill */
.exploded__gl::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 46%, rgb(0 0 0 / .32) 100%); }
