/* ============================================================
   animations.css — Keyframes y clases de animación reutilizables.
   ============================================================ */

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

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

@keyframes pulseRing {
  0%   { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%  { transform: scale(1);    opacity: 0;   box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); opacity: 0;   box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

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

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

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

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

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(59, 130, 246, 0.25); }
  50%      { box-shadow: 0 0 24px rgba(16, 185, 129, 0.4); }
}

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Clases utilitarias de animación ── */
.animate-fade-in       { animation: fadeIn       600ms ease both; }
.animate-fade-in-up    { animation: fadeInUp     700ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-fade-in-down  { animation: fadeInDown   700ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-fade-in-left  { animation: fadeInLeft   700ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-fade-in-right { animation: fadeInRight  700ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-scale-in      { animation: scaleIn      500ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-float         { animation: float        4s ease-in-out infinite; }
.animate-pulse         { animation: pulse        2.5s ease-in-out infinite; }
.animate-spin          { animation: spin         1s linear infinite; }
.animate-glow          { animation: glowPulse    3s ease-in-out infinite; }

/* Stagger delays — para animaciones secuenciales */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* Reveal on scroll — clase base, JS añade .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }

.reveal-left.is-visible,
.reveal-right.is-visible {
  transform: translateX(0);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-card-solid) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}
