/* ── Salt motion: shared scroll reveals for studiosalt.co ───────────────────────
   Loaded by index.html, work.html and every work page, together with salt-motion.js.
   Text   — blur-fade-up: opacity 0→1, blur 8px→0, 24px rise, 0.8s cubic-bezier(.22,1,.36,1)
            (the Huma landing reveal), siblings 0.07s apart in reading order.
   Work   — tiles, cards and work-page images: a cover in the frame's own colour wipes away
            upward (0.9s, late-peak curve) while the picture settles from 1.06x (1.4s long tail,
            starting 0.07s later), neighbours 0.08s apart.
            "Reveals are clips, not slides" (MOTION_PRINCIPLES 4.6). A cover is used rather than
            clipping the video itself, so lazy video loaders still see their videos.
   The hidden start state only exists once the script adds .sm-on to <html>, so the page
   shows normally without JavaScript and under prefers-reduced-motion. */
:root{--sm-text:cubic-bezier(.22,1,.36,1);--sm-wipe:cubic-bezier(.6,0,.2,1);--sm-settle:cubic-bezier(.16,1,.3,1)}
html.sm-on [data-sm=text]{opacity:0;filter:blur(8px);transform:translateY(24px);transition:opacity .8s var(--sm-text) var(--sm-d,0s),filter .8s var(--sm-text) var(--sm-d,0s),transform .8s var(--sm-text) var(--sm-d,0s)}
html.sm-on [data-sm=text].sm-in{opacity:1;filter:none;transform:none}
html.sm-on [data-sm=media]{position:relative;overflow:hidden}
html.sm-on [data-sm=media]::after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:var(--sm-cover,#f4f4f2);transform-origin:50% 0;transition:transform .9s var(--sm-wipe) var(--sm-d,0s)}
html.sm-on [data-sm=media].sm-in::after{transform:scaleY(0)}
html.sm-on [data-sm=media]>:is(video,img,picture,iframe,.cs-slot,.cs-lottie){transform:scale(1.06);transition:transform 1.4s var(--sm-settle) calc(var(--sm-d,0s) + .07s)}
html.sm-on [data-sm=media].sm-in>:is(video,img,picture,iframe,.cs-slot,.cs-lottie){transform:none}
/* Cover colours match each frame's resting background. */
#gallery .tile{--sm-cover:var(--surface,#e5ded0)}
#work .card{--sm-cover:var(--cell,#fafafa)}
#work .rail .card{--sm-cover:var(--paper,#fff)}
.cs-media{--sm-cover:var(--cs-slot,#f4f4f2)}
@media(prefers-reduced-motion:reduce){html.sm-on [data-sm],html.sm-on [data-sm]>*{opacity:1!important;filter:none!important;transform:none!important;transition:none!important}html.sm-on [data-sm]::after{display:none}}
