/* ============================================
   MULUWIN.STORE — Animations
   Micro-animations & scroll-triggered effects
   ============================================ */

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 160, 23, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 160, 23, 0.6); }
}

@keyframes goldShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

/* --- Animation Utility Classes --- */
.anim-float { animation: float 3s ease-in-out infinite; }
.anim-pulse { animation: pulse 2s ease-in-out infinite; }
.anim-glow { animation: glow 2s ease-in-out infinite; }
.anim-rotate { animation: rotate 8s linear infinite; }

.anim-shimmer {
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
}

/* --- Scroll-Triggered Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.2s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.3s; }
.stagger > *:nth-child(7) { transition-delay: 0.35s; }
.stagger > *:nth-child(8) { transition-delay: 0.4s; }
.stagger > *:nth-child(9) { transition-delay: 0.4s; }
.stagger > *:nth-child(10) { transition-delay: 0.45s; }

/* --- Hero Particles --- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0;
}

.particle:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; width: 6px; height: 6px; background: #D4A017; }
.particle:nth-child(2) { left: 25%; animation-duration: 12s; animation-delay: 2s; width: 4px; height: 4px; background: #F5C842; }
.particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; width: 8px; height: 8px; background: #D4A017; }
.particle:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; width: 5px; height: 5px; background: #00C853; }
.particle:nth-child(5) { left: 70%; animation-duration: 9s; animation-delay: 3s; width: 7px; height: 7px; background: #F5C842; }
.particle:nth-child(6) { left: 85%; animation-duration: 11s; animation-delay: 5s; width: 4px; height: 4px; background: #D4A017; }
.particle:nth-child(7) { left: 15%; animation-duration: 13s; animation-delay: 6s; width: 6px; height: 6px; background: #00C853; }
.particle:nth-child(8) { left: 60%; animation-duration: 8s; animation-delay: 7s; width: 5px; height: 5px; background: #F5C842; }
.particle:nth-child(9) { left: 35%; animation-duration: 15s; animation-delay: 2s; width: 3px; height: 3px; background: #D4A017; }
.particle:nth-child(10) { left: 80%; animation-duration: 10s; animation-delay: 4s; width: 6px; height: 6px; background: #69F0AE; }

/* Coin glow variants */
.particle--coin {
  background: linear-gradient(135deg, #D4A017, #F5C842) !important;
  box-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
}

.particle--emerald {
  background: #00C853 !important;
  box-shadow: 0 0 6px rgba(0, 200, 83, 0.4);
}

/* --- Button Ripple Effect --- */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* --- 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, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .particles { display: none; }
}
