/* ============================================================
   VoxPic -- animations.css
   Keyframes and scroll-reveal utility classes
   ============================================================ */

/* == Scroll-Reveal Utility ================================= */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.55s var(--ease),
    transform 0.55s var(--ease);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for sibling elements */
.scroll-reveal:nth-child(2) { transition-delay:  80ms; }
.scroll-reveal:nth-child(3) { transition-delay: 160ms; }
.scroll-reveal:nth-child(4) { transition-delay: 240ms; }
.scroll-reveal:nth-child(5) { transition-delay: 320ms; }
.scroll-reveal:nth-child(6) { transition-delay: 400ms; }

/* Trust pills: slide-in from left */
.trust-pill {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity   0.40s var(--ease),
    transform 0.40s var(--ease);
}

.trust-pill.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger for trust pills */
.trust-pill:nth-child(1) { transition-delay:   0ms; }
.trust-pill:nth-child(2) { transition-delay:  80ms; }
.trust-pill:nth-child(3) { transition-delay: 160ms; }
.trust-pill:nth-child(4) { transition-delay: 240ms; }
.trust-pill:nth-child(5) { transition-delay: 320ms; }

/* == @keyframes ============================================ */

/* Hero tagline cross-fade morph */
@keyframes morphText {
  0%   { opacity: 1; transform: translateY(0);    }
  18%  { opacity: 0; transform: translateY(-12px); }
  22%  { opacity: 0; transform: translateY(12px);  }
  40%  { opacity: 1; transform: translateY(0);    }
  100% { opacity: 1; transform: translateY(0);    }
}

/* Float a pictogram card gently up and down */
@keyframes floatCard {
  0%,  100% { transform: translateY(0);   }
  50%        { transform: translateY(-8px); }
}

/* Pictogram assembles into the phrase bar */
@keyframes phraseAssemble {
  0%   { opacity: 0; transform: scale(.70) translateY(20px); }
  100% { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* Generic fade-up on entry */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* Pulse glow (trust pills, CTA button) */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(255, 159, 67, .0);  }
  50%       { box-shadow: 0 0 0 8px rgba(255, 159, 67, .22); }
}

/* Phone: looping pictogram card tap animation inside mockup */
@keyframes phoneTap {
  0%   { transform: scale(1)   translateY(0);    opacity: 1; }
  40%  { transform: scale(.88) translateY(4px);  opacity: 1; }
  60%  { transform: scale(.70) translateY(40px); opacity: 0; }
  100% { transform: scale(.70) translateY(40px); opacity: 0; }
}

/* Continuous rotation (loading states) */
@keyframes spin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

/* Slide-in from below for hero CTA row */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* == Animation Utility Classes ============================= */
.animate-fadeup {
  animation: fadeUp var(--dur-slow) var(--ease) both;
}

.animate-float {
  animation: floatCard 3s var(--ease) infinite;
}

.animate-pulse-border {
  animation: pulse 2.2s ease infinite;
}

.animate-spin {
  animation: spin .8s linear infinite;
}

/* Hero section entry animations */
.hero-animate-1 { animation: fadeUp .55s var(--ease) .10s both; }
.hero-animate-2 { animation: fadeUp .55s var(--ease) .22s both; }
.hero-animate-3 { animation: fadeUp .55s var(--ease) .34s both; }
.hero-animate-4 { animation: fadeUp .55s var(--ease) .46s both; }

/* Phrase-bar word entry */
.phrase-word {
  animation: phraseAssemble 0.28s var(--ease) both;
}

/* == Respect Reduced Motion ================================ */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .trust-pill,
  .animate-fadeup,
  .animate-float,
  .animate-pulse-border,
  .hero-animate-1,
  .hero-animate-2,
  .hero-animate-3,
  .hero-animate-4 {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .phone-mockup {
    transform: none;
    transition: none;
  }
}
