/* =====================================================================
   Celestial Air Hvac — animations.css
   Scroll reveal, keyframes, micro-interactions
   ===================================================================== */

/* Page fade-in on load */
body { opacity: 0; transition: opacity .4s ease; }
body.page-ready { opacity: 1; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view { opacity: 1; transform: none; }

/* Reveal variants — keep motion subtle on mobile to avoid horizontal overflow */
.reveal.from-left { transform: translateY(20px); }
.reveal.from-right { transform: translateY(20px); }
.reveal.zoom-in { transform: scale(.97); }
.reveal.from-left.in-view,
.reveal.from-right.in-view,
.reveal.zoom-in.in-view { transform: none; }

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-stagger.in-view > * { opacity: 1; transform: none; }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: .00s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: .48s; }
.reveal-stagger.in-view > *:nth-child(8) { transition-delay: .56s; }

/* Keyframes */
@keyframes kenburns {
  from { transform: scale(1.0); }
  to   { transform: scale(1.09); }
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeUp { from { opacity:0; transform: translateY(16px);} to { opacity:1; transform:none; } }

/* Navbar slides/fades in when it turns solid on scroll */
@keyframes navDrop {
  from { transform: translateY(-100%); opacity: .15; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Pulse on call buttons */
@keyframes softPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,93,4,.45); }
  50% { box-shadow: 0 0 0 10px rgba(232,93,4,0); }
}
.pulse-call { animation: softPulse 2.4s infinite; }

/* Animated gradient accent underline on section titles */
.title-underline { position: relative; display: inline-block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  body { opacity: 1 !important; }
  .hero-slide.active .slide-bg { animation: none !important; }
}
