/* Design tokens — single source for colour, type, spacing, radii, motion */
:root {
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --fs-xs: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
  --fs-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2.4vw, 3.5rem);
  --fs-3xl: clamp(2.5rem, 1.6rem + 4.2vw, 5.5rem);

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

  --r-sm: 8px;
  --r-lg: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 160ms;
  --dur-2: 520ms;

  --container: 1200px;
  --header-h: 68px;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1420;
  --bg-raised: #111f2d;
  --text: #edf4f3;
  --text-muted: #a4b4bd;
  --line: rgba(210, 229, 232, 0.14);
  --accent: #59d2bd;
  --accent-contrast: #08201f;
  --glow-a: rgba(59, 188, 166, 0.18);
  --glow-b: rgba(90, 142, 184, 0.14);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f5;
  --bg-raised: #e7eeec;
  --text: #14242d;
  --text-muted: #50636b;
  --line: rgba(20, 46, 54, 0.15);
  --accent: #08796d;
  --accent-contrast: #ffffff;
  --glow-a: rgba(59, 188, 166, 0.2);
  --glow-b: rgba(90, 142, 184, 0.14);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f3f6f5;
    --bg-raised: #e7eeec;
    --text: #14242d;
    --text-muted: #50636b;
    --line: rgba(20, 46, 54, 0.15);
    --accent: #08796d;
    --accent-contrast: #ffffff;
    --glow-a: rgba(59, 188, 166, 0.2);
    --glow-b: rgba(90, 142, 184, 0.14);
  }
}
