.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 54% center;
  opacity: 0;
  transition: opacity 420ms ease-in-out;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  overflow: hidden;
  opacity: 1;
  transition: opacity 420ms ease-in-out;
}

.hero-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 54% center;
}

.hero.hero-video-active .hero-video {
  opacity: 1;
}

.hero.hero-video-active .hero-backdrop {
  opacity: 0;
}

/* Keep the cinematic intro unobscured; restore the existing overlay on the still. */
.hero::before {
  transition: opacity 420ms ease-in-out;
}

.hero.hero-copy-pending::before {
  opacity: 0 !important;
}

.hero-copy {
  transition: opacity 350ms ease, transform 350ms ease, filter 350ms ease;
}

.hero.hero-copy-pending .hero-copy {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  filter: blur(1px);
}

@media (max-width: 768px) {
  .hero {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .hero-media {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 9 / 16;
  }

  .hero-video {
    object-fit: contain;
    object-position: center;
  }

  .hero-backdrop img {
    object-fit: contain;
    object-position: center;
  }

  .hero-backdrop {
    width: 100%;
    height: 100%;
  }

  .hero-inner {
    width: min(100% - 34px, var(--max)) !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: flex-start !important;
    padding: 26px 0 42px !important;
  }

  .hero-copy {
    width: 100% !important;
    max-width: 620px !important;
    padding: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-video,
  .hero-backdrop,
  .hero-copy {
    transition: none;
  }
}
