/* One car model's page (/car-parts/<id>). The content is written by src/cars.js.
   Hero: three planes that move apart as the page scrolls. The make's name sits far back, the car in the middle,
   and six part labels start hidden behind the car and fly out to their places, like an exploded drawing. */
.carm { overflow-x: clip; }
.cm-hero { position: relative; height: 170vh; background: #fff; color: #1E2328; --p: 1; --cx: 71%; --cy: 50%; }
.cm-hero__stage { position: sticky; top: 0; height: 100vh; min-height: 560px; overflow: hidden; display: grid; align-items: center; }
.cm-hero__word { position: absolute; inset-inline: 0; top: 13vh; margin: 0; text-align: center; font-family: var(--font-cond); font-weight: 800; font-stretch: 122%; text-transform: uppercase; letter-spacing: -.04em; line-height: .8; font-size: clamp(72px, 21vw, 340px); color: #E9EDF2; white-space: nowrap; transform: translateY(calc(var(--p) * -9vh)) scale(calc(1 + var(--p) * .08)); will-change: transform; }
[dir="rtl"] .cm-hero__word { letter-spacing: 0; font-stretch: normal; line-height: 1.1; }
.cm-hero__car { position: absolute; left: var(--cx); top: var(--cy); width: min(54vw, 860px); height: auto; mix-blend-mode: multiply; transform: translate(-50%, -50%) translateY(calc(var(--p) * 3vh)) scale(calc(.92 + var(--p) * .1)); will-change: transform; }
.cm-hero--photo .cm-hero__car { mix-blend-mode: normal; width: min(50vw, 720px); border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(20, 30, 45, .45); }
.cm-hero__chips { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.cm-hero__chips li { position: absolute; left: var(--cx); top: var(--cy); max-width: 15rem; padding: 8px 14px; border-radius: 99px; background: #fff; color: #1E2328; font-size: 14px; font-weight: 600; line-height: 1.2; box-shadow: 0 10px 24px -12px rgba(20, 30, 45, .45); border: 1px solid #D5DBE3;
  transform: translate(-50%, -50%) translate(calc(var(--x) * var(--p) * .62vw), calc(var(--y) * var(--p) * .9vh)) scale(calc(.6 + var(--p) * .4)); opacity: calc(var(--p) * 1.6 - (var(--i) * .08)); will-change: transform, opacity; }
.cm-hero__chips li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 8px; border-radius: 50%; background: #1565C0; vertical-align: middle; }
.cm-hero__copy { position: relative; width: 100%; display: grid; gap: 14px; justify-items: start; }
.cm-hero__copy > * { max-width: min(33vw, 30rem); }
[dir="rtl"] .cm-hero { --cx: 29%; }
.cm-hero h1 { margin: 0; font-size: clamp(30px, 3.6vw, 56px); line-height: 1; color: #1E2328; }
[dir="rtl"] .cm-hero h1 { line-height: 1.25; }
.cm-hero__lead { margin: 0; max-width: 56ch; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: #3D454D; }
.cm-crumb { font-size: 13px; color: #5F6770; } .cm-crumb a { color: inherit; }
.cm-hero .btn { color: #1E2328; border-color: #1E2328; } .cm-hero .btn-primary { color: #fff; border-color: #1565C0; background: #1565C0; }
/* sections */
.cm-sec { padding-block: clamp(48px, 7vw, 96px); }
.cm-sec h2, .cm-heat h2, .cm-close h2 { font-size: clamp(28px, 4vw, 52px); margin: 0 0 12px; max-width: 20ch; }
.cm-sec__lead { max-width: 60ch; color: var(--ink-2); font-size: 17px; margin: 0 0 clamp(24px, 3vw, 40px); }
.cm-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.cm-part { border: 1px solid color-mix(in srgb, var(--rule) 25%, transparent); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: color-mix(in srgb, var(--ink) 3%, transparent); transition: transform .25s ease, border-color .25s ease; }
.cm-part:hover { transform: translateY(-4px); border-color: var(--maroon); }
.cm-part img, .cm-part__ph { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; background: #E3E8EE; }
.cm-part__ph { background: repeating-linear-gradient(135deg, #E3E8EE 0 14px, #EBEFF4 14px 28px); }
.cm-part > div { padding: 16px; display: grid; gap: 10px; align-content: start; }
.cm-part h3 { margin: 0; font-family: inherit; font-size: 17px; font-weight: 650; line-height: 1.25; letter-spacing: 0; font-stretch: normal; }
.cm-part dl { margin: 0; display: grid; gap: 4px; font-size: 14px; } .cm-part dl div { display: flex; gap: 8px; } .cm-part dt { color: var(--ink-2); min-width: 5.5em; } .cm-part dd { margin: 0; }
.cm-part__go { justify-self: start; font-weight: 650; color: var(--maroon); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 1px; }
/* how it works: the heading stays put while the steps scroll past it */
.cm-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.cm-how h2 { position: sticky; top: 110px; }
.cm-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.cm-steps li { counter-increment: s; padding: 26px 0 26px 64px; border-top: 1px solid color-mix(in srgb, var(--rule) 25%, transparent); position: relative; }
[dir="rtl"] .cm-steps li { padding: 26px 64px 26px 0; }
.cm-steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 22px; font-family: var(--font-cond); font-weight: 800; font-size: 40px; line-height: 1; color: var(--maroon); }
.cm-steps h3 { margin: 0 0 6px; font-size: 22px; } .cm-steps p { margin: 0; color: var(--ink-2); max-width: 46ch; }
/* heat: a dark band */
.cm-heat { background: #13203A; color: #F4F7FB; padding-block: clamp(56px, 8vw, 110px); }
.cm-heat h2 { color: #F4F7FB; } .cm-mats { list-style: none; margin: clamp(24px, 3vw, 40px) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.cm-mats li { padding: 22px; border: 1px solid rgba(244, 247, 251, .22); border-radius: 14px; } .cm-mats strong { font-family: var(--font-cond); font-size: 34px; color: #F2C46B; } .cm-mats p { margin: 8px 0 0; color: #C9D3E2; line-height: 1.55; }
.cm-no { margin: 0; max-width: 70ch; color: #C9D3E2; } .cm-no strong { color: #F4F7FB; }
.cm-more { list-style: none; margin: clamp(20px, 3vw, 32px) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.cm-more a { display: grid; gap: 8px; text-decoration: none; color: inherit; font-weight: 600; } .cm-more img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 12px; background: #fff; transition: transform .3s ease; } .cm-more a:hover img { transform: scale(1.04); }
.cm-all { font-weight: 650; }
.cm-close { padding-block: clamp(56px, 9vw, 120px); border-top: 1px solid color-mix(in srgb, var(--rule) 25%, transparent); } .cm-close p { color: var(--ink-2); font-size: 18px; max-width: 50ch; margin: 0 0 22px; }
.cm-rise { opacity: 0; transform: translateY(22px); transition: opacity .5s ease var(--d, 0ms), transform .5s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); } .cm-rise.is-in { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .cm-hero, [dir="rtl"] .cm-hero { height: 150vh; --cx: 50%; --cy: 27%; } .cm-hero__stage { align-items: end; } .cm-hero__car { width: 96vw; } .cm-hero--photo .cm-hero__car { width: 88vw; } .cm-hero__word { top: 9vh; font-size: 24vw; }
  .cm-hero__copy { padding-bottom: 22px; } .cm-hero__copy > * { max-width: none; }
  .cm-hero__chips li { font-size: 12px; padding: 6px 10px; max-width: 9.5rem; transform: translate(-50%, -50%) translate(calc(var(--x) * var(--p) * .9vw), calc(var(--y) * var(--p) * .42vh)) scale(calc(.6 + var(--p) * .4)); }
  .cm-how { grid-template-columns: 1fr; } .cm-how h2 { position: static; }
}
@media (prefers-reduced-motion: reduce) { .cm-hero { height: auto; } .cm-hero__stage { position: relative; } .cm-part, .cm-more img { transition: none; } }
