/* Ambient motion uses the existing visibility and preference controller. */
.cinematic-hero .hero-light {
  transform-origin: 65% 50%;
  animation: novatel-light-drift 16s ease-in-out infinite paused;
}

.cinematic-hero .hero-horizon {
  transform-origin: center;
  animation: novatel-horizon-breathe 8s ease-in-out infinite paused;
}

.cinematic-hero[data-ambient='running'] .hero-slide[aria-hidden='false'] :is(.hero-light, .hero-horizon) {
  animation-play-state: running;
}

@keyframes novatel-light-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: .78; }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.045); opacity: 1; }
}

@keyframes novatel-horizon-breathe {
  0%, 100% { transform: scaleX(1); opacity: .8; }
  50% { transform: scaleX(.94); opacity: .64; }
}

/* This line represents the controller's current seven-second wait. A paused
   carousel clears it, because resuming always begins a fresh full interval. */
.cinematic-hero .hero-utility .next-campaign { position: relative; }
.cinematic-hero .hero-utility .next-campaign::after {
  content: '';
  position: absolute;
  inset: auto 0 3px;
  height: 2px;
  background: currentColor;
  opacity: .55;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.cinematic-hero[data-autoplay='running'][data-autoplay-cycle='a'] .hero-utility .next-campaign::after {
  animation: novatel-campaign-progress-a var(--campaign-interval, 7000ms) linear forwards;
}
.cinematic-hero[data-autoplay='running'][data-autoplay-cycle='b'] .hero-utility .next-campaign::after {
  animation: novatel-campaign-progress-b var(--campaign-interval, 7000ms) linear forwards;
}
@keyframes novatel-campaign-progress-a { to { transform: scaleX(1); } }
@keyframes novatel-campaign-progress-b { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion='off']) .cinematic-hero :is(.next-campaign, .hero-secondary, .hero-content .button) > svg {
    transition: transform 240ms cubic-bezier(.2, .65, .3, 1);
  }
  html:not([data-motion='off']) .cinematic-hero :is(.next-campaign, .hero-secondary, .hero-content .button):focus-visible > svg {
    transform: translateX(3px);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not([data-motion='off']) .cinematic-hero :is(.next-campaign, .hero-secondary, .hero-content .button):hover > svg {
    transform: translateX(3px);
  }
}

html[data-motion='off'] .cinematic-hero :is(.hero-light, .hero-horizon),
html[data-motion='off'] .cinematic-hero .next-campaign::after { animation: none; }
@media (prefers-reduced-motion: reduce), print {
  .cinematic-hero :is(.hero-light, .hero-horizon),
  .cinematic-hero .next-campaign::after { animation: none; }
}
