/* =========================================================
   BMW X5 — Persian RTL Premium Landing
   Design System: BMW_X5_Design_System_FA_RTL.md
   ========================================================= */

/* ---------- Font ---------- */
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/YekanBakhFaNum-VF.woff2") format("woff2-variations"),
       url("../fonts/YekanBakhFaNum-VF.woff") format("woff-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LatinNum";
  src: local("Helvetica Neue"), local("HelveticaNeue"), local("Arial"), local("Helvetica");
  unicode-range: U+0030-0039;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* color */
  --black: #111111;
  --white: #FFFFFF;
  --soft-gray: #F3F3F1;
  --n01: #E7E7E4;
  --n02: #CFCFCA;
  --n03: #777777;
  --n04: #444444;
  --hairline: rgba(17, 17, 17, 0.10);
  --hairline-dark: rgba(255, 255, 255, 0.16);

  /* radius */
  --r1: 8px;  --r2: 12px; --r3: 16px; --r4: 24px;
  --r5: 32px; --r6: 40px; --r7: 48px; --r8: 64px;
  --pill: 9999px;

  /* spacing */
  --s4: 4px;   --s8: 8px;   --s12: 12px; --s16: 16px; --s20: 20px;
  --s24: 24px; --s28: 28px; --s32: 32px; --s40: 40px; --s48: 48px;
  --s56: 56px; --s64: 64px; --s72: 72px; --s80: 80px; --s96: 96px;
  --s112: 112px; --s128: 128px; --s144: 144px; --s160: 160px; --s192: 192px;

  /* layout */
  --container: 1440px;
  --content: 1200px;
  --text-max: 720px;
  --gutter: 24px;
  --margin: 80px;

  /* motion */
  --e-out: cubic-bezier(0.22, 1, 0.36, 1);
  --e-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-micro: 200ms;
  --t-ui: 320ms;
  --t-content: 720ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
  overflow-x: clip;
}
body {
  font-family: "LatinNum", "YekanBakh", "Yekan Bakh", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0;
  color: var(--black);
  background: var(--white);
  direction: rtl;
  text-align: right;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-loading { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; letter-spacing: 0; }
a { color: inherit; text-decoration: none; letter-spacing: 0; }
h1, h2, h3, h4, h5, h6, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
*, *::placeholder { letter-spacing: 0 !important; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: var(--r1);
}

.skip-link {
  position: fixed; top: -100px; right: var(--s24);
  z-index: 999; background: var(--black); color: var(--white);
  padding: var(--s12) var(--s24); border-radius: var(--pill);
  font-size: 14px; line-height: 20px; font-weight: 600;
  transition: top var(--t-ui) var(--e-out);
}
.skip-link:focus { top: var(--s24); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.section { padding-block: var(--s160); position: relative; }

/* ---------- Type ---------- */
.h2 {
  font-size: 64px; line-height: 72px; font-weight: 700;
  color: var(--black);
}
.h2--onDark { color: var(--white); }
.h3 { font-size: 32px; line-height: 40px; font-weight: 600; }
.body {
  font-size: 18px; line-height: 32px; font-weight: 400;
  max-width: var(--text-max); color: var(--black);
}
.body--muted { color: var(--n04); }
.body--onDark { color: var(--n02); }
.eyebrow {
  font-size: 14px; line-height: 20px; font-weight: 600;
  color: var(--n03);
}

.sectionHead { margin-bottom: var(--s96); }
.sectionHead .body { margin-top: var(--s24); }
.sectionHead--split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s64); align-items: end;
}
.sectionHead--split .body { margin-top: 0; padding-bottom: var(--s8); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s12);
  height: 56px; padding-inline: var(--s32);
  border-radius: var(--pill);
  font-size: 16px; line-height: 24px; font-weight: 600;
  transition: transform var(--t-ui) var(--e-out),
              background-color var(--t-ui) var(--e-out),
              color var(--t-ui) var(--e-out),
              border-color var(--t-ui) var(--e-out);
  will-change: transform;
}
.btn svg { transition: transform var(--t-ui) var(--e-out); }
.btn:hover { transform: scale(1.02); }
.btn:hover svg { transform: translateX(-4px); }
.btn:active { transform: scale(0.99); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #000000; }
.btn--light { background: var(--white); color: var(--black); }
.btn--outline {
  background: transparent; color: var(--black);
  border: 1px solid var(--black);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: 100;
  padding-block: var(--s24);
  transition: color var(--t-ui) var(--e-out), background-color var(--t-ui) var(--e-out),
              padding var(--t-ui) var(--e-out);
}
.nav__inner {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--margin);
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: var(--s32);
}
.nav--onDark { color: var(--white); }
.nav--onLight { color: var(--black); }
.nav.is-stuck { padding-block: var(--s20); }
.nav--onDark.is-stuck { background: var(--black); }
.nav--onLight.is-stuck { background: var(--white); }

