/* ═══════════════════════════════════════════════
   AUTOWORLD BRUSSEL — STYLE SHEET
   Horizontal-scroll museum with spinning wheels
   ═══════════════════════════════════════════════ */

/* ─── CUSTOM PROPERTIES (PALETTE) ─── */
:root {
  --color-bg: #2f3852; /* Bleu Blueprint */
  --color-bg-light: #3d4a6a;
  --color-rouge-course: #b22222; /* Rouge Course */
  --color-vert-heritage: #3a5a40; /* Vert Héritage */
  --color-argent: #a5a9b4; /* Argent Métallique */
  --color-gris-pneu: #1c1c1c; /* Gris Pneu */
  --color-blanc: #ffffff; /* Blanc Pur */

  /* Legacy alias */
  --color-accent: var(--color-rouge-course);
}

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

html {
  scroll-behavior: auto;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--color-bg);
  color: var(--color-blanc);
  overflow-x: hidden;
}

/* ── Blueprint grid overlay — covers entire site ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(165, 169, 180, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165, 169, 180, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
}

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

/* ═══════════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 10vh;
}

.preloader__logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 1;
  z-index: -1;
}


/* ═══════════════════════════════════════════════
   SITE & HORIZONTAL TRACK
   ═══════════════════════════════════════════════ */
.site {
  visibility: hidden;
  overflow: hidden;
}

.track {
  display: flex;
  flex-wrap: nowrap;
}

.panel {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════
   ROAD — Gris Pneu band at the bottom
   ═══════════════════════════════════════════════ */
.road {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--color-gris-pneu);
}

.road::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.15) 0px,
    rgba(255, 255, 255, 0.15) 30px,
    transparent 30px,
    transparent 60px
  );
}

/* ── Progress bar (Rouge Course) on road ── */
.road-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--color-rouge-course);
  z-index: 100;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(178, 34, 34, 0.6);
}

/* ═══════════════════════════════════════════════
   TOP BAR — only burger + music
   ═══════════════════════════════════════════════ */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.5rem, 3vw, 3rem);
  pointer-events: none;
}

.nav-bar__left,
.nav-bar__right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  pointer-events: auto;
}

.nav-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.85;
  transition:
    opacity 0.3s ease,
    filter 0.3s ease,
    transform 0.25s ease;
  filter: brightness(0) invert(1);
}

.nav-logo {
  height: clamp(24px, 4vw, 32px);
  width: auto;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.nav-logo:hover {
  transform: scale(1.05);
  opacity: 1;
}

.nav-logo:active {
  transform: scale(0.95);
}

.nav-icon:hover {
  opacity: 1;
  filter: brightness(0) invert(0.65);
  transform: scale(1.15);
}

.nav-icon:active {
  transform: scale(0.95);
}

/* Music icon paused state */
.nav-icon.is-paused {
  opacity: 0.35;
}

/* ═══════════════════════════════════════════════
   SIDEBAR — slides in from left
   ═══════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: rgba(28, 28, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar.is-open {
  transform: translateX(0);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__logo {
  height: clamp(30px, 5vw, 40px);
  width: auto;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  gap: 0.25rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  text-decoration: none;
  color: var(--color-blanc);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition:
    background 0.25s ease,
    color 0.25s ease;
  opacity: 0.8;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.sidebar__link:hover .sidebar__icon {
  filter: brightness(0) invert(0.65);
}

.sidebar__icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
  flex-shrink: 0;
}

/* ── Sidebar overlay ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Navigation arrows ── */
.nav-arrows {
  position: fixed;
  bottom: 80px;
  left: clamp(1rem, 2vw, 2rem);
  z-index: 500;
  display: flex;
  gap: 0.6rem;
  pointer-events: auto;
}

.nav-arrows .nav-icon {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════
   HERO — improved design
   ═══════════════════════════════════════════════ */
.panel--hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at 50% 40%,
    var(--color-bg-light) 0%,
    var(--color-bg) 70%
  );
}

