/* Chopskip motion kit (v1). Brings the Our Story page's motion language to every page.
   Everything is gated by html.mo, which is only set when the visitor has NOT asked for reduced motion.
   Without JS or with reduced motion the site simply looks as it did before. */
:root{--mo-ease:cubic-bezier(.16,1,.3,1)}

/* 1. Headlines: words rise out of a mask, one after another */
html.mo :is(h1,h2).display:not(.mo-ready),html.mo.mo-all :is(h1,h2):not(.mo-ready){opacity:0;animation:moShow .01s 2.4s forwards}
@keyframes moShow{to{opacity:1}}
.mo-w{display:inline-block;overflow:hidden;vertical-align:top;padding:.08em .06em .18em;margin:-.08em -.06em -.18em}
.mo-wi{display:inline-block;transform:translateY(115%);transition:transform 1s var(--mo-ease) calc(var(--i,0) * 60ms);will-change:transform}
/* headings with text-shadow / extrude: a mask would clip the shadow, so rise and fade instead */
.mo-fade .mo-w{overflow:visible;padding:0;margin:0}
.mo-fade .mo-wi{transform:translateY(.5em);opacity:0;transition:transform 1s var(--mo-ease) calc(var(--i,0) * 60ms),opacity .7s ease calc(var(--i,0) * 60ms)}
.mo-unit{display:inline-block;transform:translateY(.5em);opacity:0;transition:transform 1s var(--mo-ease) calc(var(--i,0) * 60ms),opacity .7s ease calc(var(--i,0) * 60ms)}
.mo-in .mo-wi,.mo-in .mo-unit{transform:none;opacity:1}

/* 2. Footer opens like the story page's iris sections */
html.mo footer.mo-iris{clip-path:inset(0 calc((1 - var(--mo-p,1)) * 4%) 0 calc((1 - var(--mo-p,1)) * 4%) round calc((1 - var(--mo-p,1)) * 48px) calc((1 - var(--mo-p,1)) * 48px) 0 0)}

/* 3. Lazy images ease in instead of popping */
html.mo img.mo-img{opacity:0;transition:opacity .7s ease}
html.mo img.mo-img.mo-img-in{opacity:1}

/* 4. Buttons feel pressed */
html.mo .btn:active{scale:.97}

@media (prefers-reduced-motion:reduce){
  .mo-wi,.mo-unit{transform:none!important;opacity:1!important;transition:none!important}
  html.mo footer.mo-iris{clip-path:none}
}