.nav__brand { display: inline-flex; align-items: center; gap: var(--s12); }
.nav__brand img { width: 32px; height: 32px; }
.nav__logo { position: relative; display: block; width: 32px; height: 32px; }
.nav__logo img { position: absolute; inset: 0; transition: opacity var(--t-ui) var(--e-out); }
.nav--onLight .nav__logo--light { opacity: 0; }
.nav--onLight .nav__logo--dark { opacity: 1; }
.nav--onDark .nav__logo--light { opacity: 1; }
.nav--onDark .nav__logo--dark { opacity: 0; }
.nav__brandText { font-size: 20px; line-height: 32px; font-weight: 700; }

.nav__links {
  display: flex; justify-content: center; gap: var(--s32);
  font-size: 14px; line-height: 20px; font-weight: 500;
}
.nav__links a { position: relative; padding-block: var(--s8); }
.nav__links a::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-ui) var(--e-out);
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  height: 48px; padding-inline: var(--s24);
  font-size: 14px; line-height: 20px;
  background: var(--white); color: var(--black);
}
.nav--onLight .nav__cta { background: var(--black); color: var(--white); }

.nav__burger { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; }
.nav__burger svg { overflow: visible; }
.nav__burger path {
  transition: transform var(--t-ui) var(--e-out), opacity var(--t-ui) var(--e-out);
  transform-origin: 12px 12px;
}
body.menu-open .nav__burgerTop { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .nav__burgerBottom { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--black); color: var(--white);
  display: flex; flex-direction: column;
  padding: var(--s96) var(--margin) calc(var(--s32) + env(safe-area-inset-bottom, 0px));
}
.menu[hidden] { display: none; }
.menu__links {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--s24); text-align: center;
}
.menu__links a { font-size: 32px; line-height: 40px; font-weight: 600; }
.menu__cta { flex: 0 0 auto; width: 100%; justify-content: center; }
/* The open menu carries its own CTA; the bar's copy would read as a duplicate. */
body.menu-open .nav__cta { opacity: 0; pointer-events: none; }
/* Over the dark menu the bar must read dark, whatever section it was over. */
body.menu-open .nav {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  color: var(--white);
}
body.menu-open .nav__logo--light { opacity: 1; }
body.menu-open .nav__logo--dark { opacity: 0; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: var(--s24); }
.loader__logo { width: 48px; height: 48px; }
.loader__count { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--n02); }
.loader__bar {
  position: absolute; inset-block-end: 0; inset-inline: 0; height: 2px;
  background: rgba(255,255,255,0.16);
}
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh; min-height: 640px;
  background: var(--black);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  /* Bottom padding must exceed the cue's reach above the sheet
     (sheet overlap 64 + dock height 44) so nothing lands under the button. */
  padding-block: var(--s128) var(--s128);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); will-change: transform;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(17,17,17,0.56) 0%, rgba(17,17,17,0.12) 34%, rgba(17,17,17,0.10) 60%, rgba(17,17,17,0.72) 100%);
}

.hero__content {
  position: relative; z-index: 2;
  text-align: center;
  padding-inline: var(--margin);
}
.hero__word {
  /* The phrase measures 11.09em wide; 6.2vw keeps it on one line down to
     768px (where the available width allows 8.07vw), capped at 88px. */
  font-size: min(6.2vw, 88px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
}
/* Each half stays intact, so the mobile wrap lands between them — two lines, never three. */
.hero__wordPart { white-space: nowrap; }
.hero__foot {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--margin);
}

.reveal-word, .reveal-line { display: inline-block; }

