/* ==========================================================================
   SMOOTH DRIVE ASSIST — Premium Design System (Production Optimized)
   Inspired by comma.ai, Tesla, and Linear
   ========================================================================== */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CRITICAL CSS - Above the fold styles for faster initial render
   ========================================================================== */
:root {
  /* Colors */
  --color-bg: #000000;
  --color-bg-elevated: #0a0a0a;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);

  --color-accent: #00ff88;
  --color-accent-dim: rgba(0, 255, 136, 0.15);
  --color-accent-glow: rgba(0, 255, 136, 0.4);

  --color-text: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-muted: rgba(255, 255, 255, 0.5);
  --color-text-dim: rgba(255, 255, 255, 0.3);

  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-hover: rgba(255, 255, 255, 0.2);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Fallbacks for older browsers */
@supports not (--css: variables) {
  :root {
    --color-bg: #000;
    --color-text: #fff;
    --color-accent: #00ff88;
  }
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Performance optimization - use content instead of strict to avoid rendering issues */
  contain: content;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  /* Performance optimizations */
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Focus styles with reduced motion support */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM
   ========================================================================== */
.text-display {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.text-mega {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}

.text-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.text-body-lg {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-caption {
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* Gradient text with vendor prefixes */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), #00ccff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-fill-color: transparent;
}

/* ==========================================================================
   LAYOUT SYSTEM
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-5xl) 0;
}

.section-full {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ==========================================================================
   COMPONENT: HEADER - Clean Professional Design
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.9;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: #000000;
}

.logo-text {
  white-space: nowrap;
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s;
}

.social-icon:hover {
  color: #000000;
  background: var(--color-accent);
  transform: translateY(-2px);
}

.btn-header {
  white-space: nowrap;
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   COMPONENT: BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Performance optimization */
  will-change: transform, box-shadow;
  contain: content;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-card);
  border-color: var(--color-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  color: var(--color-text);
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
}

.btn-glow {
  box-shadow: 0 0 30px var(--color-accent-glow);
  animation: glow 2s ease-in-out infinite alternate;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: var(--space-sm);
}

/* ==========================================================================
   COMPONENT: CARDS
   ========================================================================== */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  /* Performance optimization */
  will-change: transform, background, border;
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
}

.card-glass {
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-accent-dim), transparent 50%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-glow:hover::before {
  opacity: 1;
}

/* ==========================================================================
   COMPONENT: HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 140px var(--space-xl) var(--space-4xl); /* Account for header + promo banner */
  /* Performance optimization */
  contain: content;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-gradient-1 {
  position: absolute;
  top: -50%;
  left: -25%;
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse, var(--color-accent-dim) 0%, transparent 70%);
  opacity: 0.3;
  filter: blur(60px);
}

.hero-gradient-2 {
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(0, 204, 255, 0.15) 0%, transparent 70%);
  opacity: 0.4;
  filter: blur(60px);
}

.hero-gradient-3 {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
  opacity: 0.3;
  filter: blur(40px);
}

.hero-content {
  text-align: center;
  max-width: 1000px;
  z-index: 1;
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-subtitle-large {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3xl);
  font-weight: 400;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-3xl);
  justify-content: center;
  margin-top: var(--space-4xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--color-border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  animation: float 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-text-muted);
  border-left: none;
  border-top: none;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

/* ==========================================================================
   COMPONENT: PRODUCT SHOWCASE
   ========================================================================== */
.product-showcase {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
  padding: var(--space-4xl) 0;
}

.product-device {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-glow {
  position: absolute;
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse at center, var(--color-accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.6;
  animation: pulse-glow 3s ease-in-out infinite;
}

.device-image {
  position: relative;
  z-index: 2;
  width: 280px;
  height: 170px;
  animation: float 4s ease-in-out infinite;
}

.device-image svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* Floating Labels */
.floating-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: float-label 3s ease-in-out infinite;
  white-space: nowrap;
}

.label-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* Label positions */
.floating-label.label-1 { top: 5%; left: 5%; animation-delay: 0s; }
.floating-label.label-2 { top: 5%; right: 5%; animation-delay: 0.5s; }
.floating-label.label-3 { top: 40%; left: 0%; animation-delay: 1s; }
.floating-label.label-4 { top: 40%; right: 0%; animation-delay: 1.5s; }
.floating-label.label-5 { bottom: 10%; left: 10%; animation-delay: 2s; }
.floating-label.label-6 { bottom: 10%; right: 10%; animation-delay: 2.5s; }

/* Social Proof Bar */
.social-proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-2xl);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-top: var(--space-xl);
}

