/* Ascendance3D design tokens — v1 (locked).
 * Source of truth for colour: Ascendance_Open_Worlds_Web_Brand_Kit_v1 (web/brand-tokens.css).
 * The eight brand colours are locked hex values; they are NOT converted or re-tuned.
 * Derived tokens (surfaces, rules, text steps) are tints of Archive Black / Slate toward the brand blue.
 * Every colour and font in page CSS must come through one of these names. See DESIGN.md.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-var-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* ── Brand colours (locked) ─────────────────────────────── */
  --archive-black:   #0B0D12; /* primary dark environment */
  --ascendance-blue: #3A7AFE; /* identity, primary accent */
  --deep-blue:       #245EEA; /* depth, active state */
  --spatial-cyan:    #52D7E8; /* 3D / runtime / engineering highlights */
  --world-white:     #F4F7FB; /* primary light type */
  --archive-amber:   #D89A3D; /* preservation, history, provenance ONLY */
  --signal-green:    #32B875; /* verified / restored / passing ONLY */
  --slate:           #8290A3; /* supporting metadata */

  /* ── Derived surfaces (from brand-kit --aow-surface / --aow-surface-2) ── */
  --surface:        #121722;
  --surface-2:      #192231;
  --rule:           #232C3B;  /* hairlines on archive-black */
  --rule-strong:    #34405A;  /* hairlines that must be seen (control borders) */
  --ink-2:          #B9C3D2;  /* secondary text, 10.9:1 on archive-black */
  --scrim:          #0B0D12E6; /* archive-black at 90% — overlays on the 3D stage only */
  --scrim-soft:     #0B0D1200; /* transparent end of the hero legibility gradient */

  /* ── Semantic roles ─────────────────────────────────────── */
  --color-paper:     var(--archive-black);
  --color-ink:       var(--world-white);
  --color-ink-2:     var(--ink-2);
  --color-meta:      var(--slate);
  --color-accent:    var(--ascendance-blue);
  --color-runtime:   var(--spatial-cyan);
  --color-history:   var(--archive-amber);
  --color-verified:  var(--signal-green);
  --color-focus:     var(--spatial-cyan);

  /* ── Type ───────────────────────────────────────────────── */
  --font-display: "Space Grotesk", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Major-third scale from 16px body. Five sizes on the homepage. */
  --text-meta:      0.8125rem;                              /* 13px mono metadata */
  --text-base:      1.0625rem;                              /* 17px body */
  --text-lead:      clamp(1.1875rem, 0.6vw + 1rem, 1.375rem);
  --text-title:     clamp(1.75rem, 1.6vw + 1.2rem, 2.625rem);
  --text-display:   clamp(2.5rem, 4.2vw + 1rem, 5.25rem);

  /* ── Space (4pt) ────────────────────────────────────────── */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;
  --gutter:    clamp(1rem, 4vw, 3.5rem);
  --measure:   64ch;
  --page-max:  88rem;

  /* ── Shape ──────────────────────────────────────────────── */
  --radius-sm: 2px;   /* controls; brand kit's 8–24px radii are NOT used on this site */
  --rule-w:    1px;

  /* ── Motion ─────────────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long:  420ms;
  --dur-stage: 900ms; /* poster → live 3D crossfade only */

  /* ── Z scale ────────────────────────────────────────────── */
  --z-base:   1;
  --z-raised: 10;
  --z-sticky: 200;
  --z-modal:  400;
}
