/* =========================================================
   Abadi Motor — monochrome cinematic theme
   ========================================================= */
:root {
  --bg: #000;
  --bg-2: #0a0a0c;
  --fg: #fff;
  --dim: rgba(255, 255, 255, .66);
  --faint: rgba(255, 255, 255, .4);
  --line: rgba(255, 255, 255, .28);
  --line-soft: rgba(255, 255, 255, .12);
  --accent: #b8cbff;
  --accent-grad: linear-gradient(100deg, #f4f2ff 0%, #d6dcff 45%, #a9c3ff 100%);

  --sans: "Geist", "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 2.4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 var(--mono); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;   /* clip, not hidden: hidden would break position: sticky */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 400; margin: 0; letter-spacing: -.045em; line-height: .98; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }

.container { width: min(1280px, 100% - 2 * var(--pad)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.label { font: 500 13px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); }
.label--dim { color: var(--faint); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

/* ---------- Atmosphere: stars + film grain ---------- */
#stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 14px; }
.btns--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 160px; height: 50px; padding: 0 26px; border-radius: 6px; border: 1px solid transparent;
  font: 500 14px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn--primary { background: var(--accent-grad); color: #0b0b14; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -10px rgba(169, 195, 255, .7); }
.btn--outline { border-color: #fff; background: rgba(0, 0, 0, .35); color: #fff; }
.btn--outline:hover { background: #fff; color: #000; }
.btn--sm { height: 40px; min-width: 0; padding: 0 18px; font-size: 12px; }
.btn--block { width: 100%; }

.arrow-link { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }
.arrow-link span { transition: transform .4s var(--ease); }
.arrow-link:hover span { transform: translateX(5px); }
.arrow-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; padding: 22px var(--pad); transition: background .5s, padding .5s, backdrop-filter .5s, translate .6s var(--ease); view-transition-name: site-header; }
.header.is-hidden { translate: 0 -100%; }
.header:focus-within, .header.menu-open { translate: none; }
/* a filtered/transformed header would trap the fixed mobile menu inside it */
.header.menu-open, .header.is-scrolled.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.header.is-scrolled { padding-block: 14px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; background: #fff; }
.logo__mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.24); }
.logo__word { font: 400 25px/1 var(--sans); letter-spacing: -.04em; }
.logo--lg .logo__mark { width: 46px; height: 46px; }
.logo--lg .logo__word { font-size: 44px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { position: relative; font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.nav a:not(.btn)::before { content: "["; opacity: 0; margin-right: 4px; transition: opacity .3s; }
.nav a:not(.btn)::after { content: "]"; opacity: 0; margin-left: 4px; transition: opacity .3s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::before, .nav a[aria-current="page"]::after { opacity: 1; color: var(--accent); }

.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; z-index: 60; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* ---------- Generic sections ---------- */
.section { position: relative; padding: clamp(100px, 14vw, 180px) 0; }
.section--tight { padding: clamp(70px, 9vw, 120px) 0; }
.h-xl { font-size: clamp(56px, 12vw, 190px); letter-spacing: -.055em; line-height: .9; }
.h-1 { font-size: clamp(46px, 7.2vw, 104px); }
.h-2 { font-size: clamp(38px, 5.4vw, 80px); }
.h-3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.035em; line-height: 1.05; }
.lead { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; color: var(--fg); max-width: 600px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-bottom: clamp(48px, 6vw, 80px); }
.head-row .lead { max-width: 440px; margin: 0; color: var(--dim); }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.kicker::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 1px; box-shadow: 0 0 14px var(--accent); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; padding: 130px 0 clamp(36px, 6vh, 56px); isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 82%;
  animation: heroIn 2.2s var(--ease) both;
}
/* short settle on load; the image is pre-toned so no live filters run while scrolling */
@keyframes heroIn { from { opacity: 0; transform: scale(1.05); } }
/* darken only where the text sits: a soft top band for the nav, a deep bottom-left for the copy */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, transparent 22%, transparent 40%, rgba(0, 0, 0, .72) 72%, #000 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 55%, transparent 80%);
}
.hero__inner { position: relative; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; color: rgba(255, 255, 255, .78); }
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(184, 203, 255, .18); }
.hero__row { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 40px 60px; align-items: end; margin-bottom: clamp(32px, 5vh, 48px); }
.hero h1 { font-size: clamp(46px, 6.6vw, 100px); line-height: .95; letter-spacing: -.05em; margin: 0; }
/* second line steps back in tone: a quieter echo of the first */
.hero__accent { color: rgba(255, 255, 255, .58); }
.hero__aside { padding-bottom: 8px; }
.hero__aside p { margin: 0 0 16px; color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.65; }

.hero__ctas { gap: 12px; }

.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 22px 0 0; padding: 0; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.hero__trust li { display: inline-flex; align-items: center; gap: 10px; }
.hero__trust li::before { content: "✓"; color: var(--accent); font-size: 13px; }

@media (max-width: 900px) {
  .hero { padding-top: 110px; }
  .hero__row { grid-template-columns: 1fr; gap: 20px; }
  .hero__trust { gap: 8px 20px; font-size: 11px; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; min-height: 78svh; display: grid; align-items: end; padding: 160px 0 80px; overflow: hidden; isolation: isolate; }
.page-hero__media { position: absolute; inset: 0; z-index: -2; background: url("assets/hero-mono.jpg") var(--pos, center 62%) / cover no-repeat; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .25)), linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .35) 40%, #000 100%), radial-gradient(ellipse at 20% 80%, transparent, rgba(0, 0, 0, .6)); }
.page-hero h1 { font-size: clamp(54px, 10vw, 150px); letter-spacing: -.055em; line-height: .92; margin-bottom: 30px; }
.page-hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.page-hero__row .lead { margin: 0; max-width: 460px; }
.crumbs { display: flex; gap: 10px; margin-bottom: 28px; color: var(--faint); }
.crumbs a:hover { color: #fff; }

/* ---------- Showcase car ---------- */
.showcase { position: relative; height: 100svh; min-height: 680px; overflow: hidden; isolation: isolate; }
/* soft studio light pool behind and under the car */
.showcase::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 44%; width: min(1300px, 110vw); aspect-ratio: 2.2; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04) 55%, transparent);
  pointer-events: none;
}
.showcase__car { position: absolute; left: 50%; top: 42%; width: min(1060px, 78vw); transform: translate(-50%, -50%); display: block; }
.showcase__car img { width: 100%; height: auto; will-change: transform, opacity; }
/* contact shadow on the floor */
.showcase__car::after { content: ""; position: absolute; left: 10%; right: 6%; bottom: 7%; height: 9%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .9), transparent 70%); filter: blur(6px); }
.showcase__overlay { position: absolute; left: 0; right: 0; bottom: 64px; margin-inline: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; pointer-events: none; }
.showcase__overlay > * { pointer-events: auto; }
.showcase__text { max-width: 440px; }
.showcase__text .lead { margin: 14px 0 0; }
.showcase__specs { width: min(340px, 100%); }
.showcase__specs .label { margin-bottom: 10px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.stat { padding: 28px 24px; }
.stat + .stat { border-left: 1px dashed var(--line); }
.stat strong { display: block; font: 400 clamp(36px, 4vw, 58px)/1 var(--sans); letter-spacing: -.05em; margin-bottom: 12px; }
.stat span { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Drive-in best sellers (arrow-driven carousel) ---------- */
.drive { position: relative; }
.drive__stage { position: relative; height: 100svh; min-height: 680px; max-height: 1000px; overflow: hidden; --ppm: min(160px, 12.5vw); --road: 64%; }
.drive__head { position: absolute; left: 0; right: 0; top: clamp(80px, 12vh, 120px); display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; z-index: 3; }
.drive__head .kicker { margin-bottom: 18px; }
.drive__progress { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.drive__bars { display: flex; gap: 6px; }
.drive__bars i { position: relative; width: 44px; height: 2px; overflow: hidden; background: var(--line-soft); }
.drive__bars i::after { content: ""; position: absolute; inset: 0; background: var(--accent-grad); transform: scaleX(var(--f, 0)); transform-origin: left; transition: transform .9s var(--ease); }
.drive__nav { display: flex; gap: 10px; }
.drive__btn {
  width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); color: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background .3s, border-color .3s, color .3s, transform .4s var(--ease);
}
.drive__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.drive__btn--next { background: var(--accent-grad); border-color: transparent; color: #0b0b14; }
.drive__btn:hover { transform: translateY(-2px); }
.drive__btn--next:hover svg { transform: translateX(3px); }
.drive__btn--prev:hover { border-color: #fff; }
.drive__btn--prev:hover svg { transform: translateX(-3px); }
.drive__btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.drive__btn[aria-disabled="true"] { opacity: .5; }

/* huge model name behind the car: bright outline over a soft top-lit fill, set high so it clears the roofline */
.drive__name {
  position: absolute; left: 50%; top: calc(var(--road) - 25vh); transform: translate(-50%, -50%);
  font: 600 clamp(84px, 16vw, 250px)/1 var(--sans); letter-spacing: -.05em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .1) 55%, rgba(255, 255, 255, .02) 100%);
  -webkit-background-clip: text; background-clip: text; opacity: 0; will-change: translate, opacity; pointer-events: none;
}

/* road: hairline, lane dashes and a soft pool of light where the car parks */
.drive__road { position: absolute; left: 0; right: 0; top: var(--road); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .26) 18%, rgba(255, 255, 255, .26) 82%, transparent); }
.drive__road::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; opacity: .5; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .25) 0 46px, transparent 46px 110px); -webkit-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.drive__road::after { content: ""; position: absolute; left: 50%; top: -60px; width: 80vw; height: 160px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent); pointer-events: none; }