.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.proof-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.proof-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* ==========================================================================
   COMPONENT: DEMO VIDEO SECTION
   ========================================================================== */
.demo-section {
  background: var(--color-bg);
}

.demo-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.demo-header h2 {
  margin-bottom: var(--space-md);
}

.video-container {
  max-width: 900px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-caption {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   COMPONENT: FEATURES GRID
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-2xl);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--color-accent-dim);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.feature-number {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-lg);
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   COMPONENT: PRICING CARDS
   ========================================================================== */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  padding: var(--space-2xl);
  text-align: left;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--color-accent);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.pricing-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.pricing-card-price {
  font-size: 3rem;
  font-weight: 700;
}

.pricing-card-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-card-badge {
  background: var(--color-accent);
  color: #000;
  padding: 0.4em 1em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: var(--space-md);
  animation: pulse-glow 2s ease-in-out infinite;
}

.pricing-features {
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
}

/* ==========================================================================
   COMPONENT: TESTIMONIALS
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-5xl);
}

.testimonial {
  padding: var(--space-xl);
  position: relative;
}

.testimonial-stars {
  color: #fbbf24;
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.testimonial-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-accent-dim);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   COMPONENT: FAQ
   ========================================================================== */
.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl) 0;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 500;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-bottom: var(--space-xl);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   COMPONENT: FOOTER
   ========================================================================== */
.footer {
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  transform: translateY(-2px);
}

/* ==========================================================================
   COMPONENT: FORM ELEMENTS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ==========================================================================
   COMPONENT: PROMO BANNER
   ========================================================================== */
.promo-banner {
  background: linear-gradient(90deg, var(--color-accent) 0%, #00cc6a 100%);
  color: #000;
  padding: 0.75rem 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  position: fixed;
  top: 72px; /* Below header */
  left: 0;
  right: 0;
  z-index: 999;
}

.promo-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.promo-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25em 0.75em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.promo-text {
  font-size: 0.9rem;
}

.promo-cta {
  background: #000;
  color: var(--color-accent);
  padding: 0.4em 1em;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.promo-cta:hover {
  background: #111;
  transform: translateX(3px);
}

/* ==========================================================================
   COMPONENT: COOKIE BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* ==========================================================================
   COMPONENT: PAGE LOADER
   ========================================================================== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
   opacity: 0;
   visibility: hidden;
   display: none;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-xl);
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 2s ease-in-out infinite;
}

.loader-logo svg {
  width: 32px;
  height: 32px;
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--color-bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #00ccff);
  border-radius: var(--radius-full);
  width: 0%;
  animation: loaderProgress 2s ease-out forwards;
}

/* ==========================================================================
   COMPONENT: SCROLL PROGRESS
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #00ccff);
  z-index: 1001;
  transform-origin: left;
}

/* ==========================================================================
   COMPONENT: BACK TO TOP
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  transform: translateY(-4px);
}

/* ==========================================================================
   COMPONENT: MOBILE NAVIGATION
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav .nav-link {
  font-size: 1.5rem;
  font-weight: 500;
}

/* ==========================================================================
   COMPONENT: COMPARISON TABLE
   ========================================================================== */
.comparison-table-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.comparison-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-lg) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  background: var(--color-bg-elevated);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.comparison-table td {
  color: var(--color-text-secondary);
}

.comparison-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
  min-width: 140px;
}

.comparison-table .highlight {
  background: linear-gradient(135deg, var(--color-accent-dim), transparent);
  font-weight: 600;
  color: var(--color-accent);
  position: relative;
}

.comparison-table .highlight::before {
  content: '✓';
  position: absolute;
  left: var(--space-sm);
  color: var(--color-accent);
  font-weight: 700;
}

/* ==========================================================================
   COMPONENT: INSTALL TIMELINE
   ========================================================================== */
.install-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.install-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  position: relative;
}

