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

:root {
  --bmw-blue: #0066B1;
  --bmw-light: #1C69D4;
  --dark: #0a0a0f;
  --dark-2: #12121a;
  --dark-3: #1a1a28;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #0066B1;
  --radius: 12px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--bmw-light); }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 102, 177, 0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--bmw-light); }

.nav-cta {
  background: var(--bmw-blue);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--bmw-light);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 177, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 177, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 102, 177, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  padding: 0 24px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bmw-light);
  margin-bottom: 24px;
  padding: 8px 20px;
  border: 1px solid rgba(0, 102, 177, 0.3);
  border-radius: 50px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bmw-blue);
  color: #fff;
  padding: 16px 36px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 24px rgba(0, 102, 177, 0.3);
}

.btn-primary:hover {
  background: var(--bmw-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 102, 177, 0.4);
}

.btn-primary svg {
  animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--bmw-blue), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== EXPLORE / SCROLL ANIMATION ===== */
.explore {
  position: relative;
}

.explore-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--dark);
}

.explore-viewport {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px 40px;
}

.explore-labels {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.3;
  transition: opacity 0.5s, transform 0.5s;
  transform: translateX(-10px);
}

.label-item.active {
  opacity: 1;
  transform: translateX(0);
}

.label-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bmw-blue);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 102, 177, 0.4);
  border-radius: 50%;
}

.label-text {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.car-scene {
  width: 100%;
  max-width: 900px;
  position: relative;
}

.car-canvas-wrap {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(0, 102, 177, 0.08) 0%, transparent 70%);
}

#carCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.car-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: opacity 0.5s, visibility 0.5s;
  z-index: 5;
}

.car-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.car-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 102, 177, 0.2);
  border-top-color: var(--bmw-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.part-info {
  position: absolute;
  bottom: -20px;
  right: 0;
  background: rgba(18, 18, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 102, 177, 0.2);
  border-radius: var(--radius);
  padding: 16px 24px;
  min-width: 220px;
  transition: opacity 0.4s, transform 0.4s;
}

.part-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--bmw-light);
}

.part-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.explore-progress {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bmw-blue), var(--bmw-light));
  border-radius: 3px;
  transition: width 0.1s linear;
}

.explore-spacer {
  height: 500vh;
  pointer-events: none;
}

/* ===== SERVICES ===== */
.services {
  padding: 120px 0;
  background: var(--dark-2);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 177, 0.3), transparent);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bmw-light);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 102, 177, 0.3);
  box-shadow: 0 12px 40px rgba(0, 102, 177, 0.1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 102, 177, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 120px 0;
  background: var(--dark);
}

.gallery-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 8px 0 20px;
  color: var(--text);
}

.gallery-heading:not(:first-of-type) {
  margin-top: 56px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--dark-3);
  aspect-ratio: 4 / 5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--bmw-blue);
}

/* ===== STATS ===== */
.stats {
  padding: 80px 0;
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--bmw-light);
  letter-spacing: -2px;
}

.stat-num::after {
  content: '+';
  font-size: 0.6em;
  vertical-align: super;
}

.stat-item:last-child .stat-num::after {
  content: '/7';
  font-size: 0.35em;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact {
  padding: 120px 0;
  background: var(--dark-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s;
  outline: none;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(0, 102, 177, 0.5);
}

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

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0;
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-note {
  margin-top: 8px;
  font-size: 0.75rem !important;
  opacity: 0.6;
}

.footer-credit {
  margin-top: 6px;
  font-size: 0.7rem !important;
  opacity: 0.5;
}

.footer-credit a {
  color: var(--bmw-light);
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .explore-labels {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 102, 177, 0.15);
  }

  .services-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .part-info {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 16px;
    width: 100%;
  }

  .car-canvas-wrap {
    height: 350px;
  }

  .explore-spacer {
    height: 400vh;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    letter-spacing: -1px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