.drive__cars { position: absolute; inset: 0; touch-action: pan-y; }
.drive__car {
  position: absolute; left: 50%; top: var(--road); margin: 0;
  width: calc(var(--len) * var(--ppm)); margin-left: calc(var(--len) * var(--ppm) / -2);
  transform: translate3d(-200vw, 0, 0); will-change: transform;
}
/* lift the body so the tyres sit exactly on the road line; pitch pivots at the contact patch */
.drive__body { position: relative; translate: 0 calc(var(--ground) * -100%); transform-origin: 50% 100%; }
.drive__body img { display: block; width: 100%; height: auto; }
/* Each wheel is an elliptical window onto the same photo, sized to the measured wheel
   (horizontal half-axis r*sx, vertical half-axis r), rotated about its exact centre. */
.drive__wheel {
  --rx: calc(var(--r) * var(--sx));
  position: absolute; border-radius: 50%; will-change: transform;
  left: calc((var(--cx) - var(--rx)) / var(--w) * 100%);
  top: calc((var(--cy) - var(--r)) / var(--h) * 100%);
  width: calc(var(--rx) * 2 / var(--w) * 100%);
  aspect-ratio: var(--sx);
  background: var(--img) no-repeat;
  background-size: calc(var(--w) / (var(--rx) * 2) * 100%) auto;
  background-position: calc((var(--cx) - var(--rx)) / (var(--w) - var(--rx) * 2) * 100%) calc((var(--cy) - var(--r)) / (var(--h) - var(--r) * 2) * 100%);
}
.drive__shadow { position: absolute; left: 5%; right: 5%; top: -9px; height: 18px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .95), transparent); }

