/* ==========================================================================
   Animations – keyframes, scroll reveal and reduced-motion handling.
   Scroll reveal only hides content when JS is running (.js on <html>).
   ========================================================================== */

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 60px) scale(1.1); }
}
@keyframes hv-float {
  from { transform: translate(-50%, -50%); }
  to   { transform: translate(-50%, calc(-50% - 5px)); }
}
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dash { to { stroke-dashoffset: -22; } }
@keyframes flow-x { to { background-position: 22px 0; } }
@keyframes flow-y { to { background-position: 0 22px; } }
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Hero entrance (runs once on load) */
.hero__content > * { animation: fade-up .8s var(--ease) both; }
.hero__content > *:nth-child(2) { animation-delay: .08s; }
.hero__content > *:nth-child(3) { animation-delay: .16s; }
.hero__content > *:nth-child(4) { animation-delay: .24s; }
.hero__content > *:nth-child(5) { animation-delay: .32s; }
.hero__visual { animation: fade-up 1s .2s var(--ease) both; }

/* Scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translateX(-26px); }
.js [data-reveal="right"] { transform: translateX(26px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Single-column layouts: slide up instead of sideways */
@media (max-width: 960px) {
  .js [data-reveal="left"], .js [data-reveal="right"] { transform: translateY(26px); }
}

/* Reduced motion: show everything, stop looping motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .flow-dot { display: none; }
  .hero__bg::after, .page-hero__bg::after { animation: none; }
}

/* Print: no motion, no hidden content */
@media print {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .site-header, .back-to-top, .cta-panel__actions { display: none !important; }
}
