/* Illustrative animation, the part CSS expresses well. Every rule that hides
   or moves anything is scoped under html.is-motion, which only the runtime
   sets once it has initialised: with the script blocked, failed, or off, and
   under reduced motion, the page is complete and still. */

/* reveal: a section arrives */
html.is-motion:not(.is-motion-reduced):not(.is-motion-paused) [data-motion="reveal"]:not(.is-in){opacity:0;transform:translateY(22px)}
html.is-motion [data-motion="reveal"]{transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}

/* ink-path: a line draws itself and an illustration follows it */
[data-motion="ink-path"] svg{display:block;width:min(1200px,100%);height:auto;margin:0 auto;overflow:visible}
[data-motion="ink-path"] [data-motion-line]{fill:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
html.is-motion [data-motion="ink-path"]:not(.is-done) [data-motion-line]{stroke-dashoffset:var(--motion-length,0)}
[data-motion="ink-path"] [data-motion-at]{transform-box:fill-box;transform-origin:center;transition:transform .35s cubic-bezier(.34,1.56,.64,1)}
html.is-motion [data-motion="ink-path"] [data-motion-at]:not(.is-on){transform:scale(0)}
[data-motion="ink-path"] [data-motion-art]{transition:opacity .5s}
html.is-motion [data-motion="ink-path"]:not(.is-armed) [data-motion-art]{opacity:0}
html:not(.is-motion) [data-motion="ink-path"] [data-motion-art]{opacity:0}

/* ink-words: an illustration inks a row of words, then parks beside the last */
[data-motion="ink-words"]{position:relative}
[data-motion="ink-words"] [data-motion-word]{position:relative;display:inline-block;white-space:nowrap}
[data-motion="ink-words"] [data-motion-ink]{position:absolute;inset:0}
/* The fill is hidden, not the colour. `color: transparent` here also made
   `currentColor` transparent on the same element, so the stroke was drawn in
   nothing and an un-inked phrase was invisible rather than waiting as an
   outline. -webkit-text-fill-color hides only the fill, so the phrase keeps
   its own colour to be stroked with. */
html.is-motion [data-motion="ink-words"] [data-motion-stencil]{-webkit-text-fill-color:transparent;-webkit-text-stroke:1.5px currentColor}
html.is-motion [data-motion="ink-words"] [data-motion-word].is-done [data-motion-stencil]{opacity:0;transition:opacity .4s}
html:not(.is-motion) [data-motion="ink-words"] [data-motion-ink]{opacity:0}
[data-motion="ink-words"] [data-motion-art]{position:absolute;left:0;top:0;pointer-events:none;will-change:transform;transition:opacity .3s}
html:not(.is-motion) [data-motion="ink-words"] [data-motion-art]{opacity:0}
html.is-motion [data-motion="ink-words"]:not(.is-armed) [data-motion-art]{opacity:0}
html.is-motion [data-motion="ink-words"].is-finished [data-motion-art]{transition:opacity .3s,transform .9s cubic-bezier(.34,1.3,.64,1)}
html.is-motion [data-motion="ink-words"].is-inking [data-motion-art] img{animation:motion-buzz .11s steps(2,end) infinite}
html.is-motion [data-motion="ink-words"].is-finished [data-motion-art] img{animation:motion-lift .5s cubic-bezier(.34,1.56,.64,1) forwards}
@keyframes motion-buzz{0%{transform:translate(0,0)}50%{transform:translate(1px,-1px) rotate(.6deg)}100%{transform:translate(-1px,1px)}}
@keyframes motion-lift{to{transform:translate(4px,-16px) rotate(-5deg)}}

/* pointer: a decorative follower on fine pointers, the native pointer everywhere else */
[data-motion="pointer"]{position:fixed;left:0;top:0;opacity:0;pointer-events:none}
html.is-motion-pointer [data-motion="pointer"]{opacity:1;z-index:9999;will-change:transform}
html.is-motion-pointer, html.is-motion-pointer body, html.is-motion-pointer a, html.is-motion-pointer button{cursor:none}
[data-motion="pointer"] img{display:block;width:100%;height:100%;transform-origin:2% 99%;transition:transform .18s ease}
[data-motion="pointer"].is-over img{transform:rotate(-12deg) scale(1.08)}
[data-motion="pointer"].is-click img{animation:motion-shake .36s steps(4,end)}
@keyframes motion-shake{0%{transform:translate(0,0) rotate(0)}25%{transform:translate(-2px,2px) rotate(-4deg)}50%{transform:translate(2px,-1px) rotate(3deg)}75%{transform:translate(-1px,-2px) rotate(-2deg)}100%{transform:translate(0,0) rotate(0)}}
.motion-ink-drop{position:fixed;width:12px;height:12px;border-radius:50% 50% 50% 0;transform:translate(-50%,-50%) rotate(-45deg) scale(0);background:currentColor;pointer-events:none;z-index:9998;animation:motion-drop 1.3s ease-out forwards}
@keyframes motion-drop{10%{transform:translate(-50%,-50%) rotate(-45deg) scale(1.2)}60%{opacity:.9}100%{opacity:0;transform:translate(-50%,-50%) rotate(-45deg) scale(1)}}

/* the pause control for recurring decoration */
[data-motion-pause]{font:inherit}
html.is-motion-paused [data-motion="ink-words"] [data-motion-art] img{animation:none}

/* No motion: the preference at load, the preference changed while the page is
   open (the runtime sets is-motion-reduced), or the pause control. Every
   transition and animation this file owns is off, not only the keyframes. */
@media (prefers-reduced-motion:reduce){
  html.is-motion [data-motion="reveal"]{opacity:1;transform:none;transition:none}
  html.is-motion [data-motion="ink-words"] [data-motion-art] img,[data-motion="pointer"] img,.motion-ink-drop{animation:none}
  html.is-motion [data-motion-at],html.is-motion [data-motion-art],html.is-motion [data-motion-word].is-done [data-motion-stencil],[data-motion="pointer"] img{transition:none!important}
}
/* !important, because the rules above that move the picture are more specific. */
html.is-motion-reduced [data-motion="reveal"],html.is-motion-paused [data-motion="reveal"]{opacity:1!important;transform:none!important;transition:none!important}
html.is-motion-reduced [data-motion="ink-words"] [data-motion-art] img,html.is-motion-paused [data-motion="ink-words"] [data-motion-art] img,html.is-motion-reduced [data-motion="pointer"] img,html.is-motion-paused [data-motion="pointer"] img,html.is-motion-reduced .motion-ink-drop,html.is-motion-paused .motion-ink-drop{animation:none!important}
html.is-motion-reduced [data-motion-at],html.is-motion-paused [data-motion-at],html.is-motion-reduced [data-motion-art],html.is-motion-paused [data-motion-art],html.is-motion-reduced [data-motion-word].is-done [data-motion-stencil],html.is-motion-paused [data-motion-word].is-done [data-motion-stencil],html.is-motion-reduced [data-motion="pointer"] img,html.is-motion-paused [data-motion="pointer"] img{transition:none!important}
