/* Keep the existing full-height scene. Cover the picture and its beam mask
   identically, so responsive cropping never moves the effect off the rays. */
.detection .ymp-hero {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.detection .ymp-hero img {
  object-fit: cover;
  object-position: center;
}

.detection .ymp-hero--flicker::after {
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-position: center;
  mask-position: center;
  animation-play-state: paused !important;
}

/* Intentional hover follows the site's other custom artwork. Pausing keeps
   the supplied twelve-second phase; there is no animation restart on entry. */
@media (any-hover: hover) {
  .detection .ymp-hero--flicker[data-ymp-hover="true"]::after {
    animation-play-state: running !important;
  }
}

/* Visibility pause wins even if the pointer stays over the scene. */
.detection .ymp-hero--flicker[data-ymp-paused="true"]::after {
  animation-play-state: paused !important;
}
