/* Motion. Everything here is disabled under prefers-reduced-motion (see the end of this file). */

/* Scroll reveal: ui.js adds .in when the element enters the viewport */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.left { transform: translateX(-32px); }
.reveal.right { transform: translateX(32px); }
.reveal.zoom { transform: scale(.94); }
.reveal.left.in, .reveal.right.in, .reveal.zoom.in { transform: none; }

/* Hero entrance */
.hero-in > * { opacity: 0; transform: translateY(24px); animation: rise .9s var(--ease) forwards; }
.hero-in > *:nth-child(1) { animation-delay: .05s; }
.hero-in > *:nth-child(2) { animation-delay: .18s; }
.hero-in > *:nth-child(3) { animation-delay: .3s; }
.hero-in > *:nth-child(4) { animation-delay: .42s; }
.hero-in > *:nth-child(5) { animation-delay: .54s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Floating shapes and phone */
.hero .blob.a { animation: drift 14s ease-in-out infinite alternate; }
.hero .blob.b { animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.12); } }
.phone { animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
.chip-float.one { animation: bob 5s ease-in-out infinite .4s; }
.chip-float.two { animation: bob 7s ease-in-out infinite 1s; }
.pill i { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(59, 213, 142, 0); } }

/* Winner card pop when the demo result changes */
.winner.pop { animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* View switch (SPA) */
.view.active { animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

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