/* details for the parked car */
.drive__infos { position: absolute; left: 0; right: 0; bottom: clamp(44px, 9vh, 90px); height: 130px; z-index: 2; }
.drive__info {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 48px; align-items: end;
  opacity: 0; translate: 0 18px; pointer-events: none; visibility: hidden; transition: opacity .5s var(--ease), translate .7s var(--ease), visibility 0s .5s;
}
.drive__info.is-active { opacity: 1; translate: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.drive__model { font: 400 clamp(34px, 4vw, 58px)/1 var(--sans); letter-spacing: -.045em; margin-top: 12px; }
.drive__specs { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.drive__specs li { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.drive__specs li span { color: var(--dim); }
.drive__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

@media (max-width: 860px) {
  .drive__stage { --ppm: 17.5vw; --road: 56%; min-height: 640px; }
  .drive__head { top: 84px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .drive__progress { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
  .drive__btn { width: 50px; height: 50px; }
  .drive__bars i { width: 22px; }
  .drive__name { font-size: 24vw; top: calc(var(--road) - 17vh); }
  .drive__infos { bottom: 40px; }
  .drive__infos { height: 150px; }
  /* stacked: price + enquire sit on their own row, left-aligned, clear of the floating buttons */
  .drive__info { grid-template-columns: 1fr; gap: 14px; padding-right: 64px; }
  .drive__buy { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 24px; }
  .drive__specs { display: none; }
}

/* ---------- Trust: car key on a pedestal ---------- */
.trust { position: relative; text-align: center; overflow: hidden; padding: clamp(80px, 10vw, 130px) 0 clamp(90px, 10vw, 140px); }
.trust h2 { position: relative; z-index: 2; }
.scene { width: 420px; height: 480px; margin: -30px auto 0; position: relative; z-index: 1; }
.stage { position: absolute; left: 50%; top: 0; width: 420px; height: 480px; margin-left: -210px; transform-origin: top center; }

/* light falling from above onto the pedestal */
.spot {
  position: absolute; left: 50%; top: -40px; width: 380px; height: 470px; transform: translateX(-50%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  background: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .05) 60%, transparent);
  filter: blur(18px); pointer-events: none;
}

/* floor glow under the pedestal */
.stage::after {
  content: ""; position: absolute; left: 50%; bottom: -18px; width: 440px; height: 70px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .1), transparent); filter: blur(4px); pointer-events: none;
}
.stage { cursor: grab; touch-action: pan-y; }
.stage canvas, .key-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.key-poster { object-fit: contain; transition: opacity .8s var(--ease); }
.stage canvas { opacity: 0; transition: opacity .8s var(--ease); }
.stage.is-live canvas { opacity: 1; }
.stage.is-live .key-poster { opacity: 0; }

.partners { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px 80px; margin-top: 10px; position: relative; z-index: 2; }
.partners__group p { margin-bottom: 14px; }
.wordmarks { display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap; }
.wordmark { font: 600 22px/1 var(--sans); letter-spacing: -.02em; color: #fff; opacity: .9; }
.wordmark--wide { font-weight: 500; letter-spacing: .28em; font-size: 17px; }

/* ---------- Marques grid ---------- */
.marques { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px dashed var(--line-soft); }
.marque {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; height: 150px; border-bottom: 1px dashed var(--line-soft);
  color: rgba(255, 255, 255, .55); transition: color .4s, background .4s;
}
/* logos are single-colour SVGs: render them white, dimmed until hover */
.marque__logo { height: 46px; width: 46px; object-fit: contain; scale: var(--k, 1); filter: brightness(0) invert(1); opacity: .72; transition: opacity .4s, transform .5s var(--ease); }
.marque__name { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.marque:hover .marque__logo { opacity: 1; transform: translateY(-3px); }
.marque:not(:nth-child(5n)) { border-right: 1px dashed var(--line-soft); }
.marque:hover { color: #fff; background: rgba(255, 255, 255, .03); }

/* ---------- Car cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.team { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.team > * { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.car {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  transition: border-color .4s, transform .6s var(--ease), box-shadow .6s var(--ease);
}
.car:hover { border-color: var(--line); transform: translateY(-4px); box-shadow: 0 30px 60px -32px rgba(0, 0, 0, .65); }
.car.is-hidden { display: none; }
.car__img {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: url("assets/hero.jpg") var(--px) 66.9% / 762% auto no-repeat;
  filter: saturate(.75) brightness(.9); transition: filter .8s var(--ease), clip-path 1.3s var(--ease) .15s;
  clip-path: inset(100% 0 0 0);
}
.car.is-visible .car__img { clip-path: inset(0); }
.car:hover .car__img { filter: saturate(1) brightness(1); }
.car__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .35)); }
.car__top { position: absolute; z-index: 1; inset: 14px 14px auto; display: flex; justify-content: space-between; align-items: center; }
.tag { padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(6px); }
.car__origin { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 11px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.car__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.car__make { margin: 0 0 6px; color: var(--faint); font-size: 11px; }
.car h3 { font-size: clamp(24px, 2vw, 28px); letter-spacing: -.04em; line-height: 1.05; }
.car__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 14px 0; border-block: 1px dashed var(--line-soft); }
.car__facts > div + div { padding-left: 14px; border-left: 1px dashed var(--line-soft); }
.car__facts dt { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.car__facts dd { margin: 0; font: 400 17px/1.1 var(--sans); letter-spacing: -.02em; }
.car__engine { margin: -4px 0 0; font-size: 13px; color: var(--dim); }
.car__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.car__actions { display: flex; align-items: center; gap: 8px; }
.car__wa { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); transition: background .3s, border-color .3s; }
.car__wa svg { width: 18px; height: 18px; fill: var(--fg); transition: fill .3s; }
.car__wa:hover { background: #25d366; border-color: #25d366; }
.car__wa:hover svg { fill: #fff; }
.car__wa:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.price { font: 400 26px var(--sans); letter-spacing: -.035em; white-space: nowrap; }
.price small { font: 400 12px var(--mono); color: var(--faint); letter-spacing: .04em; margin-right: 6px; }
.specs { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.specs li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.specs li span:first-child { color: var(--dim); }

/* ---------- Inventory filter bar (sticky, sits just under the header) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inv-bar {
  position: sticky; top: var(--hdr, 0px); z-index: 20; padding: 14px 0; margin-bottom: 10px;
  /* full-bleed background + bottom hairline, drawn with shadows so they never widen the page */
  background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg), 0 1px 0 100vmax var(--line-soft); clip-path: inset(0 -100vmax -1px);
  transition: top .6s var(--ease);
}
.inv-bar__inner { display: flex; align-items: center; gap: 10px; }
.inv-search {
  position: relative; flex: 1 1 240px; max-width: 320px; height: 46px; display: flex; align-items: center; padding: 0 16px 0 44px;
  border: 1px solid var(--line); border-radius: 999px; transition: border-color .3s; cursor: text;
}
.inv-search:focus-within { border-color: var(--accent); }
.inv-search svg { position: absolute; left: 16px; width: 18px; height: 18px; fill: none; stroke: var(--dim); stroke-width: 1.6; stroke-linecap: round; }
.inv-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--fg); font: 400 15px var(--sans); letter-spacing: -.01em; outline: none; }
.inv-search input::placeholder { color: var(--faint); }
.inv-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.inv-seg { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.inv-seg button {
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--dim); cursor: pointer; white-space: nowrap;
  font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: background .3s, color .3s;
}
.inv-seg button:hover { color: var(--fg); }
.inv-seg button.is-active { background: var(--fg); color: var(--bg); }
.inv-seg button:focus-visible, .inv-bar__toggle:focus-visible, .inv-pill:focus-visible, .inv-clear:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.inv-bar__more { display: flex; gap: 10px; margin-left: auto; }
.inv-select { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.inv-select select {
  appearance: none; -webkit-appearance: none; height: 46px; padding: 0 40px 0 18px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--fg); font: 400 14px var(--sans); cursor: pointer; transition: border-color .3s;
}
.inv-select select:hover { border-color: var(--dim); }
.inv-select select:focus-visible { outline: none; border-color: var(--accent); }
.inv-select select option { background: var(--bg); color: var(--fg); }
.inv-select.is-set select { border-color: var(--fg); }
.inv-select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 12px; height: 12px; translate: 0 -50%; pointer-events: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.inv-bar__toggle {
  display: none; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--fg); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.inv-bar__toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.inv-bar__badge[hidden] { display: none; }
.inv-bar__badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-grad); color: #0b0b14; font-size: 11px; }

