/*
  F1Key Website - CSS Variables
  Design tokens for colors, typography, spacing, and more
*/

:root {
  /* ==================== */
  /* DYNAMIC THEME VARIABLES */
  /* (Controlled by theme-switcher.js) */
  /* ==================== */
  
  --spacing-multiplier: 1;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  
  /* ==================== */
  /* COLORS */
  /* ==================== */
  
  /* Primary Colors - F1Key Brand */
  --color-black: #0f0f0f;           /* Negro mate profesional (no #000 puro) */
  --color-ferrari-red: #DC143C;
  --color-white: #FFFFFF;
  
  /* Surface Layers - Sistema de capas para profundidad */
  --color-surface-base: #0f0f0f;    /* Fondo principal */
  --color-surface-1: #1a1a1a;       /* Elevación nivel 1 - sections alternadas */
  --color-surface-2: #262626;       /* Elevación nivel 2 - cards */
  --color-surface-3: #333333;       /* Elevación nivel 3 - hover/active */
  
  /* Grayscale */
  --color-light-gray: #F5F5F5;
  --color-dark-gray: #1A1A1A;
  --color-medium-gray: #333333;
  --color-border-gray: #2A2A2A;
  
  /* Semantic Colors */
  --color-primary: var(--color-ferrari-red);
  --color-background: var(--color-surface-base);
  --color-text: var(--color-white);
  --color-text-secondary: var(--color-light-gray);
  --color-card-bg: var(--color-surface-2);
  --color-card-hover: var(--color-surface-3);
  
  /* ==================== */
  /* TYPOGRAPHY */
  /* ==================== */
  
  /* Font Families */
  --font-primary: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  /* Font Sizes - Using clamp for fluid typography */
  --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 */
  
  /* Heading Sizes (Responsive) */
  --font-size-h1: clamp(3rem, 8vw, 7rem);        /* 48px - 112px */
  --font-size-h2: clamp(2.5rem, 5vw, 4rem);      /* 40px - 64px */
  --font-size-h3: clamp(1.75rem, 3vw, 2rem);     /* 28px - 32px */
  --font-size-h4: clamp(1.25rem, 2vw, 1.5rem);   /* 20px - 24px */
  --font-size-h5: 1.125rem;                      /* 18px */
  --font-size-h6: 1rem;                          /* 16px */
  
  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.1em;
  
  /* ==================== */
  /* SPACING */
  /* ==================== */
  
  /* Spacing Scale (Based on 8px grid) */
  --spacing-xs: 0.5rem;      /* 8px */
  --spacing-sm: 1rem;        /* 16px */
  --spacing-md: 2rem;        /* 32px */
  --spacing-lg: 3rem;        /* 48px */
  --spacing-xl: 5rem;        /* 80px */
  --spacing-2xl: 8rem;       /* 128px */
  
  /* Container & Section Spacing */
  --container-padding: clamp(1rem, 5vw, 3rem);
  --section-padding-y: clamp(4rem, 10vh, 8rem);
  --section-padding-x: var(--container-padding);
  
  /* Max Width */
  --container-max-width: 1400px;
  --content-max-width: 1200px;
  --text-max-width: 65ch;
  
  /* ==================== */
  /* TRANSITIONS */
  /* ==================== */
  
  /* Durations */
  --transition-fast: 0.15s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --transition-slower: 0.8s;
  
  /* Easing Functions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Combined Transitions */
  --transition-all: all var(--transition-normal) var(--ease-in-out);
  --transition-color: color var(--transition-fast) var(--ease-in-out);
  --transition-transform: transform var(--transition-normal) var(--ease-out);
  --transition-opacity: opacity var(--transition-normal) var(--ease-in-out);
  
  /* ==================== */
  /* BORDERS & RADIUS */
  /* ==================== */
  
  /* Border Widths */
  --border-width-thin: 1px;
  --border-width-normal: 2px;
  --border-width-thick: 3px;
  
  /* Border Radius */
  --radius-sm: 0.25rem;      /* 4px */
  --radius-md: 0.5rem;       /* 8px */
  --radius-lg: 1rem;         /* 16px */
  --radius-full: 9999px;
  
  /* ==================== */
  /* SHADOWS */
  /* ==================== */
  
  /* Box Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  
  /* Glow Effects */
  --glow-red: 0 0 20px rgba(220, 20, 60, 0.5);
  --glow-red-intense: 0 0 30px rgba(220, 20, 60, 0.8);
  
  /* ==================== */
  /* Z-INDEX */
  /* ==================== */
  
  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-navbar: 1000;
  --z-loader: 9999;
  
  /* ==================== */
  /* BREAKPOINTS */
  /* ==================== */
  /* These are for reference in media queries */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* ==================== */
  /* ANIMATIONS */
  /* ==================== */
  
  /* Animation Durations */
  --animation-fast: 0.2s;
  --animation-normal: 0.5s;
  --animation-slow: 1s;
  --animation-slower: 2s;
}

/* Dark mode support (already dark by default) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Already using dark theme */
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
    --transition-slower: 0s;
    --animation-fast: 0s;
    --animation-normal: 0s;
    --animation-slow: 0s;
    --animation-slower: 0s;
  }
  
  html {
    scroll-behavior: auto;
  }
}
