/* ─────────────────────────────────────────────────────────────────────────────
   The scene behind the hero.

   Bands stacked back to front, each one either a painted canvas or a supplied
   illustration. The CSS does not know or care which — a layer that found its
   artwork carries it as a background image, a layer that did not holds a
   canvas, and both fill the same band.

   The scrim is not decoration. A headline at --t-mega sits directly over the
   crowd, and an editorial illustration is busiest exactly where the type is
   largest. The gradient buys back the contrast on the reading side and fades
   the bottom of the park into the page ground so the hero does not end on a
   hard horizontal cut.
   ──────────────────────────────────────────────────────────────────────────── */

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: var(--g-0);
  /* The layers translate on every frame; keep them off the paint path. */
  contain: strict;
}

/* A band. Oversized horizontally so parallax has somewhere to slide to. */
.sl {
  position: absolute;
  left: -6%;
  width: 112%;
  will-change: transform;
  backface-visibility: hidden;
}

.sl-cv {
  width: 100%;
  height: 100%;
  display: block;
}

/* Supplied artwork. Non-tiling plates cover; tiling plates repeat across. */
.sl.is-art {
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
}
.sl.is-art.is-tile {
  background-size: auto 100%;
  background-repeat: repeat-x;
}

/* ── The scrim ────────────────────────────────────────────────────────────── */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background:
    /* reading side */
    linear-gradient(100deg,
      rgba(7, 7, 11, 0.78) 0%,
      rgba(7, 7, 11, 0.50) 28%,
      rgba(7, 7, 11, 0.16) 56%,
      rgba(7, 7, 11, 0.02) 78%,
      rgba(7, 7, 11, 0) 100%),
    /* into the page */
    linear-gradient(to bottom,
      rgba(7, 7, 11, 0.42) 0%,
      rgba(7, 7, 11, 0) 20%,
      rgba(7, 7, 11, 0) 80%,
      rgba(7, 7, 11, 0.70) 96%,
      var(--g-0) 100%);
}

/* Portrait: the type sits over the whole width, so the scrim has to come up
   from the bottom instead of in from the left. */
@media (max-width: 980px) {
  /* THE PORTRAIT TRAP. The hero is ~1200px tall on a phone because the device
     mock is tall, but the scene's bands are fractions of the hero — so a
     horizon set at 54% landed halfway down the page, with the crowd floating
     in the middle of the copy and the field hidden behind the phone.
     Anchoring the park to the top of the hero and capping it at roughly a
     screen puts the horizon back where the eye expects it, and the device
     then sits on the page's own ground, which is where it should be. */
  .scene {
    inset: 0 0 auto 0;
    height: min(100%, 78vh);
  }

  /* The park is the texture on a phone; the ghosted word just fogged it. */
  .hero-ghost { display: none; }

  .scene::after {
    background:
      linear-gradient(to bottom,
        rgba(7, 7, 11, 0.86) 0%,
        rgba(7, 7, 11, 0.52) 20%,
        rgba(7, 7, 11, 0.34) 44%,
        rgba(7, 7, 11, 0.72) 78%,
        var(--g-0) 100%);
  }
  .sl { left: -10%; width: 120%; }
}

/* The ghosted word is the manifest's `bigtype`: authored here, set into the
   scene rather than laid on top of it. */
.hero-ghost {
  z-index: 90;
}
