/*
  Animation stylesheet
  Purpose: Reusable entrance effects, hover motion, ripple feedback, and reduced-motion safety.
  JavaScript toggles .is-visible on .reveal elements through Intersection Observer.
*/

.animate {
  animation-duration: 820ms;
  animation-fill-mode: both;
  animation-timing-function: ease;
}

.fade-up {
  animation-name: fadeUp;
}

.fade-down {
  animation-name: fadeDown;
}

.zoom-in {
  animation-name: zoomIn;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 240ms;
}

.delay-3 {
  animation-delay: 360ms;
}

.reveal {
  opacity: 0;
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.fade-up {
  transform: translateY(34px);
}

.reveal.slide-left {
  transform: translateX(-42px);
}

.reveal.slide-right {
  transform: translateX(42px);
}

.reveal.zoom-in {
  transform: scale(0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.typing-text {
  overflow-wrap: anywhere;
}

.ripple::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.ripple.is-rippling::after {
  left: var(--ripple-x);
  top: var(--ripple-y);
  animation: ripple 560ms ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scrollPulse {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@keyframes brandMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 6px));
  }
}

@keyframes heroStatsMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
