/**
 * CSS Custom Properties (Design Tokens)
 * 
 * Centralized design system for consistent theming.
 * Benefits:
 * - Easy theme switching (light/dark mode)
 * - Consistent design across all components
 * - Single source of truth for design values
 * - Easy maintenance and updates
 */

:root {
  /* ===== COLOR PALETTE ===== */
  
  /* Primary Colors - Main brand colors */
  --color-primary: #0ea5e9;           /* Sky blue - trust, tech */
  --color-primary-dark: #0284c7;      /* Darker shade for hover states */
  --color-primary-light: #38bdf8;     /* Lighter shade for accents */
  
  /* Secondary Colors - Supporting colors */
  --color-secondary: #8b5cf6;         /* Purple - creativity, innovation */
  --color-secondary-dark: #7c3aed;
  --color-secondary-light: #a78bfa;
  
  /* Accent Colors - Additional highlights */
  --color-accent: #06b6d4;            /* Cyan - modern, tech-forward */
  --color-accent-alt: #10b981;        /* Green - success states */
  
  /* Background Colors - Dark theme */
  --color-bg-primary: #0f172a;        /* Main background - deep navy */
  --color-bg-secondary: #1e293b;      /* Card backgrounds */
  --color-bg-tertiary: #334155;       /* Hover states, borders */
  
  /* Text Colors - Hierarchy */
  --color-text-primary: #f1f5f9;      /* Main text - high contrast */
  --color-text-secondary: #cbd5e1;    /* Secondary text */
  --color-text-muted: #94a3b8;        /* Muted text - labels, hints */
  
  /* Border & Divider Colors */
  --color-border: #334155;
  --color-border-light: #475569;
  
  /* State Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* ===== GRADIENTS ===== */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  --gradient-hero: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
                   radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  
  /* ===== SHADOWS ===== */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);
  
  /* Colored shadows for emphasis */
  --shadow-primary: 0 8px 32px rgba(14, 165, 233, 0.3);
  --shadow-secondary: 0 8px 32px rgba(139, 92, 246, 0.3);
  
  /* ===== SPACING ===== */
  /* Using 4px base unit for consistent spacing */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */
  
  /* ===== TYPOGRAPHY ===== */
  
  /* Font Families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Font Sizes - Fluid typography using clamp() */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  
  /* ===== BORDERS ===== */
  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 4px;
  
  --border-radius-sm: 0.375rem;   /* 6px */
  --border-radius-md: 0.5rem;     /* 8px */
  --border-radius-lg: 0.75rem;    /* 12px */
  --border-radius-xl: 1rem;       /* 16px */
  --border-radius-2xl: 1.5rem;    /* 24px */
  --border-radius-full: 9999px;   /* Fully rounded */
  
  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Easing functions for natural motion */
  --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);
  
  /* ===== Z-INDEX SCALE ===== */
  /* Defined scale to avoid z-index conflicts */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  
  /* ===== BREAKPOINTS ===== */
  /* Note: These are used in media queries, not as CSS variables */
  /* Documented here for reference */
  /* --breakpoint-sm: 640px; */
  /* --breakpoint-md: 768px; */
  /* --breakpoint-lg: 1024px; */
  /* --breakpoint-xl: 1280px; */
  /* --breakpoint-2xl: 1536px; */
  
  /* ===== LAYOUT ===== */
  --container-max-width: 1400px;
  --navbar-height: 80px;
  
  /* ===== BACKDROP BLUR ===== */
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 16px;
}

/**
 * Light Mode Theme (Optional)
 * Uncomment to add light mode support
 */
/*
[data-theme="light"] {
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #e2e8f0;
  
  --color-text-primary: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;
  
  --color-border: #e2e8f0;
  --color-border-light: #cbd5e1;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}
*/

/**
 * Reduced Motion Preference
 * Respects user's motion preferences for accessibility
 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}