/* ============================================================================
   VISUAL STYLEGUIDE CSS 
   ============================================================================
   Last Updated: 2024
   
   CSS Custom Properties design system for unified visual language
   Based on Raptor theme with automotive styling
   ============================================================================ */

/* ============================================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================================ */

:root {
  /* ==========================================================================
     BRAND COLORS - Raptor Theme
     ========================================================================== */
  
  /* Primary Colors */
  --primary-orange: #F97316;        /* Primary CTA Orange */
  --primary-orange-light: #FB923C;  /* Hover state */
  --primary-orange-dark: #EA580C;   /* Active state */
  
  /* Monochrome Scale */
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --light-gray: #F3F4F6;
  --medium-gray: #9CA3AF;
  --dark-gray: #6B7280;
  --matte-black: #0d0d0d;
  --dark-grey: #202020;
  
  /* Ford Brand Colors */
  --ford-red: #FF0000;              /* Bright Red */
  --ford-midnight: #1B1F3B;         /* Deep Blue */
  
  /* Accent Colors */
  --secondary-blue: #005DAA;        /* Ford Blue */
  --secondary-yellow: #facc15;      /* Accent Yellow */
  --silver-metallic: #C0C0C0;       /* Chrome/Metallic Accent */
  
  /* UI State Colors */
  --success-green: #10B981;
  --warning-orange: #e93d3d;
  --warning-yellow: #F59E0B;
  --error-red: #EF4444;
  --info-blue: #3B82F6;
  
  /* Text Colors */
  --text-primary: #111111;
  --text-secondary: #6B7280;
  --text-on-dark: #FFFFFF;
  --text-muted: #9CA3AF;
  
  /* ==========================================================================
     TYPOGRAPHY SYSTEM
     ========================================================================== */
  
  /* Font Families */
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-headline: 'Fjalla One', 'Arial Black', sans-serif;
  --font-accent: 'Montserrat', sans-serif;
  
  /* Font Sizes - Fluid Scale */
  --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: 4rem;       /* 64px */
  
  /* 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.5;
  --line-height-relaxed: 1.75;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.02em;
  --letter-spacing-wider: 0.05em;
  
  /* ==========================================================================
     SPACING SYSTEM
     ========================================================================== */
  
  --spacing-xs: 0.25rem;    /* 4px */
  --spacing-sm: 0.5rem;     /* 8px */
  --spacing-md: 1rem;       /* 16px */
  --spacing-lg: 1.5rem;     /* 24px */
  --spacing-xl: 2rem;       /* 32px */
  --spacing-2xl: 3rem;      /* 48px */
  --spacing-3xl: 4rem;      /* 64px */
  --spacing-4xl: 5rem;      /* 80px */
  
  /* ==========================================================================
     VISUAL EFFECTS
     ========================================================================== */
  
  /* Shadows - Premium Depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
  --shadow-premium: 0 0 40px rgba(0, 0, 0, 0.3);
  
  /* Glows - Ford Theme */
  --glow-orange: 0 0 30px rgba(249, 115, 22, 0.5);
  --glow-blue: 0 0 30px rgba(0, 93, 170, 0.5);
  --glow-red: 0 0 30px rgba(200, 16, 46, 0.5);
  --glow-warning: 0 0 20px rgba(255, 107, 53, 0.8);
  --glow-warning-subtle: 0 0 10px rgba(255, 107, 53, 0.4);
  
  /* Border Radius */
  --radius-sm: 0.25rem;     /* 4px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;
  
  /* Borders */
  --border-width: 1px;
  --border-color: var(--medium-gray);
  
  /* ==========================================================================
     ANIMATION
     ========================================================================== */
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  --transition-slower: 700ms ease-in-out;
  --transition-slowest: 1000ms ease-in-out;
  --transition-premium: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* ==========================================================================
     LAYOUT
     ========================================================================== */
  
  /* Container Widths */
  --max-width-xs: 480px;
  --max-width-sm: 640px;
  --max-width-md: 768px;
  --max-width-lg: 1024px;
  --max-width-xl: 1280px;
  --max-width-wide: 1400px;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-above: 10;
  --z-dropdown: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-notification: 400;
  --z-top: 500;
  
  /* ==========================================================================
     GRADIENTS & OVERLAYS
     ========================================================================== */
  
  /* Hero Gradient Overlays */
  --overlay-light: rgba(0, 0, 0, 0.2);
  --overlay-medium: rgba(0, 0, 0, 0.5);
  --overlay-dark: rgba(0, 0, 0, 0.8);
  --overlay-gradient: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  
  /* Background Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
  --gradient-ford: linear-gradient(135deg, var(--ford-red) 0%, var(--secondary-blue) 100%);
  --gradient-dark: linear-gradient(135deg, var(--matte-black) 0%, var(--dark-grey) 100%);
  --gradient-metallic: linear-gradient(135deg, #C0C0C0 0%, #E5E5E5 50%, #C0C0C0 100%);
  
  /* Progress Bar Gradient */
  --progress-gradient: linear-gradient(90deg, var(--ford-red) 0%, var(--primary-orange) 50%, var(--secondary-yellow) 100%);
  --progress-light-blue: #00B4D8;
}

