/* ==========================================================================
   The face. Archivo carries a weight axis (100–900) and a width axis
   (62–125), so 'Archivo Narrow' is not a second family — it is this same
   file at a lower wdth. One file, ranges declared here; the coordinates the
   site actually uses are the --ui-* and --body-* tokens below.
   ========================================================================== */
@font-face{
  font-family:'Archivo';
  src:url('assets/fonts/archivo-var-latin.woff2') format('woff2');
  font-weight:100 900;
  font-stretch:62% 125%;
  font-style:normal;
  font-display:swap;
}

/* ==========================================================================
   Reset. iOS Safari inflates type in blocks it decides are body copy, which
   would silently move a font size off the scale in §2. 100% pins it: the
   size the stylesheet asks for is the size that renders, on every device.
   ========================================================================== */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* ==========================================================================
   Anchors. Recession steps by 3/4, the same interval the type scale
   descends by. Row heights differ per category; pitch is derived from them.
   ========================================================================== */
:root{
  --u: 8px;
  --base: calc(var(--u) * 2);

  --s-1: calc(var(--base) * 3 / 4);
  --s0:  var(--base);
  --s1:  calc(var(--base) * 3 / 2);
  --s2:  calc(var(--base) * 9 / 4);
  --s3:  calc(var(--base) * 27 / 8);
  --s4:  calc(var(--base) * 81 / 16);

  --lh-tight:1; --lh-mid:1.25; --lh-body:1.5;

  --sp-1: calc(var(--u) * 1);
  --sp-2: calc(var(--u) * 2);
  --sp-3: calc(var(--u) * 3);
  --sp-4: calc(var(--u) * 4);
  --sp-6: calc(var(--u) * 6);
  --sp-8: calc(var(--u) * 8);

  /* Row geometry, in whole units.
       head  4u   label region, fixed
       gap   3u   between rows
     Landscape 3:2 → tile 24u wide, 16u tall → row 20u
     Poster    2:3 → tile 24u wide, 36u tall → row 40u
     Halves are 10u and 20u. Both integers, which is what lets the
     variable pitch stay exact. */
  --tile-w: calc(var(--u) * 24);
  --head:   calc(var(--u) * 4);
  --strip:  var(--sp-3);

  /* Layout field. 12 divides by 1, 2, 3, 4 and 6, which is why it is 12.
     --measure is a reading width, not a space value: it is an integer
     multiple of --u (64u = 32rem ≈ 68 characters at --s0), but it is not
     drawn from the nine-value space scale, which governs gaps and padding. */
  --cols:    12;
  --gutter:  var(--sp-3);
  --measure: calc(var(--u) * 64);

  /* The split capture is 24:1. A quarter turn makes the box 1:24, so the
     image's long side is the rail's block-size. Both derive from --rail-w. */
  --rail-w: calc(var(--u) * 4);
  --rail-h: calc(var(--rail-w) * 24);

  --stroke: 1px;
  --r-1:    calc(var(--u) / 2);
  --hue: 250;
  --chroma: 0.008;

  --n-0: oklch(0.14 var(--chroma) var(--hue));
  --n-2: oklch(0.38 var(--chroma) var(--hue));
  --n-5: oklch(0.71 var(--chroma) var(--hue));
  --n-7: oklch(0.96 var(--chroma) var(--hue));

  --bg:var(--n-0); --line:var(--n-2); --text-dim:var(--n-5); --text:var(--n-7);

  /* One webfont family, two coordinates. wdth 78 is the closest instance to
     the Archivo Narrow this replaces: cap height and x-height are identical,
     advances differ by at most 35 units/em. It is a fit, not an identity.
     The stacks diverge only below Archivo: font-stretch cannot make a
     fallback narrow, so the interface stack names narrow families itself. */
  --ui-family:   'Archivo','Arial Narrow','Roboto Condensed',system-ui,sans-serif;
  --ui-wdth:     78%;
  --ui-wght:     500;

  --body-family: 'Archivo',system-ui;
  --body-wdth:   100%;
  --body-wght:   400;

  /* Scrims. The interface has no surfaces; these are the only fills. */
  --scrim:     oklch(0.72 0 0 / 0.10);
  --scrim-hi:  oklch(0.72 0 0 / 0.18);
  --strip-bg:  oklch(0.14 0 0 / 0.55);

  /* Tracking. em is correct here: tracking scales with its own type size. */
  --track-s: 0.08em;
  --track-m: 0.12em;
  --track-l: 0.16em;

  --stage-max: 76rem;
}
