/* ==========================================================================
   NOIR AUTOMOTIVE — design system
   1. Tokens  2. Base  3. Primitives  4. Motion  5. Header  6. Hero
   7. Statement  8. Collection  9. Detail  10. Difference  11. Editorial
   12. Contact  13. Footer  14. Dialog  15. Loader  16. Reduced motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #08090a;
  --surface: #111315;
  --surface-2: #17191c;
  --text: #f4f2ed;
  --muted: #92959a;
  --accent: #ff5a1f;
  --line: rgba(244, 242, 237, 0.12);
  --line-strong: rgba(244, 242, 237, 0.22);

  --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 72px);
  --header-h: 72px;
  --section-pad: clamp(96px, 14vw, 220px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

html.is-locked, html.is-locked body { overflow: hidden; }
/* Smooth wheel scrolling (Lenis, see initSmoothScroll). An embedded frame must not swallow the wheel mid-scroll. */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-scrolling iframe { pointer-events: none; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--bg); }

[hidden] { display: none !important; }
section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 200;
  padding: 12px 18px; background: var(--text); color: var(--bg);
  font-size: 0.875rem; font-weight: 500;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* 3. Primitives ------------------------------------------------------------ */
.container { width: min(100% - 2 * var(--gutter), 1560px); margin-inline: auto; }

.display {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent); }

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--accent); }

.tick {
  display: inline-block; width: 6px; height: 6px; margin-right: 12px;
  background: var(--accent); vertical-align: 0.08em;
}

.lede {
  font-size: clamp(1.0625rem, 1.35vw, 1.375rem);
  line-height: 1.5;
  color: var(--text);
  max-width: 38ch;
  text-wrap: pretty;
}

.demo-tag {
  display: inline-block; padding: 2px 7px; margin-inline: 2px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text); vertical-align: 0.1em; white-space: nowrap;
}

