/* scrub-hero.css — the scroll-scrubbed film hero.

   Same pattern as chinawheelsja.com: a tall section whose stage is sticky, with
   the film's currentTime driven by scroll position. Values are the tuned ones
   from the cinematic-sites Night Showroom build; colours are MAXUS's own
   (navy #052057 / #03143D), never China Wheels' red.

   STICKY KILLERS — do not reintroduce:
     · no `overflow: hidden` on .hero or any ancestor (only the STAGE gets it),
       or the stage never pins
     · `.hero { padding: 0 }` must beat any generic `section { padding: ... }`,
       or navy seams appear above and below the film
     · never leave an older `display:flex; align-items:center` hero rule in the
       cascade — delete superseded blocks rather than overriding them

   One breakpoint: 760px here AND in js/cinema.js (mqMobile). A mismatch leaves a
   band where the layout is mobile but the JS still fetches the desktop film. */

.hero {
  position: relative;
  height: 460vh;      /* taller = slower scrub */
  padding: 0;         /* must beat the generic section padding */
  background: var(--bg-footer, #03143D);
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;   /* the ONLY element that may clip */
}

.hero__media,
.hero__media video,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Legibility floor for white copy over unpredictable footage, in MAXUS navy. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3,20,61,0.58) 0%, rgba(3,20,61,0.06) 32%,
                            rgba(3,20,61,0.10) 58%, rgba(3,20,61,0.86) 100%),
    linear-gradient(100deg, rgba(3,20,61,0.62) 0%, rgba(3,20,61,0.22) 46%,
                            transparent 78%);
}

.hero__content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding-bottom: clamp(3rem, 8vh, 6rem);
  color: #fff;
  will-change: transform, opacity, filter;
}

/* The cookie banner is position:fixed and 88px tall, so on a first visit it
   clipped the bottom of the hero buttons. Lift the content only while the
   banner is actually showing, so it drops back once dismissed. Browsers
   without :has() simply keep the base padding — the buttons stay reachable
   either way, this is about not looking cut off. */
body:has(.cookie-banner.show) .hero__content {
  padding-bottom: calc(clamp(3rem, 8vh, 6rem) + 96px);
}

.hero__content .container {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-lg, 24px);
}

.hero__eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--space-sm, 8px);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 var(--space-md, 16px);
}

.hero__sub {
  margin: 0 0 var(--space-lg, 24px);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 52ch;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 56px);
  margin: 0 0 var(--space-lg, 24px);
  padding: 0;
  list-style: none;
}
.hero__stats b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1;
  color: #fff;
  font-weight: 400;
}
.hero__stats span {
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.hero__ctas { display: flex; gap: var(--space-md, 16px); flex-wrap: wrap; }

.hero__cue {
  position: absolute;
  right: max(4vw, 2rem);
  bottom: clamp(3rem, 8vh, 6rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__cue::after {
  content: "";
  width: 1px;
  height: 54px;
  background: linear-gradient(180deg, var(--accent, #1E5FAD), transparent);
  animation: cue-drop 2s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: top; }
  56%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Phones scrub too. The stage stays sticky and the section keeps a scroll
   range — slightly shorter than desktop, because a phone's scroll gesture
   covers less distance per swipe. Phones fetch the 854x480 rendition, not the
   desktop one; js/cinema.js picks it via data-src-mobile at the same 760px. */
@media (max-width: 760px) {
  .hero { height: 440vh; }
  .hero__stage { position: sticky; top: 0; height: 100svh; }
  .hero__cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__stage { position: relative; height: 100svh; }
  .hero__cue::after { animation: none; }
}
