/* Shared tokens. The site is dark-only: there is one palette, declared once. */
:root {
  /* Approved poster palette. The three grounds a full-bleed section can use
     each carry a bare-channel twin, so a gradient can fade one of them out
     over itself instead of towards transparent black. Keep every pair in
     sync. */
  --ref-klein: #002fa7;
  --ref-klein-rgb: 0 47 167;
  --ref-black: #050606;
  --ref-black-rgb: 5 6 6;
  --ref-paper: #eeeee8;
  --ref-paper-rgb: 238 238 232;
  --ref-white: #ffffff;
  --ref-text: #f0efe9;
  --ref-text-support: #ededdf;
  --ref-text-note: #c4c4bd;
  --ref-text-meta: #a1a19b;
  --ref-text-nav: #bcbcb8;
  --ref-line-nav: #555555;
  --ref-line-control: #646760;
  --ref-line-on-klein: #ffffff55;
  --ref-control-surface: #171916;

  --ref-font-display: 'Geist', sans-serif;
  --ref-font-label: var(--font-label);
  --ref-display-weight: 900;
  --ref-display-size: clamp(60px, 7.8vw, 128px);
  --ref-display-leading: .88;
  --ref-display-tracking: -.075em;
  --ref-heading-tracking: -.025em;
  --ref-space-1: 8px;
  --ref-space-2: 12px;
  --ref-space-3: 16px;
  --ref-space-4: 20px;
  --ref-space-5: 24px;
  --ref-gutter: 3.5%;
  --ref-gutter-mobile: 5%;
  --ref-hover-duration: .2s;
  --ref-note-duration: .25s;

  /* Canvas inks: weakest matrix shade first; spectrum stays inside the art. */
  --ref-matrix-0: #101411;
  --ref-matrix-1: #161b17;
  --ref-matrix-2: #1c221d;
  --ref-matrix-3: #232923;
  --ref-matrix-4: #2a3029;
  --ref-matrix-5: #32382f;
  --ref-matrix-6: #3a4036;
  --ref-matrix-7: #444b3f;
  --ref-spectrum-0: #b84a43;
  --ref-spectrum-1: #b1874c;
  --ref-spectrum-2: #b6b074;
  --ref-spectrum-3: #78a77e;
  --ref-spectrum-4: #649caa;
  --ref-spectrum-5: #677bbb;
  --ref-spectrum-6: #96739e;
  --ref-edge-left: #c4cec6;
  --ref-edge-base: #99aca1;
  --ref-edge-right: #c9d6ce;
  --ref-ray-in: #d6dbce;
  --ref-ray-inside: #a5b7b0;
  --ref-aura-color: #97b9d7;
  --ref-halo-color: #bcd8ee;
  /* JS reads bare numbers: aura spread, halo spread and wave bleed in CSS px, cycles per second, fps, step in ms, other times in seconds. */
  --ref-aura-spread: 92;
  --ref-aura-speed: .055;
  /* Halo hugging the prism: falloff distance from its edges, and its breathing rate. */
  --ref-halo-spread: 26;
  --ref-halo-speed: .075;
  /* How far the hero canvas hangs below its own box, so the wave can bite into Works. */
  --ref-wave-bleed: 170;
  /* Wave grain: block size, scroll distance between block exchanges, fade-out seconds. */
  --ref-wave-tile: 18;
  --ref-wave-step: 90;
  --ref-wave-fade: .25;
  --ref-matrix-fps: 30;
  --ref-scramble-step: 90;
  --ref-scramble-cycle: 7;
  --ref-scramble-intro: 2.1;
  --ref-scramble-start: 5.8;
  --ref-scramble-end: 6.65;
}
/* ---------- Design tokens ---------- */
/* Dark is the only theme: form controls and scrollbars follow it. */
:root { color-scheme: dark; }

:root {
  /* One accent, used sparingly, plus ink — the rest is near-black.
     The accent is lifted off the poster's Klein blue (#002FA7) because a link
     in the poster blue cannot clear AA on this ground. The poster blue itself
     survives as a *surface*, in --accent-panel below.
     --accent-rgb is the same colour as bare channels, so translucent variants
     need no second hardcoded value. Keep the two in sync. */
  --accent:     #5b7fff;
  --accent-rgb: 91 127 255;
  --ink:        #eceae6;

  /* surfaces */
  --bg:        #121110;
  --bg-2:      #171614;
  --panel:     #1b1a18;
  --panel-2:   #211f1d;
  --line:      rgba(236, 234, 230, .17);
  --line-2:    rgba(236, 234, 230, .09);

  /* text — worst surface is --panel-2 #211f1d (the lightest one):
     --muted is 6.11 and --muted-2 4.60 against it, ΔE76 8.56 apart. */
  --fg:        #eceae6;
  --fg-dim:    #b8b3aa;
  --muted:     #a49d92;
  --muted-2:   #8d877b;

  --font-plain: 'Libertinus Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Labels — eyebrows, indices, captions, metadata, form labels — are the
     body face at medium weight, and they step back by opacity rather than by
     a grey of their own: white at --label-alpha takes the tint of whatever
     ground it sits on. .72 holds AA on every ground a label crosses: 10.4:1
     on the poster black, 6.2:1 on Klein. */
  --font-label:  var(--font-sans);
  --label-weight: 500;
  --label-alpha: .72;
  --label-ink:   rgb(255 255 255 / var(--label-alpha));

  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* navigation */
  --nav-h: 58px;      /* Height of main nav */
  --nav-top: 14px;    /* distance from the top edge */
  --nav-w: 1080px;    /* shared width of both bars */

  /* Plumbing. --paper-rgb is --bg as bare channels, so glass gradients and
     fades can be written rgb(var(--paper-rgb) / .9).
     --ink-panel is a *surface*: the inverted (near-black) panel used by the
     stack act, the contact buttons and the success mark. It is lifted off the
     ground so it still reads as a panel, and keeps its #faf9f7 text. */
  --paper-rgb: 18 17 16;
  --ink-panel: #1c1b19;
  --ink-panel-fg: #faf9f7;

  /* The accent block that closes the stack act is a surface too, and for the
     same reason: white on the lifted --accent tint is only 3.54:1, and the
     block is white-on-blue by design. So the surface carries its own deep
     blue, lifted like --ink-panel above — white @.9 on it is 7.72:1. */
  --accent-panel: #0a3ab5;
  --accent-panel-fg: #ffffff;

}
