.hero {
  /* 0..1 scroll progress through the hero, written by js/hero-parallax.js */
  --p: 0;
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--bar-h));
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

/* Ghosted range behind the copy, cut from the road photograph. */
.hero::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 46vw;
  height: 24vw;
  background: url('../img/hero-road.webp') 18% 19% / 190% auto no-repeat;
  filter: grayscale(1) contrast(1.15);
  opacity: 0.09;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to top right, #000 5%, transparent 68%);
  mask-image: linear-gradient(to top right, #000 5%, transparent 68%);
  pointer-events: none;
}

/* ── Copy ── */
.hero__copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: calc(var(--gutter) + 37rem);
  padding: clamp(1.5rem, 5.5vh, 5rem) 0 clamp(1rem, 2.5vh, 3rem) var(--gutter);
}

.hero__title {
  margin-top: clamp(1.25rem, 3.4vh, 2.5rem);
  font-family: var(--serif);
  font-weight: 450;
  /* Height-aware so the headline never outgrows a short laptop screen; the vw
     term keeps the first line clear of the photographs' slanted edge. */
  font-size: clamp(3rem, min(4vw, 7.6vh), 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero__title span {
  display: block;
}

/* The payoff line leans: italic, a touch lighter, stepped in from the margin. */
.hero__title-accent {
  padding-left: 0.14em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--red);
}

.hero__lede {
  margin-top: clamp(1.5rem, 3.6vh, 2.6rem);
  /* The vw term keeps the text clear of the photographs' lower-left corner. */
  max-width: min(25em, calc(37vw - var(--gutter)));
  /* Set as a magazine standfirst: the headline's serif at text size. */
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.1vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
}

/* The turn to Frank leans, in full ink, as "Frank adjusts." does below, on
   its own line with air above it. Height-aware, as the hero's other gaps are,
   so it never pushes the hero off a short laptop screen. */
.hero__lede em {
  display: block;
  margin-top: clamp(0.5rem, 1.4vh, 1rem);
  font-style: italic;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem clamp(0.875rem, 1.4vw, 2rem);
  /* Same bound as the lede: on a narrow screen the second button drops to its
     own row instead of running under the photographs. Lifted in the stacked
     layout below. */
  max-width: calc(37vw - var(--gutter));
  margin-top: clamp(1.75rem, 3.4vh, 2.4rem);
}

.hero__tag {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  color: var(--ink-soft);
}

/* Short laptop screens (1366x768): the copy's own gaps give back the line the
   close to Frank takes, so the hero still fits unscrolled. */
@media (min-width: 961px) and (max-height: 800px) {
  .hero__copy {
    padding-top: 1.5rem;
  }

  .hero__title {
    margin-top: 1.25rem;
  }

  .hero__tag {
    margin-top: 1.25rem;
  }
}

/* ── Photographs ──
   Two panels share one slanted seam. Each panel is sized to its own bounding
   box and cut with clip-path, so the percentages below are box-relative. */
.hero__stage {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 62.6vw;
  /* Capped so the agents strip always clears the lower edge of the photographs. */
  height: min(52.3vw, calc(100svh - var(--bar-h) - 9.5rem));
  filter: drop-shadow(0 1.5rem 2.25rem rgba(30, 22, 12, 0.2));
}

.hero__panel {
  position: absolute;
  top: 0;
  overflow: hidden;
}

/* Each image overscans its panel vertically; the parallax travel below stays
   inside that overscan so no edge is ever exposed. */
.hero__panel img {
  position: absolute;
  left: 0;
  width: 100%;
  object-fit: cover;
  will-change: transform;
}

/* The slant is as steep as the helmet allows: any steeper and the left edge
   cuts into the wordmark painted on it. */
.hero__panel--driver {
  left: 0;
  width: 61.3%;
  height: 96%;
  clip-path: polygon(23.5% 0, 100% 0, 79.8% 100%, 0 95.7%);
}

.hero__panel--driver img {
  top: -2%;
  height: 104%;
  object-position: 0 50%;
  transform: translate3d(0, calc(var(--p) * 1.8%), 0);
}

.hero__panel--road {
  right: 0;
  width: 49.7%;
  height: 100%;
  clip-path: polygon(24.1% 0, 100% 0, 100% 100%, 0 94.4%);
}

.hero__panel--road img {
  top: -6%;
  height: 112%;
  object-position: 34% 50%;
  transform: translate3d(0, calc(var(--p) * 5%), 0);
}

/* ── Stacked layout (phones and upright tablets) ──
   The photographs lead, full bleed under the bar, and their slanted lower edge
   hands over to the copy. Source order is unchanged: copy is still read first. */
@media (max-width: 960px) {
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .hero::before {
    display: none;
  }

  .hero__stage {
    order: -1;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 961 / 804;
    /* On a tablet the full-ratio stage would push the headline off the screen. */
    max-height: 46svh;
  }

  /* Squared off on the left so the panel bleeds to the screen edge. */
  .hero__panel--driver {
    clip-path: polygon(0 0, 100% 0, 79.8% 100%, 0 95.7%);
  }

  .hero__panel img {
    transform: none;
  }

  .hero__copy {
    align-self: stretch;
    max-width: none;
    padding: 1.75rem var(--gutter) 2.25rem;
  }

  .hero__tag {
    text-wrap: balance;
  }

  .hero .eyebrow::after {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.5rem, 11.2vw, 3.75rem);
  }

  .hero__lede {
    max-width: 30em;
  }

  /* The side-by-side bound does not apply once the photographs sit above. */
  .hero__actions {
    max-width: none;
  }
}

/* Phones: the eyebrow wraps to two lines repeating the headline, so it goes
   to lift the button clear of the browser toolbar, and the primary button
   becomes a full-width thumb target. The copy starts closer under the
   photographs for the same reason, paying for the close's own line. */
@media (max-width: 480px) {
  .hero .eyebrow {
    display: none;
  }

  .hero__copy {
    padding-top: 1.25rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero__actions .btn--play {
    align-self: flex-start;
  }
}
