/**
 * QubikStack - Design System Tokens & Variables
 * Supports Dark Mode (default) & Light Mode with instant transition
 */

:root {
  /* ==========================================================================
     Color Palette - Dark Mode (Default)
     ========================================================================== */
  --bg-primary: #070a12;
  --bg-secondary: #0d1322;
  --bg-tertiary: #131c31;
  --bg-elevated: #1a2540;
  
  --surface-glass: rgba(13, 19, 34, 0.75);
  --surface-card: rgba(19, 28, 49, 0.65);
  --surface-card-hover: rgba(26, 37, 64, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-bright: rgba(0, 210, 255, 0.35);
  --border-focus: #00d2ff;
  
  /* Primary & Accent Accents */
  --color-primary: #00d2ff;       /* Electric Cyan */
  --color-primary-rgb: 0, 210, 255;
  --color-primary-dark: #0066ff;  /* Cobalt Blue */
  --color-primary-dark-rgb: 0, 102, 255;
  --color-accent-violet: #8b5cf6; /* Vibrant Violet */
  --color-accent-violet-rgb: 139, 92, 246;
  --color-accent-green: #10b981;  /* Emerald Pass QA */
  --color-accent-green-rgb: 16, 185, 129;
  --color-accent-amber: #f59e0b;  /* Warning/Attention */
  
  /* Text & Foreground */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #070a12;
  --text-highlight: #ffffff;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
  --grad-accent: linear-gradient(135deg, #00d2ff 0%, #8b5cf6 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  --grad-glow: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.15) 0%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(0, 210, 255, 0.25);
  --shadow-glow-violet: 0 0 30px rgba(139, 92, 246, 0.25);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Fluid Typography Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.65rem + 1.125vw, 2.375rem);
  --text-4xl: clamp(2.25rem, 1.95rem + 1.5vw, 3.125rem);
  --text-5xl: clamp(2.75rem, 2.35rem + 2vw, 4rem);
  --text-hero: clamp(3rem, 2.5rem + 2.75vw, 4.75rem);

  /* Layout & Spacing */
  --container-max: 1280px;
  --container-wide: 1400px;
  --container-padding: clamp(1rem, 3vw, 2.5rem);
  --section-spacing: clamp(4.5rem, 8vw, 7.5rem);
  --section-spacing-sm: clamp(2.5rem, 5vw, 4rem);
  
  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

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

  /* Header & Z-indexes */
  --header-height: 80px;
  --header-height-scrolled: 68px;
  --z-base: 1;
  --z-floating: 10;
  --z-sticky: 100;
  --z-header: 1000;
  --z-drawer: 1100;
  --z-modal: 1200;
  --z-cursor: 9999;
  --z-preloader: 10000;
}

/* ==========================================================================
   Light Mode Overrides (Triggered by data-theme="light")
   ========================================================================== */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #e2e8f0;
  
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-card: rgba(255, 255, 255, 0.95);
  --surface-card-hover: #ffffff;
  
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.16);
  --border-bright: rgba(0, 102, 255, 0.35);
  --border-focus: #0066ff;
  
  --color-primary: #0066ff;
  --color-primary-rgb: 0, 102, 255;
  --color-primary-dark: #004ecc;
  --color-primary-dark-rgb: 0, 78, 204;
  --color-accent-violet: #7c3aed;
  --color-accent-violet-rgb: 124, 58, 237;
  --color-accent-green: #059669;
  --color-accent-green-rgb: 5, 150, 105;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-inverse: #f8fafc;
  --text-highlight: #020617;
  
  --grad-primary: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%);
  --grad-accent: linear-gradient(135deg, #0066ff 0%, #7c3aed 100%);
  --grad-surface: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0) 100%);
  --grad-glow: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.08) 0%, transparent 70%);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.18);
  --shadow-glow-violet: 0 0 30px rgba(124, 58, 237, 0.18);
}