/* results line: count, removable filter pills, sort */
.inv-results { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 44px; margin: 14px 0 22px; }
.inv-results__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inv-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--fg); font: 400 13px var(--sans); cursor: pointer; transition: border-color .3s, background .3s;
}
.inv-pill span { color: var(--faint); font-size: 15px; line-height: 1; }
.inv-pill:hover { border-color: var(--fg); background: rgba(255, 255, 255, .04); }
.inv-clear { border: 0; background: none; padding: 0 4px; color: var(--dim); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.inv-clear:hover { color: var(--fg); }
.inv-select--sort select { height: 40px; }
.inv-empty { padding: 70px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.inv-empty h3 { font-size: clamp(26px, 3vw, 40px); margin-bottom: 14px; }
.inv-empty p { color: var(--dim); margin-bottom: 24px; }

@media (max-width: 1100px) {
  .inv-bar__inner { flex-wrap: wrap; }
  .inv-search { max-width: none; flex: 1 1 0; min-width: 0; }
  .inv-bar__toggle { display: inline-flex; }
  .inv-seg { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .inv-seg button { flex: 1; }
  .inv-bar__more { display: none; order: 4; width: 100%; margin: 4px 0 0; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .inv-bar.is-open .inv-bar__more { display: grid; }
  .inv-bar__more .inv-select select { width: 100%; }
}
@media (max-width: 600px) {
  .inv-bar__more { grid-template-columns: 1fr 1fr; }
  .inv-bar__more > :first-child { grid-column: 1 / -1; }
  .inv-seg button { padding: 0 10px; }
  .car__body { padding: 20px; }
}

/* ---------- Car cards link through to their detail page ---------- */
.car__link { color: inherit; }
.car__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.car__link:focus-visible { outline: none; }
.car:has(.car__link:focus-visible) { outline: 1px solid var(--accent); outline-offset: 3px; }
.car__foot a, .car__actions { position: relative; z-index: 2; }

/* ---------- Car detail page ---------- */
.cd { padding: calc(var(--hdr, 84px) + 40px) 0 clamp(60px, 8vw, 100px); }
.cd__crumbs { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; color: var(--faint); }
.cd__back { display: inline-flex; gap: 8px; color: var(--fg); }
.cd__back:hover span { transform: translateX(-3px); }
.cd__back span { transition: transform .3s var(--ease); }
.cd__trail { display: flex; gap: 10px; flex-wrap: wrap; }
.cd__trail a:hover { color: var(--fg); }
.cd__trail [aria-current] { color: var(--dim); }
.cd__layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(28px, 4vw, 56px); align-items: start; }

.cd__gallery { position: relative; margin: 0; }
.cd__photo { clip-path: none; aspect-ratio: 16 / 10; border-radius: 14px; border: 1px solid var(--line-soft); filter: saturate(.9); }
.cd__gallery > .car__top { inset: 16px 16px auto; }
.cd__photo-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; }

.cd__block { padding: clamp(32px, 4vw, 48px) 0 0; }
.cd__h { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.035em; margin-bottom: 20px; }
.cd__intro { color: var(--dim); font-size: 15px; margin: -6px 0 18px; }
.cd__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--line-soft); }
.cd__facts > div { padding: 18px 20px; background: var(--bg); }
.cd__facts dt { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.cd__facts dd { margin: 0; font: 400 19px/1.2 var(--sans); letter-spacing: -.02em; }
.cd__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cd__table th, .cd__table td { padding: 13px 0; border-bottom: 1px dashed var(--line-soft); text-align: left; vertical-align: top; }
.cd__table th { width: 42%; font-weight: 400; color: var(--dim); }
.cd__docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cd__docs li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 12px; color: var(--dim); font-size: 13px; }
.cd__docs b { display: block; margin-bottom: 4px; font: 500 16px/1.25 var(--sans); letter-spacing: -.02em; color: var(--fg); }
.cd__tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-grad); color: #0b0b14; font-size: 12px; font-weight: 600; }

/* loan estimator */
.loan { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1px; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--line-soft); }
.loan__inputs, .loan__result { background: var(--bg); padding: clamp(20px, 3vw, 30px); }
.loan__inputs { display: grid; gap: 22px; }
.loan__field { display: grid; gap: 12px; cursor: pointer; }
.loan__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.loan__out { font: 400 18px var(--sans); letter-spacing: -.02em; }
.loan input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); cursor: pointer; }
.loan input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(184, 203, 255, .3), 0 2px 6px rgba(0, 0, 0, .5); }
.loan input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(184, 203, 255, .3); }
.loan input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 8px; }
.loan__result { display: flex; flex-direction: column; gap: 8px; }
.loan__monthly { font: 400 clamp(34px, 3.4vw, 46px)/1 var(--sans); letter-spacing: -.045em; margin: 4px 0; }
.loan__sub { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.loan__note { margin: 10px 0 0; color: var(--faint); font-size: 12px; }

/* sticky summary */
.cd__side { position: sticky; top: calc(var(--hdr, 0px) + 20px); transition: top .6s var(--ease); }
.cd__summary { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.cd__make { margin: 0 0 8px; }
.cd__title { font-size: clamp(34px, 3.6vw, 48px); letter-spacing: -.045em; line-height: 1; margin-bottom: 18px; }
.cd__chips { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cd__chips li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px var(--mono); letter-spacing: .04em; }
.cd__price { font: 400 clamp(36px, 3.4vw, 46px)/1 var(--sans); letter-spacing: -.045em; padding-top: 20px; border-top: 1px dashed var(--line); }
.cd__price small { font: 400 14px var(--mono); color: var(--faint); margin-right: 8px; letter-spacing: .04em; }
.cd__price-note { margin: 10px 0 22px; color: var(--dim); font-size: 13px; }
.cd__price-note b { color: var(--fg); font-weight: 500; }
.cd__ctas { display: grid; gap: 10px; }
.cd__ctas .btn { gap: 10px; }
.cd__ctas svg { width: 18px; height: 18px; flex: none; }
.cd__wa { background: #25d366; color: #052e16; }
.cd__wa svg { fill: currentColor; }
.cd__wa:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(37, 211, 102, .6); }
.cd__ctas .btn--outline svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cd__assure { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 10px; font-size: 13px; color: var(--dim); }
.cd__assure li { display: flex; gap: 10px; }
.cd__assure li::before { content: "✓"; color: var(--accent); }

/* mobile quick-action bar */
.cd-bar { display: none; }

@media (max-width: 1080px) {
  .cd__layout { grid-template-columns: 1fr; }
  .cd__side { position: static; order: -1; }
  .cd__main { display: contents; }
  .cd__gallery { order: -2; }
}
@media (max-width: 900px) {
  .cd-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 10px;
    padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); background: rgba(10, 10, 12, .92);
    border-top: 1px solid var(--line-soft); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: translateY(110%); transition: transform .5s var(--ease);
  }
  .cd-bar.is-shown { transform: none; }
  .cd-bar__price { flex: 1; min-width: 0; display: grid; gap: 2px; }
  .cd-bar__price .label { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cd-bar__price b { font: 400 21px/1 var(--sans); letter-spacing: -.03em; white-space: nowrap; }
  .cd-bar__price small { font: 400 11px var(--mono); color: var(--faint); margin-right: 4px; }
  .cd-bar__wa { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #25d366; flex: none; }
  .cd-bar__wa svg { width: 22px; height: 22px; fill: #052e16; }
  .cd-bar .btn { height: 44px; }
  body.has-cd-bar .wa { display: none; }
  body.has-cd-bar .to-top { bottom: 92px; }
  body.has-cd-bar .footer { padding-bottom: 110px; }
  .cd__facts { grid-template-columns: repeat(2, 1fr); }
  .cd__docs { grid-template-columns: 1fr; }
  .loan { grid-template-columns: 1fr; }
}

/* ---------- Photo gallery (car detail) ---------- */
.gallery__stage { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-soft); background: #000; aspect-ratio: 16 / 10; touch-action: pan-y; }
.gallery__track { display: flex; height: 100%; transition: transform .6s var(--ease); will-change: transform; }
.gallery__track.is-dragging { transition: none; }
.gallery__slide { flex: 0 0 100%; height: 100%; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; cursor: zoom-in; }
.gallery__stage > .car__top { pointer-events: none; }
.gallery__nav, .gallery__zoom {
  position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .3s, opacity .3s, transform .3s var(--ease);
}
.gallery__nav { top: 50%; translate: 0 -50%; }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__nav:hover, .gallery__zoom:hover { background: rgba(0, 0, 0, .8); }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }
.gallery__nav svg, .gallery__zoom svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gallery__zoom { right: 14px; bottom: 14px; width: 40px; height: 40px; }
.gallery__count { position: absolute; z-index: 2; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.gallery__nav:focus-visible, .gallery__zoom:focus-visible, .gallery__thumb:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) {
  .gallery__stage .gallery__nav { opacity: 0; }
  .gallery__stage:hover .gallery__nav:not(:disabled), .gallery__stage:focus-within .gallery__nav:not(:disabled) { opacity: 1; }
}
.gallery__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px) / 4); gap: 10px; margin-top: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { padding: 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; cursor: pointer; background: none; opacity: .55; scroll-snap-align: start; transition: opacity .3s, border-color .3s; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb.is-active { opacity: 1; border-color: var(--fg); }

/* full-screen viewer */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto; background: rgba(0, 0, 0, .96); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); color: #fff; }
.lightbox__close { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: none; color: #fff; font-size: 22px; cursor: pointer; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--pad); touch-action: pan-y; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; user-select: none; }
.lightbox .gallery__nav { opacity: 1; }
.lightbox__thumbs { display: flex; justify-content: center; gap: 8px; padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom)); overflow-x: auto; }
.lightbox__thumbs button { flex: 0 0 72px; height: 46px; padding: 0; border-radius: 6px; overflow: hidden; border: 1px solid transparent; opacity: .5; cursor: pointer; background: none; }
.lightbox__thumbs button.is-active { opacity: 1; border-color: #fff; }
.lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
  .gallery__stage { border-radius: 12px; }
  .gallery__thumbs { grid-auto-columns: 30%; }
  .gallery__nav { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .gallery__track { transition: none; } }

/* ---------- Two-column text ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.cols .lead { color: var(--dim); }
.cols .lead strong { color: #fff; font-weight: 500; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px dashed var(--line); }
.pillar { padding: 48px 48px 48px 0; }
.pillar + .pillar { border-left: 1px dashed var(--line); padding-left: 48px; padding-right: 0; }
.pillar h3 { margin: 22px 0 18px; }
.pillar p { color: var(--dim); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; }
.ticks li { padding: 10px 0; border-bottom: 1px dashed var(--line-soft); display: flex; gap: 14px; font-size: 14px; }
.ticks li::before { content: "→"; color: var(--accent); }

/* ---------- Feature photo (About) ---------- */
.feature-photo { padding: 0 0 clamp(70px, 9vw, 120px); view-timeline: --feature block; }
.feature { margin-inline: auto; }
.feature__frame { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line-soft); aspect-ratio: 16 / 8; }
.feature__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.feature__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .35)); pointer-events: none; }
.feature__caption { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* slow push-in as the photo crosses the screen; runs on the compositor */
    .feature__frame img { animation: featureZoom linear both; animation-timeline: --feature; animation-range: entry 0% exit 100%; }
  }
}
@keyframes featureZoom { from { scale: 1.12; } to { scale: 1; } }
@media (max-width: 600px) { .feature__frame { aspect-ratio: 4 / 3; } }

