/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS — v2
   ============================================ */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50%      { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.7), 0 0 0 12px rgba(37, 211, 102, 0); }
}

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

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

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

@keyframes glow-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes blink-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes slideInBlur {
  from { opacity: 0; filter: blur(10px); transform: translateY(20px); }
  to   { opacity: 1; filter: blur(0); transform: translateY(0); }
}

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

/* REVEAL ON SCROLL --------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.4, 0, .2, 1), transform 0.7s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.reveal-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
.reveal-blur.visible { opacity: 1; filter: blur(0); transform: translateY(0); }

/* STAGGER DELAYS ----------------------------------- */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* AUTO-STAGGER for direct children ----------------- */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.15s; }
.stagger > *:nth-child(3) { transition-delay: 0.25s; }
.stagger > *:nth-child(4) { transition-delay: 0.35s; }
.stagger > *:nth-child(5) { transition-delay: 0.45s; }
.stagger > *:nth-child(6) { transition-delay: 0.55s; }
.stagger > *:nth-child(7) { transition-delay: 0.65s; }
.stagger > *:nth-child(8) { transition-delay: 0.75s; }

/* ON-LOAD HERO ANIMATION --------------------------- */
.hero-content > * {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
.hero-content > *:nth-child(6) { animation-delay: 0.6s; }

.hero-image {
  opacity: 0;
  animation: scaleIn 1s 0.4s ease forwards;
}

.counter { display: inline-block; }

/* SKELETON / IMAGE FALLBACK ------------------------ */
.img-fallback {
  background: linear-gradient(90deg,
    var(--c-gray-50) 0%,
    var(--c-navy-50) 50%,
    var(--c-gray-50) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* HOVER LIFT --------------------------------------- */
.hover-lift { transition: transform var(--t-base), box-shadow var(--t-base); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* PARALLAX (used by JS) ---------------------------- */
.parallax { will-change: transform; transition: transform 0.1s linear; }

/* TILT 3D (used by JS) ----------------------------- */
.tilt {
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.2s ease;
}

/* FLOATING ELEMENTS -------------------------------- */
.float { animation: float 3.5s ease-in-out infinite; }
.float-delayed { animation: float 3.5s 1.5s ease-in-out infinite; }
.float-rotate { animation: float-rotate 4s ease-in-out infinite; }

/* GRADIENT TEXT ------------------------------------ */
.gradient-text {
  background: linear-gradient(135deg, var(--c-navy-900), var(--c-amber), var(--c-teal-dark));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 6s ease infinite;
}

/* WHATSAPP FLOAT pulse refinement ------------------ */
.whatsapp-float { animation: pulse 2.4s infinite; }

/* SCROLL-INDICATOR (top progress) */
.progress-bar { transition: width 80ms linear; }

/* CURSOR FOLLOWER (used by JS) --------------------- */
.cursor-glow {
  pointer-events: none;
  position: fixed; top: 0; left: 0;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 134, 10, 0.10), transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
  mix-blend-mode: multiply;
}
.cursor-glow.active { opacity: 1; }

/* 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, .reveal-blur {
    opacity: 1; transform: none; filter: none;
  }
  .cursor-glow { display: none; }
}