.wordmark {
  display: inline-flex; align-items: baseline; gap: 0.55em;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.3em; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
}
.wordmark span {
  font-family: var(--font-mono); font-size: 0.58em; font-weight: 400;
  letter-spacing: 0.28em; color: var(--muted);
}
.wordmark--lg { font-size: clamp(2.5rem, 7vw, 6.5rem); letter-spacing: 0.12em; flex-wrap: wrap; gap: 0.2em 0.3em; }
.wordmark--lg span { font-size: max(0.16em, 0.6875rem); letter-spacing: 0.4em; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 0 24px;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn__arrow { display: inline-block; transition: transform 0.5s var(--ease); }
.btn__dot { width: 6px; height: 6px; background: var(--accent); transition: background-color 0.4s var(--ease); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { background: var(--accent); }
.btn--light:hover .btn__dot { background: var(--bg); }
.btn--accent { background: var(--accent); color: var(--bg); }
.btn--accent:hover { background: var(--text); }
.btn--accent:hover .btn__arrow { transform: translateX(6px); }
.btn--outline { border-color: var(--line-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.btn--outline[aria-expanded="true"] .btn__arrow { transform: rotate(180deg); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 0;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text);
}
.link-arrow::after {
  content: ""; width: 28px; height: 1px; background: var(--accent);
  transform-origin: left; transition: transform 0.5s var(--ease);
}
.link-arrow:hover::after, .vehicle:hover .link-arrow::after { transform: scaleX(1.8); }

.section-head { display: grid; gap: 28px; margin-bottom: clamp(56px, 8vw, 120px); }
.section-head__title { font-size: clamp(2.5rem, 7.4vw, 8rem); }
.section-head__title--sm { font-size: clamp(2rem, 4.6vw, 4.75rem); line-height: 0.96; }
.section-head__note { max-width: 46ch; color: var(--muted); font-size: 0.9375rem; }

@media (min-width: 900px) {
  .section-head { grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
  .section-head > .label { grid-column: 1 / -1; }
  .section-head__title { grid-column: 1 / span 8; }
  .section-head__note { grid-column: 9 / -1; padding-bottom: 0.8em; }
  .section-head--split > .label { grid-column: 1 / span 4; align-self: start; padding-top: 0.6em; }
  .section-head--split .section-head__title { grid-column: 5 / -1; }
}

/* 4. Motion: scroll reveals (only when JS is running) ----------------------- */
/* the padding keeps carons (Č Š Ž) on capitals inside the clipping box */
.line { display: block; overflow: hidden; padding: 0.22em 0 0.1em; margin: -0.22em 0 -0.1em; }
.line > span { display: block; }

.js [data-reveal]:not([data-reveal="lines"]):not([data-reveal="image"]):not([data-reveal="card"]) {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal].is-in { opacity: 1 !important; transform: none !important; }

.js [data-reveal="lines"] .line > span {
  transform: translate3d(0, 108%, 0);
  transition: transform 1.2s var(--ease);
}
.js [data-reveal="lines"] .line:nth-child(2) > span { transition-delay: 90ms; }
.js [data-reveal="lines"] .line:nth-child(3) > span { transition-delay: 180ms; }
.js [data-reveal="lines"].is-in .line > span { transform: none; }

.js [data-reveal="image"] .plate__media,
.js [data-reveal="card"] .vehicle__media {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.3s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal="image"].is-in .plate__media,
.js [data-reveal="card"].is-in .vehicle__media { clip-path: inset(0 0 0 0); }

.js [data-reveal="image"] figcaption,
.js [data-reveal="card"] .vehicle__body {
  opacity: 0; transform: translate3d(0, 16px, 0);
  transition: opacity 0.9s var(--ease) 0.25s, transform 0.9s var(--ease) 0.25s;
}
.js [data-reveal="image"].is-in figcaption,
.js [data-reveal="card"].is-in .vehicle__body { opacity: 1; transform: none; }

/* Parallax containers: the image is oversized and moved by assets/js/motion.js */
[data-parallax] { position: relative; overflow: hidden; }
[data-parallax] > img {
  position: absolute; left: 0; top: -9%; width: 100%; height: 118%;
  object-fit: cover; will-change: transform;
}

/* 5. Header ---------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.site-header.is-scrolled, .site-header.is-menu-open {
  background: rgba(8, 9, 10, 0.94);
  border-bottom-color: var(--line);
}
.site-header__inner {
  height: 100%; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.site-header .wordmark { justify-self: start; }
.site-header__cta { justify-self: end; min-height: 40px; padding-inline: 18px; }

.site-nav { position: relative; }
.site-nav__list { display: flex; gap: clamp(20px, 2.6vw, 44px); }
.site-nav__list a {
  display: block; padding: 12px 0;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); transition: color 0.4s var(--ease);
}
.site-nav__list a:hover, .site-nav__list a[aria-current="true"] { color: var(--text); }
.site-nav__indicator {
  position: absolute; left: 0; bottom: 4px; width: 1px; height: 1px; background: var(--accent);
  transform-origin: left; opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.4s var(--ease);
}

.menu-toggle { display: none; justify-self: end; width: 48px; height: 48px; margin-right: -12px; }
.menu-toggle__bars { position: relative; display: block; width: 24px; height: 10px; margin: auto; }
.menu-toggle__bars i {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--text);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.menu-toggle__bars i:first-child { top: 0; }
.menu-toggle__bars i:last-child { top: 100%; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { top: 50%; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { top: 50%; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 40px) var(--gutter) max(32px, env(safe-area-inset-bottom));
  background: var(--bg);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu li { border-bottom: 1px solid var(--line); overflow: hidden; }
.mobile-menu li a {
  display: flex; align-items: baseline; gap: 20px; padding: 22px 0;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase;
  transform: translate3d(0, 110%, 0); transition: transform 0.8s var(--ease);
}
.mobile-menu.is-open li a { transform: none; }
.mobile-menu li:nth-child(2) a { transition-delay: 50ms; }
.mobile-menu li:nth-child(3) a { transition-delay: 100ms; }
.mobile-menu li:nth-child(4) a { transition-delay: 150ms; }
.mobile-menu .btn { width: 100%; min-height: 56px; }

@media (max-width: 1023px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-nav, .site-header__cta { display: none; }
  .menu-toggle { display: block; }
}
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }

/* 6. Hero ------------------------------------------------------------------ */
.hero { position: relative; height: 500vh; }
.hero--static { height: auto; }

.hero__stage {
  /* --p: scroll progress 0–1 · --open: copy cleared / stage opened · --exit: hand-off to next section
     --fx/--fy/--fw/--fh: on-screen rectangle of the drawn frame in CSS px (set by hero.js) */
  --p: 0; --open: 0; --exit: 0; --callouts: 0;
  --fx: 0; --fy: 0; --fw: 0; --fh: 0;
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden; background: var(--bg);
}
.hero--static .hero__stage { position: relative; }

/* Opening shot: once the frames are ready the studio lights come up — the car fades in
   from black and settles back a few percent. (.hero__media carries this one-off move so
   the canvas' own opacity stays free for the scroll-linked hand-off.) */
.hero__media { position: absolute; inset: 0; transform-origin: 50% 58%; }
.js .hero__media { transition: opacity 1.8s var(--ease-in-out) 0.1s, transform 2.6s var(--ease) 0.1s; }
.js:not(.is-ready) .hero__media { opacity: 0; transform: scale(1.06); }

.hero__canvas, .hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__canvas { opacity: calc(1 - var(--exit) * 0.55); }
.hero__poster { object-fit: contain; }
.hero--live .hero__poster { display: none; }
.hero--fallback .hero__canvas { display: none; }

.hero__shade { position: absolute; left: 0; right: 0; pointer-events: none; }
.hero__shade--top {
  top: 0; height: 52%;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 34%, rgba(8, 9, 10, 0.86) 54%, rgba(8, 9, 10, 0.4) 78%, rgba(8, 9, 10, 0) 100%);
  transform-origin: top;
  transform: scaleY(calc(1 - var(--open) * 0.72));
}
.hero__shade--bottom {
  bottom: 0; height: 30%;
  background: linear-gradient(to top, var(--bg) 0%, rgba(8, 9, 10, 0.9) 30%, rgba(8, 9, 10, 0.45) 62%, rgba(8, 9, 10, 0) 100%);
  transform-origin: bottom;
  transform: scaleY(calc(1 - var(--open) * 0.42 + var(--exit) * 1.4));
}

.hero__copy {
  position: absolute; left: var(--gutter); right: var(--gutter);
  top: clamp(100px, 15.5vh, 168px);
  opacity: calc(1 - var(--open));
  transform: translate3d(0, calc(var(--open) * -32px), 0);
}
.hero__eyebrow { margin-bottom: clamp(14px, 1.8vw, 26px); }
.hero__title { font-size: clamp(2.75rem, 5.7vw, 6.75rem); white-space: nowrap; }

.hero__lede {
  position: absolute; left: var(--gutter); bottom: clamp(56px, 9vh, 104px);
  max-width: 36ch; font-size: clamp(0.9375rem, 1.15vw, 1.125rem); line-height: 1.55; color: var(--text);
  /* gone by the time the stage is half open, so it never sits under the HUD that follows */
  opacity: clamp(0, calc(1 - var(--open) * 2.2), 1);
  transform: translate3d(0, calc(var(--open) * -20px), 0);
}

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(56px, 9vh, 104px);
  display: flex; align-items: center; gap: 16px;
  opacity: clamp(0, calc(1 - var(--open) * 2.2), 1);
}
.hero__scroll .label { color: var(--text); }
.hero__scroll-line { position: relative; width: 1px; height: 56px; background: var(--line-strong); overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: translate3d(0, -100%, 0);
}
.is-ready .hero__scroll-line::after { animation: scroll-cue 2.4s var(--ease-in-out) 1.2s 3 both; }
@keyframes scroll-cue {
  0% { transform: translate3d(0, -100%, 0); }
  55%, 100% { transform: translate3d(0, 100%, 0); }
}

.hero__hud {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 18px;
  opacity: calc(clamp(0, (var(--open) - 0.5) * 2, 1) * (1 - var(--exit)));
  pointer-events: none;
}
.hero__chapters { position: relative; flex: 1; min-height: 2.6rem; }
.hero__chapters p {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: baseline; gap: 18px;
  opacity: 0; transform: translate3d(0, 12px, 0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.hero__chapters p.is-active { opacity: 1; transform: none; }
.hero__chapter-name {
  font-size: clamp(1.25rem, 2.1vw, 2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase;
}
.hero__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-strong); }
.hero__progress span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p)); }

