/*
 * DEV3 Motion Components - tokens.css
 * shadcn-style design tokens as CSS variables. Re-theme by changing ~6 of them (--primary, --background, --foreground, --muted, --accent, --radius).
 *
 *   light  : :root (default)
 *   dark   : <html class="dark">, or automatic with prefers-color-scheme unless <html class="light"> / data-mode="light"
 *   preset : <html data-theme="neutral | zinc-dark | rose | emerald | violet">  (combine with light/dark; zinc-dark is always dark)
 *
 * Tailwind v4 maps these in each component's src/input.css (@theme inline), so bg-primary, text-muted-foreground,
 * border-border, ring-ring, rounded-lg ... all follow the tokens. Colours are oklch().
 * This file does not touch core/glass.css; Motion UI templates never load it.
 */
:root {
  --background: oklch(0.985 0.003 90);
  --foreground: oklch(0.2 0.012 270);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.2 0.012 270);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.2 0.012 270);
  --primary: oklch(0.62 0.17 55);                 /* warm amber */
  --primary-foreground: oklch(0.99 0.005 90);
  --secondary: oklch(0.955 0.006 90);
  --secondary-foreground: oklch(0.28 0.012 270);
  --muted: oklch(0.955 0.006 90);
  --muted-foreground: oklch(0.52 0.015 270);
  --accent: oklch(0.945 0.02 80);
  --accent-foreground: oklch(0.28 0.02 60);
  --destructive: oklch(0.58 0.22 27);
  --destructive-foreground: oklch(0.99 0 0);
  --border: oklch(0.91 0.006 90);
  --input: oklch(0.91 0.006 90);
  --ring: oklch(0.62 0.17 55 / 0.55);
  --radius: 0.75rem;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --glow: oklch(0.85 0.15 85);                    /* light colour for lamps, bulbs, LEDs */
  --shadow-color: oklch(0.25 0.02 270 / 0.14);
  color-scheme: light;
}

/* dark: explicit class wins; otherwise follow the OS unless the page forces light */
.dark {
  --background: oklch(0.16 0.008 270);
  --foreground: oklch(0.96 0.005 90);
  --card: oklch(0.2 0.01 270);
  --card-foreground: oklch(0.96 0.005 90);
  --popover: oklch(0.2 0.01 270);
  --popover-foreground: oklch(0.96 0.005 90);
  --primary: oklch(0.8 0.15 75);
  --primary-foreground: oklch(0.2 0.03 60);
  --secondary: oklch(0.26 0.01 270);
  --secondary-foreground: oklch(0.96 0.005 90);
  --muted: oklch(0.26 0.01 270);
  --muted-foreground: oklch(0.7 0.012 270);
  --accent: oklch(0.3 0.03 70);
  --accent-foreground: oklch(0.96 0.005 90);
  --destructive: oklch(0.65 0.2 25);
  --destructive-foreground: oklch(0.99 0 0);
  --border: oklch(1 0 0 / 0.11);
  --input: oklch(1 0 0 / 0.15);
  --ring: oklch(0.8 0.15 75 / 0.55);
  --glow: oklch(0.88 0.14 85);
  --shadow-color: oklch(0 0 0 / 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light):not([data-mode="light"]):not(.dark):not([data-theme="zinc-dark"]) {
    --background: oklch(0.16 0.008 270);
    --foreground: oklch(0.96 0.005 90);
    --card: oklch(0.2 0.01 270);
    --card-foreground: oklch(0.96 0.005 90);
    --popover: oklch(0.2 0.01 270);
    --popover-foreground: oklch(0.96 0.005 90);
    --primary: oklch(0.8 0.15 75);
    --primary-foreground: oklch(0.2 0.03 60);
    --secondary: oklch(0.26 0.01 270);
    --secondary-foreground: oklch(0.96 0.005 90);
    --muted: oklch(0.26 0.01 270);
    --muted-foreground: oklch(0.7 0.012 270);
    --accent: oklch(0.3 0.03 70);
    --accent-foreground: oklch(0.96 0.005 90);
    --destructive: oklch(0.65 0.2 25);
    --destructive-foreground: oklch(0.99 0 0);
    --border: oklch(1 0 0 / 0.11);
    --input: oklch(1 0 0 / 0.15);
    --ring: oklch(0.8 0.15 75 / 0.55);
    --glow: oklch(0.88 0.14 85);
    --shadow-color: oklch(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

/* presets follow the OS dark mode too (same values as the .dark variants below) */
@media (prefers-color-scheme: dark) {
  :root[data-theme="neutral"]:not(.light):not([data-mode="light"]):not(.dark) { --primary: oklch(0.93 0.005 90); --primary-foreground: oklch(0.2 0.01 270); --ring: oklch(0.8 0.01 270 / 0.5); --accent: oklch(0.3 0.01 270); }
  :root[data-theme="rose"]:not(.light):not([data-mode="light"]):not(.dark) { --primary: oklch(0.72 0.19 12); --primary-foreground: oklch(0.2 0.05 12); --ring: oklch(0.72 0.19 12 / 0.55); --accent: oklch(0.32 0.06 12); }
  :root[data-theme="emerald"]:not(.light):not([data-mode="light"]):not(.dark) { --primary: oklch(0.75 0.15 160); --primary-foreground: oklch(0.2 0.04 160); --ring: oklch(0.75 0.15 160 / 0.55); --accent: oklch(0.32 0.05 160); }
  :root[data-theme="violet"]:not(.light):not([data-mode="light"]):not(.dark) { --primary: oklch(0.72 0.17 292); --primary-foreground: oklch(0.2 0.06 292); --ring: oklch(0.72 0.17 292 / 0.55); --accent: oklch(0.32 0.07 292); }
}

/* ---------- theme presets (set on <html>); each defines light values, then the .dark variant ---------- */
[data-theme="neutral"] { --primary: oklch(0.27 0.01 270); --primary-foreground: oklch(0.985 0 0); --ring: oklch(0.55 0.01 270 / 0.5); --accent: oklch(0.95 0.005 270); --accent-foreground: oklch(0.27 0.01 270); --glow: oklch(0.9 0.08 95); }
[data-theme="neutral"].dark { --primary: oklch(0.93 0.005 90); --primary-foreground: oklch(0.2 0.01 270); --ring: oklch(0.8 0.01 270 / 0.5); --accent: oklch(0.3 0.01 270); }

[data-theme="zinc-dark"] {  /* always dark, cool grey */
  --background: oklch(0.141 0.005 285); --foreground: oklch(0.985 0 0);
  --card: oklch(0.21 0.006 285); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.21 0.006 285); --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.92 0.004 286); --primary-foreground: oklch(0.21 0.006 285);
  --secondary: oklch(0.274 0.006 286); --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.274 0.006 286); --muted-foreground: oklch(0.705 0.015 286);
  --accent: oklch(0.31 0.01 286); --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.65 0.2 25); --border: oklch(1 0 0 / 0.1); --input: oklch(1 0 0 / 0.14); --ring: oklch(0.7 0.02 286 / 0.55);
  --glow: oklch(0.88 0.12 90); --shadow-color: oklch(0 0 0 / 0.55); color-scheme: dark;
}

