/* ========================================
   ANIMATIONS — wa.zalidan.com v2
   Premium animations inspired by scalewithouss.com
   ======================================== */

/* ---- Shimmer (button shine) ---- */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- CTA Pulse with glow ---- */
@keyframes pulseCta {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 0 0 60px rgba(255, 215, 0, 0.05);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3), 0 0 80px rgba(255, 215, 0, 0.1), 0 0 120px rgba(255, 215, 0, 0.03);
  }
}

/* ---- Border glow pulse ---- */
@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.05);
  }
  50% {
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.1);
  }
}

/* ---- Gentle float ---- */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(6px) rotate(-1deg); }
}

/* ---- Float with slight horizontal movement ---- */
@keyframes floatDrift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(8px, -14px); }
  50% { transform: translate(-4px, -6px); }
  75% { transform: translate(6px, -16px); }
}

/* ---- Marquee scroll ---- */
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

/* ---- Stars twinkle ---- */
@keyframes starsTwinkle {
  0% { opacity: 0.4; }
  100% { opacity: 0.8; }
}

/* ---- Aurora gradient shift (background) ---- */
@keyframes auroraShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Vignette pulse ---- */
@keyframes vignettePulse {
  0%, 100% { box-shadow: inset 0 0 120px 40px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: inset 0 0 150px 50px rgba(0, 0, 0, 0.5); }
}

/* ---- Scroll-triggered animations ---- */
.anim {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim.fade-up {
  transform: translateY(40px);
}
.anim.fade-down {
  transform: translateY(-30px);
}
.anim.slide-left {
  transform: translateX(-50px);
}
.anim.slide-right {
  transform: translateX(50px);
}
.anim.scale-in {
  transform: scale(0.92);
}
.anim.blur-in {
  filter: blur(8px);
  transform: translateY(20px);
}

/* Visible state */
.anim.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  filter: blur(0);
}

/* Stagger children */
.stagger > .anim:nth-child(1) { transition-delay: 0ms; }
.stagger > .anim:nth-child(2) { transition-delay: 80ms; }
.stagger > .anim:nth-child(3) { transition-delay: 160ms; }
.stagger > .anim:nth-child(4) { transition-delay: 240ms; }
.stagger > .anim:nth-child(5) { transition-delay: 320ms; }
.stagger > .anim:nth-child(6) { transition-delay: 400ms; }
.stagger > .anim:nth-child(7) { transition-delay: 480ms; }

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .btn-pulse,
  .float-shape,
  .marquee-track {
    animation: none !important;
  }
  .anim {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .btn-primary::before {
    animation: none !important;
  }
}
