/* Shared 3D / scroll animation utilities */
.ft3d-reveal, .ft3d-float, .ft3d-tilt,
.ft-scroll-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--ft-scroll-delay, 0s);
  will-change: opacity, transform;
}
.ft3d-float { transform: translateY(24px) scale(.98); }
.ft-scroll-reveal.ft-scroll-fade {
  transform: none;
}
.ft-scroll-reveal.ft-scroll-scale {
  transform: scale(.96);
}
.ft3d-visible,
.ft-scroll-visible {
  opacity: 1 !important;
  transform: none !important;
}
.ft3d-tilt.ft3d-visible { transform: perspective(900px) translateZ(0); }
.ft3d-float.ft3d-visible { animation: ft3dFloat 6s ease-in-out infinite; }

/* Staggered children — cards/lists animate one-by-one on scroll */
.ft-scroll-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.22,1,.36,1);
}
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(1) { transition-delay: .06s; }
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(2) { transition-delay: .14s; }
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(3) { transition-delay: .22s; }
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(4) { transition-delay: .30s; }
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(5) { transition-delay: .38s; }
.ft-scroll-stagger.ft-scroll-visible > *:nth-child(6) { transition-delay: .46s; }
.ft-scroll-stagger.ft-scroll-visible > * {
  opacity: 1 !important;
  transform: none !important;
}

/* Hero text — quick entrance on load */
.ft-scroll-hero-text > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1);
}
.ft-scroll-hero-text.ft-scroll-visible > *:nth-child(1) { transition-delay: .12s; }
.ft-scroll-hero-text.ft-scroll-visible > *:nth-child(2) { transition-delay: .22s; }
.ft-scroll-hero-text.ft-scroll-visible > *:nth-child(3) { transition-delay: .32s; }
.ft-scroll-hero-text.ft-scroll-visible > *:nth-child(4) { transition-delay: .42s; }
.ft-scroll-hero-text.ft-scroll-visible > * {
  opacity: 1 !important;
  transform: none !important;
}

@keyframes ft3dFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes ft3dGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(56,189,248,.25); }
  50% { box-shadow: 0 0 40px rgba(168,85,247,.35); }
}
@keyframes ft3dShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .ft3d-reveal, .ft3d-float, .ft3d-tilt, .ft-scroll-reveal, .ft-scroll-stagger > *, .ft-scroll-hero-text > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  html.ft3d-enabled { scroll-behavior: auto; scroll-snap-type: none; }
}

/* Section-by-section smooth scroll down (homepage + inner pages) */
@media (prefers-reduced-motion: no-preference) {
  html.ft3d-enabled { scroll-snap-type: y proximity; }
  .ft-main > section,
  .ft-main > div.ft-hero-welcome-below,
  .ft-main > .ft-inner-page,
  .ft-pro-footer {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }
}
