/* =====================================================================
   CommunityOS — animations.css
   Subtle, deliberate motion. Honours prefers-reduced-motion.
   ===================================================================== */

/* Scroll-reveal: hidden ONLY when JS is active (progressive enhancement).
   No JS / observer failure => content shows normally. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal][data-reveal="2"] { transition-delay: .08s; }
.js [data-reveal][data-reveal="3"] { transition-delay: .16s; }
.js [data-reveal][data-reveal="4"] { transition-delay: .24s; }

/* Hero load sequence */
.hero h1, .hero__eyebrow, .hero__lede, .hsearch, .hpanel {
  animation: rise .8s var(--ease) both;
}
.hero__eyebrow { animation-delay: .05s; }
.hero h1        { animation-delay: .12s; }
.hero__lede     { animation-delay: .22s; }
.hsearch        { animation-delay: .32s; }
.hpanel         { animation-delay: .26s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Countdown digit tick */
.countdown__n { transition: transform .3s var(--ease); }
.countdown__n.tick { animation: tick .4s var(--ease); }
@keyframes tick {
  0% { transform: translateY(-6px); opacity: .4; }
  100% { transform: none; opacity: 1; }
}

/* Like heart pop */
.post__act.pop svg { animation: pop .35s var(--ease); }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* Weather icon gentle float */
.hpanel__wxico { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
