/* FlowSite motion components: the structure the components need (our own work, see README.md). The look stays with the page. */

/* pieces waiting off screen (assemble, shatter, hscroll) never make the page scroll sideways */
html.mo-on, html.mo-on body { overflow-x: clip; }
[data-mo="assemble"], [data-mo="hscroll"] { overflow-x: clip; }

/* shatter: the tiles sit over the picture; the picture hides only while the tiles are on */
/* zero specificity: the page may position the media box itself (absolute over the section is usual) */
:where([data-mo="shatter"] [data-mo-media]) { position: relative; }
[data-mo="shatter"] [data-mo-media] { overflow: hidden; perspective: 1400px; }
[data-mo="shatter"] [data-mo-title] { perspective: 900px; }
.mo-tiles { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.mo-tile { position: absolute; background-repeat: no-repeat; backface-visibility: hidden; will-change: transform, opacity; }
.mo-shatter-on img { visibility: hidden; }

/* assemble: pieces fly in through 3D space */
[data-mo="assemble"] { perspective: 1600px; }

/* expand: the frame fills the section, the words sit over it */
.mo-expand-on [data-mo-frame] { position: absolute; inset: 0; }
.mo-expand-on [data-mo-frame] img, .mo-expand-on [data-mo-frame] video { width: 100%; height: 100%; object-fit: cover; }

/* stack: the cards lie on top of each other while the section is pinned */
.mo-stack-on [data-mo-stack] { position: relative; height: 100vh; }
.mo-stack-on [data-mo-card] { position: absolute; inset: 0; margin: 0; transform-origin: 50% 0%; }
.mo-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; border-radius: inherit; }

/* hscroll: the strip becomes one long row */
.mo-h-on [data-mo-track] { overflow: visible; scroll-snap-type: none; width: max-content; }
.mo-h-on [data-mo-progress] { transform-origin: 0 50%; }

/* tilt: the light that follows the pointer */
[data-mo="tilt"] { transform-style: preserve-3d; }
:where([data-mo="tilt"]) { position: relative; }
.mo-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; border-radius: inherit; mix-blend-mode: soft-light; }