/* Technical callouts — anchored to coordinates inside the drawn frame */
.hero__callouts { position: absolute; inset: 0; opacity: calc(var(--callouts) * (1 - var(--exit))); pointer-events: none; }
.callout {
  position: absolute; width: 0; height: 0;
  left: calc((var(--fx) + var(--fw) * var(--x)) * 1px);
  top: calc((var(--fy) + var(--fh) * var(--y)) * 1px);
  color: #08090a;
}
.callout::before {
  content: ""; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px;
  border: 1.5px solid var(--accent); border-radius: 50%; background: rgba(244, 242, 237, 0.9);
}
.callout::after { content: ""; position: absolute; background: rgba(8, 9, 10, 0.5); }
.callout__label {
  position: absolute; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
}
.callout__label b { font-weight: 500; margin-right: 0.9em; opacity: 0.5; }
.callout--up::after { left: 0; bottom: 8px; width: 1px; height: 52px; }
.callout--up .callout__label { left: 0; bottom: 68px; }
.callout--down::after { left: 0; top: 8px; width: 1px; height: 44px; }
.callout--down .callout__label { left: 0; top: 58px; }
.callout--left::after { right: 8px; top: 0; height: 1px; width: 56px; }
.callout--left .callout__label { right: 74px; top: -0.7em; }