/* ---------- Our promise (About) ---------- */
.promise__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.promise__visual { margin: 0; }
.promise__car { position: relative; isolation: isolate; }
.promise__car::before { /* studio light pool */
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 10%; bottom: -12%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .1), transparent); pointer-events: none;
}
.promise__car img { width: 100%; height: auto; }
.promise__visual figcaption { margin-top: 18px; text-align: center; }

.spot-pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); padding: 0; border: 0; background: none; cursor: pointer; z-index: 1; }
.spot-pin__dot {
  position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-grad); color: #0b0b14; font: 600 11px var(--mono); box-shadow: 0 0 0 4px rgba(184, 203, 255, .18);
}
.spot-pin__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); animation: pinPulse 2.4s var(--ease) infinite; }
.spot-pin:nth-of-type(2) .spot-pin__dot::after { animation-delay: .6s; }
.spot-pin:nth-of-type(3) .spot-pin__dot::after { animation-delay: 1.2s; }
.spot-pin:nth-of-type(4) .spot-pin__dot::after { animation-delay: 1.8s; }
@keyframes pinPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
.spot-pin__tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px); width: 210px; padding: 12px 14px; border-radius: 8px;
  background: rgba(10, 10, 12, .92); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 400 12px/1.5 var(--mono); color: var(--dim); text-align: left;
  opacity: 0; translate: -50% 6px; pointer-events: none; transition: opacity .3s, translate .4s var(--ease);
}
.spot-pin__tip b { display: block; margin-bottom: 3px; font: 500 15px/1.2 var(--sans); letter-spacing: -.02em; color: #fff; }
.spot-pin:hover .spot-pin__tip, .spot-pin:focus-visible .spot-pin__tip, .spot-pin.is-open .spot-pin__tip { opacity: 1; translate: -50% 0; }
.spot-pin:focus-visible { outline: none; }
.spot-pin:focus-visible .spot-pin__dot { outline: 1px solid var(--accent); outline-offset: 4px; }

.promise__list { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); }
.promise__list li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 30px 0; border-bottom: 1px dashed var(--line); }
.promise__num { font: 500 13px var(--mono); color: var(--accent); padding-top: 6px; }
.promise__list h3 { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.035em; margin-bottom: 10px; }
.promise__list p { color: var(--dim); font-size: 15px; margin-bottom: 14px; }
.promise__tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.promise__tag::before { content: "✓"; color: var(--accent); }

@media (max-width: 900px) {
  .promise__grid { grid-template-columns: 1fr; }
  .spot-pin__tip { width: 180px; }
}

