/* Typography.
   Revised 2026-08-31 to the site brief's §2. Display is now a humanist SANS, not a
   serif: her "heading font of salt" note points at Salt's humanist sans heading face.

   Display: Cabin — Gill Sans lineage, humanist, OFL. Regular-to-medium weight with
   near-normal tracking, as the brief specifies.
   Body: Plus Jakarta Sans — geometric and open, the face Pastel Geometry names.

   The Optima / Avenir Next / Gill Sans names the brief lists sit in the fallback
   stack so production degrades toward her reference rather than toward Arial.
   Google import lives in tokens/fonts.css — read the CSP note there before shipping
   either face to production.

   --serif is retained as a deprecated alias only. Nothing new should reach for it:
   her wordmark is a classical serif and setting page type in a *different* serif
   beside it was the flaw in the old pairing. */
:root{
  --display:"Cabin",Optima,"Avenir Next","Gill Sans","Gill Sans MT",system-ui,sans-serif; /* @kind font */
  --sans:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif; /* @kind font */
  --serif:var(--display); /* deprecated — see note above */

  --font-display:var(--display);
  --font-body:var(--sans);

  /* body scale.
     EVERY size is rem, not px — including the small labels. A px font-size ignores
     the visitor's browser font-size setting entirely, so a reader who set 20px as
     their default still gets 17px from us. rem honours it and scales the whole
     scale proportionally. This is WCAG 1.4.4 (Resize Text), and it is the reason
     this system ships no font-size widget: the browser already has one, and a
     custom control is usually a sign the page does not respond to the real one. */
  --text-base:1.0625rem;   /* 17px at a 16px root */
  --leading-body:1.6; /* @kind other */

  /* fluid display sizes. The preferred term carries BOTH a rem and a vw component:
     a pure-vw preferred term is font-size-independent, so it pins the heading to the
     viewport and blocks the reader's browser font-size setting until the rem floor
     eventually overtakes it. Measured before the fix: at a 20px root, body grew 25%
     and h1 grew 0%. Endpoints are unchanged; only the slope now includes rem.

     The preferred term is wrapped in calc() deliberately. Written bare as
     `clamp(2.3rem, 1.3rem + 2.9vw, 3.7rem)`, a comma-splitting parser reads the
     fragment `+ 2.9vw` as a font-family name. calc() keeps the math inside one
     comma-segment. Identical computed value — do not unwrap it. */
  --text-h1:clamp(2.3rem,calc(1.3rem + 2.9vw),3.7rem);
  --text-h1-leading:1.05; /* @kind other */
  --text-h2:clamp(1.7rem,calc(.85rem + 1.9vw),2.5rem);
  --text-h2-leading:1.12; /* @kind other */
  --text-h3:1.22rem;
  --text-h3-leading:1.25; /* @kind other */
  --text-lead:clamp(1.05rem,calc(.45rem + 1.1vw),1.24rem);

  --text-sm:.98rem;
  --text-xs:.92rem;
  --text-2xs:.85rem;
  --text-fine:.82rem;

  /* the eyebrow — a fixed, non-fluid label. rem so it tracks the reader's setting. */
  --text-eyebrow:.78rem;   /* 12.5px */
  --tracking-eyebrow:.16em;
  --text-tag:.625rem;      /* 10px */
  --tracking-tag:.09em;
  --text-lockup-sub:.656rem; /* 10.5px */
  --tracking-lockup-sub:.14em;
  --text-caption:.688rem;  /* 11px */
  --tracking-caption:.08em;

  /* Cabin is lighter per stem than Newsreader was, so display sits at 500 and only
     goes to 600 where a heading has to hold against a tint field. */
  --weight-display:500; /* @kind other */
  --weight-body:400; /* @kind other */
  --weight-medium:500; /* @kind other */
  --weight-semibold:600; /* @kind other */
  --weight-bold:700; /* @kind other */

  /* near-normal tracking, per the brief — the old serif's slight negative is gone */
  --tracking-display:0em;

  /* headings are balanced, body copy is pretty */
  --wrap-display:balance; /* @kind other */
  --measure-lead:60ch; /* @kind spacing */
  --measure-prose:56ch; /* @kind spacing */
  --measure-fine:62ch; /* @kind spacing */
}
