/* =====================================================================
   Cassius Launch Hub — design tokens
   Layer 1: PRIMITIVES  raw values (palette, scale). Never used directly
            by components.
   Layer 2: SEMANTIC    roles (surface, text, accent, border…). Components
            use ONLY these. Re-theme = change this file.
   Layer 3: COMPONENT   per-component knobs (button height, radius…),
            defined from semantic tokens.
   STATUS: placeholder values (VitaClasp/Cassius Navy · Charcoal · Copper)
   until the owner's visual inspirations arrive.
   ===================================================================== */

:root {
  /* ---------- 1. primitives ---------- */
  --navy-950: #070d1a; --navy-900: #0c1628; --navy-800: #13213a; --navy-700: #1c2e4f;
  --navy-600: #2a4068; --navy-500: #3d5683; --navy-300: #8fa2c4; --navy-100: #dfe6f2; --navy-50: #f1f4f9;
  --charcoal-950: #0f1012; --charcoal-900: #17181b; --charcoal-800: #222328; --charcoal-700: #2e3036;
  --charcoal-600: #45474f; --charcoal-500: #63666f; --charcoal-400: #8a8d96; --charcoal-300: #b3b5bc;
  --charcoal-200: #d6d7db; --charcoal-100: #ececee; --charcoal-50: #f7f7f8;
  --copper-700: #8a4a26; --copper-600: #a85c31; --copper-500: #c2703f; --copper-400: #d48a5c;
  --copper-200: #edc9b1; --copper-100: #f7e6da;
  --white: #ffffff;
  --green-600: #2f7d55; --green-100: #dcefe4;
  --amber-600: #a86a12; --amber-100: #f6e8cf;
  --red-600: #b23b3b; --red-100: #f6dddd;
  --blue-600: #2f62b3; --blue-100: #dde7f7;

  --font-sans: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-11: 0.6875rem; --fs-12: 0.75rem; --fs-13: 0.8125rem; --fs-14: 0.875rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-32: 2rem;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-normal: 1.5;

  --space-0: 0; --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-full: 999px;
  --dur-fast: 120ms; --dur-normal: 200ms; --ease-standard: cubic-bezier(.2, 0, 0, 1);

  /* ---------- 2. semantic (light) ---------- */
  --color-bg: var(--charcoal-50);
  --color-surface: var(--white);
  --color-surface-raised: var(--white);
  --color-surface-sunken: var(--charcoal-100);
  --color-surface-inverse: var(--navy-900);
  --color-text: var(--charcoal-900);
  --color-text-muted: var(--charcoal-500);
  --color-text-subtle: var(--charcoal-400);
  --color-text-inverse: var(--navy-50);
  --color-text-on-accent: var(--white);
  --color-border: var(--charcoal-200);
  --color-border-strong: var(--charcoal-300);
  --color-accent: var(--copper-600);
  --color-accent-hover: var(--copper-700);
  --color-accent-soft: var(--copper-100);
  --color-brand: var(--navy-900);
  --color-focus: var(--copper-500);
  --color-success: var(--green-600); --color-success-soft: var(--green-100);
  --color-warning: var(--amber-600); --color-warning-soft: var(--amber-100);
  --color-danger: var(--red-600);    --color-danger-soft: var(--red-100);
  --color-info: var(--blue-600);     --color-info-soft: var(--blue-100);
  --color-overlay: rgb(7 13 26 / .45);

  --shadow-sm: 0 1px 2px rgb(15 16 18 / .06);
  --shadow-md: 0 4px 14px rgb(15 16 18 / .08);
  --shadow-lg: 0 16px 40px rgb(15 16 18 / .16);

  /* ---------- 3. component ---------- */
  --control-h-sm: 30px; --control-h-md: 36px; --control-h-lg: 44px;
  --control-radius: var(--radius-md);
  --control-px: var(--space-3);
  --card-radius: var(--radius-lg);
  --card-pad: var(--space-4);
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --content-max: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: var(--navy-950);
    --color-surface: var(--navy-900);
    --color-surface-raised: var(--navy-800);
    --color-surface-sunken: var(--navy-950);
    --color-surface-inverse: var(--navy-50);
    --color-text: var(--navy-50);
    --color-text-muted: var(--navy-300);
    --color-text-subtle: var(--navy-500);
    --color-text-inverse: var(--navy-900);
    --color-border: var(--navy-700);
    --color-border-strong: var(--navy-600);
    --color-accent: var(--copper-400);
    --color-accent-hover: var(--copper-200);
    --color-accent-soft: rgb(194 112 63 / .18);
    --color-text-on-accent: var(--navy-950);
    --color-success-soft: rgb(47 125 85 / .22);
    --color-warning-soft: rgb(168 106 18 / .22);
    --color-danger-soft: rgb(178 59 59 / .22);
    --color-info-soft: rgb(47 98 179 / .22);
    --shadow-md: 0 4px 14px rgb(0 0 0 / .35);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / .5);
  }
}
:root[data-theme="dark"] {
  --color-bg: var(--navy-950); --color-surface: var(--navy-900); --color-surface-raised: var(--navy-800);
  --color-surface-sunken: var(--navy-950); --color-surface-inverse: var(--navy-50);
  --color-text: var(--navy-50); --color-text-muted: var(--navy-300); --color-text-subtle: var(--navy-500);
  --color-text-inverse: var(--navy-900); --color-border: var(--navy-700); --color-border-strong: var(--navy-600);
  --color-accent: var(--copper-400); --color-accent-hover: var(--copper-200);
  --color-accent-soft: rgb(194 112 63 / .18); --color-text-on-accent: var(--navy-950);
  --color-success-soft: rgb(47 125 85 / .22); --color-warning-soft: rgb(168 106 18 / .22);
  --color-danger-soft: rgb(178 59 59 / .22); --color-info-soft: rgb(47 98 179 / .22);
  --shadow-md: 0 4px 14px rgb(0 0 0 / .35); --shadow-lg: 0 16px 40px rgb(0 0 0 / .5);
}
