/* Whiffle Iso Hero — the box the animation is laid in, over the static hero image. */

/* The static hero image is hidden from the first paint: the animation fades in in its place
   (wh-iso-hero.js). It only shows when the animation can't play ("--static", set by the script).
   Safety net without the script (blocked, error): the image fades in after 4 s by itself; once
   the script runs ("--pending") that timer is paused and the script decides.
   Not in the Elementor editor, where the image is what you edit. */
body:not(.elementor-editor-active) .wh-iso-hero img:not(.wh-iso-hero__clip img) {
  opacity: 0;
  animation: wh-iso-hero-show 0.4s ease-out 4s forwards;
}

body:not(.elementor-editor-active) .wh-iso-hero.wh-iso-hero--pending img:not(.wh-iso-hero__clip img) {
  animation-play-state: paused;
}

body:not(.elementor-editor-active) .wh-iso-hero.wh-iso-hero--static img:not(.wh-iso-hero__clip img) {
  animation: wh-iso-hero-show 0.4s ease-out forwards;
}

@keyframes wh-iso-hero-show {
  to { opacity: 1; }
}

.wh-iso-hero__clip {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-out; /* FADE_MS in wh-iso-hero.js */
}

/* Shown once all its images are loaded, together with the start of the intro */
.wh-iso-hero--live .wh-iso-hero__clip {
  opacity: 1;
}

/* The engine's .iso-hero is position: relative / width: 100%; here it is placed inside the clip box. */
.wh-iso-hero__stage.iso-hero {
  position: absolute;
  max-width: none;
  background: transparent;
}

/* The stage sits inside the Elementor Image widget, whose own image settings (width, height,
   object-fit, max-width, opacity) target every img in the widget. Keep them off the animation's elements. */
.wh-iso-hero__stage .iso-hero__el img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.wh-iso-hero__stage .iso-hero__shader img {
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .wh-iso-hero__clip {
    transition: none;
  }
}