.hero__data {
  position: relative; z-index: 2;
  width: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s24);
  border-top: 1px solid var(--hairline-dark);
  padding-top: var(--s32);
}
.dataCell {
  display: flex; flex-direction: column; gap: var(--s8);
  align-items: center; text-align: center;
}
.dataCell__label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n02); }
.dataCell__value { font-size: 28px; line-height: 36px; font-weight: 700; color: var(--white); }
.dataCell__value i { font-style: normal; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--n02); }

/* ---------- Sheet ---------- */
.sheet {
  position: relative; z-index: 3;
  background: var(--white);
  border-start-start-radius: var(--r8);
  border-start-end-radius: var(--r8);
  margin-top: calc(var(--s64) * -1);
}
/* The cue sits in a hump on the sheet edge: a semicircle of radius Rd joined
   to the flat edge by fillet arcs tangent to both, so the seam reads as one
   continuous curve. Path coordinates are Rd 44 / Rf 28 in a 164x44 viewBox. */
.cueDock {
  --cueW: 214px;
  --cueH: 44px;
  --cueBtn: 64px;
  position: absolute;
  inset-block-start: calc((var(--cueH) - 1px) * -1);
  inset-inline-start: 50%; transform: translateX(50%);
  width: var(--cueW); height: var(--cueH);
}
.cueDock__shape { display: block; width: 100%; height: 100%; fill: var(--white); }
.scrollCue {
  position: absolute;
  inset-block-start: calc(var(--cueH) - (var(--cueBtn) / 2));
  inset-inline-start: 50%; transform: translateX(50%);
  width: var(--cueBtn); height: var(--cueBtn); border-radius: var(--pill);
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-ui) var(--e-out);
}
.scrollCue:hover { transform: translateX(50%) scale(1.04); }

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: var(--s96); align-items: center;
}
.about__text .h2 { margin-block: var(--s24) var(--s32); }
.about__text .btn { margin-top: var(--s40); }
.about__media {
  border-radius: var(--r6);
  overflow: hidden;
  background: var(--soft-gray);
  aspect-ratio: 16 / 10;
}
.about__media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Models ---------- */
.models { background: var(--white); }
.swatches {
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s8);
  margin-bottom: var(--s56);
}
.swatch {
  display: inline-flex; align-items: center; gap: var(--s12);
  height: 48px; padding-inline: var(--s24);
  border-radius: var(--pill);
  font-size: 14px; line-height: 20px; font-weight: 600;
  color: var(--n04);
  transition: background-color var(--t-ui) var(--e-out), color var(--t-ui) var(--e-out);
}
.swatch__dot {
  width: 20px; height: 20px; border-radius: var(--pill);
  background: var(--sw, var(--n02));
  /* A hairline keeps the near-black and near-white chips readable on either surface. */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28), 0 0 0 1px var(--hairline);
  flex: 0 0 auto;
}
.swatch:hover { background: var(--soft-gray); }
.swatch.is-active { background: var(--black); color: var(--white); }
.swatch.is-active .swatch__dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28), 0 0 0 2px rgba(255,255,255,0.9); }

.stage {
  position: relative;
  background: var(--black);
  border-radius: var(--r7);
  overflow: hidden;
}
/* Frames are stacked and cross-faded, filling the card edge to edge. */
.stage__frames {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.stage__frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--t-content) var(--e-out);
}
.stage__frame.is-active { opacity: 1; }

.stage__specs {
  position: relative;
  margin-top: var(--s48);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.specCell {
  display: flex; flex-direction: column; gap: var(--s8);
  padding: var(--s8) var(--s24);
  border-inline-start: 1px solid var(--hairline);
}
.specCell:first-child { border-inline-start: 0; padding-inline-start: 0; }
.specCell__label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n03); }
.specCell__value { font-size: 20px; line-height: 32px; font-weight: 600; color: var(--black); }

/* ---------- Design / 3D ---------- */
/* The card lies back on entry and rises to upright; the wrapper owns the
   perspective so the transform stays on one element. */
.tiltWrap { perspective: 1600px; perspective-origin: 50% 40%; }

/* The card lies back and rises to upright as it scrolls into view. The
   perspective lives on the wrapper so no other section inherits it. */
.tiltWrap {
  perspective: 1000px;
  perspective-origin: 50% 36%;
  margin-block: var(--s96);
}
.design { transform-origin: 50% 50%; }

