/* ==========================================================================
   SSG design tokens
   Layout is built against the 1728px-wide Figma frame. `--u` is one Figma
   pixel at the current viewport width (set precisely from JS, CSS fallback
   below), so `calc(N * var(--u))` reproduces the design at any desktop size.
   ========================================================================== */
:root {
  /* Colour: dark "Golden Dusk" theme (build instructions §12.2) */
  /* Base: slates sampled from the reference sky */
  --night:      #12171E;   /* main page background (darkest sky) */
  --deep:       #1E2630;   /* alternate sections, cards, panels (upper sky) */
  --dusk:       #2E3742;   /* lifted surfaces, hover fills (mid sky) */
  --haze:       #4E4A45;   /* warm grey: borders, dividers, the horizon haze */
  --earth:      #2D2820;   /* ground tones: grass/tree shadows, footer base */

  /* Light: the only bright colours on the site */
  --gold:       #E9A94A;   /* PRIMARY ACCENT: lines, buttons, icons, pulses, highlights */
  --amber:      #B9772E;   /* deep gold: shadow side of lines, pressed states */
  --sun:        #FFE2A0;   /* sun core, LED glow tint, brightest highlights */

  /* Text */
  --text:       #F2EEE6;   /* warm white: never pure #FFF */
  --ash:        #A4A7AD;   /* secondary text, mono labels */

  /* Brand blue: RESTRICTED, see 12.3 */
  --brand-blue: #2744DF;

  /* Lines & glass */
  --line:       rgba(242, 238, 230, .14);  /* grid lines, card borders */
  --glass:      rgba(242, 238, 230, .05);  /* glass card fill */
  --gold-glow:  0 0 18px rgba(233, 169, 74, .45);

  /* Gradients */
  /* The horizon is raised from §12.2's 92–100% so the thin gold line glows behind the grass
     island's base (~88% of the hero), then falls back to #2E3742, which is where --why-gradient
     starts, so the hero/why seam is seamless without an extra fade (approved Oct 2026). */
  --hero-gradient: linear-gradient(180deg,
      #12171E 0%, #1E2630 35%, #2E3742 55%, #4E4A45 72%, #8A6A3A 82%, #E9A94A 87%, #FFE2A0 88.5%,
      #E9A94A 91%, #8A6A3A 94%, #4E4A45 97%, #2E3742 100%);
  --why-gradient:  linear-gradient(180deg, #2E3742 0%, #1E2630 40%, #12171E 100%);
  --sun-gradient:  linear-gradient(180deg, #12171E 0%, #2E3742 55%, #4E4A45 80%, #8A6A3A 94%, #E9A94A 100%);
  /* About page: one gradient behind every section (it holds #2E3742 from 75% down) */
  --about-gradient: linear-gradient(180deg, #12171E 0%, #1E2630 50%, #2E3742 75%);

  /* The glowing gold horizon line (page transition, About hero, the gold thread) */
  --gold-line: linear-gradient(90deg, transparent 0%, var(--gold) 12%, var(--sun) 50%, var(--gold) 88%, transparent 100%);
  --gold-line-glow: 0 0 16px 2px color-mix(in srgb, var(--gold) 65%, transparent), 0 0 50px 8px color-mix(in srgb, var(--gold) 22%, transparent);

  /* Type */
  --f-display: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  --f-body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "Space Mono", ui-monospace, Menlo, monospace;
  --track-body: 0.05em;     /* Instrument Sans letter-spacing everywhere */

  /* Fluid unit: 1 Figma px */
  --u: calc(100vw / 1728);

  /* Motion */
  --ease: cubic-bezier(.4, .01, .04, 1);              /* 'ssg' in main.js: the site's one motion curve */
  --t-micro: .25s;
  --t-ui: .5s;

  /* Layers (see build instructions §5.3) */
  --z-bg: 0;
  --z-content: 10;
  --z-canvas: 20;
  --z-over: 30;
  --z-nav: 50;
  --z-modal: 80;
  --z-intro: 150;          /* store intro: canvas, then its overlay, then the glow (preloader above all) */
  --z-preloader: 200;
}
