/* ============================================================
   Site-16: Animation & Transitions
   ============================================================ */

/* --- Fade-in on scroll --- */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stagger children --- */
.anim-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.anim-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.anim-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.anim-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.anim-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.anim-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.anim-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
.anim-stagger.is-visible > *:nth-child(7) { transition-delay: 0.48s; }
.anim-stagger.is-visible > *:nth-child(8) { transition-delay: 0.56s; }
.anim-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Carousel transition --- */
.carousel-track {
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- Phone float effect --- */
.phone-frame {
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Button press --- */
.btn-primary,
.btn-platform,
.btn-secondary,
.download-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

/* --- FAQ accordion --- */
.faq-a {
  transition: max-height 0.35s ease;
}

/* --- Nav toggle animation --- */
.mastnav-toggle span {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- Metric count-up (visual only, actual count in JS) --- */
.metric__value {
  transition: opacity 0.3s ease;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .phone-frame { animation: none; }
  .anim-fade { opacity: 1; transform: none; }
  .anim-stagger > * { opacity: 1; transform: none; }
}