/* ── Blueprint grid overlay ── */
.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(165, 169, 180, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165, 169, 180, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.hero__logo {
  width: clamp(100px, 14vw, 220px);
  margin: 0 auto 2.5rem;
}

/* ── Decorative lines ── */
.hero__deco-line {
  width: 80px;
  height: 2px;
  background: var(--color-rouge-course);
  margin: 0 auto;
  opacity: 0.7;
}

.hero__deco-line--top {
  margin-bottom: 1.5rem;
}

.hero__deco-line--bottom {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.hero__title--accent {
  color: var(--color-rouge-course);
}

.hero__subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.3rem);
  font-weight: 300;
  opacity: 0.6;
  margin-bottom: 3rem;
  color: var(--color-argent);
}

/* ── Scroll hint with mouse icon ── */
.hero__scroll-hint {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.hero__scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 11px;
  position: relative;
}

.hero__scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--color-rouge-course);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(10px);
  }
}

/* ═══════════════════════════════════════════════
   CAR PANEL
   ═══════════════════════════════════════════════ */
.car-panel {
  background: var(--color-bg);
}

.car-panel__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 6rem);
  width: 100%;
  height: 100%;
  padding: 2rem clamp(2rem, 5vw, 6rem);
  padding-bottom: 80px;
}

/* ── Visual (car image container) ── */
.car-panel__visual {
  position: relative;
  flex: 0 0 auto;
  width: clamp(300px, 45vw, 700px);
  display: flex;
  align-items: flex-end;
}

/* ── Layers (color on bottom, blueprint on top) ── */
.car-layer {
  width: 100%;
  position: relative;
}

.car-layer--color {
  position: relative;
  z-index: 1;
}

.car-layer--blueprint {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  clip-path: inset(-50% 110% -10% -50%);
}

/* ── Blueprint laser line (follows the mask edge) ── */
.blueprint-laser {
  position: absolute;
  top: -20%;
  width: 3px;
  height: 140%;
  background: var(--color-rouge-course);
  box-shadow:
    0 0 12px rgba(178, 34, 34, 0.7),
    0 0 24px rgba(178, 34, 34, 0.3);
  z-index: 5;
  opacity: 0;
  left: 0;
  pointer-events: none;
}

.car-body {
  width: 100%;
  height: auto;
  display: block;
}

