:root {
  --ink: #0b0b0b;
  --ink-2: #141414;
  --paper: #f3f0ea;
  --text: #ece8e1;
  --muted: #8f8a82;
  --line: rgba(236, 232, 225, 0.14);
  --line-dark: rgba(11, 11, 11, 0.14);
  --accent: #c8102e;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.eyebrow {
  margin: 0 0 1.5rem;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.section-title em { color: var(--muted); }

/* ---------- Scroll-linked reveals ----------
   [data-scrub] elements receive --p (0 → 1) from main.js as they move through the viewport.
   Children offset their start with --d. */

.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span {
  display: block;
  transform: translateY(calc((1 - clamp(0, (var(--p, 1) - var(--d, 0)) * 2.2, 1)) * 110%));
}

.fade-up {
  opacity: clamp(0, (var(--p, 1) - var(--d, 0)) * 2.2, 1);
  transform: translateY(calc((1 - clamp(0, (var(--p, 1) - var(--d, 0)) * 2.2, 1)) * 24px));
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
}

.brand img { width: 120px; height: auto; }

.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a,
.header-meta,
.menu-toggle {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-meta { justify-self: end; display: flex; align-items: center; gap: 24px; }
.lang { opacity: 0.6; }
.lang a[aria-current] { opacity: 1; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 0;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: var(--gutter);
  background: var(--ink);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { font-family: var(--serif); font-size: 44px; line-height: 1.2; }

/* ---------- Hero ---------- */

.hero { position: relative; height: 520vh; background: #000; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 45%);
}
/* Deepens the black space on the left behind the outro copy */
.hero-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0) 48%);
  opacity: var(--outro, 0);
}

.hero-intro,
.hero-outro {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  will-change: opacity, transform;
}

.hero-intro {
  bottom: clamp(56px, 10vh, 120px);
  right: auto;
  opacity: var(--intro, 1);
  transform: translateY(calc((1 - var(--intro, 1)) * -40px));
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero-title em { color: var(--muted); }

.hero-cta { margin-top: clamp(28px, 4vh, 44px); gap: 14px; }
.hero.intro-gone .hero-intro { pointer-events: none; }

.hero-outro {
  top: 42%;
  right: auto;
  width: min(32vw, 540px);
  opacity: var(--outro, 0);
  transform: translateY(calc(-50% + (1 - var(--outro, 0)) * 40px));
}
.hero-outro .display {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-outro p {
  max-width: 40ch;
  margin: 0;
  font-size: clamp(15px, 1.2vw, 17px);
  color: rgba(236, 232, 225, 0.82);
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(56px, 10vh, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: var(--intro, 1);
}
.scroll-cue span { writing-mode: vertical-rl; }
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 64px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 40%;
  background: var(--text);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}

.hero-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}
.hero-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}

/* ---------- Divisions (pinned chapters) ---------- */

.chapters { position: relative; height: 440vh; background: #000; }

.chapters-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  padding: 96px var(--gutter) 64px;
  overflow: hidden;
}

.chapters-list { list-style: none; margin: 0 0 40px; padding: 0; }
.chapter-name {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 116px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  opacity: 0.18;
  transform: translateX(0);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.chapter-name b { font-weight: 400; font-style: italic; }
.chapter-name.is-active { opacity: 1; transform: translateX(clamp(12px, 1.6vw, 28px)); }
.chapter-name.is-active b { color: var(--accent); }

.chapters-detail { position: relative; min-height: 4.8em; max-width: 42ch; }
.chapter-detail {
  position: absolute;
  inset: 0 auto auto 0;
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.chapter-detail.is-active { opacity: 1; transform: none; }

.chapters-count {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.chapters-current { color: var(--text); }
.chapters-count i { position: relative; width: 120px; height: 1px; background: var(--line); }
.chapters-count b {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

.chapters-media {
  position: relative;
  height: min(78vh, 760px);
  overflow: hidden;
}
.chapter-img {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  /* --r: 0 hidden → 1 fully revealed, wiping up from the bottom */
  clip-path: inset(calc((1 - var(--r, 0)) * 100%) 0 0 0);
}
.chapter-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.18 - var(--r, 0) * 0.18));
}

/* ---------- Service centre aperture ---------- */

.aperture { position: relative; height: 260vh; background: #000; }

.aperture-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  /* --o: how far the frame has opened */
  --o: clamp(0, var(--p, 0) / 0.65, 1);
  --t0: 18%; --r0: 6%; --b0: 18%; --l0: 50%;
}

.aperture-frame {
  position: absolute;
  inset: 0;
  clip-path: inset(
    calc(var(--t0) * (1 - var(--o)))
    calc(var(--r0) * (1 - var(--o)))
    calc(var(--b0) * (1 - var(--o)))
    calc(var(--l0) * (1 - var(--o)))
  );
}
.aperture-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.25 - var(--o) * 0.25));
}

.aperture-copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: min(40vw, 560px);
  opacity: calc(1 - clamp(0, (var(--o) - 0.35) * 3, 1));
  transform: translateY(calc(-50% - var(--o) * 40px));
}

/* ---------- Inventory ---------- */

