/* ─────────────────────────────────────────────────────────────
   DESIGN TOKENS — the whole look of the site comes from here.
   Light theme by default; dark theme below. Change once, applies everywhere.
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f4f3ee;
  --surface: #ffffff;
  --surface-2: #ebeae4;
  --surface-ink: #0c0c0d;          /* dark panels inside the light page */
  --line: rgba(12, 12, 13, 0.08);
  --line-strong: rgba(12, 12, 13, 0.16);

  /* Text */
  --text: #0c0c0d;
  --text-muted: #5d5d63;
  --text-faint: #9a9aa1;
  --text-on-ink: #f4f3ee;

  /* Accent — electric lime (overridden by the brand palettes below) */
  --accent: #d2f53c;
  --accent-strong: #b8e01a;
  --accent-ink: #0c0c0d;           /* text on accent */
  --accent-soft: rgba(210, 245, 60, 0.18);
  --accent-text: #5f7a00;          /* accent used as text on light backgrounds */
  --accent-on-ink: #d2f53c;        /* accent used on dark panels */
  --pop: #ff6a4a;                  /* small secondary highlight */

  /* Status */
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  /* Glass (nav bar, overlays) */
  --glass: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.6);

  /* Type */
  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --fs-2xl: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  --fs-hero: clamp(3rem, 1.4rem + 7vw, 7.5rem);
  --tracking-tight: -0.035em;

  /* Space & shape */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 80px;
  --section-y: clamp(64px, 11vw, 160px);
  --container: 1240px;
  --gutter: 16px;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(12, 12, 13, 0.06);
  --shadow: 0 1px 2px rgba(12, 12, 13, 0.04), 0 12px 40px -12px rgba(12, 12, 13, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1); /* tiny overshoot for things that pop */
  --nav-h: 60px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ── Dark theme ─────────────────────────────────────────
   Set by the toggle in the nav bar (or the device setting on first
   visit — see the small script in index.html <head>). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1d1d20;
  --surface-ink: #1d1d20;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3ee;
  --text-muted: #a3a3aa;
  --text-faint: #6b6b72;
  --accent-soft: rgba(210, 245, 60, 0.12);
  --glass: rgba(21, 21, 23, 0.82);
  --glass-line: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px -12px rgba(0, 0, 0, 0.6);
}


/* ── Brand palettes ─────────────────────────────────────
   <html data-palette="…"> picks one. Each sets the brand colours;
   the light/dark theme above still controls the page background. */

:root[data-palette="cobalt"] {
  --accent: #2e47ff; --accent-strong: #1f35e0; --accent-ink: #ffffff;
  --accent-soft: rgba(46, 71, 255, 0.13); --accent-text: #2e47ff; --accent-on-ink: #8a98ff;
  --pop: #ff6a4a;
}
:root[data-palette="cobalt"]:not([data-theme="dark"]) {
  --bg: #f2f1ee; --surface-2: #e8e7e3; --surface-ink: #0e1230;
  --text: #0e1230; --text-muted: #545871; --text-faint: #9497ab;
  --line: rgba(14, 18, 48, 0.08); --line-strong: rgba(14, 18, 48, 0.16);
}

:root[data-palette="tangerine"] {
  --accent: #ff5a1f; --accent-strong: #e84a12; --accent-ink: #1c1611;
  --accent-soft: rgba(255, 90, 31, 0.14); --accent-text: #d4410c; --accent-on-ink: #ff7a45;
  --pop: #17b3a3;
}
:root[data-palette="tangerine"]:not([data-theme="dark"]) {
  --bg: #f5f0e8; --surface: #fffdf9; --surface-2: #ece5da; --surface-ink: #1c1611;
  --text: #1c1611; --text-muted: #6a5f55; --text-faint: #a69b90;
  --line: rgba(28, 22, 17, 0.08); --line-strong: rgba(28, 22, 17, 0.16);
}

:root[data-palette="violet"] {
  --accent: #6a3bff; --accent-strong: #5426f0; --accent-ink: #ffffff;
  --accent-soft: rgba(106, 59, 255, 0.13); --accent-text: #6a3bff; --accent-on-ink: #b29bff;
  --pop: #ffd23f;
}
:root[data-palette="violet"]:not([data-theme="dark"]) {
  --bg: #f3f1f7; --surface-2: #e9e5f1; --surface-ink: #16102a;
  --text: #16102a; --text-muted: #5f5875; --text-faint: #9e97b2;
  --line: rgba(22, 16, 42, 0.08); --line-strong: rgba(22, 16, 42, 0.16);
}
