@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,600;1,700;1,800&family=Titillium+Web:ital,wght@0,300;0,400;0,600;0,700;0,900;1,400;1,700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #0A0A0B;
  --color-accent: #DC2626;
  --color-accent-bright: #E50914;
  --color-silver: #E2E8F0;
  --color-bg-subtle: #F8FAFC;
  --color-bg-tech: #F1F5F9;
  --font-sans: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Barlow Semi Condensed', Arial, Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75rem;
  font-weight: 400;
  background-color: #FFFFFF;
  color: #0A0A0B;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Guard: Titles & display text must not exceed font-weight: 700 */
.font-black, .font-extrabold {
  font-weight: 700 !important;
}

button, .btn, input, select, textarea, nav, p, a {
  font-family: var(--font-sans);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Radiant Red Glow Utilities */
.glow-red {
  box-shadow: 0 0 25px -4px rgba(220, 38, 38, 0.45);
}
.glow-red-lg {
  box-shadow: 0 0 40px -4px rgba(229, 9, 20, 0.55);
}
.glow-red-subtle {
  box-shadow: 0 0 15px -3px rgba(220, 38, 38, 0.25);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Hero Cockpit HUD Card (Apple Pro Automotive Studio - Mockup Match) */
.hero-hud-card {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 
    0 25px 50px -12px rgba(10, 10, 11, 0.35),
    0 0 0 1px rgba(226, 232, 240, 0.5),
    0 10px 40px -8px rgba(220, 38, 38, 0.35);
  overflow: hidden;
}

.hero-hud-inner-frame {
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 10;
}

.hero-neon-corner-bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 15;
}

.hero-neon-corner-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 15;
}

.hero-neon-edge-bottom {
  position: absolute;
  bottom: 0;
  left: 70px;
  right: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.8) 20%, rgba(229, 9, 20, 0.95) 50%, rgba(229, 9, 20, 0.8) 80%, transparent);
  box-shadow: 0 0 12px 1px rgba(229, 9, 20, 0.7);
  pointer-events: none;
  z-index: 15;
}

.glass-dark {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px -2px rgba(10, 10, 11, 0.04), 0 2px 6px -1px rgba(10, 10, 11, 0.02);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 20px 35px -8px rgba(10, 10, 11, 0.08), 0 6px 16px -4px rgba(10, 10, 11, 0.04);
  transform: translateY(-4px);
}

/* Subtle Technical Grid Background */
.bg-tech-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
}

.bg-radial-fade {
  background: radial-gradient(circle at 50% 30%, rgba(220, 38, 38, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

/* High Sharpness Engine Canvas & Pure White Studio Vignette */
#engine-canvas {
  image-rendering: -webkit-optimize-contrast;
  filter: contrast(1.03) saturate(1.06);
}

.studio-vignette {
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(255, 255, 255, 0.4) 75%, #FFFFFF 98%);
  pointer-events: none;
}

/* Animated Radar Pulse */
@keyframes radarPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 16px rgba(220, 38, 38, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.radar-pulse {
  animation: radarPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Pulsing Status Dot */
@keyframes statusDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.status-dot-active {
  animation: statusDot 1.8s infinite ease-in-out;
}

/* Leaflet Custom Styles */
.leaflet-popup-content-wrapper {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px -6px rgba(10, 10, 11, 0.15) !important;
  border: 1px solid #E2E8F0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.5 !important;
}

.leaflet-popup-tip {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #DC2626;
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.custom-map-pin:hover {
  transform: scale(1.18);
}

/* Custom Range Slider */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #DC2626;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #E50914;
}

input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #DC2626;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  cursor: pointer;
}

/* ========================================================== */
/* 3D TILT & SPECULAR CURSOR SPOTLIGHT (Apple Pro Automotive) */
/* ========================================================== */
.tilt-card-container {
  perspective: 1200px;
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease;
  will-change: transform;
}

.tilt-card-content {
  transform: translateZ(28px);
}

.specular-spotlight {
  position: relative;
  overflow: hidden;
}

.specular-spotlight::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: radial-gradient(450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(229, 9, 20, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.specular-spotlight:hover::before {
  opacity: 1;
}

/* Audio EQ Equalizer Animation */
@keyframes eqBounce {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

.sound-playing .eq-bar:nth-child(1) {
  animation: eqBounce 0.55s ease-in-out infinite;
}

.sound-playing .eq-bar:nth-child(2) {
  animation: eqBounce 0.8s ease-in-out 0.15s infinite;
}

.sound-playing .eq-bar:nth-child(3) {
  animation: eqBounce 0.45s ease-in-out 0.3s infinite;
}

/* Animated Laser Highway Corridors on Leaflet Map */
@keyframes laserDash {
  to {
    stroke-dashoffset: -40;
  }
}

.laser-route-path {
  stroke-dasharray: 8, 10;
  animation: laserDash 1.2s linear infinite;
  filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.9));
}

.laser-route-blue {
  stroke-dasharray: 6, 8;
  animation: laserDash 1.6s linear infinite;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.8));
}

.radar-beacon {
  position: relative;
}

.radar-beacon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid #E50914;
  animation: radarPing 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes radarPing {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* Dual Tachometer Dial Needle */
.gauge-needle {
  transform-origin: 50% 50%;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================================== */
/* CINEMATIC GSAP EXPANDING PARALLAX SHOWCASES */
/* ========================================================== */
.parallax-expand-section {
  position: relative;
  overflow: hidden;
}

.parallax-card {
  will-change: transform, border-radius;
  transform-origin: center center;
  box-shadow: 0 30px 70px -15px rgba(10, 10, 11, 0.5);
}

.parallax-img {
  will-change: transform;
  transform-origin: center center;
  image-rendering: -webkit-optimize-contrast;
}

/* Glass Dark Panel for Telemetry Overlays */
.glass-dark {
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* High-Contrast Bento Card Depth */
.tilt-card {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.tilt-card:hover {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 30px -5px rgba(220, 38, 38, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}