/* Road markings that run while the card is held back at 70deg. */
.road {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}
.road__lane {
  position: absolute;
  left: 50%; top: -50%; bottom: -50%;
  width: 16px; margin-left: -8px;
  background: repeating-linear-gradient(180deg,
              rgba(255,255,255,0.82) 0 96px,
              rgba(255,255,255,0) 96px 240px);
  animation: roadRun 1.15s linear infinite;
}
@keyframes roadRun { to { transform: translateY(240px); } }
.road__edge {
  position: absolute; top: -50%; bottom: -50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.14);
}
.road__edge--start { left: 14%; }
.road__edge--end { right: 14%; }
/* Without the scroll sequence the road has no role, so it stays out. */
.js-off .road { display: none; }

/* Inset from the viewport rather than full-bleed: at full width the 64px
   corners run into the screen edge and read as cut rather than rounded. */
.design {
  background: var(--black);
  color: var(--white);
  border-radius: var(--r8);
  width: calc(100% - var(--margin) * 2);
  max-width: var(--container);
  margin-inline: auto;
  margin-block: var(--s96);
  overflow: hidden;
  /* Section default is 160px of headroom; the tilt already leaves empty plane
     above the road and the heading now lives outside the card. */
  padding-block: var(--s16) var(--s80);
  transform-origin: 50% 50%;
}
.designHead {
  width: 100%; max-width: var(--container);
  margin-inline: auto; margin-bottom: var(--s24);
  padding-inline: var(--margin);
}
.viewer {
  display: grid; grid-template-columns: 1fr 320px;
  gap: var(--s64); align-items: center;
}
.viewer__stage {
  position: relative;
  transform: translateZ(0);
  contain: paint;
  aspect-ratio: 16 / 10;
  border-radius: var(--r7);
  background: radial-gradient(120% 90% at 50% 40%, #1D1D1D 0%, #111111 70%);
  overflow: hidden;
}
.viewer__stage model-viewer {
  width: 100%; height: 100%;
  pointer-events: none;
  --poster-color: transparent;
  background: transparent;
}
.viewer__fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.viewer__fallback.is-hidden { display: none; }
.viewer__loader { position: relative; display: grid; place-items: center; }
.viewer__fallback.is-error .viewer__loader { display: none; }
.viewer__ring { transform: rotate(-90deg); }
.viewer__ringTrack {
  fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 4;
}
.viewer__ringBar {
  fill: none; stroke: #E8E8E8; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.25s ease-out;
}
.viewer__pct {
  position: absolute;
  font-size: var(--fs-body, 1rem);
  color: #E8E8E8;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.viewer__errorImg {
  display: none;
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.viewer__fallback.is-error .viewer__errorImg { display: block; }
.viewer__list { display: flex; flex-direction: column; gap: var(--s4); }
.poi {
  width: 100%; text-align: right;
  padding: var(--s20) var(--s24);
  border-radius: var(--r4);
  font-size: 16px; line-height: 24px; font-weight: 500;
  color: var(--n02);
  border: 1px solid transparent;
  transition: background-color var(--t-ui) var(--e-out), color var(--t-ui) var(--e-out), border-color var(--t-ui) var(--e-out);
}
.poi:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.poi.is-active {
  background: var(--white); color: var(--black); font-weight: 600;
}

/* ---------- Performance ---------- */
/* Instrument read-outs: a 270-degree dial per metric that sweeps as it comes
   into view, with the numeral counting up inside it. The sweep is a reveal,
   not a data encoding, so every dial completes. */
.gauges {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s24);
  border-top: 1px solid var(--hairline);
  padding-top: var(--s56);
}
.gauge { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge__dial { position: relative; width: 168px; height: 168px; }
.gauge__svg { width: 100%; height: 100%; transform: rotate(135deg); }
.gauge__track, .gauge__arc {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  /* 270deg of a r=54 circle: 2*PI*54 = 339.29, three quarters = 254.47 */
  stroke-dasharray: 254.47 339.29;
}
.gauge__track { stroke: var(--n01); }
/* Tick ring: 1px dashes on a r=45 circle read as an instrument scale. */
.gauge__ticks {
  fill: none; stroke: var(--n02); stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0.5 11.3;
}
.gauge__arc { stroke: var(--black); stroke-dashoffset: 254.47; }
.js-off .gauge__arc { stroke-dashoffset: 0; }

.gauge__readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--s4);
  /* Keeps long units such as "کیلومتر بر ساعت" clear of the arc. */
  padding-inline: 17%;
  text-align: center;
}
.gauge__num { font-size: 40px; line-height: 48px; font-weight: 700; }
.gauge__unit { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n03); }

