:root {
  --cream: #dbc0a4;
  --cream-soft: #eee1d2;
  --ink: #111;
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  --page-width: 576px;
  --deck-top: max(14px, env(safe-area-inset-top));
  --card-gap: 14px;
}

* { box-sizing: border-box; }

html {
  background: #050708;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #050708;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

main,
.brand-footer {
  width: min(100%, var(--page-width));
  margin-inline: auto;
}

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  max-height: 1248px;
  overflow: hidden;
  background: #061012;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(1, 4, 5, .45));
  pointer-events: none;
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 26px;
  bottom: calc(25px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.94);
  letter-spacing: .01em;
  font-size: clamp(12px, 3.4vw, 16px);
  cursor: pointer;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}

.scroll-cue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1.4px solid rgba(255,255,255,.9);
  border-radius: 50%;
  animation: cue-bob 1.8s ease-in-out infinite;
}

.scroll-cue-icon svg {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(.5px);
}

@keyframes cue-bob {
  0%,100% { transform: translateY(-2px); }
  50% { transform: translateY(2px); }
}

.feature-story {
  position: relative;
  min-height: 100svh;
  background: #080b0c;
}

.story-background {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  overflow: hidden;
}

.story-background img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.story-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(211,151,105,.10), transparent 28%),
    linear-gradient(180deg, rgba(2,8,10,.18), rgba(2,7,8,.32) 44%, rgba(1,3,4,.67));
}

.story-intro,
.card-deck {
  position: relative;
  z-index: 2;
}

.story-intro {
  min-height: 0;
  margin-top: -100svh;
  padding: max(32px, 4.5svh) 26px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-shadow: 0 3px 22px rgba(0,0,0,.75);
}

