/* Design tokens: colors, type, spacing. Theme is set via <html data-theme="light|dark">. */

:root {
  color-scheme: dark;

  --bg: #0a0b10;
  --bg-2: #0e1017;
  --surface: #12141c;
  --surface-2: #181b26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #eceef5;
  --text-2: #a3a8ba;
  --text-3: #6f7589;

  --accent: #7c5cff;
  --accent-hover: #917aff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --live: #22d3a5;
  --live-soft: rgba(34, 211, 165, 0.14);

  --header-bg: rgba(10, 11, 16, 0.72);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --grid-line: rgba(255, 255, 255, 0.06);
  --orb-a: rgba(124, 92, 255, 0.45);
  --orb-b: rgba(34, 211, 165, 0.28);

  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 10vw, 128px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f7f5;
  --bg-2: #efefec;
  --surface: #ffffff;
  --surface-2: #f3f3f0;
  --border: rgba(18, 19, 26, 0.1);
  --border-strong: rgba(18, 19, 26, 0.22);

  --text: #12131a;
  --text-2: #4b5063;
  --text-3: #7b8094;

  --accent: #5b3df5;
  --accent-hover: #4a2ee0;
  --accent-soft: rgba(91, 61, 245, 0.1);
  --live: #0b8f6e;
  --live-soft: rgba(11, 143, 110, 0.12);

  --header-bg: rgba(247, 247, 245, 0.78);
  --shadow: 0 24px 60px -28px rgba(30, 30, 60, 0.35);
  --grid-line: rgba(18, 19, 26, 0.07);
  --orb-a: rgba(91, 61, 245, 0.28);
  --orb-b: rgba(15, 163, 127, 0.2);
}

/* No-JS fallback: follow the system preference when data-theme was never set. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f7f7f5;
    --bg-2: #efefec;
    --surface: #ffffff;
    --surface-2: #f3f3f0;
    --border: rgba(18, 19, 26, 0.1);
    --border-strong: rgba(18, 19, 26, 0.22);
    --text: #12131a;
    --text-2: #4b5063;
    --text-3: #7b8094;
    --accent: #5b3df5;
    --accent-hover: #4a2ee0;
    --accent-soft: rgba(91, 61, 245, 0.1);
    --live: #0b8f6e;
    --live-soft: rgba(11, 143, 110, 0.12);
    --header-bg: rgba(247, 247, 245, 0.78);
    --shadow: 0 24px 60px -28px rgba(30, 30, 60, 0.35);
    --grid-line: rgba(18, 19, 26, 0.07);
    --orb-a: rgba(91, 61, 245, 0.28);
    --orb-b: rgba(15, 163, 127, 0.2);
  }
}
