/*
 * WS Commander design tokens — "Obsidian Precision / Native macOS Glass"
 * Mirrors https://design.wscommander.com
 *
 * Themes:
 *   html[data-theme="dark"]  — Obsidian Instrument (default)
 *   html[data-theme="light"] — Brushed Alabaster
 *
 * Contrast (WCAG 2.2 AA): text tokens >= 4.5:1 on canvas/surfaces,
 * UI border and focus tokens >= 3:1.
 */

:root,
html[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --canvas: #07090d;
  --surface-1: #0e1218;
  --surface-2: #151b24;
  --glass: rgba(14, 18, 24, 0.78);
  --glass-blur: blur(18px) saturate(180%);

  /* Lines */
  --hairline: rgba(255, 255, 255, 0.10);
  --border-ui: #5e6e85;

  /* Text */
  --text-primary: #f2f5f9;
  --text-secondary: #b0bccd;
  --text-muted: #8f9db2;

  /* Accents */
  --amber: #f5a623;          /* graphical only (marks, icons, bars) */
  --amber-text: #f7b84b;     /* text-safe amber */
  --amber-soft: rgba(245, 166, 35, 0.14);
  --cobalt: #6c9bff;
  --cobalt-soft: rgba(108, 155, 255, 0.14);
  --focus: #80b0ff;
  --success: #45de94;

  /* CTA pill */
  --cta-bg: #ffffff;
  --cta-text: #07090d;

  /* Chart */
  --chart-baseline: #5f6b7d;

  /* Elevation */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 64px rgba(0, 0, 0, 0.55);
  --glow: radial-gradient(60% 60% at 50% 0%, rgba(108, 155, 255, 0.16), transparent 70%);
}

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

  --canvas: #f6f4ee;
  --surface-1: #ffffff;
  --surface-2: #eae6dc;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-blur: blur(18px) saturate(180%);

  --hairline: rgba(20, 25, 32, 0.12);
  --border-ui: #647182;

  --text-primary: #141920;
  --text-secondary: #3b4758;
  --text-muted: #505d70;

  --amber: #b45d00;
  --amber-text: #8c4b00;
  --amber-soft: rgba(180, 93, 0, 0.10);
  --cobalt: #1d4ed8;
  --cobalt-soft: rgba(29, 78, 216, 0.08);
  --focus: #1d4ed8;
  --success: #0a6c3e;

  --cta-bg: #141920;
  --cta-text: #ffffff;

  --chart-baseline: #7a8492;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 24px rgba(20, 25, 32, 0.08);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 24px 64px rgba(20, 25, 32, 0.14);
  --glow: radial-gradient(60% 60% at 50% 0%, rgba(29, 78, 216, 0.08), transparent 70%);
}

:root {
  /* Type */
  --font-display: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'SF Pro Display', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'SF Pro Text', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  /* Targets */
  --target-min: 44px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur-med: 280ms;

  --max-width: 1200px;
}
