/* Base Reveal Classes with Mercury Fluid Easing */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Reveal for Grid Children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.34s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.46s; }

/* Hero Entrance Animations */
@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(32px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate-in {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-animate-in:nth-child(1) { animation-delay: 0.08s; }
.hero-animate-in:nth-child(2) { animation-delay: 0.16s; }
.hero-animate-in:nth-child(3) { animation-delay: 0.24s; }
.hero-animate-in:nth-child(4) { animation-delay: 0.32s; }

/* Subtle Ambient Float Effect */
@keyframes ambientFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.ambient-float {
  animation: ambientFloat 6s ease-in-out infinite;
}

/* Progressive Enhancement - Scroll-Driven Motion */
@supports (animation-timeline: view()) {
  .scroll-fade {
    animation: scrollFadeIn linear;
    animation-timeline: view();
    animation-range: entry 10% cover 35%;
  }
  
  @keyframes scrollFadeIn {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .hero-animate-in {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  
  .ambient-float,
  .status-dot,
  .scroll-fade {
    animation: none !important;
  }
}