/* Entrance, once the first frames are ready */
/* (an animation, not a transition: these opacities are scroll-linked afterwards and must not lag) */
.js.is-ready .hero__eyebrow, .js.is-ready .hero__lede, .js.is-ready .hero__scroll { animation: hero-in 1.2s var(--ease) 0.9s backwards; }
@keyframes hero-in { from { opacity: 0; } }
.js .hero__title span { display: inline-block; transition: transform 1.4s var(--ease) 0.35s, opacity 1.4s var(--ease) 0.35s; }
.js .hero__title span:nth-child(2) { transition-delay: 0.45s; }
.js .hero__title span:nth-child(3) { transition-delay: 0.55s; }
.js:not(.is-ready) .hero__title span { transform: translate3d(0, 0.5em, 0); opacity: 0; }

.hero--static .hero__hud, .hero--static .hero__callouts { display: none; }
.hero--static .hero__scroll .label { font-size: 0; }
.hero--static .hero__scroll .label::after { content: "Drsajte"; font-size: 0.6875rem; }

@media (max-width: 899px) {
  .hero { height: 420vh; }
  .hero--static { height: auto; }
  .hero__copy { top: calc(var(--header-h) + 28px); }
  .hero__title { font-size: clamp(2.6rem, 12.4vw, 5.5rem); white-space: normal; }
  .hero__title span { display: block !important; }
  .hero__lede { bottom: 104px; right: var(--gutter); max-width: 32ch; }
  .hero__scroll { left: var(--gutter); right: auto; bottom: 32px; flex-direction: row-reverse; }
  .hero__scroll-line { width: 40px; height: 1px; }
  .hero__scroll-line::after { animation: none !important; transform: scaleX(0.4); transform-origin: left; }
  .hero__callouts { display: none; }
  .hero__hud { bottom: 26px; gap: 12px; }
  .hero__chapters p { gap: 12px; white-space: nowrap; }
  .hero__chapter-name { font-size: 1.125rem; }
  .hero__shade--top { height: 40%; }
}

