/* Design tokens — all theme-able values live here. Swap colors in one file. */

:root,
[data-theme="dark"] {
  /* Surfaces */
  --color-bg: #0b0d10;
  --color-surface: #14181d;
  --color-surface-2: #1c2128;
  --color-surface-3: #252b33;
  --color-overlay: rgba(0, 0, 0, 0.6);

  /* Text */
  --color-text: #e6e8eb;
  --color-text-muted: #9aa3ad;
  --color-text-faint: #5d6772;
  --color-text-inverse: #0b0d10;

  /* Borders */
  --color-border: #2a3038;
  --color-border-strong: #3a414b;
  --color-border-focus: #34d399;

  /* Accents */
  --color-accent: #34d399;
  --color-accent-strong: #10b981;
  --color-accent-soft: rgba(52, 211, 153, 0.12);
  --color-pink: #f472b6;
  --color-pink-strong: #ec4899;
  --color-pink-soft: rgba(244, 114, 182, 0.12);

  /* Semantic */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-warning-soft: rgba(251, 191, 36, 0.12);
  --color-danger: #f87171;
  --color-danger-strong: #ef4444;
  --color-danger-soft: rgba(248, 113, 113, 0.12);
  --color-info: #60a5fa;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-surface-2: #f1f2f4;
  --color-surface-3: #e7e9ec;
  --color-overlay: rgba(0, 0, 0, 0.4);

  --color-text: #14181d;
  --color-text-muted: #5d6772;
  --color-text-faint: #9aa3ad;
  --color-text-inverse: #ffffff;

  --color-border: #e1e3e7;
  --color-border-strong: #c8ccd2;
  --color-border-focus: #10b981;

  --color-accent: #10b981;
  --color-accent-strong: #059669;
  --color-accent-soft: rgba(16, 185, 129, 0.12);
  --color-pink: #ec4899;
  --color-pink-strong: #db2777;
  --color-pink-soft: rgba(236, 72, 153, 0.12);

  --color-success: #10b981;
  --color-warning: #d97706;
  --color-warning-soft: rgba(217, 119, 6, 0.12);
  --color-danger: #ef4444;
  --color-danger-strong: #dc2626;
  --color-danger-soft: rgba(239, 68, 68, 0.12);
  --color-info: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

:root {
  /* Type */
  --font-ui: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing */
  --s-0: 0;
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Motion */
  --t-fast: 120ms;
  --t-mid: 200ms;
  --t-slow: 320ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 56px;
  --content-max: 1100px;

  /* Z-index */
  --z-base: 0;
  --z-sticky: 50;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Safe areas (notched devices) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
