/* ============================================
   WICKED BOOKKEEPING — Design Tokens
   Palette: Deep purple magic + dark ink + silver sparkle
   ============================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f5f3f8;
  --color-surface: #faf9fc;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ede9f4;
  --color-surface-offset-2: #e4dff0;
  --color-surface-dynamic: #d8d1e8;
  --color-divider: #cdc5de;
  --color-border: #bfb6d4;

  /* Text */
  --color-text: #1a1525;
  --color-text-muted: #6b6078;
  --color-text-faint: #b0a8be;
  --color-text-inverse: #f5f3f8;

  /* Primary — deep purple */
  --color-primary: #6b21a8;
  --color-primary-hover: #581c87;
  --color-primary-active: #46166c;
  --color-primary-highlight: #e9d5ff;

  /* Accent — silver/sparkle */
  --color-accent: #7c3aed;
  --color-accent-hover: #6d28d9;

  /* Magic gold sparkle */
  --color-gold: #c4a000;
  --color-gold-light: #fef3c7;

  /* Success */
  --color-success: #166534;
  --color-success-highlight: #dcfce7;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0.2 0.05 280 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.2 0.05 280 / 0.12);
  --shadow-lg: 0 12px 40px oklch(0.2 0.05 280 / 0.18);
  --shadow-purple: 0 8px 32px oklch(0.35 0.2 280 / 0.25);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

/* DARK MODE */
[data-theme='dark'] {
  --color-bg: #0d0a14;
  --color-surface: #130f1e;
  --color-surface-2: #19152a;
  --color-surface-offset: #1f1a30;
  --color-surface-offset-2: #261f38;
  --color-surface-dynamic: #2e2642;
  --color-divider: #3a3050;
  --color-border: #4a3f64;
  --color-text: #e8e0f4;
  --color-text-muted: #9d90b8;
  --color-text-faint: #5e5278;
  --color-text-inverse: #0d0a14;
  --color-primary: #a855f7;
  --color-primary-hover: #c084fc;
  --color-primary-active: #d8b4fe;
  --color-primary-highlight: #3b1d6e;
  --color-accent: #c084fc;
  --color-accent-hover: #d8b4fe;
  --color-gold: #fbbf24;
  --color-gold-light: #2d2200;
  --color-success: #4ade80;
  --color-success-highlight: #052e16;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
  --shadow-purple: 0 8px 32px oklch(0.5 0.25 280 / 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0d0a14;
    --color-surface: #130f1e;
    --color-surface-2: #19152a;
    --color-surface-offset: #1f1a30;
    --color-surface-offset-2: #261f38;
    --color-surface-dynamic: #2e2642;
    --color-divider: #3a3050;
    --color-border: #4a3f64;
    --color-text: #e8e0f4;
    --color-text-muted: #9d90b8;
    --color-text-faint: #5e5278;
    --color-text-inverse: #0d0a14;
    --color-primary: #a855f7;
    --color-primary-hover: #c084fc;
    --color-primary-active: #d8b4fe;
    --color-primary-highlight: #3b1d6e;
    --color-accent: #c084fc;
    --color-accent-hover: #d8b4fe;
    --color-gold: #fbbf24;
    --color-gold-light: #2d2200;
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
    --shadow-purple: 0 8px 32px oklch(0.5 0.25 280 / 0.35);
  }
}