/* ============================================================================
   2. GLOBAL STYLES
   ============================================================================ */

/* ==========================================================================
   RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   BODY & TYPOGRAPHY
   ========================================================================== */

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   HEADINGS
   ========================================================================== */

h1, .h1 {
  font-family: var(--font-headline);
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin: 0 0 var(--spacing-lg) 0;
  letter-spacing: var(--letter-spacing-tight);
}

h2, .h2 {
  font-family: var(--font-headline);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

h3, .h3 {
  font-family: var(--font-headline);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

h4, .h4 {
  font-family: var(--font-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

h5, .h5 {
  font-family: var(--font-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

h6, .h6 {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-sm) 0;
}

/* ==========================================================================
   BODY TEXT
   ========================================================================== */

p {
  margin: 0 0 var(--spacing-md) 0;
}

.lead {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

strong, b {
  font-weight: var(--font-weight-semibold);
}

small, .small {
  font-size: var(--font-size-sm);
}

.text-muted {
  color: var(--text-muted);
}

/* ==========================================================================
   LINKS
   ========================================================================== */

a {
  color: var(--primary-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-orange-light);
  text-decoration: underline;
}

/* ==========================================================================
   LISTS
   ========================================================================== */

ul, ol {
  margin: 0 0 var(--spacing-md) 0;
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* ==========================================================================
   PREMIUM TEXT STYLES
   ========================================================================== */

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
}

.text-bold {
  font-weight: var(--font-weight-bold);
}

.text-headline {
  font-family: var(--font-headline);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.text-accent {
  font-family: var(--font-accent);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ============================================================================
   3. LAYOUT UTILITIES
   ============================================================================ */

/* ==========================================================================
   CONTAINERS
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-4xl) 0;
}

/* ============================================================================
   4. COMPONENTS
   ============================================================================ */

/* ==========================================================================
   BUTTONS
   ========================================================================== */

/* Base Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  gap: var(--spacing-sm);
}

/* Primary Button - Raptor Style */
.btn-primary {
  background: var(--warning-orange);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.btn-primary:hover {
  background: var(--warning-orange);
  filter: brightness(1.1);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  background: var(--warning-orange);
  filter: brightness(0.9);
}

/* Secondary Button - Ghost Style */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--silver-metallic);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--silver-metallic);
  z-index: -1;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--silver-metallic);
}

.btn-secondary:hover::before {
  width: 100%;
}

/* Button Sizes */
.btn-large {
  padding: 20px 40px;
  font-size: var(--font-size-xl);
  border-radius: var(--radius-xl);
}

/* Button States */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

/* Form Groups */
.form-group {
  margin-bottom: var(--spacing-lg);
}

/* Labels */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

/* Input Base Styles */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--spacing-md);
  font-size: var(--font-size-base);
  font-family: var(--font-primary);
  border: 1px solid var(--medium-gray);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Input Error State */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error-red);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Textarea */
.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Select */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  padding-right: var(--spacing-2xl);
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary-orange);
  color: var(--white);
}

/* ==========================================================================
   PROGRESS BARS
   ========================================================================== */

/* Base Progress Bar Container */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}

/* Progress Fill */
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow) ease-out;
}

/* Striped Progress Bar Animation */
.progress-striped .progress-fill {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
  0% { background-position: 40px 0; }
  100% { background-position: 0 0; }
}

/* ============================================================================
   5. UTILITY CLASSES
   ============================================================================ */

/* ==========================================================================
   DISPLAY UTILITIES
   ========================================================================== */

.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

/* ==========================================================================
   FLEXBOX UTILITIES
   ========================================================================== */

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-white { color: var(--white); }
.text-orange { color: var(--primary-orange); }
.text-red { color: var(--ford-red); }

/* ==========================================================================
   SPACING OVERRIDES
   ========================================================================== */

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

/* ==========================================================================
   VISUAL EFFECTS
   ========================================================================== */

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================================
   6. RESPONSIVE UTILITIES
   ============================================================================ */

/* Mobile First Breakpoints */
@media (max-width: 768px) {
  /* Typography Scale for Mobile */
  h1, .h1 { font-size: var(--font-size-4xl); }
  h2, .h2 { font-size: var(--font-size-3xl); }
  h3, .h3 { font-size: var(--font-size-2xl); }
  
  /* Container Padding */
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Section Spacing */
  .section {
    padding: var(--spacing-2xl) 0;
  }
}

/* Hide/Show Utilities */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
  .show-mobile { display: none !important; }
}

/* ============================================================================
   7. PRINT STYLES
   ============================================================================ */

@media print {
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  .no-print {
    display: none !important;
  }
}