/*
╔═══════════════════════════════════════════════════════════════╗
║                        NEURAL STYLE MEMORY BOOK                          ║
║                      CSS Variables & Design System                       ║
╠═══════════════════════════════════════════════════════════════╣
║ File: css/variables.css                                                  ║
║ Purpose: Comprehensive design tokens for cohesive AI-themed experience   ║
║ Version: 1.2.0                                                           ║
║ Author: Neural Style Memory Book Team                                    ║
║ Created: 2024                                                            ║
║                                                                          ║
║ Features:                                                                ║
║ • Neural-themed color palette with gradients                             ║
║ • Fluid typography system with clamp() functions                         ║
║ • Comprehensive spacing scale                                            ║
║ • Advanced shadow system with glow effects                               ║
║ • Animation timing and easing functions                                  ║
║ • Component-specific variables for 3D book, styles, etc.                 ║
║ • Responsive breakpoints and container queries                           ║
║ • Accessibility settings (reduced motion, high contrast)                 ║
║ • Dark mode support with color scheme detection                          ║
║                                                                          ║
║ Usage:                                                                   ║
║ This file should be loaded first before any other CSS files.             ║
║ All custom properties are globally available and follow BEM-like naming. ║
║ Responsive values use clamp() for fluid scaling across devices.          ║
║                                                                          ║
║ Browser Support: CSS Custom Properties (IE11+ with fallbacks)            ║
╚═══════════════════════════════════════════════════════════════╝
*/

/* Neural Style Memory Book - CSS Variables System */
/* Comprehensive design tokens for a cohesive AI-themed experience */