/* 7. Brand statement ------------------------------------------------------- */
.statement {
  position: relative; z-index: 2;
  margin-top: -28vh; padding-top: 28vh;
  background: linear-gradient(to bottom, rgba(8, 9, 10, 0) 0, rgba(8, 9, 10, 0.7) 14vh, var(--bg) 28vh);
}
.hero--static + .statement { margin-top: 0; padding-top: 0; background: var(--bg); }
.statement__grid { padding-block: clamp(72px, 11vw, 180px) var(--section-pad); display: grid; gap: clamp(32px, 5vw, 72px); }
.statement__title { font-size: clamp(2.75rem, 9.6vw, 10.5rem); line-height: 0.9; }
.statement__body { display: grid; gap: clamp(40px, 5vw, 72px); }
.statement__plate .plate__media { aspect-ratio: 3 / 2; }
.statement__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.statement__facts dt { margin-bottom: 8px; }
.statement__facts dd { font-size: 0.9375rem; line-height: 1.35; }

@media (min-width: 900px) {
  .statement__grid { grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .statement__index { grid-column: 1 / -1; }
  .statement__title { grid-column: 1 / -1; }
  /* picture on the left under the headline; the copy opens level with its top and the facts close level with its foot */
  .statement__plate { grid-column: 1 / span 5; margin-top: clamp(16px, 3vw, 48px); }
  .statement__body { grid-column: 7 / -1; grid-template-columns: 1fr; margin-top: clamp(16px, 3vw, 48px); align-content: space-between; }
}
@media (max-width: 520px) { .statement__facts { grid-template-columns: 1fr; gap: 16px; } .statement__facts div { display: grid; grid-template-columns: 9ch 1fr; } }

/* Outlined word band that drifts sideways with the scroll (assets/js/motion.js) */
.ticker { overflow: hidden; border-top: 1px solid var(--line); padding-block: clamp(22px, 3.2vw, 52px); }
.ticker__track {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 56px); width: max-content;
  font-size: clamp(3rem, 8.4vw, 8.5rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.15; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(244, 242, 237, 0.28);
  will-change: transform;
}
.ticker__track i { flex: none; width: 0.11em; height: 0.11em; background: var(--accent); }

/* 8. Collection ------------------------------------------------------------ */
.collection { padding-block: var(--section-pad); border-top: 1px solid var(--line); }

.vehicle-grid { display: grid; gap: clamp(56px, 9vw, 96px) 24px; }

.vehicle { display: flex; flex-direction: column; }
.vehicle__media {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface);
}
.vehicle__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 1.6s var(--ease), filter 1.6s var(--ease);
  filter: saturate(0.82) brightness(0.9);
}
.vehicle:hover .vehicle__media img, .vehicle:focus-within .vehicle__media img { transform: scale(1.07) translate3d(0, -1%, 0); filter: saturate(1) brightness(1); }
.vehicle__index {
  position: absolute; left: 16px; top: 14px; z-index: 1; color: var(--text);
  mix-blend-mode: difference;
}
.vehicle__body { padding-top: 22px; }
.vehicle__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.vehicle__make { display: block; margin-bottom: 8px; }
.vehicle__title { font-size: clamp(1.5rem, 2.5vw, 2.5rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1; text-transform: uppercase; }
.vehicle__price { font-family: var(--font-mono); font-size: clamp(0.9375rem, 1.1vw, 1.0625rem); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vehicle__specs { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 12px 20px; padding-block: 16px 10px; }
.vehicle__specs dt { margin-bottom: 4px; }
.vehicle__specs dd { font-size: 0.875rem; line-height: 1.3; }

@media (min-width: 640px) and (max-width: 899px) {
  .vehicle-grid { grid-template-columns: 1fr 1fr; }
  .vehicle:nth-child(even) { margin-top: 72px; }
  .vehicle__specs { grid-template-columns: 1fr 1fr; justify-content: start; }
}
@media (min-width: 900px) {
  .vehicle-grid { grid-template-columns: repeat(12, 1fr); row-gap: clamp(80px, 10vw, 168px); }
  .vehicle--1 { grid-column: 1 / span 7; }
  .vehicle--2 { grid-column: 9 / span 4; margin-top: clamp(96px, 16vw, 260px); }
  .vehicle--2 .vehicle__media { aspect-ratio: 4 / 5; }
  .vehicle--3 { grid-column: 1 / span 5; }
  .vehicle--4 { grid-column: 7 / span 6; margin-top: clamp(64px, 9vw, 150px); }
  .vehicle--4 .vehicle__media { aspect-ratio: 3 / 2; }
  .vehicle--2 .vehicle__specs { grid-template-columns: 1fr 1fr; justify-content: start; }
}
@media (max-width: 420px) { .vehicle__specs { grid-template-columns: 1fr 1fr; justify-content: start; } }

.collection__footer { display: flex; justify-content: center; margin-top: clamp(72px, 9vw, 140px); }

.inventory { margin-top: clamp(40px, 5vw, 72px); animation: fade-up 0.9s var(--ease) both; }
.inventory__head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.inventory__row {
  width: 100%; display: grid; grid-template-columns: 4ch 1fr auto; align-items: baseline; gap: 6px 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line); text-align: left;
  transition: padding 0.6s var(--ease), color 0.4s var(--ease);
}
.inventory__row:hover { padding-left: 14px; }
.inventory__row:hover .inventory__name { color: var(--accent); }
.inventory__name { font-size: clamp(1.25rem, 2.4vw, 2.25rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; text-transform: uppercase; transition: color 0.4s var(--ease); }
.inventory__meta { grid-column: 2 / -1; font-size: 0.875rem; color: var(--muted); }
.inventory__price { font-family: var(--font-mono); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.inventory__note { margin-top: 20px; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 900px) {
  .inventory__row { grid-template-columns: 6ch minmax(0, 7fr) minmax(0, 5fr) 9ch; }
  .inventory__meta { grid-column: auto; order: 3; }
  .inventory__price { order: 4; text-align: right; }
}
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 24px, 0); } }

