/* ─────────────────────────────────────────────────────────────────────
   GameBrain — base theme tokens (Console / Dark)
   Source: docs/design/handoff/themes/_base-tokens.css (lifted verbatim).
   Self-hosted fonts: WOFF2 files in /static/fonts/, font-display: swap.

   Per-game theme overrides: see docs/design/handoff/themes/bullet-heart-theme.css
   for the template pattern. Per-game theming UI is deferred (TODO.md);
   the class-scoped variables here are forward-compatible.
   ───────────────────────────────────────────────────────────────────── */


/* ── fonts ────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/jetbrains-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* EB Garamond — body serif, used by the Arydia per-game theme.
   Latin subset only (English UI). Synthetic bold from the 400 weight is
   acceptable for the body-text usage; add a separate 600/700 file here
   if a future theme leans on heavier weights. */
@font-face {
  font-family: 'EB Garamond';
  src: url('/static/fonts/eb-garamond-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/static/fonts/eb-garamond-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Barlow — UI/body sans, used by the Reckoners per-game theme.
   Latin subset only (English UI). Weights mirror the Space Grotesk set
   so it's a drop-in for --d3-font-ui. */
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ── base tokens (Console / Dark) ─────────────────────────────────── */

:root, .d3g-default {
  /* ── surfaces ─────────────────────────────────────── */
  --d3-bg:        #0a0c12;   /* outer canvas */
  --d3-bg-2:      #0d1018;   /* shaded variant — PDF top bar, MD resource bar */
  --d3-panel:     #131722;   /* chat / card / dropdown surface */
  --d3-panel-2:   #1a1f2c;   /* assistant turn header strip */
  --d3-elev:      #1f2433;   /* hover · selected nav item */

  /* ── hairlines & dividers ─────────────────────────── */
  --d3-line:      rgba(255,255,255,0.06);
  --d3-line-2:    rgba(255,255,255,0.10);

  /* ── text ─────────────────────────────────────────── */
  --d3-fg:        #dbe1ea;   /* body text */
  --d3-fg-2:      #98a0ad;   /* secondary · timestamps */
  --d3-muted:     #5a6170;   /* labels · metadata */
  --d3-faint:     #383d49;   /* very-low-emphasis */

  /* ── primary accent · citations / active state ────── */
  --d3-amber:      #d4a85a;
  --d3-amber-hi:   #f0c878;
  --d3-amber-dim:  rgba(212,168,90,0.16);

  /* ── secondary accent · resource links / external ─── */
  --d3-teal:       #5ec0c4;
  --d3-teal-hi:    #82dadc;
  --d3-teal-dim:   rgba(94,192,196,0.12);

  /* ── status ───────────────────────────────────────── */
  --d3-good:       #6ed598;
  --d3-bad:        #e07a82;

  /* ── font families ────────────────────────────────── */
  --d3-font-ui:    'Space Grotesk', 'Inter', system-ui, sans-serif;
  --d3-font-mono:  'JetBrains Mono', ui-monospace, monospace;
}


/* ── reference scales (use these — do not free-form) ──────────────────
   Spacing (px):  2 · 4 · 6 · 8 · 10 · 12 · 14 · 16 · 18 · 22 · 28 · 36 · 48
   Radius (px):   sm 3 (chips) · md 4 (buttons, cards) · lg 6 (panels, tabs) · xl 8 (modals)
   Shadows:
     sm  0 1px 2px rgba(0,0,0,0.3)
     md  0 4px 16px rgba(0,0,0,0.35)
     lg  0 12px 36px rgba(0,0,0,0.45)
     xl  0 16px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4)
   Type scale (px):
     Headings — turn title 17 · section title 15 · page title 22–30
     Body     — 13.5 (chat body) · 13 (table cells) · 12.5 (menu) · 12 (compact)
     Meta     — 11.5 · 11 · 10.5 · 10 (mono uppercase labels) · 9.5 (corner labels)
     Letter-spacing: body normal · headings -0.01em to -0.02em · mono uppercase 0.10em to 0.16em
   ─────────────────────────────────────────────────────────────────── */
