/* =====================================================================
   BASE — reset, page ground, type scale, section rhythm, reveal primitive
   No colour value appears here. Everything refers to css/tokens.css.
   ===================================================================== */

*{box-sizing:border-box;margin:0}

/* scroll-behavior:smooth is ANCHOR-JUMP behaviour, not scroll-driven
   motion — this build has none of the latter. It does mean any
   scroll-dependent measurement must set scrollBehavior:'auto' and assert
   asked-vs-got position before sampling, or every sample reads the
   position it started from. */
html{scroll-behavior:smooth}

body{
  background:var(--ground-page);
  color:var(--on-page);
  font-family:var(--sans);
  font-size:16.5px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}

section{padding:110px 34px}
.in{max-width:1180px;margin:0 auto}
.center{text-align:center}

/* visually hidden, still announced */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- type ---- */

h1,h2{
  font-family:var(--serif);
  font-weight:700;
  letter-spacing:.002em;
  line-height:1.16;
  text-wrap:balance;
}
h1{font-size:clamp(36px,4.4vw,60px)}
h2{font-size:clamp(28px,3.4vw,46px)}
h1 em,h2 em{font-style:normal;color:var(--accent)}
h2 em.g{color:var(--gold)}

.body{margin-top:20px;font-size:16.5px;color:var(--on-page-body);max-width:56ch}

/* THE HERO EYEBROW. Three things about this rule are measured rather
   than chosen, and none is visible from the value alone.

   CONTRAST IS FRAGILE HERE. --slate on --paper measures 4.5994 against a
   4.5 threshold — a margin of 0.0994. ANY future move of --slate or
   --paper re-opens it. 11px is below the 18px large-text boundary, so the
   threshold stays 4.5: the size increase buys legibility, NOT a relaxed
   requirement. Do not read a larger eyebrow as licence to darken the
   ground or lighten the ink.

   11px IS A CEILING, NOT A PREFERENCE. The copy is 34 characters of
   letterspaced uppercase mono in a column padded 34px a side. Rendered
   text width is near-perfectly linear at 30.18px per 1px of font-size:
   331.9px at this setting against a 346px column at a 414px viewport —
   14.1px of slack. It holds one line down to 400 and wraps below. 11.5px
   wraps at exactly 414 and holds at 415, so it is the boundary case, not
   a safe step; 12px fails at 430 and 14px at 490.

   AND THE TRAP: the failure width is textWidth + 68px of padding, so a
   2.5px step in type moves the breakpoint by ~75px of VIEWPORT. Small
   steps in type are large steps in breakpoint, and a size estimate cannot
   be sanity-checked against a text-width estimate. ALWAYS MEASURE THE
   BREAKPOINT; predicting the text is legitimate, predicting the
   breakpoint is not.

   letter-spacing stays .26em — em-relative, so it scales on its own. */
.kick{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.26em;
  text-transform:uppercase;
  display:block;
  margin-bottom:18px;
  color:var(--slate);
}

/* ---- the reveal primitive ----
   The ONLY entry mechanism in the build. IntersectionObserver-gated,
   fires once, unobserves, settles. There is no scroll listener and no
   scroll-position read anywhere in this build, by concept-level decision
   — see the register note in js/reveal.js. */
.rv{opacity:0;transform:translateY(16px);transition:opacity .9s ease,transform .9s ease}
.rv.on{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){
  .rv{opacity:1;transform:none;transition:none}
}