/* 9. Detail showcase ------------------------------------------------------- */
.detail { padding-block: var(--section-pad); border-top: 1px solid var(--line); overflow: clip; }
.detail__grid { display: grid; gap: clamp(48px, 8vw, 88px) 24px; }
.detail__intro { display: grid; gap: 28px; align-content: start; }
.detail__title { font-size: clamp(2.75rem, 7.6vw, 8rem); }
.detail__aside { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.25; letter-spacing: -0.02em; max-width: 24ch; color: var(--text); }

.plate { position: relative; }
.plate__media { aspect-ratio: 4 / 3; background: var(--surface); }
.plate__media > img { filter: saturate(0.85); }
.plate figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.plate figcaption span:first-child { color: var(--accent); white-space: nowrap; }
.plate figcaption span:last-child { text-align: right; }
.plate--tall .plate__media { aspect-ratio: 4 / 5; }
.plate--wide .plate__media { aspect-ratio: 3 / 2; }
.plate--blueprint .plate__media { aspect-ratio: 16 / 9; overflow: hidden; }
.plate--blueprint .plate__media > img { width: 100%; height: 100%; object-fit: cover; filter: none; }
/* corner registration marks tie the plate to the hero's technical language */
.plate--blueprint::before, .plate--blueprint::after {
  content: ""; position: absolute; width: 14px; height: 14px; z-index: 1; pointer-events: none;
  border: solid var(--accent); border-width: 1px 0 0 1px;
}
.plate--blueprint::before { left: -7px; top: -7px; }
.plate--blueprint::after { right: -7px; top: -7px; transform: scaleX(-1); }

@media (min-width: 900px) {
  .detail__grid { grid-template-columns: repeat(12, 1fr); row-gap: clamp(72px, 9vw, 150px); }
  .detail__intro { grid-column: 1 / span 7; grid-row: 1; }
  .plate--tall { grid-column: 8 / span 5; grid-row: 1 / span 2; margin-top: clamp(40px, 8vw, 140px); }
  .plate--wide { grid-column: 2 / span 5; grid-row: 2; align-self: end; }
  .plate--blueprint { grid-column: 1 / span 8; grid-row: 3; }
  .plate--small { grid-column: 10 / span 3; grid-row: 3; align-self: end; }
  .detail__aside { grid-column: 6 / span 6; grid-row: 4; }
}