[data-theme="rose"] { --primary: oklch(0.6 0.22 12); --primary-foreground: oklch(0.99 0.005 12); --ring: oklch(0.6 0.22 12 / 0.5); --accent: oklch(0.95 0.025 12); --accent-foreground: oklch(0.35 0.1 12); --glow: oklch(0.86 0.12 30); }
[data-theme="rose"].dark { --primary: oklch(0.72 0.19 12); --primary-foreground: oklch(0.2 0.05 12); --ring: oklch(0.72 0.19 12 / 0.55); --accent: oklch(0.32 0.06 12); }

[data-theme="emerald"] { --primary: oklch(0.58 0.14 160); --primary-foreground: oklch(0.99 0.01 160); --ring: oklch(0.58 0.14 160 / 0.5); --accent: oklch(0.95 0.03 160); --accent-foreground: oklch(0.32 0.07 160); --glow: oklch(0.88 0.16 150); }
[data-theme="emerald"].dark { --primary: oklch(0.75 0.15 160); --primary-foreground: oklch(0.2 0.04 160); --ring: oklch(0.75 0.15 160 / 0.55); --accent: oklch(0.32 0.05 160); }

[data-theme="violet"] { --primary: oklch(0.55 0.23 292); --primary-foreground: oklch(0.99 0.005 292); --ring: oklch(0.55 0.23 292 / 0.5); --accent: oklch(0.95 0.025 292); --accent-foreground: oklch(0.33 0.12 292); --glow: oklch(0.85 0.13 300); }
[data-theme="violet"].dark { --primary: oklch(0.72 0.17 292); --primary-foreground: oklch(0.2 0.06 292); --ring: oklch(0.72 0.17 292 / 0.55); --accent: oklch(0.32 0.07 292); }

/* base: a component page can rely on these */
.mc-base, .mc-base * { border-color: var(--border); }
.mc-base { background: var(--background); color: var(--foreground); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { .mc-base *, .mc-base *::before, .mc-base *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