.story-intro span {
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.story-intro h1 {
  margin: 12px 0 8px;
  max-width: 360px;
  font-size: clamp(39px, 12vw, 64px);
  line-height: .92;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.story-intro p {
  max-width: 360px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.45;
}

.card-deck {
  padding: 12px 11px 18svh;
}

.card-step {
  --push-y: 0px;
  --card-scale: 1;
  --card-opacity: 1;
  --shade-opacity: .18;
  --card-saturation: 1;
  --card-grayscale: 0;
  --card-brightness: 1;
  --card-contrast: 1;

  position: sticky;
  top: var(--deck-top);
  z-index: calc(20 - var(--index));
  width: 100%;
  margin: 0 0 var(--card-gap);
  overflow: visible;
  isolation: isolate;
  transform-origin: center top;
  transform: translate3d(0, var(--push-y), 0) scale(var(--card-scale));
  opacity: var(--card-opacity);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 24px 34px rgba(0,0,0,.34);
}

.card-step::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 1px;
  border-radius: 24px;
  background: rgba(2, 5, 6, var(--shade-opacity));
  pointer-events: none;
}

.card-step.is-active,
.card-step.is-next {
  will-change: transform, opacity;
}

.card-step.is-active {
  --shade-opacity: 0;
  --card-saturation: 1;
  --card-grayscale: 0;
  --card-brightness: 1;
  --card-contrast: 1;
}

.card-step.is-next {
  --shade-opacity: .075;
  --card-saturation: .42;
  --card-grayscale: .52;
  --card-brightness: .86;
  --card-contrast: 1.04;
}

/* The incoming card regains full colour before it reaches the sticky anchor.
   This gives the eye a short reading runway before the hand-off. */
.card-step.is-preactive {
  --shade-opacity: .012;
  --card-saturation: 1;
  --card-grayscale: 0;
  --card-brightness: 1;
  --card-contrast: 1;
  --card-scale: 1;
}

.card-step.is-future {
  --card-scale: .997;
  --shade-opacity: .23;
  --card-saturation: .12;
  --card-grayscale: .88;
  --card-brightness: .62;
  --card-contrast: 1.08;
}

.card-step.is-retired {
  --card-opacity: 0;
  --shade-opacity: .38;
  --card-saturation: .08;
  --card-grayscale: .94;
  --card-brightness: .48;
  --card-contrast: 1.04;
  pointer-events: none;
}

.feature-card {
  position: relative;
  z-index: 1;
  display: block;
  width: calc(100% - 2px);
  height: auto;
  margin-inline: 1px;
  border-radius: 0;
  object-fit: unset;
  transform: translateZ(0);
  filter:
    saturate(var(--card-saturation))
    grayscale(var(--card-grayscale))
    brightness(var(--card-brightness))
    contrast(var(--card-contrast));
  transition: filter .18s ease-out;
  will-change: filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-step-spec {
  margin-bottom: 0;
}

.spec-card {
  width: calc(100% - 2px);
}

.form-section {
  position: relative;
  z-index: 5;
  background: #f2eee7;
  color: #111;
  padding: 52px 18px 54px;
}

.form-shell {
  background: #fff;
  border-radius: 30px;
  padding: 30px 22px 22px;
  overflow: hidden;
}

.form-eyebrow {
  color: #876b46;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.form-shell h2 {
  margin: 14px 0 14px;
  font-size: clamp(42px, 12vw, 60px);
  line-height: .93;
  letter-spacing: -.035em;
}

.form-intro {
  margin: 0 0 18px;
  color: #65605a;
  font-size: 14px;
  line-height: 1.5;
}

.test-ride-frame-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

.test-ride-form-frame {
  display: block;
  width: 100%;
  height: 1720px;
  border: 0;
  background: #fff;
}

.sticky-test-ride {
  position: fixed;
  z-index: 100;
  right: max(18px, calc((100vw - var(--page-width)) / 2 + 18px));
  bottom: calc(18px + var(--safe-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  max-width: calc(100vw - 205px);
  padding: 0 19px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 13px;
  background: #c7aa80;
  color: #17130e;
  box-shadow: 0 12px 34px rgba(35,26,17,.34);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.sticky-test-ride:active { transform: scale(.97); background: #b99a70; }

.sticky-test-ride.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
}

.sticky-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.sticky-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-footer {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 1px minmax(0, .95fr);
  gap: 20px;
  align-items: center;
  padding: 30px 22px calc(30px + env(safe-area-inset-bottom));
  background: #050505;
  color: #fff;
}

.footer-contact {
  display: grid;
  gap: 15px;
  min-width: 0;
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-size: 10px;
  line-height: 1.25;
}

.footer-contact a span { overflow-wrap: anywhere; }

.footer-contact svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-contact a:nth-child(2) svg {
  fill: currentColor;
  stroke: none;
}

.footer-divider {
  align-self: stretch;
  width: 1px;
  min-height: 118px;
  background: rgba(255,255,255,.72);
}

.footer-logos {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 14px 12px;
  align-items: center;
  justify-items: center;
}

.footer-logos img {
  display: block;
  width: 100%;
  max-width: 112px;
  height: auto;
  object-fit: contain;
}

.footer-logos img:first-child { max-width: 62px; }
.footer-logos .poi-logo {
  grid-column: 1 / -1;
  max-width: 136px;
}

@media (min-width: 577px) {
  /* Desktop browser: lift the persistent CTA slightly above the viewport edge.
     Mobile keeps the original position because it already aligns well with browser chrome. */
  .sticky-test-ride {
    bottom: calc(42px + var(--safe-bottom));
  }

  body::before,
  body::after {
    content: "";
    position: fixed;
    inset-block: 0;
    width: calc((100vw - var(--page-width)) / 2);
    background: #030506;
    z-index: -1;
  }
  body::before { left: 0; }
  body::after { right: 0; }
}

@media (max-width: 480px) {
  .hero { min-height: 620px; }
  .story-intro {
    min-height: 0;
    padding: max(28px, 4svh) 20px 14px;
  }
  .card-deck { padding: 12px 9px 18svh; }
  .form-section { padding: 42px 14px 44px; }
  .form-shell { padding: 27px 18px 18px; }
  .test-ride-form-frame { height: 1780px; }
}

@media (max-width: 390px) {
  .scroll-cue { left: 18px; font-size: 11px; }
  .sticky-test-ride {
    right: 14px;
    max-width: calc(100vw - 165px);
    min-height: 50px;
    padding-inline: 14px;
    font-size: 10px;
  }
  .story-intro h1 { font-size: 41px; }
  .brand-footer {
    gap: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-contact a { gap: 8px; font-size: 9px; }
  .footer-contact svg { flex-basis: 18px; width: 18px; height: 18px; }
  .footer-logos { gap: 11px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue-icon { animation: none; }
  .card-step,
  .feature-card,
  .sticky-test-ride { transition: none; }
}
