/* =====================================================================
   SUNTAIL SOLAR — MOTION
   Entrance, scroll-reveal, filter and marquee animations.
   Everything is disabled for users who prefer reduced motion.
   ===================================================================== */

/* Hero entrance */
@keyframes st-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes st-fade { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes st-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-marquee { to { transform: translateX(-50%); } }
@keyframes st-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.anim-rise { animation: st-rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
.anim-fade { animation: st-fade .9s var(--ease) both; animation-delay: var(--d, 0ms); }
.hero-chip { animation: st-float 6s ease-in-out infinite; }
.chip-b { animation-delay: -3s; }
.hero-arc { animation: st-spin 140s linear infinite; }

/* Scroll reveal — only hidden when JS is running */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Project filter */
.project-card.is-filtered-in { animation: st-pop .45s var(--ease) both; }

/* Spinner */
.spinner { animation: st-spin .8s linear infinite; }

/* Partner marquee (track holds two identical sets → translate -50%) */
.marquee.is-animated .marquee-track { animation: st-marquee 32s linear infinite; }
.marquee.is-animated:hover .marquee-track,
.marquee.is-animated:focus-within .marquee-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-chip, .hero-arc { animation: none; }
  .marquee .marquee-track { animation: none !important; }
}
