/* ============================================================
   3D TACT | Animations
   ============================================================ */

/* Page load */
body { opacity: 0; transition: opacity 0.3s ease; }
body.page-loaded { opacity: 1; }

/* Base scroll animation */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}
.animate-on-scroll.visible { opacity: 1 !important; transform: none !important; }

/* Variants */
.fade-up    { transform: translateY(24px); }
.fade-down  { transform: translateY(-24px); }
.fade-left  { transform: translateX(24px); }
.fade-right { transform: translateX(-24px); }
.scale-in   { transform: scale(0.95); }

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > * { opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.04s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.09s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.14s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.29s; }

/* Counter */
.counter { display: inline-block; }

/* Floating */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.floating { animation: float 4s ease-in-out infinite; }

/* Reduced motion overrides */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  body { opacity: 1; transition: none; }
  .floating { animation: none; }
}
