/* ============================================
   ANIMATIONS — CNL Construction | Pools
   Keyframes, scroll reveals, parallax helpers
   ============================================ */

/* ---- Keyframes ---- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* ---- Scroll Reveal Base ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.reveal--left.is-visible {
  transform: translateX(0);
}

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

.reveal--right.is-visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.92);
}

.reveal--scale.is-visible {
  transform: scale(1);
}

/* ---- Stagger Children ---- */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 500ms; }

/* ---- Hero Animations ---- */
.hero__badge {
  animation: fade-in-up 0.8s var(--ease-out) 0.2s both;
}

.hero__title {
  animation: fade-in-up 0.8s var(--ease-out) 0.4s both;
}

.hero__description {
  animation: fade-in-up 0.8s var(--ease-out) 0.6s both;
}

.hero__actions {
  animation: fade-in-up 0.8s var(--ease-out) 0.8s both;
}

.hero__stats {
  animation: fade-in-up 0.8s var(--ease-out) 1s both;
}

/* ---- Floating Badge Animation ---- */
.features__floating-badge {
  animation: float 4s ease-in-out infinite;
}

/* ---- Cursor Glow ---- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-glow-size);
  height: var(--cursor-glow-size);
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--cursor-glow) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.cursor-glow.is-active {
  opacity: 1;
}

/* ---- WhatsApp Pulse ---- */
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

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

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

  .cursor-glow {
    display: none;
  }

  .hero__bg-image,
  .hero__bg-video {
    transform: none !important;
  }
}

/* Financing card mobile entry */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
