/* MGB hero video — background layer behind the hero content. Paste at the end of style.css. */
.hero { position: relative; isolation: isolate; }
.hero > *:not(.hero-media) { position: relative; z-index: 1; }
.hero-media { position: absolute; inset: 0 0 auto 0; height: min(100vh, 100%); z-index: 0; overflow: hidden; pointer-events: none; }
.hero-media img, .hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  transform: translateX(17%) scale(1.3);                 /* move the question mark into the gap between the card and the headline */
  opacity: .6;                                           /* calm: never fights the headline */
}
@media (max-aspect-ratio: 4/3) { .hero-media img, .hero-media video { transform: translateX(12%) scale(1.25); } }
.hero-media video { opacity: 0; transition: opacity .8s ease; }
.hero-media video.is-playing { opacity: .6; }
/* fade into the solid hero blue at the bottom so the rest of the section stays clean */
.hero-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, #161BDE 100%),
              linear-gradient(to left, #161BDE 0%, transparent 14%, transparent 86%, #161BDE 100%); }
@media (prefers-reduced-motion: reduce) { .hero-media video { display: none; } }

/* Keep portrait artwork behind the headline without reserving extra space. */
@media (max-width: 760px) and (orientation: portrait) {
  .hero-media { top: 130px; height: auto; aspect-ratio: 16 / 9; }
  .hero-media img, .hero-media video {
    transform: none; object-fit: contain; object-position: center;
    opacity: .38;
  }
  .hero-media video:not(.is-playing) { opacity: 0; }
  .hero-media::after {
    background: linear-gradient(to bottom, #161bde 0%, transparent 18%, transparent 78%, #161bde 100%);
  }
}

/* Remove the duplicate still frame once video playback begins. */
.hero-media.has-video img { opacity: 0; }
.hero-media { background-color: #161bde; }
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(3, 7, 30, .2); pointer-events: none;
}
.hero-media::after { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .hero-media.has-video img { opacity: .6; }
}
