/* Motion. Transform and opacity only, plus the bar width. Everything is switched off by prefers-reduced-motion at the end. */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Hero entrance: each child rises in one after another */
.hero-in > * { animation: rise .7s ease-out both; }
.hero-in > *:nth-child(1) { animation-delay: .05s; }
.hero-in > *:nth-child(2) { animation-delay: .15s; }
.hero-in > *:nth-child(3) { animation-delay: .25s; }
.hero-in > *:nth-child(4) { animation-delay: .35s; }
.hero-in > *:nth-child(5) { animation-delay: .45s; }

.hero__shape--a { animation: drift 14s ease-in-out infinite; }
.hero__shape--b { animation: drift 18s ease-in-out infinite reverse; }
.hero__shape--c { animation: drift 11s ease-in-out infinite; }
.phone--float { animation: float 6s ease-in-out infinite; }

/* Bars grow into view; ui.js sets --v when the bar becomes visible or the result changes */
.bar__fill { transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.pop { animation: pop .45s ease-out; }

/* Switching between views */
[data-view]:not([hidden]) { animation: view-in .35s ease-out; }

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