/* ============================================================
   YOURH — Animations & Motion
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */

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

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

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

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

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

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

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes gradientShift {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

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

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  60%  { opacity: 1; transform: scale(1.1) rotate(2deg); }
  80%  { transform: scale(0.95) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

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

@keyframes flowDash {
  0%   { stroke-dashoffset: 26; opacity: 0.35; }
  50%  { opacity: 1; }
  100% { stroke-dashoffset: -26; opacity: 0.35; }
}

@keyframes borderGlow {
  0%, 100% { filter: drop-shadow(0 4px 8px rgba(0,200,83,0.06)); }
  50%       { filter: drop-shadow(0 8px 24px rgba(0,200,83,0.22)); }
}

@keyframes vsEntrance {
  0%   { opacity: 0; transform: scale(0) rotate(-180deg); }
  65%  { transform: scale(1.18) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

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

@keyframes connectorPop {
  0%   { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(1); }
}

/* ── Estado inicial para animações por scroll ────────────────── */

.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.animate-on-scroll.from-left {
  transform: translateX(-20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.from-right {
  transform: translateX(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Delays escalonados ──────────────────────────────────────── */

.delay-100 { transition-delay: 0.10s !important; }
.delay-150 { transition-delay: 0.15s !important; }
.delay-200 { transition-delay: 0.20s !important; }
.delay-250 { transition-delay: 0.25s !important; }
.delay-300 { transition-delay: 0.30s !important; }
.delay-400 { transition-delay: 0.40s !important; }
.delay-500 { transition-delay: 0.50s !important; }
.delay-600 { transition-delay: 0.60s !important; }

/* ── Classes utilitárias ─────────────────────────────────────── */

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.6s ease forwards;
}

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

.shake {
  animation: shake 0.5s ease;
}

.float {
  animation: floatUp 3s ease-in-out infinite;
}

/* ── Loading spinner ─────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Countdown blink ─────────────────────────────────────────── */

.countdown-urgent {
  animation: blink 1s ease-in-out infinite;
}

/* ── Prefer reduced motion ───────────────────────────────────── */

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
