/* =====================================================================
   ITLTube design tokens — "Charcoal & Gold"
   Shared with ProFix Buildroom — change here only.
   The ONLY place colours, type, radii, spacing and motion are defined.
   app.css and luxury.css consume these variables and never restate a hex.
   ===================================================================== */

/* ---- Self-hosted fonts (SIL OFL, see /fonts/LICENSE-*) ---- */
@font-face { font-family: "ITL Serif"; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "ITL Serif"; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "ITL Serif"; src: url("/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "ITL Serif"; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "ITL Sans"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ITL Sans"; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "ITL Sans"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "ITL Sans"; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---- Charcoal (default) ---- */
:root, [data-theme="charcoal"] {
  /* type */
  --font-serif: "ITL Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "ITL Sans", Inter, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(44px, 5.6vw, 84px);
  --fs-display: clamp(34px, 3.4vw, 48px);
  --fs-title: 28px;
  --fs-h3: 21px;
  --fs-card: 18px;
  --fs-body: 14px;
  --fs-small: 12.5px;
  --fs-label: 11px;
  --track-label: .16em;
  --lh-body: 1.55;
  --lh-serif: 1.08;

  /* surfaces */
  --bg: #101012; --bg-2: #141417; --bg-3: #1a1a1e; --bg-4: #202026;
  --surface: rgba(255,255,255,.035); --surface-2: rgba(255,255,255,.06); --surface-hover: rgba(255,255,255,.085);
  --hairline: rgba(255,255,255,.08); --hairline-strong: rgba(255,255,255,.15);
  --glass-border: rgba(255,255,255,.07); --glass-blur: 18px;
  --scrim: rgba(6,6,8,.62);

  /* ink */
  --fg: #ece9e2; --fg-2: #c9c5bb; --fg-muted: #8d8a83; --fg-on-media: #f6f1e6;

  /* the one accent: warm gold */
  --accent: #d4af6a; --accent-hi: #ecd29a; --accent-lo: #9c7a3c; --accent-ink: #17130b;
  --accent-rgb: 212,175,106; --glow-rgb: 255,217,138;
  --accent-soft: rgba(var(--accent-rgb),.14); --accent-glow: rgba(var(--accent-rgb),.28);
  --gold-brushed: linear-gradient(135deg, var(--accent-hi) 0%, var(--accent) 28%, var(--accent-lo) 52%, var(--accent) 74%, var(--accent-hi) 100%);
  --gold-gradient: linear-gradient(135deg, var(--accent-hi), var(--accent) 50%, var(--accent-lo));

  /* status */
  --danger: #e07a6a; --ok: #9fc79a; --warn: #e3b85f; --live: #e0574a;

  /* depth */
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --shadow-2: 0 2px 6px rgba(0,0,0,.45), 0 24px 60px rgba(0,0,0,.5);
  --shadow-stage: 0 40px 120px -30px rgba(0,0,0,.9);

  /* geometry */
  --radius: 16px; --radius-sm: 10px; --radius-xs: 6px; --radius-pill: 999px;
  --topbar-h: 64px; --sidebar-w: 256px; --rail-w: 80px;
  --gutter: 32px; --gutter-phone: 16px;
  --content-max: 1680px;

  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-fast: .18s; --dur: .3s; --dur-slow: .6s;
  --kenburns-dur: 28s; --curtain-dur: 1.1s;
  --dim: .86;
  color-scheme: dark;
}

/* ---- Pure dark (OLED black, same gold) ---- */
[data-theme="pure"] {
  --bg: #000; --bg-2: #0a0a0a; --bg-3: #121212; --bg-4: #1a1a1a;
  --surface: rgba(255,255,255,.04); --surface-2: rgba(255,255,255,.07); --surface-hover: rgba(255,255,255,.1);
  --hairline: rgba(255,255,255,.09); --hairline-strong: rgba(255,255,255,.17); --glass-border: rgba(255,255,255,.08);
  --fg: #f2f0ea; --fg-2: #cfcbc2; --fg-muted: #96928a;
  --scrim: rgba(0,0,0,.72);
}

/* ---- Ivory (light; a deeper gold so it still reads on cream) ---- */
[data-theme="ivory"] {
  --bg: #f6f3ec; --bg-2: #efebe2; --bg-3: #e7e2d6; --bg-4: #ddd7c8;
  --surface: rgba(255,255,255,.55); --surface-2: rgba(255,255,255,.75); --surface-hover: rgba(255,255,255,.95);
  --hairline: rgba(40,32,16,.1); --hairline-strong: rgba(40,32,16,.2); --glass-border: rgba(40,32,16,.08);
  --fg: #1b1a17; --fg-2: #3b3833; --fg-muted: #67625a;
  --accent: #8a6a2c; --accent-hi: #a8833f; --accent-lo: #6e5420; --accent-ink: #fffaf0;
  --accent-rgb: 138,106,44; --glow-rgb: 184,138,46;
  --accent-soft: rgba(168,131,63,.12); --accent-glow: rgba(168,131,63,.25);
  --shadow-1: 0 1px 2px rgba(40,32,16,.08), 0 8px 24px rgba(40,32,16,.08);
  --shadow-2: 0 2px 6px rgba(40,32,16,.1), 0 24px 60px rgba(40,32,16,.16);
  --shadow-stage: 0 40px 120px -30px rgba(40,32,16,.5);
  --scrim: rgba(20,16,8,.4);
  color-scheme: light;
}

/* ---- Navy (deep navy surfaces, gold kept) ---- */
[data-theme="navy"] {
  --bg: #0c1424; --bg-2: #101a2e; --bg-3: #16223a; --bg-4: #1c2a46;
  --surface: rgba(200,215,240,.045); --surface-2: rgba(200,215,240,.075); --surface-hover: rgba(200,215,240,.1);
  --hairline: rgba(200,215,240,.1); --hairline-strong: rgba(200,215,240,.18); --glass-border: rgba(200,215,240,.09);
  --fg: #e8edf4; --fg-2: #c4cdda; --fg-muted: #8e9bb1;
  --shadow-1: 0 1px 2px rgba(0,4,12,.5), 0 8px 24px rgba(0,4,12,.35);
  --shadow-2: 0 2px 6px rgba(0,4,12,.5), 0 24px 60px rgba(0,4,12,.55);
  --scrim: rgba(4,8,18,.68);
}

/* ---- Lite mode: no grain, no blur, no ambient glow (set by Settings → Playback) ---- */
[data-lite="1"] { --glass-blur: 0px; }

/* ---- Reduced motion collapses every duration ---- */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0s; --dur: 0s; --dur-slow: 0s; --kenburns-dur: 0s; --curtain-dur: 0s; }
}
