/* ============================================
   MPK Mini MK3 Playbook - Design Tokens
   Premium design system foundation
   ============================================ */

:root {
  /* ─────────────────────────────────────────
     COLOR SYSTEM - Pro Audio Dark (Enhanced)
     ───────────────────────────────────────── */

  /* Base Colors */
  --color-black: #000000;
  --color-white: #ffffff;

  /* Background Hierarchy - Warmer Undertones */
  --bg-base: #0b0a0a;      /* Warm black */
  --bg-surface: #151312;   /* Warm elevated */
  --bg-elevated: #1c1918;  /* Warm higher */
  --bg-overlay: #252220;   /* Warm overlay */
  --bg-hover: #2e2a28;     /* Warm hover */

  /* Glassmorphism & Texture */
  --bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  
  --bg-glass: rgba(11, 10, 10, 0.7);
  --bg-glass-heavy: rgba(11, 10, 10, 0.9);
  --bg-glass-light: rgba(30, 27, 26, 0.4);
  --blur-glass: 12px;
  --blur-heavy: 20px;

  /* Primary Accent - Akai Red-Orange (Enhanced) */
  --accent-primary: #ff4d1c;
  --accent-primary-dim: #d63a10;
  --accent-primary-bright: #ff7a52;
  --accent-primary-bg: rgba(255, 77, 28, 0.15);
  --accent-primary-glow: 0 0 40px rgba(255, 77, 28, 0.4);

  /* Secondary Accent - FL Studio Purple (Enhanced) */
  --accent-secondary: #9b6dff;
  --accent-secondary-dim: #7c4ddb;
  --accent-secondary-bright: #b794ff;
  --accent-secondary-bg: rgba(155, 109, 255, 0.15);
  --accent-secondary-glow: 0 0 40px rgba(155, 109, 255, 0.35);

  /* Tertiary Accent - Cyan (NEW) */
  --accent-tertiary: #22d3ee;
  --accent-tertiary-dim: #06b6d4;
  --accent-tertiary-bright: #67e8f9;
  --accent-tertiary-bg: rgba(34, 211, 238, 0.12);
  --accent-tertiary-glow: 0 0 35px rgba(34, 211, 238, 0.3);

  /* Control-Specific Colors (NEW) */
  --color-keys: #3b82f6;       /* Blue for keyboard */
  --color-pads: #ff4d1c;       /* Orange for pads */
  --color-knobs: #9b6dff;      /* Purple for knobs */
  --color-joystick: #10b981;   /* Green for joystick */
  --color-transport: #f59e0b; /* Amber for transport */

  /* Status Colors (Enhanced) */
  --color-success: #22c55e;   /* Brighter Green */
  --color-warning: #fbbf24;   /* Brighter Yellow */
  --color-error: #f43f5e;     /* Rose Red */
  --color-info: #38bdf8;      /* Sky Blue */

  /* Text Colors - Warmer Tones */
  --text-primary: #f5f3f1;
  --text-secondary: #a8a4a0;
  --text-tertiary: #6e6a66;
  --text-muted: #524e4a;
  --text-inverse: #0b0a0a;

  /* Border Colors - Warmer */
  --border-subtle: #3a3634;
  --border-default: #4a4542;
  --border-strong: #5a5550;
  --border-accent: var(--accent-primary);

  /* ─────────────────────────────────────────
     TYPOGRAPHY
     ───────────────────────────────────────── */

  --font-display: "Outfit", "Inter", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  /* Font Sizes - Fluid Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 2rem + 3vw, 4rem);

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* ─────────────────────────────────────────
     SPACING
     ───────────────────────────────────────── */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ─────────────────────────────────────────
     LAYOUT
     ───────────────────────────────────────── */

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  --header-height: 72px;
  --rail-width: 280px;
  --footer-height: 120px;

  /* ─────────────────────────────────────────
     EFFECTS
     ───────────────────────────────────────── */

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(255, 77, 28, 0.15);

  /* Blur */
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 20px;
  --blur-xl: 40px;

  /* ─────────────────────────────────────────
     TRANSITIONS
     ───────────────────────────────────────── */

  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);

  --transition-fast: all var(--duration-fast) var(--ease-default);
  --transition-normal: all var(--duration-normal) var(--ease-smooth);
  --transition-slow: all var(--duration-slow) var(--ease-smooth);

  /* ─────────────────────────────────────────
     Z-INDEX SCALE
     ───────────────────────────────────────── */

  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-tooltip: 500;
  --z-toast: 600;
}

/* ─────────────────────────────────────────
   LIGHT MODE (Optional)
   ───────────────────────────────────────── */

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-overlay: #e2e8f0;
  --bg-hover: #cbd5e1;

  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-light: rgba(248, 250, 252, 0.9);
  --bg-glass-dark: rgba(241, 245, 249, 0.95);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #f0f2f5;

  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-default: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
}
