/* CERP landing page, part 1: tokens, base, shared parts, buttons, nav, hero + spec bar, footer, dock.
   Part 2 (content sections) lives in sections.css, the waitlist form in form.css. Mobile-first.
   Look: dealer showroom (photo-led, dark bands) + service shop (ruled boards, numbered bays) + registration office (forms, folders). */
:root {
  --obsidian: #1E1E1E;
  --obsidian-2: #2A2C2D;
  --steel: #636E72;
  --red: #D63031;
  --red-text: #B1262A;
  --concrete: #DFE6E9;
  --paper: #FFFFFF;
  --body: #3A4245;
  --rule: #C9D2D6;
  --rule-dark: rgba(255,255,255,.16);
  --on-dark: #C5CED2;
  --field-border: #8A9599;
  /* Barlow has no peso sign (U+20B1): Roboto / Roboto Condensed supply only that glyph (tiny text= subset). */
  --font: 'Barlow', 'Roboto', Arial, sans-serif;
  --font-display: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  /* Brand logo only: same face as assets/cerp-logo.svg. */
  --font-logo: 'Avenir Next', 'Nunito Sans', Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 2px;
  --shadow-sheet: 0 1px 1px rgba(0,0,0,.08), 0 14px 30px -10px rgba(0,0,0,.35);
  --section-pad: clamp(56px, 8vw, 112px);
  --dock-space: calc(112px + env(safe-area-inset-bottom));
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--obsidian); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: .95; text-transform: uppercase; letter-spacing: -.005em; }
h2 { font-size: clamp(36px, 8.4vw, 64px); max-width: 15em; text-wrap: balance; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.05; letter-spacing: .01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
b, strong { font-weight: 600; }
a { color: var(--red-text); text-underline-offset: 3px; }
a:hover { color: var(--obsidian); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; background: var(--obsidian); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; color: #fff; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shared parts ---------- */
.lede { margin-top: 16px; font-size: 18px; color: var(--body); max-width: 34em; }
.kicker { margin-bottom: 12px; font-weight: 600; font-size: 16px; color: var(--red-text); }
.small { font-size: 15px; color: var(--body); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; font: 700 19px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.text-link .ico { transition: transform .2s var(--ease); }
.text-link:hover .ico { transform: translateX(4px); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Ruled list: one line per item, red bar marker. Used on the price board, ledger, OFW and fleets. */
.rule-list { list-style: none; margin: 20px 0 0; padding: 0; }
.rule-list li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--rule); font-weight: 500; }
.rule-list li:last-child { border-bottom: 1px solid var(--rule); }
.rule-list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 10px; height: 3px; background: var(--red); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 0; border-radius: var(--radius); font: 700 18px/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--red); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s, transform .15s var(--ease); }
.btn:hover { color: #fff; background: var(--red-text); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 1.1em; height: 1.1em; stroke-width: 2.4; transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn--big { min-height: 58px; padding: 16px clamp(14px, 4.4vw, 28px); font-size: clamp(17px, 5.2vw, 22px); }
.btn--block { width: 100%; }
.btn--ghost { color: var(--obsidian); background: transparent; box-shadow: inset 0 0 0 2px var(--obsidian); }
.btn--ghost:hover { color: #fff; background: var(--obsidian); }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }

/* ---------- Nav ---------- */
.site-header { position: relative; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
/* Logo lockup: every measure is a ratio of the mark height (--logo-h), taken from assets/cerp-logo.svg
   (mark 96x64, CERP 62/800/+1.5, tagline 11.2/700/+1.6, CERP 18 units right of the mark). */
.logo { --logo-h: 31px; display: grid; grid-template-columns: auto auto; justify-content: start; align-content: center; align-items: start; column-gap: calc(var(--logo-h) * .281); min-height: 44px; color: var(--obsidian); text-decoration: none; }
.logo__mark { width: calc(var(--logo-h) * 1.5); height: var(--logo-h); color: currentColor; }
.logo__text { display: block; font-family: var(--font-logo); }
.logo__text b { display: block; margin-top: calc(var(--logo-h) * -.022); font-size: calc(var(--logo-h) * .969); font-weight: 800; line-height: 1; letter-spacing: .024em; }
.logo__text small { display: block; margin: calc(var(--logo-h) * .127) 0 0 calc(var(--logo-h) * .031); font-size: calc(var(--logo-h) * .175); font-weight: 700; line-height: 1; letter-spacing: .143em; text-transform: uppercase; white-space: nowrap; color: var(--steel); }
.logo--dark { color: #fff; }
.logo--dark .logo__text small { color: var(--concrete); }
.site-header .logo__text small { display: none; }
.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__link { display: none; align-items: center; min-height: 44px; padding: 10px 14px; font: 700 17px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--obsidian); text-decoration: none; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow .2s, color .2s; }
.nav__link:hover { color: var(--obsidian); box-shadow: inset 0 -3px 0 var(--red); }
/* Mobile: outlined so the hero CTA stays the only red primary in the first screen. */
.nav__cta { min-height: 44px; padding: 10px 14px; font-size: 16px; color: var(--obsidian); background: transparent; box-shadow: inset 0 0 0 2px var(--obsidian); }
.nav__cta:hover { color: #fff; background: var(--obsidian); }

/* ---------- Hero: the car is the hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); isolation: isolate; background: var(--obsidian); color: #fff; }
.hero__head, .hero__body, .hero__deck { width: 100%; }
.hero__head { order: -1; padding-top: 28px; }
.hero__kicker { font-weight: 500; font-size: 15px; color: var(--on-dark); text-wrap: balance; }
.hero__title { margin-top: 10px; font-size: clamp(46px, 14.2vw, 104px); line-height: .88; letter-spacing: -.01em; }
.hero__title > span { display: block; }
/* Rotating word: its own line, so the longest word ("motorcycle.") fits at 320px and the H1 keeps a fixed 3-line height. */
.hero__word { color: var(--red); }
.hero__word > span { display: inline-block; }
.hero__word > .is-new { animation: word-in .45s var(--ease) both; }
@keyframes word-in { from { opacity: 0; transform: translateY(.18em); } to { opacity: 1; transform: none; } }
.hero__media { position: relative; z-index: -1; width: 100%; margin-top: -36px; aspect-ratio: 4 / 3; max-height: 62svh; min-height: 250px; }
/* Carousel: stacked slides, crossfade on opacity only (no layout shift). */
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 74% 62%; }
.hero__slide--moto .hero__img { object-position: 50% 55%; }
.hero__slide--truck .hero__img { object-position: 52% 50%; }
.hero__slide--equipment .hero__img { object-position: 66% 72%; filter: brightness(.7) contrast(1.05); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--obsidian) 0%, rgba(30,30,30,.35) 26%, rgba(30,30,30,0) 46%, rgba(30,30,30,0) 74%, var(--obsidian) 100%), linear-gradient(90deg, rgba(30,30,30,.6), rgba(30,30,30,0) 40%); }
.hero__body { margin-top: -28px; padding-bottom: 32px; }
.hero__lede { font-size: 17px; color: #E4EAEC; max-width: 32em; }
.hero__cta { margin-top: 20px; display: grid; gap: 12px; justify-items: start; }
.hero__price { font-size: 14px; color: var(--on-dark); }
.hero__price b { display: block; font-size: 17px; color: #fff; text-wrap: balance; }
.hero__price s { color: var(--on-dark); font-weight: 500; text-decoration-thickness: 2px; text-decoration-color: rgba(228,234,236,.85); }
/* Per-slide lines share one grid cell and swap visibility, so the hero height never changes. */
.hero__variants { display: grid; }
.hero__variants > * { grid-area: 1 / 1; }
.hero__variants > .is-off { visibility: hidden; }

/* Slide deck: what this slide is + slideshow controls (controls appear once hero-carousel.js runs). */
.hero__deck { display: grid; gap: 10px; padding-bottom: 28px; }
.hero__tag { font: 700 20px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.hero__tag span { display: block; margin-bottom: 4px; font: 600 13px/1 var(--font); letter-spacing: .1em; color: var(--on-dark); }
.hero__controls { display: none; align-items: center; }
.hero.is-carousel .hero__controls { display: flex; }
.hero__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: #fff; cursor: pointer; transition: background .2s; }
.hero__btn:hover { background: rgba(255,255,255,.12); }
.hero__btn .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.hero__btn:active .ico { transform: scale(.9); }
.ico--flip { transform: scaleX(-1); }
.hero__btn:active .ico--flip { transform: scaleX(-1) scale(.9); }
.hero__pause { margin-right: 4px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.hero__pause .ico--play, .is-playing .hero__pause .ico--pause { display: block; }
.hero__pause .ico--pause, .is-playing .hero__pause .ico--play { display: none; }
.hero__dots { display: flex; }
.hero__dot { position: relative; width: 38px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hero__dot::before, .hero__dot::after { content: ""; position: absolute; left: 7px; right: 7px; top: 20px; height: 4px; background: rgba(255,255,255,.4); transition: background .2s; }
.hero__dot::after { background: var(--red); transform: scaleX(0); transform-origin: left; }
.hero__dot:hover::before { background: #fff; }
.hero__dot[aria-current="true"]::after { transform: none; }
/* Autoplay progress on the active dot; frozen while the slideshow is held (hover, focus, touch). */
.is-playing.is-cycling .hero__dot[aria-current="true"]::after { animation: dot-fill 6s linear both; animation-play-state: paused; }
.hero.is-autoplay .is-playing.is-cycling .hero__dot[aria-current="true"]::after { animation-play-state: running; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: none; } }

/* Spec bar: the dealer "key figures" strip. Mobile: ruled price rows on white. Desktop: bolted to the photo. */
.specbar { background: var(--paper); color: var(--obsidian); border-top: 5px solid var(--red); }
.specbar__list { list-style: none; margin: 0 auto; padding-block: 6px; }
.specbar__list li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.specbar__list li:last-child { border-bottom: 0; }
.specbar__label { font: 700 21px/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.specbar__value { grid-row: span 2; align-self: center; font: 800 32px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.specbar__value small { font-size: 16px; font-weight: 700; text-transform: uppercase; color: var(--steel); }
.specbar__note { font-size: 15px; color: var(--body); }

/* ---------- Footer ---------- */
.footer { padding-block: 48px var(--dock-space); background: var(--obsidian); color: var(--on-dark); font-size: 14px; border-top: 5px solid var(--red); }
.footer__inner { display: grid; gap: 14px; }
.footer__brand { display: grid; gap: 14px; justify-items: start; }
.footer__brand .logo { --logo-h: clamp(40px, 12vw, 60px); min-height: 0; }
.footer__descriptor { font-weight: 500; color: var(--on-dark); }
.footer a { color: #fff; }
.footer a:hover { color: var(--concrete); }
.footer__meta { color: #AEB8BC; }

/* ---------- Sticky mobile CTA ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; gap: 6px; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--obsidian); border-top: 3px solid var(--red); transform: translateY(110%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; }
.dock.is-shown { transform: none; visibility: visible; }
.dock small { text-align: center; font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--concrete); }
.dock .btn { width: 100%; min-height: 50px; font-size: clamp(16px, 5vw, 20px); }

/* ---------- Breakpoints (part 1) ---------- */
@media (max-width: 359px) {
  .nav__cta { padding-inline: 10px; font-size: 15px; }
  .site-header .logo { --logo-h: 27px; }
}
@media (min-width: 600px) {
  .hero__media { aspect-ratio: 16 / 9; }
  .specbar__list { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 0; }
  .specbar__list li { grid-template-columns: 1fr; align-content: start; row-gap: 6px; padding: 20px 20px 22px; border-bottom: 0; border-left: 1px solid var(--rule); }
  .specbar__list li:first-child { padding-left: 0; border-left: 0; }
  .specbar__value { grid-row: auto; order: 2; font-size: 40px; }
  .specbar__note { order: 3; }
}
@media (min-width: 720px) {
  .nav { padding-block: 12px; }
  .nav__cta { margin-left: 10px; padding-inline: 20px; color: #fff; background: var(--red); box-shadow: none; }
  .nav__cta:hover { color: #fff; background: var(--red-text); }
  .site-header .logo { --logo-h: 50px; }
  .site-header .logo__text small { display: block; }
  .footer { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .dock { display: none; }
}
@media (min-width: 960px) {
  .nav__link { display: inline-flex; white-space: nowrap; }
}
@media (min-width: 900px) {
  /* Showroom: full-bleed photo, copy on the dark left, spec bar along the bottom edge. */
  .hero { display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(640px, 90vh, 880px); }
  .hero__media { position: absolute; inset: 0; margin: 0; aspect-ratio: auto; max-height: none; }
  .hero__img { object-position: 60% 62%; }
  .hero__slide--moto .hero__img { object-position: 50% 50%; }
  .hero__slide--truck .hero__img { object-position: 50% 50%; }
  .hero__slide--equipment .hero__img { object-position: 60% 70%; }
  .hero__deck { display: flex; align-items: center; gap: 28px; padding-bottom: 36px; }
  .hero__dot { width: 44px; }
  .hero__media::after { background: linear-gradient(90deg, rgba(30,30,30,.94) 0%, rgba(30,30,30,.82) 26%, rgba(30,30,30,.25) 50%, rgba(30,30,30,0) 64%), linear-gradient(0deg, rgba(30,30,30,.9) 0%, rgba(30,30,30,0) 34%); }
  .hero__head { order: 0; padding-top: 48px; }
  .hero__body { margin-top: 0; padding-top: 22px; padding-bottom: 48px; }
  .hero__head > *, .hero__body > * { max-width: 500px; }
  .hero__title { font-size: clamp(60px, 5.8vw, 92px); }
  .hero__head .hero__title { max-width: 960px; }
  .hero__lede { font-size: 19px; }
  .specbar { background: rgba(22,22,22,.86); color: #fff; border-top: 0; box-shadow: inset 0 1px 0 var(--rule-dark); }
  .specbar__list li { border-left-color: var(--rule-dark); padding-block: 24px 26px; }
  .specbar__label { font-size: 18px; color: var(--on-dark); }
  .specbar__value { font-size: 48px; color: #fff; }
  .specbar__value small { color: var(--on-dark); }
  .specbar__note { color: var(--on-dark); }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
