/* ═══════════════════════════════════════════
   AQUABOTÂNICA — ANIMATIONS
   Dramatic • Expressive • Playful
   ═══════════════════════════════════════════ */

/* ── Bounce ── */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-12px); }
  60% { transform: translateX(-50%) translateY(-6px); }
}

/* ── Fade In Up ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Fade In Right ── */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Fade In Left ── */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Scale In ── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Scale Up ── */
@keyframes scaleUp {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

/* ── Pulse ── */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── Pulse Glow ── */
@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 4px 4px 0px var(--text-primary);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 8px 8px 0px var(--text-primary), 0 0 30px rgba(201, 168, 76, 0.3);
  }
}

/* ── Float ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ── Float Rotate ── */
@keyframes floatRotate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1deg); }
  66% { transform: translateY(-4px) rotate(-1deg); }
}

/* ── Shimmer ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Slide Down ── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Slide Up ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Ripple ── */
@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* ── Drop ── */
@keyframes drop {
  0% { opacity: 0; transform: translateY(-20px) scaleY(0.8); }
  60% { opacity: 1; transform: translateY(4px) scaleY(1.02); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

/* ── Shake ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ── Wiggle ── */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* ── Spinner ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Typing Bounce ── */
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ── Skeleton ── */
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Gradient Shift ── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Glow ── */
@keyframes glow {
  0%, 100% { box-shadow: 4px 4px 0px var(--text-primary); }
  50% { box-shadow: 6px 6px 0px var(--text-primary), 0 0 30px rgba(201, 168, 76, 0.2); }
}

/* ── Leaf Sway ── */
@keyframes leafSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ── Water Ripple ── */
@keyframes waterRipple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── Tree Swing ── */
@keyframes treeSwing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}

/* ── Pop In ── */
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  70% { opacity: 1; transform: scale(1.05) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Slant In ── */
@keyframes slantIn {
  from { opacity: 0; transform: translateY(40px) rotateX(10deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* ── Reveal ── */
@keyframes reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ═══════════════════════════════════════════
   ANIMATION CLASSES
   ═══════════════════════════════════════════ */

[data-animate] {
  opacity: 0;
}

[data-animate].animated {
  animation: fadeInUp 0.8s var(--transition-spring) forwards;
}

[data-animate="fade-right"].animated {
  animation: fadeInRight 0.8s var(--transition-spring) forwards;
}

[data-animate="fade-left"].animated {
  animation: fadeInLeft 0.8s var(--transition-spring) forwards;
}

[data-animate="scale"].animated {
  animation: scaleIn 0.7s var(--transition-spring) forwards;
}

[data-animate="pop"].animated {
  animation: popIn 0.6s var(--transition-spring) forwards;
}

[data-animate="slide-up"].animated {
  animation: slideUp 0.6s var(--transition-spring) forwards;
}

[data-animate="slide-down"].animated {
  animation: slideDown 0.6s var(--transition-spring) forwards;
}

[data-animate="slant"].animated {
  animation: slantIn 0.8s var(--transition-spring) forwards;
}

/* ── Stagger Children ── */
.stagger-children > * {
  opacity: 0;
}

.stagger-children.animated > *:nth-child(1) { animation: fadeInUp 0.6s ease 0.05s forwards; }
.stagger-children.animated > *:nth-child(2) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.stagger-children.animated > *:nth-child(3) { animation: fadeInUp 0.6s ease 0.15s forwards; }
.stagger-children.animated > *:nth-child(4) { animation: fadeInUp 0.6s ease 0.2s forwards; }
.stagger-children.animated > *:nth-child(5) { animation: fadeInUp 0.6s ease 0.25s forwards; }
.stagger-children.animated > *:nth-child(6) { animation: fadeInUp 0.6s ease 0.3s forwards; }
.stagger-children.animated > *:nth-child(7) { animation: fadeInUp 0.6s ease 0.35s forwards; }
.stagger-children.animated > *:nth-child(8) { animation: fadeInUp 0.6s ease 0.4s forwards; }

/* ── Stagger Fade (delay alternado) ── */
.stagger-fade > * {
  opacity: 0;
}

.stagger-fade.animated > *:nth-child(1) { animation: fadeInUp 0.7s ease 0.1s forwards; }
.stagger-fade.animated > *:nth-child(2) { animation: fadeInUp 0.7s ease 0.2s forwards; }
.stagger-fade.animated > *:nth-child(3) { animation: fadeInUp 0.7s ease 0.3s forwards; }
.stagger-fade.animated > *:nth-child(4) { animation: fadeInUp 0.7s ease 0.4s forwards; }
.stagger-fade.animated > *:nth-child(5) { animation: fadeInUp 0.7s ease 0.5s forwards; }
.stagger-fade.animated > *:nth-child(6) { animation: fadeInUp 0.7s ease 0.6s forwards; }

/* ── Utility Classes ── */
.float-animation {
  animation: float 3s ease-in-out infinite;
}

.float-rotate {
  animation: floatRotate 4s ease-in-out infinite;
}

.glow-animate {
  animation: glow 2s ease-in-out infinite;
}

.pulse-animate {
  animation: pulse 2s ease-in-out infinite;
}

.wiggle-animate {
  animation: wiggle 2s ease-in-out infinite;
}

.leaf-sway {
  animation: leafSway 3s ease-in-out infinite;
  transform-origin: bottom center;
}

.tree-swing {
  animation: treeSwing 4s ease-in-out infinite;
  transform-origin: top center;
}

.drop-animate {
  animation: drop 0.6s var(--transition-spring) forwards;
}

/* ── Water Ripple Effect ── */
.water-ripple {
  position: relative;
  overflow: hidden;
}

.water-ripple::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  left: var(--x, 50%);
  top: var(--y, 50%);
  animation: waterRipple 0.8s ease-out forwards;
  pointer-events: none;
}

/* ── Page Load ── */
.page-load-animate .header {
  animation: slideDown 0.6s var(--transition-spring) forwards;
}

.page-load-animate .hero__content {
  animation: fadeInUp 0.8s var(--transition-spring) 0.2s forwards;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1 !important;
  }

  [data-animate].animated {
    animation: none !important;
  }

  .stagger-children > *,
  .stagger-fade > * {
    opacity: 1 !important;
  }

  .stagger-children.animated > *,
  .stagger-fade.animated > * {
    animation: none !important;
  }

  .hero__scroll,
  .float-animation,
  .pulse-animate,
  .glow-animate,
  .wiggle-animate,
  .leaf-sway,
  .tree-swing {
    animation: none !important;
  }
}
