/* ============================================================
   FORGE — Brand Override Layer  (loads AFTER tokens.css + base.css)
   The Command Surface engine stays PRISTINE (diff-able vs keystone/astra);
   this file makes the site unmistakably FORGE: industrial, warm, sharp.

   PRIMARY   forge yellow  #FFD600 — the strike: CTAs, hero, stats, sliders, glyph
   SECONDARY ember orange  #FF6B35 — labels (HEAT markers), the heat in the metal
   PAYOFF    quench green   #4ade80 — approved / kept / live (the quench-lock)
   Type      Bebas Neue (display) · DM Mono (body+UI) · JetBrains Mono (data)
   ============================================================ */

:root {
  /* ---- type: FORGE stack (design-system/MASTER.md §3) ---- */
  --font-display: "Bebas Neue", "Arial Narrow", system-ui, sans-serif;
  --font-body: "DM Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* ---- sharper than the engine default (FORGE is sharp, not soft) ---- */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px;

  /* ---- repurpose the engine's cyan atmosphere → warm ember-yellow ----
     base.css wires borders / scanlines / scrollbar / selection to --cyan(-rgb);
     pointing those at FORGE yellow makes the whole engine read "forge" for free. */
  --accent: #FFD600;
  --cyan: #FFD600;  --cyan-rgb: 255, 214, 0;
  --gold: #FFD600;  --gold-rgb: 255, 214, 0;
  --orange: #FF6B35; --orange-rgb: 255, 107, 53;
  --blue: #FF8C42;  --blue-rgb: 255, 140, 66;   /* engine "blue" → ember orange for gradients */
  --green: #4ade80; --green-rgb: 74, 222, 128;  /* quench / approved / live */
  --red: #f87171;   --red-rgb: 248, 113, 113;

  --bg: #08080c; --bg2: #0f0f16; --bg3: #14141d;
  --foreground: #f3f1ea; --text2: #cfcabb; --muted: #9a958a; --dim: #7c776c;

  --border: rgba(255, 214, 0, .08);
  --border-bright: rgba(255, 214, 0, .24);
  --border-soft: rgba(255, 255, 255, .08);

  --card-grad: linear-gradient(150deg, rgba(16,16,22,.9), rgba(20,18,24,.66));
  --glow-ambient: 0 0 24px rgba(255, 214, 0, .06);
  --glow-hover: 0 14px 40px rgba(0,0,0,.6), 0 0 26px rgba(255, 140, 66, .16);
  --shadow-card: 0 12px 34px rgba(0,0,0,.5);

  --hero-scrim: radial-gradient(ellipse 92% 72% at 60% 42%, transparent 0%, rgba(8,8,12,.6) 52%, rgba(8,8,12,.98) 100%);
  --dot-grid: rgba(255, 214, 0, .10);
}

/* light "Forge cold" — the cooled metal: paper-warm, ember accents kept */
html[data-theme="light"] {
  --accent: #b45309;
  --cyan: #b45309;  --cyan-rgb: 180, 83, 9;
  --gold: #b45309;  --gold-rgb: 180, 83, 9;
  --orange: #c2410c; --orange-rgb: 194, 65, 12;
  --blue: #c2410c;  --blue-rgb: 194, 65, 12;
  --green: #047857; --green-rgb: 4, 120, 87;
  --red: #dc2626;   --red-rgb: 220, 38, 38;

  --bg: #f6f4ef; --bg2: #fffdf8; --bg3: #efece4;
  --foreground: #1a1814; --text2: #2c2820; --muted: #5b5447; --dim: #6b6456;
  --border: rgba(180, 83, 9, .14);
  --border-bright: rgba(180, 83, 9, .3);
  --border-soft: rgba(26, 24, 20, .1);
  --card-grad: linear-gradient(150deg, #fffdf8, #f3efe6);
  --glow-ambient: 0 8px 24px rgba(40, 26, 8, .06);
  --glow-hover: 0 14px 34px rgba(40, 26, 8, .12);
  --shadow-card: 0 10px 28px rgba(40, 26, 8, .09);
  --hero-scrim: radial-gradient(ellipse 92% 72% at 60% 42%, transparent 0%, rgba(246,244,239,.5) 55%, rgba(246,244,239,.98) 100%);
  --dot-grid: rgba(26, 24, 20, .1);
}

/* ---- Bebas Neue is condensed all-caps, single weight: re-tune the headings ----
   the engine sizes headings for Space Grotesk @700 + negative tracking; Bebas needs
   weight 400 and slightly positive tracking, and reads taller, so nudge sizes/leading. */
h1, h2, h3, h4 { font-weight: 400; letter-spacing: .012em; line-height: .98; }
h1 { font-size: clamp(3.1rem, 6.8vw, 6rem); letter-spacing: .006em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: .02em; }
/* DM Mono has no 600/700 — keep "bold" body text legible via 500 + brightness */
strong, b { font-weight: 500; color: var(--foreground); }

/* primary button → FORGE yellow, dark text (MASTER §14.3 — never reverse) */
.btn-primary { background: linear-gradient(120deg, var(--gold), #f59e0b); color: #0a0700; font-weight: 700; }
html[data-theme="light"] .btn-primary { background: var(--gold); color: #fff7ed; }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(255, 214, 0, .22); }
.btn-ghost:hover { background: rgba(255, 214, 0, .07); }

/* brand sigil + HUD corners + accent glow → forge */
.brand .sigil { background: linear-gradient(135deg, var(--gold), #FF6B35); border-radius: 5px; }
.hud::before, .hud::after { border-color: rgba(255, 214, 0, .6); }
.accent-glow { text-shadow: 0 0 16px rgba(255, 214, 0, .45); }
html[data-theme="light"] .accent-glow { text-shadow: none; }

/* gradient headline → strike(yellow) → heat(ember) → quench(green) */
.grad-text {
  background: linear-gradient(108deg, var(--gold) 0%, #FF8C42 52%, var(--green) 108%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* reading progress + selection + scrollbar → warm */
.reading-progress i { background: linear-gradient(90deg, var(--gold), #FF6B35); }
::selection { background: rgba(255, 214, 0, .26); color: var(--foreground); }
::-webkit-scrollbar-thumb { background: rgba(255, 214, 0, .2); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 214, 0, .4); }

/* the marquee diamond → ember */
.marquee-track span::after { color: var(--orange); }

/* preloader wordmark spacing for Bebas */
.preloader .word { letter-spacing: .06em; }
