/* ─────────────────────────────────────────────────────────────
 * IANS GAME STUDIO: design tokens
 *
 * Direction: brand-expressive, held back ("candlelit workshop").
 * A warm near-black canvas, bone-coloured type, and ONE accent,
 * candle gold. Game pages may re-theme the accent (see [data-theme]
 * at the bottom); nothing else changes per page.
 *
 * Contrast is measured, not guessed (WCAG ratio vs --canvas):
 *   --text       15.33   corpus median 13.4
 *   --text-2      9.17
 *   --text-muted  5.70   corpus median 4.74, never below 4.5
 *   --accent      9.13
 * Re-measure when you change any colour: brand/DESIGN.md has the script.
 * ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* surfaces step by luminance, never by hue */
  --canvas: #0f0d11;
  --surface: #17141b;
  --surface-2: #1f1b24;
  --surface-sunk: #0a090c;
  --border: rgb(237 228 212 / 0.09);
  --border-strong: rgb(237 228 212 / 0.18);

  /* text */
  --text: #ede4d4;
  --text-2: #bdb1a0;
  --text-muted: #948a7c;

  /* the one accent: candle gold (Thornwall's lamp colour, promoted to studio) */
  --accent: #dcaa52;
  --accent-hover: #e8bd6c;
  --accent-text: #1a1308;
  --accent-wash: rgb(220 170 82 / 0.10);

  --focus: var(--accent-hover);

  /* type: Newsreader for the story voice, Geist for everything that works, Geist Mono for facts */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;

  /* scale: ratio ~1.14 in the body range, opening up for display. Never set a size inline. */
  --text-2xs: 11px;   /* mono labels, legal */
  --text-xs: 12px;
  --text-sm: 13.5px;
  --text-base: 16px;  /* body; brand sites run 16–24 */
  --text-lg: 18px;    /* lead paragraphs */
  --text-xl: 22px;
  --text-2xl: clamp(24px, 2.4vw, 30px);
  --text-3xl: clamp(30px, 3.6vw, 44px);
  --text-4xl: clamp(38px, 5.2vw, 64px);
  --text-display: clamp(44px, 7.4vw, 108px);

  --leading-display: 1.0;
  --leading-tight: 1.12;
  --leading-snug: 1.3;
  --leading-body: 1.55;   /* serif-adjacent reading copy wants a touch more than 1.43 */

  --tracking-display: -0.025em;
  --tracking-heading: -0.015em;
  --tracking-body: 0;
  --tracking-label: 0.08em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* space: 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  --section-y: clamp(56px, 7vw, 104px);
  --gutter: clamp(16px, 4vw, 48px);
  --container: 1280px;
  --container-narrow: 720px;
  --measure: 62ch;

  /* shape: tight corners, because the art is made of square pixels */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 6px;

  /* elevation on dark = lighter surface + hairline, plus a stacked shadow for floating things only */
  --shadow-float:
    0 0 0 1px rgb(0 0 0 / 0.4),
    0 1px 1px rgb(0 0 0 / 0.25),
    0 6px 16px -4px rgb(0 0 0 / 0.45),
    0 24px 56px -12px rgb(0 0 0 / 0.55);
  --shadow-art:
    0 0 0 1px var(--border-strong),
    0 2px 4px rgb(0 0 0 / 0.3),
    0 18px 40px -16px rgb(0 0 0 / 0.7);

  /* motion: decelerate into rest; hover 120ms, entrances 600ms, nothing interactive over 400ms */
  --duration-instant: 60ms;
  --duration-fast: 120ms;
  --duration: 200ms;
  --duration-slow: 400ms;
  --duration-enter: 700ms;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  --z-nav: 50;
  --z-overlay: 80;
}

/* Per-game themes. Only the accent family moves, so every page still reads as the studio. */
[data-theme="thornwall"] {
  --accent: #dcaa52;        /* the lamp */
  --accent-2: #a58bd8;      /* the dream, 6.71:1 on canvas */
  --canvas: #0f0c13;        /* a shade more plum */
}
