/* ==========================================================================
   VitaCore — Animations CSS
   ========================================================================== */

/* ---- Scroll Reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade-up"]   { transform: translateY(32px); }
[data-reveal="fade-down"] { transform: translateY(-32px); }
[data-reveal="fade-left"] { transform: translateX(32px); }
[data-reveal="fade-right"]{ transform: translateX(-32px); }
[data-reveal="scale"]     { transform: scale(0.92); }
[data-reveal="fade"]      { transform: none; }
[data-reveal].is-visible  { transform: none; }

/* ---- Stagger children ---- */
[data-stagger] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
[data-stagger].is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
[data-stagger].is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: .08s; }
[data-stagger].is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: .16s; }
[data-stagger].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: .24s; }
[data-stagger].is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: .32s; }
[data-stagger].is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: .40s; }
[data-stagger].is-visible > *:nth-child(n+7) { opacity: 1; transform: none; transition-delay: .48s; }

/* ---- Count Up ---- */
.vc-stats__num { transition: opacity .3s ease; }

/* ---- Shimmer Loading ---- */
.vc-skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2eaf0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---- Hero Entrance ---- */
@keyframes hero-content-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vc-hero__badge   { animation: hero-content-in .7s ease both; animation-delay: .1s; }
.vc-hero__title   { animation: hero-content-in .7s ease both; animation-delay: .2s; }
.vc-hero__desc    { animation: hero-content-in .7s ease both; animation-delay: .3s; }
.vc-hero__actions { animation: hero-content-in .7s ease both; animation-delay: .4s; }
.vc-hero__stats   { animation: hero-content-in .7s ease both; animation-delay: .5s; }
.vc-hero__visual  { animation: hero-content-in .8s ease both; animation-delay: .3s; }

/* ---- Respect prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, [data-reveal], [data-stagger] > * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
