/* =========================================
   铭赞网络 · 西安微信小程序开发
   animations.css — 关键帧与动效
   ========================================= */

/* ====== Keyframes ====== */
@keyframes grid-drift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

@keyframes scroll-pulse {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(50px); opacity: 0; }
}

@keyframes faq-reveal {
  0%   { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scale-in {
  0%   { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

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

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

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(212, 162, 76, 0.4); }
  100% { box-shadow: 0 0 0 12px rgba(212, 162, 76, 0); }
}

/* ====== Reveal 滚动渐入 ====== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger 顺序 */
.reveal:nth-child(1).is-visible { transition-delay: 0ms; }
.reveal:nth-child(2).is-visible { transition-delay: 60ms; }
.reveal:nth-child(3).is-visible { transition-delay: 120ms; }
.reveal:nth-child(4).is-visible { transition-delay: 180ms; }
.reveal:nth-child(5).is-visible { transition-delay: 240ms; }
.reveal:nth-child(6).is-visible { transition-delay: 300ms; }
.reveal:nth-child(7).is-visible { transition-delay: 360ms; }
.reveal:nth-child(8).is-visible { transition-delay: 420ms; }
.reveal:nth-child(9).is-visible { transition-delay: 480ms; }
.reveal:nth-child(10).is-visible { transition-delay: 540ms; }
.reveal:nth-child(11).is-visible { transition-delay: 600ms; }
.reveal:nth-child(12).is-visible { transition-delay: 660ms; }

/* ====== 首次进入时立即显现的内容（避免首屏延迟） ====== */
.hero .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.hero .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero .hero-eyebrow.is-visible { transition-delay: 100ms; }
.hero .hero-title.is-visible { transition-delay: 220ms; }
.hero .hero-desc.is-visible { transition-delay: 360ms; }
.hero .hero-cta.is-visible { transition-delay: 480ms; }
.hero .hero-trust.is-visible { transition-delay: 600ms; }

/* ====== 计数动画中数字微动 ====== */
.counter.is-counting {
  animation: fade-in 0.4s var(--ease);
}

/* ====== 减少动效偏好 ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-grid-bg { animation: none; }
}
