/* ==========================================================================
   film.css — the full-bleed parallax band.
   One per page, at most. It is the loudest thing on the site and it earns that
   only by being rare. Colour comes from tokens; no hex literals.
   ========================================================================== */

.film {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(78vh, 46rem);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(3rem, 10vw, 7rem);
  background: var(--color-deep);   /* what shows before the poster decodes */
}

/* Oversized on purpose. The parallax translates this box up to ±8%, so it has
   to start taller than the section or the translation exposes the edge. */
.film__media {
  position: absolute;
  inset: -10% 0;
  z-index: -2;
  background-position: center 55%;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
}
.film__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Hidden until it can actually paint, so there is never a black rectangle
     between the poster and the first decoded frame. */
  opacity: 0;
  transition: opacity .9s ease;
}
.film__media video[data-ready="true"] { opacity: 1; }

/* Legibility is not negotiable. The copy sits bottom-left, so the scrim is
   heaviest there and lets the picture breathe top-right. */
.film__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      color-mix(in srgb, var(--color-deep) 92%, transparent) 0%,
      color-mix(in srgb, var(--color-deep) 72%, transparent) 34%,
      color-mix(in srgb, var(--color-deep) 30%, transparent) 68%,
      color-mix(in srgb, var(--color-deep) 12%, transparent) 100%),
    linear-gradient(to right,
      color-mix(in srgb, var(--color-deep) 55%, transparent) 0%,
      transparent 62%);
}

.film__body {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  align-items: end;
  color: var(--color-deep-ink);
}
.film__body h2,
.film__body .film__lede { color: var(--color-deep-ink); }
.film__body .eyebrow { color: var(--color-sun); }
.film__body p { color: color-mix(in srgb, var(--color-deep-ink) 88%, transparent); }
.film__lede {
  font-family: var(--font-display);
  /* Same floor as .lede — and over a photograph a Didone needs more, not less,
     because the background is competing with the hairlines. */
  font-size: clamp(1.25rem, 2.2vw, 1.35rem);
  line-height: 1.45;
  max-width: 44ch;
}
.film__links { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
.film__links a {
  color: var(--color-sun);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-sun) 45%, transparent);
  padding-bottom: .15rem;
}
.film__links a:hover { color: var(--color-deep-ink); border-bottom-color: var(--color-deep-ink); }
/* A ground of its own under each link. The scrim above is a vertical gradient,
   so what these small mono labels actually sit on depends on where the photograph
   is bright: measured glyph-by-glyph at 1280 they fell to 2.3-4.0:1 over the
   valley band, and computed styles cannot see it because the colours are fine on
   paper. A deep plate puts a known ground under the text wherever the photo
   lands, in both motion modes. 88%, not less: the band is VIDEO, so the only
   honest bound is the plate over a pure-white frame, and 72% gave 2.9:1 there. */
.film__links a {
  background: color-mix(in srgb, var(--color-deep) 88%, transparent);
  padding: .15rem .45rem;
  border-radius: 2px;
}

.film .btn--ghost {
  border-color: color-mix(in srgb, var(--color-deep-ink) 40%, transparent);
  color: var(--color-deep-ink);
}
.film .btn--ghost:hover { border-color: var(--color-sun); color: var(--color-sun); }

/* A single bolt, bottom-right, riding the picture rather than the copy. */
.film__mark {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 3rem);
  opacity: .9;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--color-bolt) 60%, transparent));
}

@media (max-width: 56rem) {
  .film { min-height: min(66vh, 34rem); }
  .film__body { grid-template-columns: 1fr; }
  .film__mark { display: none; }
  /* The scrim has to work harder when the copy spans the full width. */
  .film__scrim {
    background: linear-gradient(to top,
      color-mix(in srgb, var(--color-deep) 94%, transparent) 0%,
      color-mix(in srgb, var(--color-deep) 78%, transparent) 46%,
      color-mix(in srgb, var(--color-deep) 34%, transparent) 100%);
  }
}

/* Someone who has asked the OS for less motion gets the still frame and no
   translation at all. The video element is never even given a source. */
@media (prefers-reduced-motion: reduce) {
  .film__media { transform: none !important; }
  .film__media video { display: none; }
}
