/* ============================================================
   Site-17 — Animation CSS
   ============================================================ */

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

/* --- Stagger children --- */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.visible > *:nth-child(2) { transition-delay: .1s; }
.stagger.visible > *:nth-child(3) { transition-delay: .15s; }
.stagger.visible > *:nth-child(4) { transition-delay: .2s; }
.stagger.visible > *:nth-child(5) { transition-delay: .25s; }
.stagger.visible > *:nth-child(6) { transition-delay: .3s; }
.stagger.visible > *:nth-child(7) { transition-delay: .35s; }
.stagger.visible > *:nth-child(8) { transition-delay: .4s; }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Counter animation --- */
.counter {
  display: inline-block;
  transition: opacity .3s;
}

/* --- Pulse dot --- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.pulse-dot {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Shimmer (compliance) --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--elevated) 25%, var(--surface) 50%, var(--elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* --- Table row slide-in --- */
.tier-table tbody tr {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .4s ease, transform .4s ease;
}
.tier-table tbody tr.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Nav underline --- */
.nav-links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-links a {
  position: relative;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* --- Hero gradient subtle shift --- */
@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero {
  background-size: 200% 200%;
  animation: heroShift 12s ease-in-out infinite;
}

/* --- Metric count-up flash --- */
@keyframes countFlash {
  0% { color: var(--accent); }
  100% { color: #fff; }
}
.metric-value.counted {
  animation: countFlash .6s ease;
}
