/* ============================================
   BlueTail Medical · animations.css
   Keyframes + scroll reveal + hover effects + counter
   ============================================ */

/* === Keyframes === */
@keyframes bt-pulse {
  0% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0.55);
  }
  70% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.3),
      0 0 0 18px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0);
  }
}

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

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

@keyframes bt-glow {
  from {
    box-shadow: 0 0 0 rgba(43, 184, 166, 0);
  }
  to {
    box-shadow: 0 0 32px rgba(43, 184, 166, 0.35);
  }
}

/* === Scroll reveal === */
.bt-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms var(--bt-ease-out-quart),
    transform 600ms var(--bt-ease-out-quart);
  will-change: opacity, transform;
}

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

/* Stagger por orden de hermano */
.bt-reveal-stagger > .bt-reveal:nth-child(1) { transition-delay: 0ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(2) { transition-delay: 80ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(3) { transition-delay: 160ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(4) { transition-delay: 240ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(5) { transition-delay: 320ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(6) { transition-delay: 400ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(7) { transition-delay: 480ms; }
.bt-reveal-stagger > .bt-reveal:nth-child(8) { transition-delay: 560ms; }

/* === Hover utilities === */
.bt-hover-lift {
  transition: transform 250ms var(--bt-ease-out-quart);
}

.bt-hover-lift:hover {
  transform: translateY(-4px);
}

.bt-hover-glow {
  transition: box-shadow 250ms var(--bt-ease-out-quart);
}

.bt-hover-glow:hover {
  box-shadow: 0 0 32px rgba(43, 184, 166, 0.25);
}

/* === Counter === */
.bt-counter {
  display: inline-block;
  font-family: var(--bt-font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--bt-teal-500);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Variante palabra-fuerza (diferenciador no numérico) */
.bt-counter-word {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -0.01em;
}

/* === Respeto a prefers-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;
  }

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

  .bt-whatsapp-float {
    animation: none;
  }
}
