/*!
 * WS Commander Design Tokens v1.0.8 — https://design.wscommander.com/tokens.css
 * MIT License · WS Agency · Kristijan Lukačin (@klukacin)
 *
 * Usage:
 *   <link rel="stylesheet" href="https://design.wscommander.com/tokens.css">
 *   <html class="wsc-brand" data-theme="dark" data-motion="running">
 *
 * Themes:   html[data-theme="dark"] (default, "Obsidian Instrument")
 *           html[data-theme="light"] ("Brushed Alabaster")
 *           Scope a preview with <div class="wsc-brand" data-theme="light">.
 * Motion:   html[data-motion="paused"] or prefers-reduced-motion: reduce
 *           collapse every duration token to 0ms. Pair with
 *           animation-play-state: paused on looping animations.
 * Fonts:    Manrope, Inter and JetBrains Mono (load from Google Fonts or self-host).
 */

/* ── Theme-independent scales ─────────────────────────────────────────────── */
:root,
.wsc-brand {
  /* Typography */
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-display-1: 72px;   /* Manrope 800 · 1.0  · -0.045em */
  --text-display-2: 48px;   /* Manrope 750 · 1.05 · -0.04em  */
  --text-title: 32px;       /* Manrope 700 · 1.15 · -0.03em  */
  --text-heading: 22px;     /* Manrope 650 · 1.25 · -0.02em  */
  --text-body-lg: 18px;     /* Inter 400   · 1.6               */
  --text-body: 15px;        /* Inter 400   · 1.6               */
  --text-small: 13px;       /* Inter 500   · 1.5               */
  --text-label: 12px;       /* JetBrains Mono 500 · 0.08em caps */
  --tracking-display: -0.045em;
  --tracking-label: 0.08em;

  /* Spacing — 4px base unit */
  --space-unit: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
  --target-min: 44px;

  /* Radii */
  --radius-badge: 3px;    /* hairline badge */
  --radius-control: 8px;  /* buttons, inputs, rows */
  --radius-card: 12px;    /* cards, panels */
  --radius-window: 16px;  /* macOS window */
  --radius-pill: 999px;

  /* Glass */
  --glass-blur: blur(18px) saturate(180%);
  --hairline: 1px;

  /* Motion */
  --ease-precision: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;

  /* WS Agency brand harmony (fixed, theme-independent) */
  --brand-ws-amber: #ea9423;   /* WS Agency Original */
  --brand-ws-blue: #3864ff;    /* WS Agency Blue */
  --brand-wsc-cursor: #f5a623; /* WS Commander cursor */
}

/* ── Dark · "Obsidian Instrument" (default) ──────────────────────────────── */
:root,
html[data-theme="dark"],
.wsc-brand[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #07090d;
  --bg-surface-1: #0e1218;
  --bg-surface-2: #151b24;
  --bg-glass: rgba(14, 18, 24, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-ui: #5e6e85;
  --fg-primary: #f2f5f9;
  --fg-secondary: #b0bccd;
  --fg-muted: #8f9db2;
  --accent-amber: #f5a623;
  --accent-amber-text: #f7b84b;
  --accent-cobalt: #6c9bff;
  --focus-ring: #80b0ff;
  --cta-bg: #ffffff;
  --cta-fg: #07090d;
  --success: #45de94;
  --warning: #f7b84b;
  --danger: #ff7575;
  --specular: rgba(255, 255, 255, 0.08);
  --shadow-window: 0 24px 64px -16px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Light · "Brushed Alabaster" ─────────────────────────────────────────── */
html[data-theme="light"],
.wsc-brand[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #f6f4ee;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #eae6dc;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --border-subtle: rgba(20, 25, 32, 0.12);
  --border-ui: #647182;
  --fg-primary: #141920;
  --fg-secondary: #3b4758;
  --fg-muted: #505d70;
  --accent-amber: #b45d00;
  --accent-amber-text: #8c4b00;
  --accent-cobalt: #1d4ed8;
  --focus-ring: #1d4ed8;
  --cta-bg: #141920;
  --cta-fg: #ffffff;
  --success: #0a6c3e;
  --warning: #8c4b00;
  --danger: #c02626;
  --specular: rgba(255, 255, 255, 0.9);
  --shadow-window: 0 24px 64px -20px rgba(40, 36, 24, 0.28), 0 2px 8px rgba(40, 36, 24, 0.08);
}

/* ── Motion: paused or reduced ───────────────────────────────────────────── */
html[data-motion="paused"] {
  --dur-fast: 0ms;
  --dur-base: 0ms;
  --dur-slow: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="running"]) {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
  }
}

/* ── Minimal base ────────────────────────────────────────────────────────── */
.wsc-brand {
  background-color: var(--bg-canvas);
  color: var(--fg-primary);
  font-family: var(--font-sans);
}

.wsc-brand :focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.wsc-glass {
  background: var(--bg-glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: var(--hairline) solid var(--border-subtle);
  box-shadow: inset 0 1px 0 var(--specular);
}
