/* variables.css - Core CSS variables for branding, spacing, layout, and theming */

:root {
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --text-color: var(--text-primary);

  /* Typography Scales */
  --text-hero: clamp(2.5rem, 5vw, 4rem);
  --text-section-title: clamp(2rem, 4vw, 3rem);
  --text-card-title: clamp(1.25rem, 3vw, 1.75rem);
  --text-price-lg: 3rem;
  --text-3xl: 2.25rem;
  --text-2xl: 2rem;
  --text-xl: 1.5rem;
  --text-lg: 1.25rem;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-xxs: 0.6875rem;
  --text-micro: 0.625rem;
  --text-nano: 0.5rem;

  /* Line Heights */
  --lh-heading: 1.2;
  --lh-body: 1.6;

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-premium: 0 24px 48px -12px rgba(135, 22, 24, 0.08);

  /* Spacing Grid */
  --section-spacing-desktop: 120px;
  --section-spacing-tablet: 80px;
  --section-spacing-mobile: 60px;
  --container-max-width: 1440px;

  /* Motion & Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ==========================================
     SEMANTIC TOKEN SYSTEM (LIGHT MODE)
     ========================================== */

  /* Brand Colors */
  --primary-color: #871618;
  --primary-hover: #6E1113;
  --primary-light: #F9ECEC;
  --primary-glow: rgba(135, 22, 24, 0.15);

  /* Background & Surface */
  --background: #FFFFFF;
  --foreground: #000000;
  --card: #FFFFFF;
  --card-foreground: #000000;
  --muted: #F5F5F5;
  --muted-foreground: #8E8E93;

  /* Legacy aliases (keep for backward compat) */
  --bg-color: var(--background);
  --surface-color: var(--muted);
  --surface-hover: #F5F5F5;
  --text-primary: var(--foreground);
  --text-secondary: #5E5E5E;
  --text-muted: var(--muted-foreground);

  /* Borders & Inputs */
  --border: #EAEAEA;
  --input: #EAEAEA;
  --border-color: var(--border);
  --border-hover: #D6D6D6;
  --ring: var(--primary-color);

  /* Status Colors */
  --success: #16A34A;
  --success-light: #DCFCE7;
  --success-text: #14532D;
  --success-glow: rgba(22, 163, 74, 0.15);

  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --warning-text: #78350F;

  --error: #DC2626;
  --error-light: #FEE2E2;
  --error-text: #7F1D1D;

  --info: #3B82F6;
  --info-light: #DBEAFE;
  --info-text: #1E3A5F;

  /* Overlay */
  --overlay: rgba(0, 0, 0, 0.4);

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(234, 234, 234, 0.6);
  --glass-backdrop-blur: 16px;

  /* Chart Colors */
  --chart-1: #871618;
  --chart-2: #16A34A;
  --chart-3: #F59E0B;
  --chart-4: #3B82F6;
  --chart-5: #8B5CF6;
}

/* ==========================================
   DARK MODE OVERRIDES
   ========================================== */
[data-theme="dark"] {
  /* Brand Colors */
  --primary-color: #871618;
  --primary-hover: #A31B1E;
  --primary-light: #2C0F10;
  --primary-glow: rgba(163, 27, 30, 0.3);

  /* Background & Surface */
  --background: #0A0A0A;
  --foreground: #FAFAFA;
  --card: #141414;
  --card-foreground: #FAFAFA;
  --muted: #1A1A1A;
  --muted-foreground: #8A8A8E;

  /* Legacy aliases */
  --bg-color: var(--background);
  --surface-color: var(--muted);
  --surface-hover: #1F1F1F;
  --text-primary: var(--foreground);
  --text-secondary: #A0A0A0;
  --text-muted: #6B6B72;

  /* Borders & Inputs */
  --border: #262626;
  --input: #262626;
  --border-color: var(--border);
  --border-hover: #383838;

  /* Status Colors */
  --success: #22C55E;
  --success-light: #064E3B;
  --success-text: #D1FAE5;

  --warning: #FBBF24;
  --warning-light: #78350F;
  --warning-text: #FEF3C7;

  --error: #EF4444;
  --error-light: #7F1D1D;
  --error-text: #FEE2E2;

  --info: #60A5FA;
  --info-light: #1E3A5F;
  --info-text: #DBEAFE;

  /* Overlay */
  --overlay: rgba(0, 0, 0, 0.6);

  /* Glass Effect */
  --glass-bg: rgba(20, 20, 20, 0.8);
  --glass-border: rgba(38, 38, 38, 0.6);
  --glass-backdrop-blur: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-premium: 0 24px 48px -12px rgba(135, 22, 24, 0.25);

  /* Chart Colors (adjusted for dark backgrounds) */
  --chart-1: #EF5350;
  --chart-2: #66BB6A;
  --chart-3: #FFA726;
  --chart-4: #42A5F5;
  --chart-5: #AB47BC;
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
