/* Extra life on top of motion.css. Everything here is decoration: the site works the same without it. */
@media (prefers-reduced-motion:no-preference){
 /* 2. A slow shine across the highlighted words of the welcome title */
 .hero h1 em{background:linear-gradient(100deg,var(--lively-em,currentColor) 0 38%,color-mix(in srgb,var(--lively-em,currentColor) 45%,#fff) 50%,var(--lively-em,currentColor) 62% 100%);background-size:260% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:lively-shine 7s ease-in-out infinite}

 /* 3. The "next topic" card floats, and the main button breathes */
 .hero-next{animation:lively-float 7s ease-in-out infinite}
 .hero .button.primary{animation:lively-breathe 3.2s ease-in-out infinite}
 .hero .button.primary svg{animation:lively-spark 3.2s ease-in-out infinite}

 /* 4. Little icons bob, each a beat after the last */
 .metric-top svg{animation:lively-bob 4.5s ease-in-out infinite}
 .metric:nth-child(2) .metric-top svg{animation-delay:-1.1s}
 .metric:nth-child(3) .metric-top svg{animation-delay:-2.2s}
 .metric:nth-child(4) .metric-top svg{animation-delay:-3.3s}

 /* 5. The "new" dot sends out a ring */
 .new-dot{animation:lively-ping 2.4s ease-out infinite}

 /* 6. Menu icons wiggle when you point at them, the logo tilts */
 .main-nav>button:hover svg,.mobile-nav>button:active svg{animation:lively-wiggle .55s ease}
 .brand:hover .brand-mark{transform:rotate(-8deg) scale(1.08)}
 .topbar .icon-button:hover svg{animation:lively-wiggle .55s ease}
 .text-button:hover svg{transform:translateX(4px)}

 /* 7. Buttons and cards press in when clicked */
 .button:not(:disabled):active,.filter-chip:active,.icon-button:not(:disabled):active{transform:scale(.96)}
 .resource-card:active,.subject-card:active,.mode-card:active{transform:scale(.985)}

 /* 8. Numbers that just counted up get a small pop (lively.js adds the class) */
 .lively-pop{animation:lively-pop .5s cubic-bezier(.22,1,.36,1)}

 .motion-paused .hero h1 em,.motion-paused .hero-next,.motion-paused .hero .button.primary,.motion-paused .hero .button.primary svg,.motion-paused .metric-top svg,.motion-paused .new-dot{animation-play-state:paused}
}
@keyframes lively-shine{0%,55%{background-position:100% 0}100%{background-position:0 0}}
@keyframes lively-float{0%,100%{translate:0 0}50%{translate:0 -7px}}
@keyframes lively-breathe{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--green) 45%,transparent)}55%{box-shadow:0 0 0 10px transparent}}
@keyframes lively-spark{0%,100%{rotate:0deg;scale:1}50%{rotate:-10deg;scale:1.15}}
@keyframes lively-bob{0%,100%{translate:0 0}50%{translate:0 -3px}}
@keyframes lively-ping{0%{box-shadow:0 0 0 0 color-mix(in srgb,currentColor 55%,transparent)}70%,100%{box-shadow:0 0 0 8px transparent}}
@keyframes lively-wiggle{0%,100%{rotate:0deg}30%{rotate:-12deg}65%{rotate:9deg}}
@keyframes lively-pop{0%{scale:1}45%{scale:1.12}100%{scale:1}}