:root {
  /* === COLOR PALETTE === */
  
  /* Primary Neural Colors */
  --color-neural-primary: #6366f1;
  --color-neural-secondary: #8b5cf6;
  --color-neural-tertiary: #06b6d4;
  --color-neural-accent: #f59e0b;
  
  /* Neural Gradients */
  --gradient-neural-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-neural-secondary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-neural-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-neural-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  
  /* Background Colors */
  --color-bg-primary: #0f0f23;
  --color-bg-secondary: #16213e;
  --color-bg-tertiary: #1e3a8a;
  --color-bg-glass: rgba(255, 255, 255, 0.05);
  --color-bg-modal: rgba(0, 0, 0, 0.8);
  
  /* Surface Colors */
  --color-surface-primary: #1e1e3f;
  --color-surface-secondary: #2d2d5f;
  --color-surface-elevated: #3d3d7f;
  --color-surface-interactive: #4d4d9f;
  
  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #e2e8f0;
  --color-text-tertiary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-disabled: #64748b;
  
  /* Border Colors */
  --color-border-primary: rgba(255, 255, 255, 0.1);
  --color-border-secondary: rgba(255, 255, 255, 0.05);
  --color-border-focus: var(--color-neural-primary);
  --color-border-error: #ef4444;
  --color-border-success: #10b981;
  
  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #06b6d4;
  
  /* === TYPOGRAPHY === */
  
  /* Font Families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  --font-display: 'Orbitron', 'Exo 2', 'Rajdhani', sans-serif;
  
  /* Font Sizes - Fluid Typography */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  --font-size-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.25rem);
  --font-size-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);
  --font-size-5xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;
  
  /* === SPACING === */
  
  /* Base spacing unit */
  --space-unit: 0.25rem;
  
  /* Spacing Scale */
  --space-0: 0;
  --space-1: calc(var(--space-unit) * 1);   /* 4px */
  --space-2: calc(var(--space-unit) * 2);   /* 8px */
  --space-3: calc(var(--space-unit) * 3);   /* 12px */
  --space-4: calc(var(--space-unit) * 4);   /* 16px */
  --space-5: calc(var(--space-unit) * 5);   /* 20px */
  --space-6: calc(var(--space-unit) * 6);   /* 24px */
  --space-8: calc(var(--space-unit) * 8);   /* 32px */
  --space-10: calc(var(--space-unit) * 10); /* 40px */
  --space-12: calc(var(--space-unit) * 12); /* 48px */
  --space-16: calc(var(--space-unit) * 16); /* 64px */
  --space-20: calc(var(--space-unit) * 20); /* 80px */
  --space-24: calc(var(--space-unit) * 24); /* 96px */
  --space-32: calc(var(--space-unit) * 32); /* 128px */
  
  /* Fluid Spacing */
  --space-fluid-sm: clamp(1rem, 2vw, 1.5rem);
  --space-fluid-md: clamp(1.5rem, 4vw, 3rem);
  --space-fluid-lg: clamp(2rem, 6vw, 4rem);
  --space-fluid-xl: clamp(3rem, 8vw, 6rem);
  
  /* === LAYOUT === */
  
  /* Container Sizes */
  --container-xs: 20rem;
  --container-sm: 24rem;
  --container-md: 28rem;
  --container-lg: 32rem;
  --container-xl: 36rem;
  --container-2xl: 42rem;
  --container-3xl: 48rem;
  --container-4xl: 56rem;
  --container-5xl: 64rem;
  --container-6xl: 72rem;
  --container-7xl: 80rem;
  --container-full: 100%;
  
  /* Grid System */
  --grid-columns: 12;
  --grid-gap: var(--space-6);
  --grid-gap-sm: var(--space-4);
  --grid-gap-lg: var(--space-8);
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* === BORDERS & RADIUS === */
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;
  --radius-base: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Border Widths */
  --border-width-0: 0;
  --border-width-1: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;
  --border-width-8: 8px;
  
  /* === SHADOWS === */
  
  /* Neural-themed Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(99, 102, 241, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(99, 102, 241, 0.1), 0 1px 2px 0 rgba(99, 102, 241, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(99, 102, 241, 0.1), 0 2px 4px -1px rgba(99, 102, 241, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(99, 102, 241, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(99, 102, 241, 0.1), 0 10px 10px -5px rgba(99, 102, 241, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(99, 102, 241, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(99, 102, 241, 0.06);
  
  /* Glow Effects */
  --shadow-glow-sm: 0 0 10px rgba(99, 102, 241, 0.3);
  --shadow-glow-md: 0 0 20px rgba(99, 102, 241, 0.4);
  --shadow-glow-lg: 0 0 30px rgba(99, 102, 241, 0.5);
  --shadow-glow-xl: 0 0 40px rgba(99, 102, 241, 0.6);
  
  /* === ANIMATIONS === */
  
  /* Timing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-neural: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  /* Durations */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  --duration-slowest: 750ms;
  
  /* === SPECIFIC COMPONENT VARIABLES === */
  
  /* Book Dimensions */
  --book-width: min(80vw, 800px);
  --book-height: min(60vh, 600px);
  --book-depth: 30px;
  --page-thickness: 2px;
  
  /* Style Transfer */
  --style-preview-size: 60px;
  --style-grid-gap: var(--space-3);
  
  /* Face Detection */
  --hotspot-size: 24px;
  --hotspot-pulse-duration: 2s;
  
  /* Neural Network Visualization */
  --node-size: 8px;
  --connection-width: 2px;
  --network-color: var(--color-neural-primary);
  
  /* Glass Morphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(10px);
  
  /* Performance Thresholds */
  --performance-good: #10b981;
  --performance-warning: #f59e0b;
  --performance-critical: #ef4444;
  
  /* === RESPONSIVE BREAKPOINTS === */
  
  /* Mobile-first breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* Container Queries (for foldables and special devices) */
  --container-query-sm: 300px;
  --container-query-md: 600px;
  --container-query-lg: 900px;
  --container-query-xl: 1200px;
  
  /* === ACCESSIBILITY === */
  
  /* Focus States */
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-ring-color: var(--color-neural-primary);
  
  /* Motion Preferences */
  --motion-reduce: 1;
  --motion-safe: 1;
  
  /* High Contrast Mode */
  --contrast-high: 1;
  --contrast-normal: 1;
  
  /* === DARK MODE VARIANTS === */
  
  /* These will be overridden in light mode if implemented */
  --color-scheme: dark;
  
  /* === NEURAL STYLE SPECIFIC === */
  
  /* Van Gogh Theme */
  --vangogh-primary: #4a90e2;
  --vangogh-secondary: #f5a623;
  --vangogh-accent: #7ed321;
  
  /* Picasso Theme */
  --picasso-primary: #d0021b;
  --picasso-secondary: #f8e71c;
  --picasso-accent: #9013fe;
  
  /* Monet Theme */
  --monet-primary: #50e3c2;
  --monet-secondary: #b8e986;
  --monet-accent: #4a90e2;
  
  /* Kandinsky Theme */
  --kandinsky-primary: #f5a623;
  --kandinsky-secondary: #d0021b;
  --kandinsky-accent: #9013fe;
  
  /* Hokusai Theme */
  --hokusai-primary: #4a90e2;
  --hokusai-secondary: #bd10e0;
  --hokusai-accent: #50e3c2;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-reduce: 0;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
    --duration-slowest: 0ms;
  }
}

/* === HIGH CONTRAST === */
@media (prefers-contrast: high) {
  :root {
    --contrast-high: 1;
    --color-border-primary: rgba(255, 255, 255, 0.5);
    --color-border-secondary: rgba(255, 255, 255, 0.3);
  }
}

/* === LIGHT MODE (Optional Future Enhancement) === */
@media (prefers-color-scheme: light) {
  :root {
    /* Uncomment and adjust if implementing light mode */
    /*
    --color-scheme: light;
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f8fafc;
    --color-text-primary: #1a202c;
    --color-text-secondary: #2d3748;
    */
  }
}

/* === PRINT STYLES === */
@media print {
  :root {
    --color-bg-primary: #ffffff;
    --color-text-primary: #000000;
    --shadow-base: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}