.gauge__index {
  margin-top: var(--s24);
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n03);
}
.gauge__title { margin-top: var(--s8); font-size: 18px; line-height: 28px; font-weight: 600; }
.gauge__note { margin-top: var(--s4); font-size: 14px; line-height: 20px; font-weight: 400; color: var(--n03); }

/* ---------- News ---------- */
.sectionHead__aside {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: var(--s24);
  text-align: left;
}

/* A dark console: the index of updates on the right, the selected one
   rendered large on the left. Same list-plus-stage grammar as the colour
   picker and the 3D detail list. */
.feed {
  display: grid; grid-template-columns: 5fr 7fr;
  background: var(--black); color: var(--white);
  border-radius: var(--r7);
  overflow: hidden;
}
.feed__list { display: flex; flex-direction: column; padding: var(--s16); }
.feedItem {
  position: relative;
  width: 100%;
  display: grid; grid-template-columns: auto 1fr;
  align-items: start; gap: var(--s20);
  text-align: right;
  padding: var(--s28) var(--s24);
  border-radius: var(--r4);
  color: var(--n02);
  transition: background-color var(--t-ui) var(--e-out), color var(--t-ui) var(--e-out);
}
.feedItem:hover { background: rgba(255, 255, 255, 0.05); color: var(--white); }
.feedItem.is-active { background: var(--white); color: var(--black); }
.feedItem__index { font-size: 12px; line-height: 24px; font-weight: 500; }
.feedItem__body { display: flex; flex-direction: column; gap: var(--s4); }
.feedItem__meta { font-size: 12px; line-height: 16px; font-weight: 500; }
.feedItem__title { font-size: 18px; line-height: 28px; font-weight: 600; }
/* Hairline that draws in under the active row. */
.feedItem__rule {
  position: absolute; inset-block-end: 0; inset-inline: var(--s24);
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 520ms var(--e-out);
  opacity: 0.24;
}
.feedItem.is-active .feedItem__rule { transform: scaleX(1); }

.feed__stage {
  position: relative;
  min-height: 460px;
  border-inline-end: 1px solid var(--hairline-dark);
}
/* Each tab carries its own image; the panel fills the stage so the picture
   sits behind the copy rather than beside it. */
.feedPanel {
  position: absolute; inset: 0;
  padding: var(--s56);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: feedIn 520ms var(--e-out) both;
}
.feedPanel[hidden] { display: none; }
@keyframes feedIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.feedPanel__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: feedZoom 7200ms var(--e-soft) both;
}
@keyframes feedZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.feedPanel__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(17,17,17,0.97) 0%, rgba(17,17,17,0.90) 38%,
              rgba(17,17,17,0.66) 72%, rgba(17,17,17,0.42) 100%);
}
.feedPanel__body {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
}
.feedPanel__meta { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n02); }
.feedPanel__title { font-size: 40px; line-height: 48px; font-weight: 700; margin-top: var(--s24); max-width: 16ch; }
.feedPanel__text { font-size: 16px; line-height: 28px; font-weight: 400; color: var(--n02); margin-top: var(--s24); max-width: 46ch; }
.feedPanel__more {
  margin-top: auto; padding-top: var(--s40);
  display: inline-flex; align-items: center; gap: var(--s12);
  font-size: 14px; line-height: 20px; font-weight: 600;
}
.feedPanel__more svg { transition: transform var(--t-ui) var(--e-out); }
.feed:hover .feedPanel__more svg { transform: translateX(-4px); }

