/* ==========================================================================
   Motion support — CSS transitions/keyframes that complement GSAP
   ========================================================================== */

/* Text split masks (built by js/animations.js) */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.split-word__inner { display: inline-block; will-change: transform; }

/* Preloader safety net: never block the page if a script fails to load */
.js .preloader { animation: preloader-failsafe 0.01s linear 6s forwards; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* Location pin pulse */
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Button arrow loop: arrow exits right, re-enters from left */
.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow,
.link-arrow:hover .link-arrow__icon { animation: arrow-loop 0.55s var(--ease-out); }
@keyframes arrow-loop {
  0% { transform: translateX(0); }
  45% { transform: translateX(120%); opacity: 0; }
  46% { transform: translateX(-120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Image hover zoom */
.img-mask img { transition: scale 1.2s var(--ease-out); }
@media (hover: hover) {
  .service__media:hover img,
  .about__media:hover img,
  .feature__media:hover img { scale: 1.05; }
}

/* Hero scroll cue */
.hero__scroll-line { position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--c-warm-white);
  animation: scroll-cue 2.2s var(--ease-in-out) infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* Map dot pulse for home base */
.map__home circle { animation: map-pulse 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes map-pulse { 50% { transform: scale(1.5); } }

/* Mobile menu link entrance */
.mobile-menu__list a { transform: translateY(105%); transition: transform 0.7s var(--ease-out); }
.mobile-menu.is-open .mobile-menu__list a { transform: none; }
.mobile-menu.is-open li:nth-child(1) a { transition-delay: 0.25s; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.3s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.35s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.4s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.45s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 0.5s; }

/* ==========================================================================
   Reduced motion: keep everything visible and still
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .preloader { display: none; }
  .mobile-menu__list a { transform: none; }
  .img-mask [data-parallax] { height: 100%; margin-top: 0; }
  .cta__media img { height: 100%; margin-top: 0; }
}
