/* Southfreeze — scroll motion layer (ported from the Aigency site's pattern).
   js/motion.js adds html.mo-on and writes scroll progress into --q (per element),
   --sp (page) and --py (parallax). Without JS or with reduced motion the site is
   the plain static design: nothing is ever hidden by default. */

/* scroll progress line along the bottom of the nav */
.mo-on .nav::after{content:"";position:absolute;left:0;bottom:-1px;height:2px;width:calc(var(--sp,0) * 100%);background:linear-gradient(90deg,var(--peri-deep),#b9c2ee 70%,var(--red));pointer-events:none}

/* content rises into place, cascading across a row */
.mo-on .reveal{opacity:var(--q,0);translate:0 calc((1 - var(--q,0)) * 44px)}

/* section headings wipe up from their baseline */
.mo-on h2.reveal{opacity:1;clip-path:inset(-0.3em -0.5em calc((1 - var(--q,0)) * 100%) -0.5em);translate:0 calc((1 - var(--q,0)) * .5em)}

/* eyebrow line draws in */
.mo-on .eyebrow.reveal::before{width:calc(var(--q,0) * 22px)}

/* images open from the bottom and settle from a slight zoom */
.mo-on .img-reveal.reveal{opacity:1;clip-path:inset(calc((1 - var(--q,0)) * 26%) 0 0 0 round var(--r-lg))}
.mo-on .img-reveal.reveal img{scale:calc(1.12 - var(--q,1) * .12)}
.mo-on .card .img img{translate:0 calc(var(--py,0) * 1px)}

/* dark bands grow from an inset panel to full width as they arrive */
.mo-on .grow{clip-path:inset(0 calc((1 - var(--e,1)) * 3.5vw) round calc(var(--r-lg) + (1 - var(--e,1)) * 24px))}

/* cursor glow on cards */
.mo-on .glow::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(340px circle at var(--mx,-400px) var(--my,-400px),rgba(140,140,193,.16),rgba(238,242,249,.08) 45%,transparent 65%);opacity:0;transition:opacity .35s ease}
.mo-on .glow:hover::after{opacity:1}

/* 3D tilt (fine pointers only, set up in motion.js) */
.tilt{transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .5s cubic-bezier(.2,.7,.2,1),box-shadow .35s,border-color .35s}
.tilt.tilting{transition:transform .08s linear,box-shadow .35s,border-color .35s}

/* process steps light as you reach them */
.mo-on .steps li::after{content:"";position:absolute;left:16px;top:38px;width:2px;height:calc(var(--q,0) * (100% - 16px));background:linear-gradient(var(--peri),transparent)}
.mo-on .steps li:last-child::after{display:none}
