/* THE TOKEN FILE. G2, G3, G9.
 *
 * Every colour, type size, weight, tracking and spacing step the site is
 * allowed to use is declared here. `npm run lint:tokens` fails the build on any
 * hard-coded colour, type size or spacing value found outside this directory —
 * across .css, .ts, .tsx, inline style attributes and SVG presentation
 * attributes (1D-13 proves the lint catches each of those syntaxes).
 *
 * COLOUR CONVICTION (G3). The subject is aluminium, olive drab, cast iron and
 * oxidised bronze, and the brightest thing on any page must be the 3D canvas
 * itself. The ground is therefore a cool neutral graphite — measurably cool,
 * hue ~220, never a pure black — and the single accent family is a warm oxide
 * drawn from the corrosion on the objects themselves. One accent family, warm,
 * on a cool ground: that is the whole colour argument.
 *
 * There is no #FFFFFF and no #000000 anywhere in this file, and 1D-05 asserts
 * neither appears in the built CSS either.
 */

:root {
  /* ── ground, coolest to lightest ─────────────────────────────────────── */
  --g-ink-900: #0c0f14; /* page ground */
  --g-ink-800: #11151c; /* section ground */
  --g-ink-700: #171c25; /* raised surface */
  --g-ink-600: #1f2531; /* card / well */
  --g-ink-500: #2a313f; /* hover surface */
  --g-line: #333b4a; /* hairline */
  --g-line-strong: #47526580;

  /* ── ink on ground. Never pure white. ────────────────────────────────── */
  --g-text: #dde3ec;
  --g-text-dim: #9aa4b4;
  /* Was #6e7889, which measured 3.45–4.31:1 and failed WCAG AA on EVERY ground
     in this file. It carries labels, ordinals and definition terms — all small
     text, where 4.5:1 applies. Raised to clear 4.65:1 against the lightest
     ground rather than patching the one selector axe happened to name first. */
  --g-text-faint: #848e9f;

  /* ── the one accent family: oxide. Set per collection theme. ─────────── *
   * USAGE RULE, measured not assumed: `--g-accent` is for strokes, rules,
   * fills and underlines ONLY. Accent TEXT always uses `--g-accent-bright`,
   * because the base accent falls under 4.5:1 on the lighter grounds for two
   * of the four themes. Every `--g-accent-bright` clears 4.5:1 on every ground
   * in this file (space 6.36, military 6.94, agrarian 7.42, industrial 5.07
   * against --g-ink-600, the lightest ground text ever sits on). */
  --g-accent: #c2703a;
  --g-accent-bright: #e79355;
  --g-accent-dim: #7d4726;
  --g-accent-wash: #c2703a1f;

  /* ── state ───────────────────────────────────────────────────────────── */
  --g-focus: #7fb4d6;
  /* The colour of a thing that is not available. Still ≥4.4:1 on every ground:
     an absence a visitor cannot read is not an honest absence. */
  --g-absent: #808b9d;

  /* ── type: three roles, three families, self-hosted (G1) ─────────────── */
  --g-face-display: 'Archivo Variable', ui-sans-serif, system-ui, sans-serif;
  --g-face-body: 'Newsreader Variable', ui-serif, Georgia, serif;
  --g-face-mono: 'Martian Mono Variable', ui-monospace, monospace;

  /* ── the type scale (G2). No size outside this list. ─────────────────── */
  --g-size-display: 5.75rem; /* 92px @1440 — high commit, ≥72px */
  --g-size-display-sm: 2.75rem; /* 44px @375 */
  --g-size-h2: 2.125rem; /* 34px */
  --g-size-h3: 1.375rem; /* 22px */
  --g-size-body: 1.1875rem; /* 19px — inside 18–24 */
  --g-size-small: 0.9375rem; /* 15px */
  --g-size-label: 0.75rem; /* 12px — inside 11–13 */

  --g-leading-display: 0.94;
  --g-leading-tight: 1.2;
  --g-leading-body: 1.58; /* inside 1.5–1.65 */

  --g-track-display: -0.035em; /* inside −0.02…−0.06 */
  --g-track-label: 0.09em; /* inside +0.05…+0.12 */
  --g-track-normal: 0;

  --g-weight-display: 800; /* ∉ {400, 700} — variable instance */
  --g-weight-strong: 620;
  --g-weight-body: 400;
  --g-weight-label: 560;

  /* ── spacing scale. No ad-hoc margin or padding. ─────────────────────── */
  --g-space-1: 0.25rem;
  --g-space-2: 0.5rem;
  --g-space-3: 0.75rem;
  --g-space-4: 1rem;
  --g-space-5: 1.5rem;
  --g-space-6: 2rem;
  --g-space-7: 3rem;
  --g-space-8: 4rem;
  --g-space-9: 6rem;
  --g-space-10: 8rem;

  /* ── measure, radius, rail ───────────────────────────────────────────── */
  --g-measure: 34rem;
  --g-measure-wide: 68rem;
  --g-radius: 2px; /* machined, not rounded */
  --g-rail: 4.5rem; /* the left nav rail (G10) */
  --g-hairline: 1px;
  --g-tick: 10px; /* corner tick length on CTAs */

  /* ── motion (G6). Entrance 600–1200ms total, stagger 40–80ms. ────────── */
  --g-dur-micro: 180ms; /* 150–300ms micro-interactions */
  --g-dur-entrance: 720ms;
  --g-stagger: 60ms;
  --g-ease-out: cubic-bezier(0.16, 0.84, 0.32, 1);

  /* ── texture (G4): drafting-sheet rule, derived from the subject ─────── */
  --g-grid-fine: 8px;
  --g-grid-coarse: 64px;
  --g-grain-opacity: 0.055;
}

/* Reduced motion is a token-level switch, not a per-component afterthought:
   every duration collapses to zero and final states render instantly (G6). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --g-dur-micro: 0ms;
    --g-dur-entrance: 0ms;
    --g-stagger: 0ms;
  }
}

/* ── 1E APPEND BLOCK ─────────────────────────────────────────────────────────
 *
 * §B.3: base.css is a FROZEN INPUT. Amendments are append-only, in this
 * designated block, and nothing above this marker may change — not a value, not
 * an order, not a reformat. 1E-05 reads the frozen bytes from the commit and
 * compares property, value and order.
 *
 * Colour, type scale and radius are settled. This block adds exactly one new
 * colour, because the alternative was leaving §B.3's ratio-and-threshold
 * machinery as dead code over an empty set.
 *
 * --g-cut is the drafting-sheet cut edge (§E). Usage category: non-text-ui,
 * threshold 3:1. Measured against every ground in this file: 7.82 / 7.46 / 6.96
 * / 6.26 / 5.32 : 1. It is deliberately cooler and dimmer than the accent
 * family so a cut edge reads as a DRAWN LINE rather than a highlight — a clip
 * plane must not look like an interactive affordance, and it must not look like
 * material the ledger cannot vouch for.
 */
:root {
  --g-cut: #8fa9bb;
  --g-cut-width: 1px;
  --g-vignette-stop: 62%;
  --g-stage-ratio: 16 / 10;
}