.timeline-marker {
  width: 50px;
  height: 50px;
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

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

/* ==========================================================================
   COMPONENT: GALLERY
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto var(--space-4xl);
}

.gallery-item {
  text-align: center;
}

.gallery-image {
  height: 200px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--color-accent-dim), var(--color-bg-card));
}

.gallery-placeholder {
  width: 64px;
  height: 64px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-placeholder svg {
  width: 32px;
  height: 32px;
}

.gallery-caption {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   COMPONENT: VEHICLE COMPATIBILITY
   ========================================================================== */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

.brand-card {
  padding: var(--space-lg);
  text-align: center;
  font-weight: 500;
}

.brand-card:hover {
  border-color: var(--color-accent);
}

.vehicle-accordion {
  margin-top: var(--space-2xl);
}

.vehicle-brand {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.vehicle-brand summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  background: var(--color-bg-card);
  list-style: none;
  transition: background var(--transition-fast);
}

.vehicle-brand summary::-webkit-details-marker {
  display: none;
}

.vehicle-brand summary:hover {
  background: var(--color-bg-card-hover);
}

.vehicle-brand summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.vehicle-brand[open] summary::after {
  transform: rotate(45deg);
}

.vehicle-models {
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.vehicle-model {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.callout-box {
  background: var(--color-accent-dim);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  margin-top: var(--space-3xl);
}

.callout-box h3 {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.callout-box p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   COMPONENT: LEGAL PAGES
   ========================================================================== */
.legal-page {
  padding-top: calc(var(--header-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: var(--space-lg);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.legal-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.legal-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.legal-content li {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  list-style: disc;
}

.legal-updated {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   COMPONENT: ERROR PAGES
   ========================================================================== */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-xl);
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-page h1 {
  margin-bottom: var(--space-md);
}

.error-page p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   COMPONENT: COMMUNITY STATS
   ========================================================================== */
.community-highlights {
  margin: 3rem 0;
}

.community-highlights .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.community-highlights .stat-item {
  text-align: center;
  padding: 2rem;
}

.community-highlights .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.community-highlights .stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
}

.community-highlights .stat-label {
  font-size: 1rem;
  margin-top: 0.5rem;
  opacity: 0.9;
}

.community-highlights .stat-source {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 0.5rem;
}

.trust-badge {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
}

/* ==========================================================================
   ANIMATIONS - Optimized for performance
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--color-accent-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--color-accent-glow);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(-10px) rotate(45deg);
  }
  60% {
    transform: translateY(-5px) rotate(45deg);
  }
}

@keyframes loaderProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes float-label {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Scroll animations - optimized */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children - optimized */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.hidden { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  opacity: 0.7;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
  body {
    background: white;
    color: black;
  }

  .header, .footer, .cookie-banner, .promo-banner, .back-to-top {
    display: none !important;
  }

  .section {
    padding: 1in 0;
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Print-specific optimizations */
  @page {
    size: auto;
    margin: 1in;
  }
}

/* ==========================================================================
   RESPONSIVE STYLES - Mobile first approach
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-desktop {
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .header-social {
    gap: 0.375rem;
  }

  .social-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  :root {
    --space-5xl: 5rem;
    --space-4xl: 4rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .nav-desktop,
  .header-social {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header {
    padding: 0.75rem 0;
  }

  .promo-banner {
    top: 60px;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .hero-scroll-hint {
    display: none;
  }

  .floating-labels {
    display: none;
  }

  .device-image {
    width: 220px;
    height: 130px;
  }

  .social-proof-bar {
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .proof-divider {
    display: none;
  }

  .proof-value {
    font-size: 1.25rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .featured-testimonial-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .contact-options {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    margin-bottom: var(--space-xl);
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .text-display {
    font-size: 2.5rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .btn-lg {
    padding: var(--space-md) var(--space-xl);
  }

  .community-highlights .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BROWSER-SPECIFIC FIXES
   ========================================================================== */
/* Safari specific fixes */
@media not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) {
    /* Fix for Safari rendering issues */
    .card {
      -webkit-backface-visibility: hidden;
    }

    .btn {
      -webkit-transform: translateZ(0);
    }
  }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
  /* Fix for Firefox scrollbar issues */
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-bg);
  }
}

/* IE11 specific fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  /* Basic fallback for IE11 */
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }

  .text-gradient {
    color: var(--color-accent);
    background: none;
  }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* GPU acceleration for animations */
@media (prefers-reduced-motion: no-preference) {
  [data-animate],
  .animate-on-scroll,
  .stagger-children > * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
  }
}

/* Containment for better performance */
[data-contain],
.header,
.footer,
.card,
.modal-content {
  contain: content;
}

/* Optimize images and videos */
img[loading="lazy"],
video[loading="lazy"] {
  content-visibility: auto;
}

/* ==========================================================================
   END OF FILE
   ========================================================================== */