/**
 * Akademi shared scroll reveal + slider crossfade.
 * Motion ON by default (same as Varmıs). Opt out: ?motion=0
 * Reveals use a JS tween so theme CSS cannot freeze them at opacity 0.
 */
html.ak-force-motion {
  --ak-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.ak-force-motion .ak-reveal,
html.ak-force-motion [data-ak-reveal] {
  will-change: opacity, transform;
}

html.ak-force-motion .ak-reveal.is-in,
html.ak-force-motion [data-ak-reveal].is-in {
  /* Final state owned by JS tween; keep pointer events. */
  pointer-events: auto;
}

/* Soft image zoom */
html.ak-force-motion body.ak-motion-ready .ak-media-zoom {
  overflow: hidden;
}
html.ak-force-motion body.ak-motion-ready .ak-media-zoom img {
  transition: transform 0.75s var(--ak-ease, ease) !important;
  transform: scale(1);
  will-change: transform;
}
html.ak-force-motion body.ak-motion-ready .ak-media-zoom:hover img,
html.ak-force-motion body.ak-motion-ready .ak-media-zoom:focus-within img {
  transform: scale(1.07) !important;
}

/* ——— Universal smooth slider / gallery crossfade ——— */
html.ak-force-motion .hero__img,
html.ak-force-motion .feature-split__slide,
html.ak-force-motion [class*='hero__slide'],
html.ak-force-motion [class*='-hero__slide'],
html.ak-force-motion [class*='__slides'] > img,
html.ak-force-motion [data-fade-slider] img,
html.ak-force-motion [data-hero] [class*='__slide'],
html.ak-force-motion [class*='card__media'] img,
html.ak-force-motion [class*='__media'] > img,
html.ak-force-motion [data-gallery-img],
html.ak-force-motion .wfp-hero__slide,
html.ak-force-motion .nova-hero__slide,
html.ak-force-motion .ml-hero__tile img {
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    transform 7.5s ease !important;
}

html.ak-force-motion [class*='hero__slide'].is-active img,
html.ak-force-motion [class*='-hero__slide'].is-active img,
html.ak-force-motion [class*='__slides'] > img.is-active,
html.ak-force-motion .hero__img.is-active,
html.ak-force-motion .wfp-hero__slide.is-active .wfp-hero__media img {
  transform: scale(1.06);
}

html.ak-force-motion [class*='hero__slide'].is-leaving,
html.ak-force-motion [class*='-hero__slide'].is-leaving,
html.ak-force-motion [class*='__slides'] > img.is-leaving,
html.ak-force-motion .hero__img.is-leaving,
html.ak-force-motion [data-gallery-img].is-leaving,
html.ak-force-motion .wfp-hero__slide.is-leaving {
  opacity: 0 !important;
  z-index: 2;
}

/* Beat theme reduced-motion kill-switches while force-motion is on. */
@media (prefers-reduced-motion: reduce) {
  html.ak-force-motion .hero__img,
  html.ak-force-motion .feature-split__slide,
  html.ak-force-motion [class*='hero__slide'],
  html.ak-force-motion [class*='-hero__slide'],
  html.ak-force-motion [class*='__slides'] > img,
  html.ak-force-motion [data-fade-slider] img,
  html.ak-force-motion [data-hero] [class*='__slide'],
  html.ak-force-motion [class*='card__media'] img,
  html.ak-force-motion [data-gallery-img],
  html.ak-force-motion .wfp-hero__slide,
  html.ak-force-motion .ak-media-zoom img {
    transition:
      opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 1.15s cubic-bezier(0.22, 1, 0.36, 1),
      transform 7.5s ease !important;
  }

  /* Restore hero entrance + scroll reveals killed by animation-duration: 0.01ms */
  html.ak-force-motion [data-hero-rise] {
    animation: ak-force-rise 1s var(--ak-ease, ease) forwards !important;
    animation-delay: 0.15s !important;
  }
  html.ak-force-motion .hero__content [data-hero-rise]:nth-child(1) {
    animation-delay: 0.12s !important;
  }
  html.ak-force-motion .hero__content [data-hero-rise]:nth-child(2) {
    animation-delay: 0.28s !important;
  }
  html.ak-force-motion .hero__content [data-hero-rise]:nth-child(3) {
    animation-delay: 0.42s !important;
  }
  html.ak-force-motion .hero-dock[data-hero-rise] {
    animation-delay: 0.55s !important;
  }
  html.ak-force-motion [data-reveal].is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.85s var(--ak-ease, ease), transform 0.85s var(--ak-ease, ease) !important;
  }
}

@keyframes ak-force-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

html.ak-motion-off .ak-reveal,
html.ak-motion-off [data-ak-reveal] {
  opacity: 1 !important;
  transform: none !important;
}
