/* MOTION STAGE (v14): the shared ground every motion-graphics chapter stands on. mg.js drives it.
   .mg-pin is the scroll the chapter takes (--len, --len-m on phones). .mg is the stage: it sticks for that long and
   fills the tall viewport, so nothing shows under it when Safari's toolbar slides away. .mg-art is the graphic,
   full bleed. .mg-safe is the box type may sit in: clear of the fixed nav above and of Safari's toolbar below.
   Everything inside a stage belongs to its scene (#live, #sales, #close, #ai, #playbooks) and is styled there. */
.mg-pin { height: var(--len, 300vh); }
.mg { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: #01030a; }
.mg-art { position: absolute; inset: 0; }
.mg-art > svg, .mg-art > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mg-safe { position: absolute; left: var(--pad-l); right: var(--pad-r); top: calc(72px + env(safe-area-inset-top, 0px)); bottom: calc(var(--tb) + var(--safe-b) + 22px); }
/* a line of type that rises out of a mask: <span class="mg-mask"><b>words</b></span> */
.mg-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.mg-mask > b { display: inline-block; font-weight: inherit; will-change: transform; }
@media (max-width: 899px) { .mg-pin { height: var(--len-m, var(--len, 300vh)); } }
/* reduced motion: nothing is pinned. The stage is as tall as its content and shows the finished state. */
.is-reduced .mg-pin { height: auto; }
.is-reduced .mg { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }
.is-reduced .mg-safe { position: relative; left: auto; right: auto; top: auto; bottom: auto; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--pad-r) 64px var(--pad-l); }
/* the motion palette: white on the page's black, cobalt only as light, red only as a signal */
:root { --mg-black: #01030a; --mg-cobalt: #2a5cff; --mg-cobalt-deep: #0a1f6b; --mg-red: #ff2a3c; --mg-stroke: 2px; }
@media (max-width: 899px) { :root { --mg-stroke: 1.5px; } }
