/* =============================================
   FoundOnline.pro — Animations & Effects
   ============================================= */

/* --- Scroll-triggered animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-in.stagger > *:nth-child(1) { transition-delay: 0s; }
.animate-in.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.animate-in.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.animate-in.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.animate-in.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.animate-in.stagger > *:nth-child(6) { transition-delay: 0.5s; }

.animate-in.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Grain texture overlay --- */
.grain::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Hero fade-in on load --- */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

.hero .lead {
  animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s both;
}

.hero-ctas {
  animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-in.stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero h1,
  .hero .lead,
  .hero-ctas {
    animation: none;
  }

  .grain::after {
    display: none;
  }
}