/* ---------- Sourcing markets (Services): Japan + UK side by side ---------- */
.markets__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.market { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--bg-2); transition: border-color .4s; }
.market:hover { border-color: var(--line); }
.market__photo { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.market__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.market:hover .market__photo img { transform: scale(1.04); }
.market__badge {
  position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.flag { width: 20px; height: 13px; border-radius: 2px; flex: none; }
.flag--jp { background: radial-gradient(circle, #bc002d 0 3.6px, transparent 4px), #fff; }
.flag--uk {
  background:
    linear-gradient(#c8102e, #c8102e) center / 100% 2px no-repeat,
    linear-gradient(#c8102e, #c8102e) center / 2px 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 5px no-repeat,
    linear-gradient(#fff, #fff) center / 5px 100% no-repeat,
    linear-gradient(33deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%),
    linear-gradient(-33deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%),
    #012169;
}
.market__body { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; flex: 1; }
.market__title { font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -.04em; line-height: 1.05; margin-bottom: 14px; }
.market__lead { color: var(--dim); font-size: 15px; margin-bottom: 24px; }
.market__checks { list-style: none; margin: auto 0 0; padding: 0; border-top: 1px dashed var(--line); }
.market__checks li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line-soft); color: var(--dim); font-size: 13px; }
.market__checks li:last-child { border-bottom: 0; padding-bottom: 0; }
.market__checks b { display: block; margin-bottom: 2px; font: 500 16px/1.25 var(--sans); letter-spacing: -.02em; color: var(--fg); }
.market__tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-grad); color: #0b0b14; font-size: 12px; font-weight: 600; }
@media (max-width: 900px) { .markets__grid { grid-template-columns: 1fr; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); }
.timeline li { display: grid; grid-template-columns: 160px 1fr 1.2fr; gap: 30px; padding: 30px 0; border-bottom: 1px dashed var(--line); align-items: baseline; transition: background .4s; }
.timeline li:hover { background: linear-gradient(90deg, rgba(255, 255, 255, .03), transparent); }
.timeline .year { font: 400 clamp(32px, 3.4vw, 48px)/1 var(--sans); letter-spacing: -.05em; color: var(--accent); }
.timeline h3 { font-size: 24px; letter-spacing: -.03em; }
.timeline p { margin: 0; color: var(--dim); font-size: 15px; }

/* ---------- Team ---------- */
.member { background: #000; padding: 34px 28px; display: flex; flex-direction: column; gap: 4px; transition: background .4s; }
.member:hover { background: var(--bg-2); }
.member__avatar {
  width: 84px; height: 84px; border-radius: 50%; margin-bottom: 26px; display: grid; place-items: center;
  font: 400 26px var(--sans); letter-spacing: -.03em;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 60%, transparent 70%), #0d0d10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 40px rgba(184, 203, 255, .08);
}
.member h3 { font-size: 24px; letter-spacing: -.035em; }
.member p { margin: 0; color: var(--faint); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Services ---------- */
.services { border-top: 1px dashed var(--line); }
.service { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 40px; padding: clamp(40px, 5vw, 64px) 0; border-bottom: 1px dashed var(--line); }
.service__num { font: 500 14px var(--mono); color: var(--accent); }
.service h3 { font-size: clamp(32px, 3.8vw, 56px); letter-spacing: -.05em; }
.service p { color: var(--dim); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px dashed var(--line); }
.step { padding: 36px 28px 40px 0; }
.step + .step { padding-left: 28px; border-left: 1px dashed var(--line); }
.step__num { display: block; font: 400 64px/1 var(--sans); letter-spacing: -.06em; margin-bottom: 34px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 26px; margin-bottom: 12px; letter-spacing: -.035em; }
.step p { margin: 0; color: var(--dim); font-size: 14px; }

.faq { border-top: 1px dashed var(--line); max-width: 920px; margin-inline: auto; }
.faq details { border-bottom: 1px dashed var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 30px; padding: 26px 0; font: 400 clamp(20px, 2vw, 26px)/1.2 var(--sans); letter-spacing: -.03em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--dim); max-width: 720px; padding-bottom: 26px; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.info { border-top: 1px dashed var(--line); }
.info__row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px dashed var(--line); }
.info__row a:hover { color: var(--accent); }
.form { display: grid; gap: 22px; padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line); border-radius: 10px; background: rgba(10, 10, 12, .7); backdrop-filter: blur(10px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form label { display: grid; gap: 10px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px dashed var(--line); background: transparent; color: #fff;
  font: 400 16px var(--mono); letter-spacing: -.01em; text-transform: none; border-radius: 0; resize: vertical; transition: border-color .3s;
}
.form select { appearance: none; cursor: pointer; }
.form select option { background: #000; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom: 1px solid var(--accent); }
.form ::placeholder { color: rgba(255, 255, 255, .28); }
.form .is-invalid { border-bottom-color: #ff6b6b; }
.form__status { margin: 0; font-size: 13px; min-height: 1.2em; }
.form__status.ok { color: var(--accent); }
.form__status.err { color: #ff8a8a; }
.map { margin-top: 40px; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* ---------- Final CTA + footer with dot wave ---------- */
.finale { position: relative; overflow: hidden; isolation: isolate; }
.finale canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 75%; z-index: -1; pointer-events: none; }
.finale__cta { text-align: center; padding: clamp(140px, 18vw, 240px) 0 clamp(160px, 20vw, 280px); }
.finale__cta h2 { margin-bottom: 40px; }
.footer { padding: 0 calc(var(--pad) + 76px) 34px var(--pad); display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.footer__links { display: flex; align-items: center; gap: 38px; flex-wrap: wrap; font: 500 15px var(--mono); }
.footer__links a { transition: color .3s; }
.footer__links a:hover { color: var(--accent); }
.socials { display: flex; gap: 22px; }
.socials svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.socials a:hover svg { stroke: var(--accent); }
.footer__legal { width: 100%; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; margin-top: 10px; border-top: 1px dashed var(--line-soft); color: var(--faint); font-size: 12px; letter-spacing: .04em; }

.wa { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #fff; transition: transform .4s var(--ease), background .3s; }
.wa:hover { transform: scale(1.08); background: var(--accent); }
.wa svg { width: 26px; height: 26px; fill: #000; }

/* ---------- Reveal + split text ---------- */
.reveal { opacity: 0; transform: translateY(30px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; transform: translateY(105%); opacity: 0; filter: blur(6px); transition: transform 1.1s var(--ease), opacity 1.1s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
[data-split].is-visible .w > span { transform: none; opacity: 1; filter: none; }

/* ---------- Scroll UX ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; background: var(--accent-grad); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px rgba(169, 195, 255, .6); pointer-events: none; }

.to-top {
  position: fixed; right: 26px; bottom: 88px; z-index: 40; width: 46px; height: 46px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 16px var(--mono); opacity: 0; translate: 0 14px; pointer-events: none; transition: opacity .4s, translate .5s var(--ease), background .3s;
}
.to-top.is-shown { opacity: 1; translate: none; pointer-events: auto; }
.to-top:hover { background: rgba(255, 255, 255, .1); }
.to-top:focus-visible, .btn:focus-visible, .chip:focus-visible, .nav a:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke-width: 1.5; }
.to-top__track { stroke: rgba(255, 255, 255, .18); }
.to-top__ring { stroke: var(--accent); stroke-linecap: round; }

/* scroll-linked elements: let the browser plan for the change */
.hero__media, .page-hero__media { will-change: translate; }

/* wordmarks cascade in once their grid is visible */
.marques .marque { opacity: 0; translate: 0 16px; transition: opacity .9s var(--ease), translate .9s var(--ease), color .4s, background .4s; transition-delay: calc(var(--i, 0) * 60ms); }
.marques.is-visible .marque { opacity: 1; translate: none; }

/* timeline progress rail */
.timeline { position: relative; padding-left: 40px; border-top: 0; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; }
.timeline::before { background: var(--line-soft); }
.timeline::after { background: linear-gradient(var(--accent), #fff); transform: scaleY(var(--tp, 0)); transform-origin: top; box-shadow: 0 0 10px var(--accent); }
.timeline li { position: relative; }
.timeline li:first-child { border-top: 1px dashed var(--line); }
.timeline li::before {
  content: ""; position: absolute; left: -40px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: #000; border: 1px solid var(--line); transition: background .5s, border-color .5s, box-shadow .5s;
}
.timeline li.is-passed::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent); }
.timeline .year { color: var(--faint); transition: color .6s; }
.timeline li.is-passed .year { color: var(--accent); }

/* ---------- Scroll-driven motion ----------
   CSS scroll timelines run on the compositor thread, so motion stays locked to the
   scroll position with no lag or jitter. Unsupported browsers simply get no parallax. */
.trust { view-timeline: --trust block; }
.finale { view-timeline: --finale block; }
.showcase { view-timeline: --showcase block; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__media, .page-hero__media { animation: drift linear both; animation-timeline: scroll(root block); animation-range: 0px 100vh; }
    .page-hero__media { animation-range: 0px 80vh; }
    .hero > .container, .page-hero > .container { animation: liftOut linear both; animation-timeline: scroll(root block); animation-range: 0px 70vh; }
    .page-hero > .container { animation-range: 0px 60vh; }
    .hero__foot { animation: fadeOut linear both; animation-timeline: scroll(root block); animation-range: 0px 25vh; }
    .finale__cta { animation: floatUpSoft linear both; animation-timeline: --finale; animation-range: entry 0% exit 100%; }
    .showcase__car img { animation: carIn linear both; animation-timeline: --showcase; animation-range: entry 0% cover 45%; }
    .trust h2 { animation: settle linear both; animation-timeline: --trust; animation-range: entry 0% cover 45%; }
    .trust .scene { animation: rise linear both; animation-timeline: --trust; animation-range: entry 10% cover 50%; }
  }
}
@keyframes drift { to { translate: 0 20%; } }
@keyframes liftOut { to { translate: 0 -90px; opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes floatUpSoft { from { translate: 0 50px; } to { translate: 0 -30px; } }
@keyframes carIn { from { transform: translateX(14%) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes settle { from { scale: .86; } to { scale: 1; } }
@keyframes rise { from { translate: 0 120px; opacity: .2; } to { translate: none; opacity: 1; } }

/* page-to-page transitions (cross-document View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .35s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .7s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; filter: blur(6px); } }
@keyframes vtIn { from { opacity: 0; filter: blur(6px); } }


/* ---------- Light chapter (Home: "Built for trust" → marques) ----------
   script.js toggles html.theme-light while that stretch of the page fills the viewport.
   Most components read the palette variables, so swapping them re-themes the page;
   the overrides below cover the few places that hard-code white or black. */
html.theme-light {
  --bg: #f3f2ee;
  --bg-2: #e8e7e2;
  --fg: #0b0b0d;
  --dim: rgba(11, 11, 13, .64);
  --faint: rgba(11, 11, 13, .44);
  --line: rgba(11, 11, 13, .22);
  --line-soft: rgba(11, 11, 13, .1);
  --accent: #3d55c4;
}
body { transition: background-color 1s var(--ease), color 1s var(--ease); }
/* elements that set their own colour from the palette need their own transition */
.label, .lead, .dim, .kicker, .car, .car__meta, .specs li, .specs li span, .price, .arrow-link, .grid, .grid > *,
.marques, .marque, .marque__logo, .wordmark, .nav a, .header, .burger span, .wa, .wa svg, #stars, .spot, .stage::after {
  transition-property: color, background-color, border-color, opacity, filter, fill, translate, transform;
  transition-duration: 1s; transition-timing-function: var(--ease);
}
#stars { transition: opacity 1s var(--ease); }
html.theme-light #stars { opacity: 0; }
html.theme-light body::after { opacity: .045; }

/* header */
html.theme-light .header.is-scrolled { background: rgba(243, 242, 238, .78); }
html.theme-light .burger span { background: var(--fg); }
html.theme-light .header.menu-open { color: #fff; }
html.theme-light .header.menu-open .burger span { background: #fff; }
@media (min-width: 861px) {
  html.theme-light .nav a:not(.btn):hover, html.theme-light .nav a[aria-current="page"] { color: var(--fg); }
}

/* trust: the spotlight becomes daylight; floor glow becomes a soft contact shadow */
html.theme-light .spot { opacity: 0; }
html.theme-light .stage::after { background: radial-gradient(closest-side, rgba(0, 0, 0, .16), transparent); }
html.theme-light .wordmark { color: var(--fg); }

/* marques: logos turn black */
html.theme-light .marque { color: var(--dim); }
html.theme-light .marque__logo { filter: brightness(0); opacity: .8; }
html.theme-light .marque:hover { color: var(--fg); background: rgba(0, 0, 0, .03); }

/* buttons */
html.theme-light .btn--outline { border-color: var(--fg); background: transparent; color: var(--fg); }
html.theme-light .btn--outline:hover { background: var(--fg); color: var(--bg); }

/* About: timeline, team and quote in the light chapter */
.member, .member__avatar, .timeline li::before { transition: background-color 1s var(--ease), color 1s var(--ease), border-color 1s var(--ease), box-shadow 1s var(--ease); }
html.theme-light .member { background: var(--bg); }
html.theme-light .member:hover { background: var(--bg-2); }
html.theme-light .member__avatar { background: radial-gradient(circle at 35% 30%, #fff, #e4e3de 70%); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px -10px rgba(0, 0, 0, .25); }
html.theme-light .timeline li::before { background: var(--bg); }
html.theme-light .timeline li.is-passed::before { background: var(--accent); }
html.theme-light .timeline::after { background: linear-gradient(var(--accent), #8ea0e6); box-shadow: none; }

/* labels and tags sit on photos, so they stay white in both themes */
.car__top, .car__top .label { color: #fff; }

/* floating buttons keep their contrast */
.to-top { color: #fff; }
html.theme-light .wa { background: #0b0b0d; }
html.theme-light .wa svg { fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  .car__img { clip-path: none; }
  .marques .marque { opacity: 1; translate: none; }
  .timeline .year { color: var(--accent); }
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, [data-split] .w > span { opacity: 1; transform: none; filter: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid, .team { grid-template-columns: repeat(2, 1fr); }
  .marques { grid-template-columns: repeat(3, 1fr); }
  .marque:not(:nth-child(5n)) { border-right: 0; }
  .marque:not(:nth-child(3n)) { border-right: 1px dashed var(--line-soft); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n + 3) { border-top: 1px dashed var(--line); }
  .service { grid-template-columns: 80px 1fr; }
  .service > div:last-child { grid-column: 2; }
}

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 26px; padding: 0 var(--pad);
    background: rgba(0, 0, 0, .96); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav a:not(.btn) { font: 400 44px/1 var(--sans); letter-spacing: -.045em; text-transform: none; color: #fff; }
  .nav a:not(.btn)::before, .nav a:not(.btn)::after { display: none; }
  .nav a[aria-current="page"] { color: var(--accent); }
  .nav .btn { margin-top: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .showcase { height: auto; min-height: 0; padding-bottom: 40px; }
  .showcase { padding-top: 90px; }
  .showcase::before { top: 230px; }
  .showcase__car { position: relative; left: auto; top: auto; transform: none; width: 100%; margin: 0 0 40px; }
  .showcase__overlay { position: relative; bottom: auto; flex-direction: column; align-items: stretch; gap: 32px; }
  .showcase__specs { width: 100%; }

  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px dashed var(--line); }
  .cols, .pillars, .contact-grid { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 40px 0; border-left: 0; }
  .pillar + .pillar { border-top: 1px dashed var(--line); }
  .timeline li { grid-template-columns: 1fr; gap: 10px; }
  .scene { width: 315px; height: 360px; margin-top: 0; }
  .stage { transform: scale(.75); }
}

@media (max-width: 600px) {
  .grid, .team, .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0; border-left: 0; }
  .step + .step { border-top: 1px dashed var(--line); }
  .marques { grid-template-columns: repeat(2, 1fr); }
  .marque { height: 120px; gap: 14px; }
  .marque__logo { height: 38px; width: 38px; }
  .marque:not(:nth-child(3n)) { border-right: 0; }
  .marque:nth-child(odd) { border-right: 1px dashed var(--line-soft); }
  .service { grid-template-columns: 1fr; gap: 16px; }
  .service > div:last-child { grid-column: auto; }
  .form__row, .info__row { grid-template-columns: 1fr; }
  .info__row { gap: 6px; }
  .hero__foot { display: none; }
  .logo--lg .logo__word { font-size: 34px; }
  .footer__links { gap: 20px; font-size: 13px; }
  .footer { padding-right: var(--pad); padding-bottom: 96px; }
  .toolbar__right { width: 100%; justify-content: space-between; }
}

/* =========================================================
   Touch, tablet & phone refinements (kept last so they win the cascade)
   ========================================================= */

/* Comfortable 44px touch targets for inline links and small controls on touch screens */
@media (pointer: coarse) {
  .arrow-link, .footer__links > a, .footer__legal a, .crumbs a, .cd__back, .cd__trail a, .scroll-cue {
    min-height: 44px; display: inline-flex; align-items: center;
  }
  .socials { gap: 4px; }
  .socials a { width: 44px; height: 44px; display: grid; place-items: center; }
  .logo { min-height: 44px; }
  .spot-pin { padding: 10px; }   /* 46px hit area around the 26px dot */
  .inv-search input { align-self: stretch; }
  .car__facts dt, .cd__facts dt { font-size: 11px; }
}

/* ---------- Tablet (portrait & small laptops) ---------- */
@media (max-width: 1080px) {
  .section { padding: clamp(80px, 11vw, 120px) 0; }
  .page-hero { min-height: 64svh; padding-bottom: 64px; }
  .finale__cta { padding: 130px 0 150px; }
  .hero__row { grid-template-columns: 1fr; gap: 18px; }
  .hero__aside { max-width: 520px; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  :root { --pad: 20px; }
  .section { padding: 72px 0; }
  .section--tight { padding: 56px 0; }
  .head-row { margin-bottom: 36px; gap: 18px; }
  .h-2 { font-size: clamp(34px, 10vw, 44px); }

  /* floating buttons: keep WhatsApp only, slightly smaller, and give page bottoms room for it */
  .to-top { display: none; }
  .wa { width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .footer { padding-bottom: 84px; }

  /* page banners: tighter, no scroll cue */
  .page-hero { min-height: 58svh; padding: 120px 0 44px; }
  .page-hero h1 { font-size: clamp(48px, 14vw, 64px); margin-bottom: 20px; }
  .page-hero__row .scroll-cue, .page-hero .crumbs { display: none; }
  .crumbs { margin-bottom: 16px; }

  /* home hero */
  .hide-sm { display: none; }
  .hero { padding-top: 104px; }
  .hero__eyebrow { font-size: 11px; letter-spacing: .06em; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 52px); }
  .hero__ctas { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__ctas .btn { min-width: 0; padding: 0 12px; }
  .hero__trust { gap: 6px 16px; }

  /* best sellers: model name fits the screen */
  .drive__name { font-size: 19vw; }

  /* stats: 2 x 2 with breathing room */
  .stat { padding: 22px 16px; }

  /* finale + footer */
  .finale__cta { padding: 96px 0 120px; }
  .finale__cta h2 { font-size: clamp(36px, 10.5vw, 46px); margin-bottom: 28px; }
  .finale .btns--center { display: grid; grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
  .footer { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; width: 100%; font-size: 15px; }
  .footer__links .socials { grid-column: 1 / -1; margin-top: 8px; }
  .footer__legal { flex-direction: column; gap: 6px; color: var(--dim); }

  /* contact: the form is the main task, so it comes first */
  .contact-grid > form { order: -1; }
  .form { padding: 24px 20px; }

  /* about: timeline + team */
  .timeline { padding-left: 28px; }
  .timeline li::before { left: -28px; }
  .member { padding: 26px 22px; }
  .member__avatar { width: 64px; height: 64px; margin-bottom: 18px; font-size: 20px; }

  /* services list */
  .service { gap: 10px; padding: 34px 0; }
  .step__num { font-size: 48px; margin-bottom: 18px; }

  /* car detail */
  .cd { padding-top: 96px; }
  .cd__trail { display: none; }
  .cd__crumbs { margin-bottom: 14px; }
  .cd__photo { border-radius: 12px; }
}

/* tablet: no stranded single card at the end of a 2-column grid */
@media (min-width: 601px) and (max-width: 1080px) {
  .grid > .car:not(.is-hidden):last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .grid > .car:not(.is-hidden):last-child:nth-child(odd) .car__img { flex: 0 0 50%; aspect-ratio: auto; min-height: 100%; }
  .marques { grid-template-columns: repeat(5, 1fr); }
  .marque:not(:nth-child(3n)) { border-right: 0; }
  .marque:not(:nth-child(5n)) { border-right: 1px dashed var(--line-soft); }
  .marque { height: 120px; }
}

/* ---------- Live data (rendered from the admin backend) ---------- */
.car__img--photo { background: #111; clip-path: inset(100% 0 0 0); }
.car__img--photo img { width: 100%; height: 100%; object-fit: cover; }
.tag--reserved { background: rgba(180, 83, 9, .85); border-color: transparent; color: #fff; }
.cd__loading { min-height: 50vh; display: grid; place-items: center; }
.cd__missing { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; }
.cd__nophoto { display: grid; place-items: center; gap: 10px; aspect-ratio: 16 / 10; border: 1px dashed var(--line); border-radius: 14px; color: var(--dim); text-align: center; }
.cd__desc { color: var(--dim); white-space: pre-line; max-width: 70ch; margin: 0; }
.cd__reserved { margin: -6px 0 18px; padding: 10px 14px; border-radius: 10px; background: rgba(217, 119, 6, .14); color: #f5b04a; font-size: 13px; }
.form__status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* best sellers: arrows on the left and right edges, level with the car */
.drive__nav { position: absolute; z-index: 4; left: var(--pad); right: var(--pad); top: calc(var(--road) - 9vh); display: flex; justify-content: space-between; pointer-events: none; }
.drive__nav .drive__btn { pointer-events: auto; width: 60px; height: 60px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.drive__btn--prev { background: rgba(0, 0, 0, .45); }
@media (max-width: 860px) {
  /* the car fills the width on phones, so the arrows sit just below the road instead of over the wheels */
  .drive__nav { top: calc(var(--road) + 22px); left: var(--pad); right: var(--pad); }
  .drive__nav .drive__btn { width: 46px; height: 46px; }
}
