/* ============================================
   css/animations.css — Keyframes & Transitions
   ============================================ */

/* ─── Reveal on scroll ─── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

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

/* ─── Keyframes ─── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@keyframes wave-bar {
  from { transform: scaleY(0.4); }
  to   { transform: scaleY(1); }
}

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

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

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

/* ─── Loading shimmer ─── */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--gray-100) 25%,
    var(--gray-50) 50%,
    var(--gray-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ─── Floating hero elements ─── */
.app-mockup {
  animation: float-y 6s ease-in-out infinite;
}

/* ─── Nav scroll effect ─── */
.nav-header {
  transition: box-shadow 0.3s var(--ease-out),
              background 0.3s var(--ease-out);
}

/* ─── Hover lift ─── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── Stats counter ─── */
.stat-number {
  transition: all 0.05s linear;
}

/* ─── Wave bars in call preview ─── */
.cp-wave span:nth-child(1) { animation-delay: 0.0s; }
.cp-wave span:nth-child(2) { animation-delay: 0.15s; }
.cp-wave span:nth-child(3) { animation-delay: 0.30s; }
.cp-wave span:nth-child(4) { animation-delay: 0.45s; }

/* ─── Page load entrance for hero ─── */
@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: hero-fade-in 0.8s var(--ease-out) both;
  animation-delay: 0.1s;
}

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

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