/* ---------- Pricing ---------- */
.priceGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s24); }
.priceCard {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--s40);
  border-radius: var(--r6);
  border: 1px solid var(--hairline);
  background: var(--white);
  transition: transform var(--t-ui) var(--e-out), border-color var(--t-ui) var(--e-out);
}
.priceCard:hover { transform: translateY(-8px); border-color: rgba(17,17,17,0.24); }
/* One trim carries the dark treatment so the eye lands somewhere. */
.priceCard--featured {
  background: var(--black); color: var(--white);
  border-color: var(--black);
}
.priceCard__index {
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--n03);
}
.priceCard--featured .priceCard__index { color: var(--n02); }
.priceCard__badge {
  position: absolute; inset-block-start: var(--s32); inset-inline-start: var(--s40);
  font-size: 12px; line-height: 16px; font-weight: 600;
  color: var(--black); background: var(--white);
  border-radius: var(--pill); padding: var(--s4) var(--s12);
}
.priceCard__name { margin-top: var(--s24); font-size: 28px; line-height: 36px; font-weight: 700; }
.priceCard__engine {
  margin-top: var(--s8);
  font-size: 14px; line-height: 20px; font-weight: 400; color: var(--n03);
}
.priceCard--featured .priceCard__engine { color: var(--n02); }
.priceCard__price {
  margin-top: var(--s32);
  display: flex; align-items: baseline; gap: var(--s8);
  border-top: 1px solid var(--hairline); padding-top: var(--s32);
}
.priceCard--featured .priceCard__price { border-top-color: var(--hairline-dark); }
.priceCard__amount {
  font-size: 48px; line-height: 56px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.priceCard__currency { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--n03); }
.priceCard--featured .priceCard__currency { color: var(--n02); }
.priceCard__list {
  margin-top: var(--s32);
  display: flex; flex-direction: column; gap: var(--s12);
  font-size: 14px; line-height: 24px; color: var(--n04);
}
.priceCard--featured .priceCard__list { color: var(--n02); }
.priceCard__list li { position: relative; padding-inline-start: var(--s20); }
.priceCard__list li::before {
  content: ""; position: absolute;
  inset-inline-start: 0; inset-block-start: 11px;
  width: 8px; height: 1px; background: currentColor;
}
.priceCard__cta {
  margin-top: auto; margin-top: var(--s40);
  align-self: flex-start;
  background: var(--black); color: var(--white);
}
.priceCard--featured .priceCard__cta { background: var(--white); color: var(--black); }
.pricing__note {
  margin-top: var(--s40);
  font-size: 14px; line-height: 24px; color: var(--n03);
  text-align: center;
}

/* ---------- CTA ---------- */
.cta { padding-block: var(--s96) var(--s160); }
.ctaCard {
  position: relative;
  border-radius: var(--r8);
  overflow: hidden;
  min-height: 600px;
  display: flex; align-items: center; justify-content: flex-start;
  padding: var(--s96) var(--s72);
}
.ctaCard__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
/* The rear shot already falls off to dark on the right, where the RTL copy
   sits, so the scrim only has to deepen it rather than build the contrast. */
.ctaCard__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(17,17,17,0.82) 0%, rgba(17,17,17,0.58) 36%,
              rgba(17,17,17,0.20) 70%, rgba(17,17,17,0.06) 100%);
}
.ctaCard__body {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s24); max-width: 520px;
}
.ctaCard__body .btn { margin-top: var(--s16); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--black); color: var(--white);
  padding-top: var(--s80);
  overflow: hidden;
}
/* Broad, low glow so the wordmark reads as lit rather than filled. */
.footer::before {
  content: "";
  position: absolute; inset-inline: 0; inset-block-end: 0;
  height: 72%;
  background: radial-gradient(58% 100% at 50% 96%, rgba(255,255,255,0.085) 0%, rgba(255,255,255,0.035) 42%, transparent 72%);
  pointer-events: none;
}
.footer .container { position: relative; }
.footer__top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--s40);
  border-bottom: 1px solid var(--hairline-dark);
}
.footer__social { display: flex; gap: var(--s16); }
.footer__social a {
  width: 44px; height: 44px; border-radius: var(--pill);
  border: 1px solid var(--hairline-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--t-ui) var(--e-out), color var(--t-ui) var(--e-out);
}
.footer__social a:hover { background: var(--white); color: var(--black); }

