/* ==========================================================================
   Animations – keyframes, scroll-reveal states, reduced-motion handling
   ========================================================================== */

@keyframes marquee {
  to { transform: translateX(calc(-50% - 0.625rem)); }
}

@keyframes morph {
  0%, 100% { border-radius: 46% 54% 40% 60% / 52% 44% 56% 48%; }
  33% { border-radius: 58% 42% 52% 48% / 44% 58% 42% 56%; }
  66% { border-radius: 40% 60% 46% 54% / 58% 46% 54% 42%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

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

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

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes highlight-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes bead-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-10px); }
  60% { transform: translateY(0); }
}

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

.anim-float { animation: float 6s ease-in-out infinite; }
.anim-float-slow { animation: float-slow 5s ease-in-out infinite; }
.anim-float-delay { animation-delay: -2.5s; }
.anim-spin-slow { animation: spin-slow 40s linear infinite; }

/* Hero entrance */
.hero [data-enter] {
  animation: fade-up 0.9s var(--ease-out) both;
}

.hero [data-enter="1"] { animation-delay: 0.05s; }
.hero [data-enter="2"] { animation-delay: 0.15s; }
.hero [data-enter="3"] { animation-delay: 0.25s; }
.hero [data-enter="4"] { animation-delay: 0.35s; }
.hero [data-enter="5"] { animation-delay: 0.45s; }

/* Scroll reveal – only hide content when JS is available */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal="zoom"] { transform: scale(0.94); }

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* SVG illustration micro-animations (classes used inside inline SVGs) */
.svg-bead { animation: bead-bounce 2.8s var(--ease-out) infinite; transform-box: fill-box; transform-origin: center; }
.svg-bead:nth-of-type(2) { animation-delay: 0.15s; }
.svg-bead:nth-of-type(3) { animation-delay: 0.3s; }
.svg-leaf { animation: float-slow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
.svg-draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s 0.4s var(--ease-out) forwards; }

@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 [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

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