/* ==========================================================
   Homepage hero: the video starts small between the two lines
   and grows to full screen as you scroll, pushing the words
   out (inspired by the-independents.com/about).
   The section holds in place while it grows, then releases
   and the page carries on to Selected work.
   ========================================================== */

.hv-pin { position: relative; height: 280vh; }
.hv-stage {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  --w: 260px; --h: 146px;     /* scroll-fx.js drives these */
  --gap: clamp(16px, 2.2vh, 28px);
}

/* the video, always centred in the screen */
.hv-media {
  position: absolute; left: 50%; top: 50%;
  width: var(--w); height: var(--h);
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: var(--paper-deep);
  z-index: 1;
}
.hv-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the words sit just above and below the video, so they get pushed out as it grows */
.hv-top, .hv-bottom {
  position: absolute; left: 0; right: 0;
  padding: 0 var(--gutter);
  will-change: opacity;
}
.hv-top { bottom: calc(50% + var(--h) / 2 + var(--gap)); }
.hv-bottom { top: calc(50% + var(--h) / 2 + var(--gap)); }

/* same type as the current hero, capped by screen height so it fits on landing */
.hv-stage .hero-caps {
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.01em;
}
.hv-stage .hv-top .hero-caps { font-size: clamp(44px, min(13.6vw, 23vh), 300px); }
.hv-stage .hv-top .reveal-line { white-space: nowrap; }
.hv-stage .hero-caps-b {
  display: flex; flex-wrap: nowrap; justify-content: space-between; column-gap: 0.25em;
  font-size: clamp(22px, min(8.6vw, 14vh), 200px);
}
.hv-stage .hero-bot { margin-top: 16px; }

@media (max-width: 720px) {
  .hv-pin { height: 240vh; }
}

/* reduced motion: no pin, video shown full width as before */
@media (prefers-reduced-motion: reduce) {
  .hv-pin { height: auto; }
  .hv-stage { position: relative; height: auto; overflow: visible; display: flex; flex-direction: column; gap: 24px; padding: 88px 0 64px; }
  .hv-top, .hv-bottom { position: static; }
  .hv-media { position: relative; left: auto; top: auto; transform: none; width: auto !important; height: auto !important; aspect-ratio: 16/9; margin: 0 var(--gutter); }
}
