/* ==========================================================================
   Sonara Design Tokens & Theme Variables
   Dark-first design with handcrafted light theme
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Monaco, monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.84375rem;  /* 13.5px */
  --text-base: 0.9375rem; /* 15px */
  --text-md: 1.0625rem;   /* 17px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.375rem;   /* 38px */
  --text-4xl: 3.125rem;   /* 50px */
  --text-5xl: 4.25rem;    /* 68px */

  /* Spacing Scale */
  --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;

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Z-Index Hierarchy */
  --z-background: -10;
  --z-base: 1;
  --z-elevated: 10;
  --z-sticky: 100;
  --z-drawer: 500;
  --z-modal: 1000;
  --z-cursor: 9999;
  --z-toast: 10000;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shared Accents */
  --accent-purple-rgb: 139, 92, 246;
  --accent-glow-strength: 0.3;
}

/* ==========================================================================
   Dark Theme (Default)
   ========================================================================== */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --color-bg: #08090D;
  --color-surface: #101218;
  --color-surface-elevated: #151821;
  --color-surface-hover: #191D28;
  --color-surface-active: #202433;
  --color-glass: rgba(16, 18, 24, 0.72);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.16);
  --color-border-subtle: rgba(255, 255, 255, 0.04);
  --color-border-accent: rgba(139, 92, 246, 0.4);

  /* Typography */
  --color-text-primary: #F5F5F7;
  --color-text-secondary: #9A9DA8;
  --color-text-muted: #616472;
  --color-text-inverse: #08090D;

  /* Accents */
  --color-accent: #8B5CF6;
  --color-accent-secondary: #A78BFA;
  --color-accent-hover: #9D75F8;
  --color-accent-subtle: rgba(139, 92, 246, 0.12);
  --color-accent-glow: rgba(139, 92, 246, 0.28);
  --color-accent-gradient: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 60%, #6D28D9 100%);

  /* Status Colors */
  --color-success: #10B981;
  --color-success-subtle: rgba(16, 185, 129, 0.12);
  --color-warning: #F59E0B;
  --color-error: #EF4444;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-elevated: 0 24px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--color-border);
  --shadow-glow: 0 0 40px -8px rgba(139, 92, 246, 0.35);
  --shadow-glow-intense: 0 0 80px -10px rgba(139, 92, 246, 0.5);

  /* Ambient Blobs */
  --ambient-glow-1: rgba(139, 92, 246, 0.14);
  --ambient-glow-2: rgba(99, 102, 241, 0.10);
  --ambient-glow-3: rgba(167, 139, 250, 0.08);

  /* Mockup specific */
  --mockup-bg: #0C0E14;
  --mockup-sidebar: #090B10;
  --mockup-player: #11141B;
  --mockup-row-hover: rgba(255, 255, 255, 0.04);
  --mockup-highlight: rgba(139, 92, 246, 0.15);
}

/* ==========================================================================
   Light Theme (Handcrafted, High-Contrast & Soft)
   ========================================================================== */
[data-theme="light"] {
  color-scheme: light;

  /* Surfaces */
  --color-bg: #F7F7F8;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #F0F1F4;
  --color-surface-hover: #E9EAEF;
  --color-surface-active: #DFE1E8;
  --color-glass: rgba(255, 255, 255, 0.82);
  --color-glass-border: rgba(0, 0, 0, 0.08);

  /* Borders */
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.16);
  --color-border-subtle: rgba(0, 0, 0, 0.04);
  --color-border-accent: rgba(124, 58, 237, 0.35);

  /* Typography */
  --color-text-primary: #15151A;
  --color-text-secondary: #686B75;
  --color-text-muted: #8D919E;
  --color-text-inverse: #FFFFFF;

  /* Accents */
  --color-accent: #7C3AED;
  --color-accent-secondary: #8B5CF6;
  --color-accent-hover: #6D28D9;
  --color-accent-subtle: rgba(124, 58, 237, 0.09);
  --color-accent-glow: rgba(124, 58, 237, 0.18);
  --color-accent-gradient: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 60%, #6D28D9 100%);

  /* Status Colors */
  --color-success: #059669;
  --color-success-subtle: rgba(5, 150, 105, 0.10);
  --color-warning: #D97706;
  --color-error: #DC2626;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.10);
  --shadow-elevated: 0 20px 48px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--color-border);
  --shadow-glow: 0 0 36px -6px rgba(124, 58, 237, 0.22);
  --shadow-glow-intense: 0 0 60px -8px rgba(124, 58, 237, 0.32);

  /* Ambient Blobs */
  --ambient-glow-1: rgba(124, 58, 237, 0.08);
  --ambient-glow-2: rgba(99, 102, 241, 0.06);
  --ambient-glow-3: rgba(167, 139, 250, 0.05);

  /* Mockup specific */
  --mockup-bg: #FFFFFF;
  --mockup-sidebar: #F4F5F8;
  --mockup-player: #ECEEF2;
  --mockup-row-hover: rgba(0, 0, 0, 0.035);
  --mockup-highlight: rgba(124, 58, 237, 0.12);
}
