/* Everyday AI: classic motion layer.
   Only active when <html class="anim"> is set. The head script sets it unless the visitor asked for
   reduced motion (add ?motion=on to the URL to preview it anyway). Without it the page is the static version. */

/* Thin scroll progress bar */
.scroll-progress { display: none; }
html.anim .scroll-progress { display: block; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--marker); transform-origin: 0 50%; transform: scaleX(0); z-index: 50; }

/* Header settles in */
html.anim .site-header { animation: eai-drop .7s cubic-bezier(.2,.7,.2,1) both; }

/* Hero: lines rise from a mask, one after the other */
html.anim .hero h1 .line { display: block; overflow: hidden; padding: .06em .25em .12em; margin: -.06em -.25em -.12em; }
html.anim .hero h1 .line > span { display: inline-block; transform: translateY(115%); animation: eai-rise .9s cubic-bezier(.2,.75,.15,1) forwards; }
html.anim .hero h1 .line:nth-child(1) > span { animation-delay: .15s; }
html.anim .hero h1 .line:nth-child(2) > span { animation-delay: .32s; }
html.anim .hero .kicker,
html.anim .hero .lead,
html.anim .hero .btn-row { opacity: 0; animation: eai-fade-up .8s cubic-bezier(.2,.7,.2,1) forwards; }
html.anim .hero .kicker { animation-delay: .05s; }
html.anim .hero .lead { animation-delay: .55s; }
html.anim .hero .btn-row { animation-delay: .7s; }

/* Portrait: soft scale-in, then the yellow shadow slides out */
html.anim .hero .portrait { opacity: 0; animation: eai-portrait 1.1s cubic-bezier(.2,.7,.2,1) .35s forwards; }
html.anim .hero .portrait-tag { opacity: 0; animation: eai-fade-in .6s ease 1.15s forwards; }

/* Marker highlight draws in from the left */
html.anim .hl { background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 0 / 0% 100%; transition: background-size .9s cubic-bezier(.65,0,.35,1); }
html.anim .band .hl { background-image: linear-gradient(var(--white), var(--white)); }
html.anim .hl.drawn { background-size: 100% 100%; }

/* Staggered entrances inside revealed sections */
html.anim .reveal .stagger { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; transition-delay: calc(var(--i, 0) * 90ms + 120ms), calc(var(--i, 0) * 90ms + 120ms), 0s; }
html.anim .reveal .series-item.stagger { transform: translateX(-28px); }
html.anim .reveal.in .stagger { opacity: 1; transform: none; }

/* Step rules draw across */
html.anim .steps .step { border-top-color: transparent; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 0% 3px; transition: background-size 1s cubic-bezier(.65,0,.35,1); transition-delay: calc(var(--i, 0) * 140ms + 150ms); }
html.anim .reveal.in .steps .step { background-size: 100% 3px; }

/* Ticks pop in */
html.anim .reveal .ticks li::before { transform: scale(0); transition: transform .45s cubic-bezier(.3,1.6,.5,1); transition-delay: calc(var(--i, 0) * 110ms + 300ms); }
html.anim .reveal.in .ticks li::before { transform: scale(1); }

/* Gentle hover lifts (after the entrance has finished) */
html.anim .reveal.in .card.stagger:not(.oat):hover,
html.anim .reveal.in .series-item.stagger:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); transition-delay: 0s; }
html.anim .social { transition: transform .2s ease, background-color .2s ease; }
html.anim .social:hover { transform: translateY(-2px); }

/* Goal bar fills with a soft sheen */
html.anim .goal-bar i { transition: width 1.8s cubic-bezier(.2,.7,.2,1); background: linear-gradient(90deg, var(--marker), #ffe27a, var(--marker)) 0 0 / 200% 100%; animation: eai-sheen 3s linear infinite; }

@keyframes eai-drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes eai-rise { to { transform: translateY(0); } }
@keyframes eai-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes eai-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes eai-portrait { 0% { opacity: 0; transform: scale(.94); box-shadow: 0 0 0 var(--marker); } 60% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 var(--marker); } 100% { opacity: 1; transform: scale(1); } }
@keyframes eai-sheen { to { background-position: -200% 0; } }