.inventory {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
  padding: var(--section) var(--gutter);
}
.inventory-copy > p:not(.eyebrow) { max-width: 44ch; margin: 32px 0 0; color: rgba(236, 232, 225, 0.75); }

.inventory-media {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  clip-path: inset(calc((1 - clamp(0, var(--p, 1) * 2.6, 1)) * 100%) 0 0 0);
}
.inventory-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  transform: scale(calc(1.3 - clamp(0, var(--p, 1) * 2.6, 1) * 0.2)) translateY(calc((var(--p, 0.5) - 0.5) * -8%));
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; margin-top: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 18px 32px;
  border: 1px solid var(--text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.btn:hover { background: var(--text); color: var(--ink); }

.link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}
.link:hover { color: var(--text); }

/* ---------- News (horizontal on vertical scroll) ---------- */

.news { position: relative; }

.news-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(32px, 5vh, 64px);
  overflow: hidden;
}

.news-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  padding: 0 var(--gutter);
}
.news-lede { max-width: 36ch; margin: 0; color: var(--muted); }

.news-track {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  padding: 0 var(--gutter);
  width: max-content;
  will-change: transform;
}

.card { width: clamp(260px, 24vw, 400px); flex: none; }
.card-media { aspect-ratio: 5 / 4; overflow: hidden; background: var(--ink-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card a:hover .card-media img { transform: scale(1.04); }
.card-cat { margin: 20px 0 8px; font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; }
.card h3 + p { margin: 0; font-size: 14px; color: var(--muted); }

.news-progress { margin: 0 var(--gutter); height: 1px; background: var(--line); }
.news-progress i {
  display: block;
  height: 100%;
  background: var(--text);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

/* ---------- Dealers ---------- */

.dealers { padding: var(--section) 0; background: var(--paper); color: var(--ink); }
.dealers .section-head { padding: 0 var(--gutter); margin-bottom: clamp(48px, 7vw, 96px); }
.dealers .section-title em { color: #7b766e; }
.dealers .eyebrow { color: #7b766e; }

.dealer-grid {
  list-style: none;
  margin: 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.dealer-grid li {
  display: grid;
  place-items: center;
  padding: clamp(32px, 4vw, 56px) 24px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.dealer-grid li + li { border-left: 1px solid var(--line-dark); }
/* Fade sits on the img, not the li: a stacking context on the li would isolate the multiply and show the JPEGs' white boxes */
.dealer-grid img {
  max-height: 92px;
  width: auto;
  mix-blend-mode: multiply;
  filter: grayscale(1);
  opacity: clamp(0, (var(--p, 1) - var(--d, 0)) * 2.2, 1);
  transform: translateY(calc((1 - clamp(0, (var(--p, 1) - var(--d, 0)) * 2.2, 1)) * 32px));
}

/* ---------- Footer ---------- */

.site-footer { padding: var(--section) var(--gutter) 32px; }

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 64px;
}
.footer-claim { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.1; color: var(--muted); }
.footer-cols nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-cols a { color: rgba(236, 232, 225, 0.8); transition: color 0.3s; }
.footer-cols a:hover { color: #fff; }

.footer-wordmark { overflow: hidden; }
.footer-wordmark img {
  width: 100%;
  transform: translateY(calc((1 - var(--p, 1)) * 70%));
}

.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.footer-bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav, .lang { display: none; }
  .menu-toggle { display: block; }

  .hero-outro { width: min(60vw, 480px); }
  .hero-outro .display { font-size: clamp(40px, 7vw, 64px); }

  .chapters-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 24px;
    padding: 88px var(--gutter) 32px;
  }
  .chapters-list { margin-bottom: 16px; }
  .chapter-name { font-size: clamp(36px, 10vw, 64px); }
  .chapters-count { margin-top: 16px; }
  .chapters-media { height: 100%; }

  .aperture-copy { width: auto; right: var(--gutter); }

  .inventory { grid-template-columns: 1fr; }
  .inventory-media { aspect-ratio: 4 / 3; }

  .card { width: 72vw; }

  .dealer-grid { grid-template-columns: repeat(2, 1fr); }
  .dealer-grid li:nth-child(3) { border-left: 0; }

  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-claim { grid-column: 1 / -1; }
}

/* Portrait: the scene is drawn low (see main.js), so the copy moves to the black space on top */
@media (max-aspect-ratio: 1/1) {
  .hero-intro,
  .hero-outro {
    top: clamp(96px, 14vh, 160px);
    bottom: auto;
    right: var(--gutter);
    width: auto;
  }
  .hero-outro { transform: translateY(calc((1 - var(--outro, 0)) * 40px)); }
  .hero-shade::after { background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 45%); }

  /* The service-centre frame starts low; the copy keeps the black space on top */
  .aperture-sticky { --t0: 52%; --r0: 6%; --b0: 10%; --l0: 6%; }
  .aperture-copy { top: clamp(96px, 14vh, 160px); transform: translateY(calc(var(--o) * -40px)); }
}

@media (max-width: 560px) {
  .hero { height: 420vh; }
  .dealer-grid { grid-template-columns: 1fr; }
  .dealer-grid li + li { border-left: 0; }
  .scroll-cue { display: none; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
