/* =========================================================
   REALM HQ · DESIGN TOKENS — "Classified After Hours"
   One source of truth for colour, type, space, line, shadow and
   motion. Loaded on every page AFTER any page-local <style> so the
   shared values win. Legacy names (--ink, --void, --bone, --gold,
   --hazard …) are kept as aliases so nothing already shipped breaks.
   ========================================================= */
:root{
  /* ---- foundations: near-black + charcoal ---- */
  --ink:#070708;
  --ink-soft:#0c0c0f;
  --ink-lift:#121216;
  --ink-panel:#17171c;
  --void:var(--ink);                 /* legacy alias (self-contained pages) */

  /* ---- bone: warm off-white text ---- */
  --bone:#ebe6d6;
  --bone-dim:#b5ad99;
  --bone-faint:#857e6d;

  /* ---- tarnished gold: the Realm Certified identity ---- */
  --gold:#cfa847;
  --gold-hot:#e8cc7c;
  --gold-dim:#7d6531;
  --gold-ink:rgba(207,168,71,.14);  /* tinted panels / borders */
  --gold-line:rgba(207,168,71,.34);

  /* ---- signal amber (restrained) + warning red (small doses) ---- */
  --signal:#e0a33a;
  --signal-dim:#6e4f1b;
  --red:#c8412d;
  --red-dim:#6d241a;
  --hazard-red:var(--red);           /* homepage legacy: --hazard means red there */

  /* ---- states ---- */
  --ok:#8fd6a4;
  --ok-dim:#2c5e46;
  --realm-green:var(--ok);
  --realm-green-dim:var(--ok-dim);
  /* tier semantics only (LEVEL 02 / applicant) — not a UI accent */
  --realm-purple:#a878ff;
  --realm-purple-dim:#4a2b7a;

  /* ---- lines ---- */
  --border:#1d1d23;
  --border-bright:#2b2b34;
  --line:1px solid var(--border);
  --line-gold:1px solid var(--gold-line);

  /* ---- type ---- */
  --font-display:"Space Grotesk", ui-sans-serif, "Segoe UI", sans-serif;
  --font-body:"Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif:"Cormorant Garamond", ui-serif, Georgia, serif;
  --font-mono:"JetBrains Mono", "Space Mono", ui-monospace, SFMono-Regular, monospace;

  --fs-hero:clamp(2.75rem, 7.2vw, 5.75rem);
  --fs-h2:clamp(2rem, 4.4vw, 3.4rem);
  --fs-h3:clamp(1.35rem, 2.2vw, 1.9rem);
  --fs-lede:clamp(1.05rem, 1.4vw, 1.25rem);
  --fs-body:1rem;
  --fs-meta:.72rem;       /* mono file labels */
  --fs-micro:.62rem;      /* stamps, corner marks */
  --track-meta:.22em;
  --lh-tight:.95;
  --lh-body:1.6;

  /* ---- space (4px base) ---- */
  --s-1:.25rem; --s-2:.5rem; --s-3:.75rem; --s-4:1rem; --s-5:1.5rem;
  --s-6:2rem; --s-7:3rem; --s-8:4.5rem; --s-9:7rem;
  --section-pad:clamp(3.5rem, 8vw, 7rem);
  --gutter:clamp(1rem, 4vw, 2.5rem);
  --measure:62ch;
  --wrap:1180px;

  /* legacy spacing aliases */
  --space-1:var(--s-1); --space-2:var(--s-2); --space-3:var(--s-4);
  --space-4:var(--s-5); --space-5:2.5rem; --space-6:var(--s-8);

  /* ---- radius ---- */
  --radius-sm:3px; --radius-md:6px; --radius-lg:12px;

  /* ---- shadow ---- */
  --shadow-1:0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
  --shadow-2:0 1px 0 rgba(255,255,255,.04) inset, 0 18px 50px rgba(0,0,0,.55);
  --shadow-gold:0 0 0 1px var(--gold-line), 0 12px 40px rgba(207,168,71,.12);

  /* ---- motion ---- */
  --ease-out:cubic-bezier(.2,.8,.2,1);
  --ease-in-out:cubic-bezier(.65,0,.35,1);
  --dur-1:160ms; --dur-2:320ms; --dur-3:640ms;

  /* ---- z-index ladder ---- */
  --z-header:60; --z-drawer:9998; --z-dialog:9999; --z-toast:10000;
}

@media (prefers-reduced-motion: reduce){
  :root{ --dur-1:0ms; --dur-2:0ms; --dur-3:0ms; }
}