/* 10. The NOIR difference -------------------------------------------------- */
.difference { padding-block: var(--section-pad); background: var(--surface); }
.values { display: grid; gap: 0; counter-reset: v; }
.value { position: relative; padding: 28px 0 clamp(40px, 6vw, 72px); display: grid; gap: 14px; align-content: start; }
.value::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong);
  transform-origin: left;
}
.js .value::before { transform: scaleX(0); transition: transform 1.4s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js .value.is-in::before { transform: scaleX(1); }
.value__marker {
  font-size: clamp(4.5rem, 10vw, 10rem); font-weight: 500; letter-spacing: -0.06em; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1px rgba(244, 242, 237, 0.34);
  margin-bottom: clamp(20px, 4vw, 64px);
  transition: color 0.8s var(--ease), -webkit-text-stroke-color 0.8s var(--ease);
}
.value:hover .value__marker { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.value__title { font-size: clamp(1.375rem, 2vw, 1.875rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; text-transform: uppercase; }
.value p { color: var(--muted); max-width: 30ch; }
@media (min-width: 900px) {
  .values { grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
  .value { padding-right: 24px; }
}

/* 11. Editorial statement -------------------------------------------------- */
.editorial { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: #050607; }
.editorial__media { position: absolute; inset: 0; }
.editorial__media > img { filter: saturate(0.9) brightness(0.9); }
.editorial__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--surface) 0%, rgba(17, 19, 21, 0) 22%),
    linear-gradient(to top, var(--bg) 0%, rgba(8, 9, 10, 0.72) 30%, rgba(8, 9, 10, 0.1) 70%),
    linear-gradient(to right, rgba(8, 9, 10, 0.55), rgba(8, 9, 10, 0) 60%);
}
.editorial__content { position: relative; padding-block: clamp(140px, 22vh, 260px) clamp(72px, 10vw, 150px); display: grid; gap: 28px; }
.editorial__title { font-size: clamp(2.75rem, 9.4vw, 10.5rem); line-height: 0.88; }

/* 12. Contact -------------------------------------------------------------- */
.contact { padding-block: var(--section-pad); }
.contact__grid { display: grid; gap: clamp(56px, 8vw, 96px) 24px; }
.contact__intro { display: grid; gap: 28px; align-content: start; }
.contact__title { font-size: clamp(2.5rem, 5.6vw, 6.25rem); }
.contact__details { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; margin-top: clamp(16px, 3vw, 40px); padding-top: 28px; border-top: 1px solid var(--line); }
.contact__details dt { margin-bottom: 8px; }
.contact__details dd { font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.demo-note { font-size: 0.8125rem; color: var(--muted); max-width: 44ch; }

.enquiry { display: grid; gap: 28px; align-content: start; padding: clamp(24px, 3.4vw, 56px); background: var(--surface); border: 1px solid var(--line); }
.field { display: grid; gap: 10px; min-width: 0; }
.field-row { display: grid; gap: 28px 24px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.field label span[aria-hidden] { color: var(--accent); margin-left: 4px; margin-right: auto; }
.field__optional { letter-spacing: 0.12em; opacity: 0.8; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; font-size: 1.0625rem; line-height: 1.4;
  transition: border-color 0.4s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.field select option { background: var(--surface); color: var(--text); }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; margin-top: -7px;
  border: solid var(--muted); border-width: 0 1px 1px 0; transform: rotate(45deg); pointer-events: none;
}
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.field [aria-invalid="true"] { border-bottom-color: var(--accent); }
.field__error { min-height: 1.3em; font-size: 0.8125rem; line-height: 1.3; color: #ff8a5c; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px var(--surface) inset; caret-color: var(--text); }
.enquiry__required span[aria-hidden] { color: var(--accent); }
.enquiry__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.enquiry__actions .btn { min-height: 56px; padding-inline: 32px; }
.enquiry__hint { font-size: 0.8125rem; color: var(--muted); }
.enquiry__result { padding: 24px; border: 1px solid var(--accent); display: grid; gap: 14px; }
.enquiry__result:focus { outline: none; }
.enquiry__result h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1.1; }
.enquiry__result p { font-size: 0.9375rem; color: var(--muted); }
.enquiry__result dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 0.875rem; }
.enquiry__result dd { overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .contact__grid { grid-template-columns: repeat(12, 1fr); }
  .contact__intro { grid-column: 1 / span 6; padding-right: clamp(16px, 3vw, 56px); }
  .enquiry { grid-column: 7 / -1; }
}

/* 13. Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 110px) 32px; }
.site-footer__top { display: grid; gap: 48px 24px; grid-template-columns: 1fr 1fr; }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: 20px; }
.site-footer__brand p { color: var(--muted); max-width: 30ch; }
.site-footer .label { margin-bottom: 18px; }
.site-footer li { font-size: 0.9375rem; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.site-footer li + li { margin-top: 12px; }
.site-footer nav a { position: relative; display: inline-block; padding: 2px 0; }
.site-footer nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.site-footer nav a:hover::after { transform: scaleX(1); }
.back-to-top { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 16px; justify-self: start; }
.back-to-top .label { margin: 0; color: var(--text); }
.back-to-top__arrow {
  display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.6s var(--ease);
}
.back-to-top:hover .back-to-top__arrow { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: translate3d(0, -4px, 0); }
.site-footer__bottom { display: grid; gap: 10px; margin-top: clamp(56px, 8vw, 110px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
@media (min-width: 900px) {
  .site-footer__top { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .site-footer__brand { grid-column: 1 / span 6; }
  .site-footer__top > nav { grid-column: 7 / span 2; }
  .site-footer__top > div:not(.site-footer__brand) { grid-column: 9 / span 3; }
  .back-to-top { grid-column: 12 / span 1; justify-self: end; flex-direction: column-reverse; align-items: flex-end; }
  .back-to-top .label { white-space: nowrap; }
  .site-footer__bottom { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom p:last-child { text-align: right; }
}

/* 14. Vehicle dialog ------------------------------------------------------- */
.vehicle-dialog {
  width: min(760px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line);
  background: var(--bg); color: var(--text); overflow: hidden;
}
.vehicle-dialog::backdrop { background: rgba(4, 5, 6, 0.78); }
.vehicle-dialog[open] { animation: dialog-in 0.7s var(--ease) both; }
.vehicle-dialog[open]::backdrop { animation: backdrop-in 0.5s ease both; }
@keyframes dialog-in { from { transform: translate3d(48px, 0, 0); opacity: 0; } }
@keyframes backdrop-in { from { opacity: 0; } }
.vehicle-dialog__panel { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.vehicle-dialog__bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding-inline: clamp(20px, 3vw, 40px); background: rgba(8, 9, 10, 0.94); border-bottom: 1px solid var(--line);
}
.vehicle-dialog__close { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.vehicle-dialog__close .label { color: var(--text); }
.vehicle-dialog__close i { position: relative; width: 16px; height: 16px; }
.vehicle-dialog__close i::before, .vehicle-dialog__close i::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: var(--accent); }
.vehicle-dialog__close i::before { transform: rotate(45deg); }
.vehicle-dialog__close i::after { transform: rotate(-45deg); }
.vehicle-dialog__media { aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
.vehicle-dialog__media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-dialog__content { padding: clamp(24px, 3vw, 40px); display: grid; gap: 28px; }
.vehicle-dialog__title { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; text-transform: uppercase; }
.vehicle-dialog__price { font-family: var(--font-mono); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.vehicle-dialog__desc { color: var(--muted); max-width: 52ch; }
.vehicle-dialog__specs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.vehicle-dialog__specs div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.vehicle-dialog__specs div:nth-child(odd) { padding-right: 16px; }
.vehicle-dialog__specs dt { margin-bottom: 6px; }
.vehicle-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.vehicle-dialog__actions .btn { flex: 1 1 220px; min-height: 56px; }

/* 15. Loader --------------------------------------------------------------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--bg);
  transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}
.js .loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { display: grid; justify-items: center; gap: 28px; }
.loader__bar { position: relative; width: min(240px, 56vw); height: 1px; background: var(--line-strong); overflow: hidden; }
.loader__bar span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.4s var(--ease); }
.loader__count { font-variant-numeric: tabular-nums; }

/* 16. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; transition-delay: 0s !important;
  }
  .js [data-reveal], .js [data-reveal] * { transform: none !important; }
  [data-parallax] > img { transform: none !important; }
}
