/* ==========================================================================
   Animations — keyframes, reveal states, reduced motion
   ========================================================================== */

@keyframes marquee {
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}

@keyframes btn-shine {
  0%,
  70% {
    inset-inline-start: -60%;
  }
  100% {
    inset-inline-start: 130%;
  }
}

@keyframes wa-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 168, 85, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 18px rgba(31, 168, 85, 0);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise-in {
  to {
    transform: translateY(0);
  }
}

@keyframes load-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes loader-out {
  to {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes float-up {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* ---------- Reveal (initial state set only when JS + GSAP are active) ---------- */
.js.motion-ok [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(48px);
}

.js.motion-ok [data-reveal="fade"]:not(.is-revealed) {
  transform: none;
}

.js.motion-ok [data-reveal="scale"]:not(.is-revealed) {
  transform: translateY(30px) scale(0.96);
}

/* Split-text words (hero + titles) */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-block: 0.08em;
  margin-block: -0.08em;
}

.split-word__inner {
  display: inline-block;
  will-change: transform;
}

.js.motion-ok [data-split] .split-word__inner {
  transform: translateY(110%);
}

/* Spinner (form loading) */
.spinner {
  inline-size: 18px;
  block-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-block-start-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Reduced motion ---------- */
@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;
  }

  .marquee__track {
    animation: none !important;
  }

  .marquee {
    flex-wrap: wrap;
    justify-content: center;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .marquee__track[aria-hidden="true"] {
    display: none;
  }

  .marquee__track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .spinner {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}