.benz-body {
  width: 75%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════════
   WHEELS
   ═══════════════════════════════════════════════ */
.car-wheel {
  position: absolute;
  z-index: 3;
  animation: wheelSpin 3s linear infinite;
}

.car-layer--blueprint .car-wheel {
  z-index: 4;
}

@keyframes wheelSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Strip wheels (Citroën, DS, Mini): no rotation */
[data-car="citroen"] .car-wheel,
[data-car="ds"] .car-wheel,
[data-car="mini"] .car-wheel {
  animation: none;
  transform: translate(-50%, -50%);
}

/* ── PER-CAR WHEEL POSITIONS ── */

/* --- BENZ (1886) --- */
[data-car="benz"] .car-wheel--rear {
  width: 50%;
  left: 15.8%;
  top: 87%;
}
[data-car="benz"] .car-wheel--front {
  width: 30%;
  left: 74.5%;
  top: 96%;
}

/* --- FORD Model T (1908) --- */
[data-car="ford"] .car-wheel--rear {
  width: 15%;
  left: 17.6%;
  top: 80%;
}
[data-car="ford"] .car-wheel--front {
  width: 15%;
  left: 85%;
  top: 80%;
}

/* --- CITROËN Traction Avant (1934) --- */
[data-car="citroen"] .car-wheel--rear {
  width: 78.9%;
  left: 53.2%;
  top: 78%;
}

/* --- VW COCCINELLE (1938) --- */
[data-car="coccinelle"] .car-wheel--rear {
  width: 15%;
  left: 21.8%;
  top: 80%;
}
[data-car="coccinelle"] .car-wheel--front {
  width: 15%;
  left: 83.3%;
  top: 80%;
}

/* --- CITROËN DS (1955) --- */
[data-car="ds"] .car-wheel--rear {
  width: 76.5%;
  left: 48%;
  top: 79.6%;
}

/* --- MINI COOPER (1959) --- */
[data-car="mini"] .car-wheel--rear {
  width: 82%;
  left: 50.5%;
  top: 81%;
}

/* --- FORD MUSTANG (1964) --- */
[data-car="mustang"] .car-wheel--rear {
  width: 15%;
  left: 22.8%;
  top: 76%;
}
[data-car="mustang"] .car-wheel--front {
  width: 15%;
  left: 81.8%;
  top: 76%;
}

/* --- PORSCHE 911 (1964) --- */
[data-car="porsche"] .car-wheel--rear {
  width: 15%;
  left: 24.3%;
  top: 75%;
}
[data-car="porsche"] .car-wheel--front {
  width: 15%;
  left: 79.9%;
  top: 75%;
}

/* --- TOYOTA PRIUS (1997) --- */
[data-car="toyota"] .car-wheel--rear {
  width: 14.3%;
  left: 18.9%;
  top: 80.7%;
}
[data-car="toyota"] .car-wheel--front {
  width: 14.3%;
  left: 80.6%;
  top: 80.7%;
}

/* --- TESLA Model S (2012) --- */
[data-car="tesla"] .car-wheel--rear {
  width: 15%;
  left: 21%;
  top: 75%;
}
[data-car="tesla"] .car-wheel--front {
  width: 15%;
  left: 82.8%;
  top: 75%;
}

/* ═══════════════════════════════════════════════
   CAR INFO
   ═══════════════════════════════════════════════ */
.car-panel__info {
  flex: 0 1 420px;
  opacity: 0;
  transform: translateY(30px);
}

.car-info__year {
  display: block;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  color: var(--color-rouge-course);
  line-height: 1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.car-info__title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: var(--color-blanc);
}

.car-info__line {
  width: 60px;
  height: 3px;
  background: var(--color-rouge-course);
  margin-bottom: 1.2rem;
}

.car-info__desc {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.7;
  opacity: 0.75;
  margin-bottom: 1.5rem;
}

.car-info__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.car-info__spec {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.spec-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-argent);
  opacity: 1;
}

.spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-blanc);
}

/* ── Counter ── */
.car-panel__counter {
  position: absolute;
  bottom: 75px;
  right: clamp(1.5rem, 3vw, 4rem);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.35;
}

.counter-current {
  font-weight: 700;
  color: var(--color-rouge-course);
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   OUTRO / FOOTER
   ═══════════════════════════════════════════════ */
.panel--outro {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at 50% 40%,
    var(--color-bg-light) 0%,
    var(--color-bg) 70%
  );
}

.outro__content {
  text-align: center;
  padding: 2rem;
}

.outro__logo {
  width: clamp(80px, 10vw, 160px);
  margin: 0 auto 2rem;
  opacity: 0.6;
}

.outro__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.outro__text {
  font-size: clamp(0.85rem, 1.2vw, 1.1rem);
  opacity: 0.65;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.outro__line {
  width: 60px;
  height: 3px;
  background: var(--color-rouge-course);
  margin: 0 auto 2rem;
}

.outro__credits {
  font-size: 0.85rem;
  opacity: 0.4;
  line-height: 1.8;
}

.outro__credits--small {
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — small screens
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .car-panel__inner {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    padding-bottom: 80px;
  }

  .car-panel__visual {
    width: 80vw;
  }

  .car-panel__info {
    flex: none;
    max-width: 90vw;
  }

  .nav-bar {
    padding: 0.75rem 1rem;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .sidebar {
    width: 240px;
  }

  .nav-arrows {
    bottom: 70px;
    left: 0.75rem;
  }

  .nav-arrows .nav-icon {
    width: 16px;
    height: 16px;
  }
}
