/* Scroll-driven motion (assets/scroll-fx.js). Everything here only applies when motion is allowed. */

/* Headings: each word fades and rises into place as the heading scrolls up. */
.fx-on .fx-scrub .fx-word { display:inline-block; opacity:calc(.14 + .86 * var(--k, 0)); transform:translateY(calc((1 - var(--k, 0)) * .32em)); filter:blur(calc((1 - var(--k, 0)) * 3px)); will-change:opacity, transform; }

/* Tool strip marquee. */
.tool-names.is-marquee { display:block; overflow:hidden; -webkit-mask-image:linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image:linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.marquee-belt { display:flex; width:max-content; animation:fx-marquee 34s linear infinite; }
.marquee-track { flex:none; display:flex; align-items:center; justify-content:space-around; gap:56px; padding-right:56px; }
.marquee-track>span { flex:none; }
.tool-names.is-marquee:hover .marquee-belt { animation-play-state:paused; }
@keyframes fx-marquee { to { transform:translateX(-50%); } }

/* Section strip. */
.fx-strip { position:fixed; z-index:45; left:50%; top:12px; transform:translate(-50%, -140%); opacity:0; transition:transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s, top .45s cubic-bezier(.2,.7,.2,1); pointer-events:none; max-width:calc(100% - 32px); }
.fx-strip.is-on { transform:translate(-50%, 0); opacity:1; pointer-events:auto; }
.fx-strip.is-on.is-low { top:92px; }
.fx-strip-inner { position:relative; display:flex; gap:2px; padding:5px; border-radius:100px; background:rgba(255,255,255,.72); border:1px solid rgba(21,32,28,.08); box-shadow:0 10px 30px rgba(21,32,28,.08); -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%); }
.fx-strip a { position:relative; z-index:1; display:flex; align-items:center; gap:7px; padding:8px 14px 9px; border-radius:100px; font-size:13px; font-weight:500; color:#5f6c63; text-decoration:none; white-space:nowrap; overflow:hidden; transition:color .25s; }
.fx-strip a span { font:11px var(--mono, monospace); color:#8b978f; transition:color .25s; }
.fx-strip a i { position:absolute; left:14px; right:14px; bottom:4px; height:2px; border-radius:2px; background:var(--blue, #245bff); transform:scaleX(var(--p, 0)); transform-origin:left; opacity:.0; transition:opacity .25s; }
.fx-strip a:hover { color:var(--ink, #15201c); }
.fx-strip a.is-active { color:#fff; }
.fx-strip a.is-active span { color:#c7d5ff; }
.fx-strip a.is-active i { background:#fff; opacity:.9; }
.fx-strip-mark { position:absolute; z-index:0; top:5px; bottom:5px; left:0; border-radius:100px; background:var(--blue, #245bff); box-shadow:0 6px 18px rgba(36,91,255,.3); transition:transform .5s cubic-bezier(.2,.7,.2,1), width .5s cubic-bezier(.2,.7,.2,1), opacity .3s; }
@media (max-width:700px) {
  .fx-strip.is-on.is-low { top:76px; }
  .fx-strip a:not(.is-active) { display:none; }
  .fx-strip-mark { transform:none !important; width:auto !important; right:5px; }
}

/* Process walk: a rail with a travelling dot; steps land one by one. */
.walk-rail { position:relative; z-index:2; height:0; }
.walk-fill { position:absolute; left:0; right:0; top:0; height:2px; background:linear-gradient(90deg, #fff, #9db4ff); transform:scaleX(var(--p, 0)); transform-origin:left; }
.walk-dot { position:absolute; top:-6px; left:calc(var(--p, 0) * 100%); width:14px; height:14px; margin-left:-7px; border-radius:50%; background:#fff; box-shadow:0 0 0 6px rgba(255,255,255,.18), 0 0 22px 4px rgba(255,255,255,.6); }
.walk-dot::after { content:""; position:absolute; inset:-6px; border-radius:50%; border:1px solid rgba(255,255,255,.7); animation:fx-ping 1.6s cubic-bezier(.2,.7,.2,1) infinite; }
.steps.is-walking .step { opacity:.24; transform:translateY(22px); filter:blur(1.5px); transition:opacity .55s, transform .7s cubic-bezier(.2,.7,.2,1), filter .55s; }
.steps.is-walking .step.is-landed { opacity:1; transform:none; filter:none; }
.steps.is-walking .step .n { transition:background .35s, color .35s, box-shadow .35s, transform .35s; }
.flux-home .card--blue .steps.is-walking .step.is-current .n { background:#fff; color:var(--blue, #245bff); box-shadow:0 0 0 8px rgba(255,255,255,.16); transform:scale(1.12); }
@keyframes fx-ping { from { transform:scale(.6); opacity:1; } to { transform:scale(2.2); opacity:0; } }

/* Offer cards dealt from a stack: they need their grid as the offset parent. */
.system-grid.is-dealt { position:relative; }
.system-grid.is-dealt .system-card { will-change:translate, rotate, scale; }

/* Week stats: the rule under each stat draws in with it. */
.motion-ready .week-stats>div { position:relative; border-bottom-color:transparent; }
.motion-ready .week-stats>div::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:1px; background:var(--line); transform:scaleX(0); transform-origin:left; transition:transform 1.1s cubic-bezier(.2,.7,.2,1) calc(var(--reveal-delay, 0ms) + 150ms); }
.motion-ready .week-stats>div.is-visible::after { transform:scaleX(1); }

/* Calculator results glow briefly when they change. */
.fx-on [data-out].is-bump { animation:fx-bump .6s ease-out; }
@keyframes fx-bump { 30% { text-shadow:0 0 18px rgba(36,91,255,.45); } }

/* FAQ: the plus turns into a minus. */
.fx-on .faq summary svg .v { display:block !important; transform-origin:center; transform-box:fill-box; transition:transform .3s cubic-bezier(.2,.7,.2,1); }
.fx-on .faq details[open] summary svg .v { transform:scaleY(0); }
.fx-on .faq summary svg { transition:transform .35s cubic-bezier(.2,.7,.2,1), color .15s; }
.fx-on .faq details[open] summary svg { transform:rotate(180deg); color:var(--blue, #245bff); }

/* Closing card: a light sweep, and the big X drifts. */
.fx-on .cta>div { position:relative; z-index:1; }
.fx-on .flux-home .cta::before, .fx-on .cta.cta--fx::before { content:""; position:absolute; top:-40%; bottom:-40%; left:-30%; width:26%; background:linear-gradient(100deg, transparent, rgba(255,255,255,.2), transparent); transform:translateX(0) skewX(-18deg); animation:fx-sweep 6.5s cubic-bezier(.6,0,.2,1) infinite; pointer-events:none; }
.fx-on .flux-home .cta::after { animation:fx-drift 12s ease-in-out infinite alternate; }
@keyframes fx-sweep { 0% { transform:translateX(0) skewX(-18deg); } 40%, 100% { transform:translateX(560%) skewX(-18deg); } }
@keyframes fx-drift { from { transform:translate(0, 0) rotate(0); } to { transform:translate(-48px, 34px) rotate(-7deg); } }

/* The shared Pause button stops every loop on this page. */
.flux-paused .marquee-belt, .flux-paused .walk-dot::after, .flux-paused .cta::before, .flux-paused .cta::after { animation-play-state:paused !important; }
