/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  --bg-dark: #070708;
  --bg-card: #121215;
  --bg-navbar: rgba(7, 7, 8, 0.75);
  
  --text-main: #f5f5f7;
  --text-muted: #8e8e93;
  --text-dark: #1d1d1f;
  
  --primary: #00b4ff;
  --primary-glow: rgba(0, 180, 255, 0.4);
  --primary-gradient: linear-gradient(135deg, #00b4ff 0%, #7000ff 100%);
  --accent-purple: #7000ff;
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --max-width: 1200px;
}

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

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 {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

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

/* ==========================================================================
   LOADING SYSTEM
   ========================================================================== */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader-container.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.loader-logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.6em;
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.loader-bar-wrapper {
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: var(--primary-gradient);
  box-shadow: 0 0 10px var(--primary);
  transition: width 0.1s linear;
}

.loader-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  font-weight: 600;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(7, 7, 8, 0.9);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.navbar.scrolled .nav-container {
  padding: 0.8rem 2rem;
}

.logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 180, 255, 0.1);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 180, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SCROLL ANIMATION PIN SECTION
   ========================================================================== */
.hero-scroll-container {
  position: relative;
  height: 350vh; /* Adjust height to change scroll speed of frames */
  width: 100%;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   HERO TEXT OVERLAY STYLES (Animated in on scroll)
   ========================================================================== */
.hero-text-overlay {
  position: absolute;
  top: 25%; /* Pushes text to the top quadrant, above the car silhouette */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 3.5rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 0.8rem;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

/* Active states for transition in */
.hero-text-overlay.active .hero-title {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-text-overlay.active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    letter-spacing: 0.25em;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.35em;
  }
  .hero-text-overlay {
    top: 28%;
  }
}



/* ==========================================================================
   CAR PPF DETAILS SECTION
   ========================================================================== */
.ppf-section, .packages-section {
  padding: 10rem 2rem;
  position: relative;
  background-color: var(--bg-dark);
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem auto;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #fff;
}

.section-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 6rem;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 3rem 2rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 180, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 180, 255, 0.05);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.card-border-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
  border: 1px solid var(--primary);
  box-shadow: inset 0 0 15px rgba(0, 180, 255, 0.08);
}

.feature-card:hover .card-border-glow {
  opacity: 0.15;
}

/* Visual Demonstrator Showcase */
.demonstrator-wrapper {
  background-color: #0b0b0e;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  overflow: hidden;
}

.demo-info h3 {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.demo-info p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.demo-specs {
  display: grid;
  gap: 1rem;
}

.demo-specs li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.demo-specs i {
  color: var(--primary);
}

/* Schematic car scanning block */
.demo-visual {
  position: relative;
  height: 300px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(0, 180, 255, 0.15);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Technical mesh background */
.mesh-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Laser sweep animation */
.scanning-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px var(--primary);
  opacity: 0.7;
  animation: laserSweep 4s infinite linear;
  z-index: 2;
}

@keyframes laserSweep {
  0% { left: 0%; }
  100% { left: 100%; }
}

.demo-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--primary);
  background: rgba(0, 180, 255, 0.1);
  border: 1px solid rgba(0, 180, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  z-index: 3;
}

.car-schematic {
  width: 85%;
  height: 70%;
  z-index: 1;
}

.car-outline {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawCar 6s infinite ease-in-out;
}

@keyframes drawCar {
  0%, 100% { stroke-dashoffset: 1000; }
  50% { stroke-dashoffset: 0; }
}

/* ==========================================================================
   PACKAGES SECTION
   ========================================================================== */
.packages-section {
  background-color: #0a0a0c;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  align-items: stretch;
}

.package-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 3.5rem 2.5rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.package-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.08);
}

.package-card.featured {
  border: 1px solid rgba(0, 180, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 180, 255, 0.04);
}

.package-card.featured:hover {
  border-color: rgba(0, 180, 255, 0.4);
}

.package-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.package-card.featured .package-tag {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 180, 255, 0.2);
}

.package-card h3 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.price {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.5rem;
}

.price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.package-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  min-height: 50px;
}

.package-features {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
  margin-top: auto;
}

.package-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.package-features i {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
}

.package-card.featured .package-features i {
  color: var(--primary);
}

.package-card .btn {
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 5rem 2rem 2rem 2rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  max-width: 350px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-links {
  display: flex;
  gap: 6rem;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-group h4 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.5rem;
}

.link-group a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.link-group a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 968px) {
  .overlay-slide h1,
  .overlay-slide h2 {
    font-size: 2.75rem;
  }
  
  .demonstrator-wrapper {
    grid-template-columns: 1fr;
    padding: 2.5rem;
    gap: 3rem;
  }
  
  .footer-links {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a real layout we'd make a burger menu, but this is a mockup navbar */
  }
  
  .nav-cta {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .ppf-section, .packages-section {
    padding: 6rem 1.5rem;
  }
  
  .section-title {
    font-size: 2.1rem;
  }
  
  .overlay-slide {
    left: 5%;
    width: 90%;
  }
}

.blank-space {
  height: 150vh;
  background-color: var(--bg-dark);
}