.footer__nav {
  display: flex; justify-content: center; gap: var(--s32);
  padding-block: var(--s48);
  font-size: 14px; line-height: 20px; font-weight: 500;
}
.footer__word {
  font-size: min(23vw, 340px);
  line-height: 0.82;
  font-weight: 800;
  /* Lit from the centre outwards: the middle of the word catches the light
     and both ends fall away. Kept very low so it stays a watermark. */
  background: linear-gradient(90deg,
              rgba(255, 255, 255, 0.010) 0%,
              rgba(255, 255, 255, 0.028) 26%,
              rgba(255, 255, 255, 0.062) 50%,
              rgba(255, 255, 255, 0.028) 74%,
              rgba(255, 255, 255, 0.010) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-align: center;
  user-select: none;
  pointer-events: none;
}
.footer__legal {
  display: flex; justify-content: center; text-align: center;
  padding-block: var(--s32);
  font-size: 12px; line-height: 16px; color: var(--n03);
}

/* Sections below the fold skip layout and paint until they approach.
   contain-intrinsic-size keeps the scrollbar honest so nothing jumps. */
.performance, .news, .pricing, .cta {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

/* ---------- Reveal base ---------- */
.reveal { opacity: 0; }
.js-off .reveal { opacity: 1; }

/* =========================================================
   Responsive — art directed, not scaled down
   ========================================================= */
@media (max-width: 1439px) {
  :root { --margin: 48px; }
  .section { padding-block: var(--s128); }
  .h2 { font-size: 56px; line-height: 64px; }
}

@media (max-width: 1199px) {
  :root { --margin: 40px; --gutter: 20px; }
  .section { padding-block: var(--s112); }
  .h2 { font-size: 48px; line-height: 56px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .nav__cta { justify-self: end; }
  /* The headline sat hard against the bar in this band. */
  .hero__content { margin-top: var(--s128); }
  .about__grid { grid-template-columns: 1fr; gap: var(--s56); }
  .viewer { grid-template-columns: 1fr; gap: var(--s32); }
  /* One scrollable row of chips reads cleaner than a ragged wrap. */
  .viewer__list {
    flex-direction: row; flex-wrap: nowrap;
    gap: var(--s8); overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .viewer__list::-webkit-scrollbar { display: none; }
  .poi {
    width: auto; flex: 0 0 auto; white-space: nowrap;
    padding: var(--s12) var(--s24);
    border-radius: var(--pill);
    background: rgba(255,255,255,0.06);
  }
  .poi.is-active { background: var(--white); }
  .ctaCard__video { object-position: 70% 50%; }
  .ctaCard__scrim {
    background: linear-gradient(to left, rgba(17,17,17,0.90) 0%, rgba(17,17,17,0.74) 40%,
                rgba(17,17,17,0.36) 74%, rgba(17,17,17,0.12) 100%);
  }
  .tiltWrap { perspective-origin: 50% 36%; }
  .feed { grid-template-columns: 1fr; }
  .feed__list { border-block-end: 1px solid var(--hairline-dark); }
  .feed__stage { border-inline-end: 0; min-height: 440px; }
  .feedPanel { padding: var(--s40); }
  .feedPanel__title { font-size: 32px; line-height: 40px; max-width: none; }
  .gauges { grid-template-columns: 1fr 1fr; gap: var(--s40) var(--s24); }
}

@media (max-width: 899px) {
  .hero__data { grid-template-columns: 1fr 1fr; gap: var(--s24) var(--s16); }
  .hero { padding-block: var(--s96) var(--s128); }
}

@media (max-width: 767px) {
  :root { --margin: 16px; --gutter: 16px; }
  body { font-size: 16px; line-height: 28px; }
  .section { padding-block: var(--s80); }
  .h2 { font-size: 32px; line-height: 40px; }
  .body { font-size: 16px; line-height: 28px; }
  .sectionHead { margin-bottom: var(--s48); }
  .sectionHead--split { grid-template-columns: 1fr; gap: var(--s24); }

  .nav { padding-block: var(--s16); }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__inner { grid-template-columns: auto auto; justify-content: space-between; }

  /* Full-bleed on small screens: the frame is cropped to the vehicle's
     mass, and the scrim carries the type instead of empty space. */
  .hero { padding-block: var(--s96) var(--s96); min-height: 100svh; }
  .hero__media { background: var(--black); }
  .hero__video { object-fit: cover; object-position: 56% 50%; transform: scale(1.04); }
  .hero__scrim {
    background: linear-gradient(to bottom, rgba(17,17,17,0.78) 0%, rgba(17,17,17,0.24) 30%,
                rgba(17,17,17,0.24) 48%, rgba(17,17,17,0.86) 78%, rgba(17,17,17,0.94) 100%);
  }
  .hero__content { margin-top: 0; }
  /* Longest half is 5.63em: 52px clears a 360px viewport with room to spare. */
  .hero__word { font-size: 52px; line-height: 56px; white-space: normal; }
  .hero__claim { font-size: 16px; line-height: 28px; margin-bottom: var(--s24); max-width: none; }
  .hero__data { grid-template-columns: 1fr 1fr; gap: var(--s24) var(--s16); padding-top: var(--s20); }
  .dataCell__value { font-size: 20px; line-height: 32px; }

  .sheet { border-start-start-radius: var(--r6); border-start-end-radius: var(--r6); margin-top: calc(var(--s32) * -1); }
  .cueDock { --cueW: 160px; --cueH: 33px; --cueBtn: 48px; }

  /* Five pills wrap to three ragged rows at this width; one edge-to-edge
     scroller keeps the choice on a single line. */
  .swatches {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    scrollbar-width: none; -ms-overflow-style: none;
    margin-inline: calc(var(--margin) * -1);
    padding-inline: var(--margin);
    margin-bottom: var(--s32);
  }
  .swatches::-webkit-scrollbar { display: none; }
  .swatch { flex: 0 0 auto; }

  .tiltWrap { perspective: 760px; perspective-origin: 50% 26%; }
  .stage { border-radius: var(--r6); }
  .stage__specs { grid-template-columns: 1fr 1fr; gap: var(--s20); text-align: right; }
  /* Two columns need one divider between them, not a rule on every cell. */
  .specCell { text-align: right; border-inline-start: 0; padding-inline: 0; }
  .specCell:nth-child(odd) {
    border-inline-end: 1px solid var(--hairline);
    padding-inline-end: var(--s16);
  }
  .specCell:nth-child(even) { padding-inline-start: var(--s16); }

  .design { border-radius: var(--r6); margin-block: var(--s48); }
  .viewer__stage { aspect-ratio: 4 / 3; border-radius: var(--r5); }

  .gauges { grid-template-columns: 1fr 1fr; gap: var(--s32) var(--s16); padding-top: var(--s40); }
  .gauge__dial { width: 128px; height: 128px; }
  .gauge__num { font-size: 28px; line-height: 36px; }
  .gauge__title { font-size: 16px; line-height: 24px; }
  .gauge__note { font-size: 12px; line-height: 16px; }

  .priceGrid { grid-template-columns: 1fr; }
  .priceCard { padding: var(--s28); border-radius: var(--r5); }
  .priceCard--featured { grid-column: auto; }
  .priceCard__badge { inset-block-start: var(--s24); inset-inline-start: var(--s28); }
  .priceCard__amount { font-size: 40px; line-height: 48px; }
  .feed { border-radius: var(--r6); }
  .feed__stage { min-height: 420px; }
  .feedPanel { padding: var(--s28); }
  .feedPanel__scrim {
    background: linear-gradient(to bottom, rgba(17,17,17,0.78) 0%, rgba(17,17,17,0.92) 52%,
                rgba(17,17,17,0.96) 100%);
  }
  .feedPanel__title { font-size: 24px; line-height: 32px; margin-top: var(--s16); }
  .feedPanel__text { font-size: 14px; line-height: 24px; margin-top: var(--s16); }
  .feedPanel__more { padding-top: var(--s28); }
  .feed__list { padding: var(--s8); }
  .feedItem { padding: var(--s20) var(--s16); gap: var(--s12); }
  .feedItem__title { font-size: 16px; line-height: 24px; }

  .ctaCard { min-height: 480px; padding: var(--s56) var(--s24); border-radius: var(--r6); }
  .ctaCard__video { object-position: 58% 50%; }
  .ctaCard__scrim {
    background: linear-gradient(to bottom, rgba(17,17,17,0.88) 0%, rgba(17,17,17,0.62) 46%,
                rgba(17,17,17,0.34) 100%);
  }
  .ctaCard__body { max-width: none; }
  .footer__nav { flex-wrap: wrap; gap: var(--s20); padding-block: var(--s32); }
  .footer__legal { flex-direction: column; gap: var(--s8); text-align: center; align-items: center; }
}

@media (max-width: 359px) {
  .hero__word { font-size: 44px; line-height: 48px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .road { display: none; }
  .design { transform: none !important; }
  .design > .container { opacity: 1 !important; }
  .hero__video { transform: none; }
}
