/* Scrollytelling layer for the homepage (12 Nov 2026, Connor: "keep our colors etc, i just want our normal
   front page layout but with scrollytelling"). Same sections, same colors; js/scrolly.js sets --p (0 to 1,
   how far through each section you are) and lights items in order as you scroll. Nothing is hidden at rest:
   items waiting their turn are dimmed, never invisible. Off for reduced motion. */
html.sx .sx-prog{ position: fixed; left: 0; top: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--sx-page, 0)); background: linear-gradient(90deg, var(--accent), #C99634); z-index: 1000; pointer-events: none; }
html.sx .sx-rail{ position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); z-index: 50; display: flex; flex-direction: column; gap: 10px; }
html.sx .sx-rail a{ display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; color: var(--ink-faint, #8792A2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
html.sx .sx-rail a span{ opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; white-space: nowrap; background: color-mix(in srgb, var(--surface, #fff) 90%, transparent); padding: 2px 8px; border-radius: 999px; }
html.sx .sx-rail a i{ width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; transition: all .25s; }
html.sx .sx-rail a:hover span, html.sx .sx-rail a.on span{ opacity: 1; transform: none; }
html.sx .sx-rail a.on{ color: var(--accent-text, #8A6423); }
html.sx .sx-rail a.on i{ background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (max-width: 1100px){ html.sx .sx-rail{ display: none; } }

/* Hero: the headline lifts away and the rings turn as you leave it */
html.sx header.hero.hero-big h1, html.sx header.hero.hero-big .lede{ transform: translateY(calc(var(--p, 0) * -60px)); opacity: calc(1 - var(--p, 0) * .55); will-change: transform; }
html.sx header.hero > .hero-art{ rotate: calc(var(--p, 0) * 40deg); }

/* Whale Tracker: each bet drops in from above as you scroll, its size counting up and its odds moving from the
   whale's price to now; a counter in the card header tracks how many have landed. Scrubbed by --lp (0 to 1). */
html.sx #whales .whale-card{ transform: translateY(calc((.5 - var(--p, .5)) * 18px)); }
html.sx #whales .whale-row{ opacity: calc(.12 + .88 * var(--lp, 1)); transform: translateY(calc((1 - var(--lp, 1)) * 22px)) scale(calc(.97 + .03 * var(--lp, 1))); transform-origin: 50% 100%; transition: background-color .3s ease; position: relative; }
html.sx #whales .whale-row.sx-now{ background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 75%); }
html.sx #whales .whale-row.sx-now::before{ content: ""; position: absolute; left: 6px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: sx-ping 1.2s ease-out infinite; }
html.sx #whales .whale-amt, html.sx #whales .whale-odds{ font-variant-numeric: tabular-nums; }
@keyframes sx-ping{ 0%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100%{ box-shadow: 0 0 0 10px transparent; } }
html.sx #whales .sx-count{ display: inline-flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 10px; font-size: .74rem; letter-spacing: .04em; color: inherit; opacity: .9; }
html.sx #whales .sx-count i{ display: block; width: 70px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
html.sx #whales .sx-count u{ display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 560px){ html.sx #whales .sx-count i{ display: none; } }

/* AI Analyst: the screenshot tilts flat, then each point slides in from the right as you scroll */
html.sx #checker .checker-video{ transform: perspective(1200px) rotateX(calc((1 - min(1, var(--p, 0) * 2.2)) * 12deg)) scale(calc(.94 + min(1, var(--p, 0) * 2.2) * .06)); transform-origin: 50% 0; }
html.sx #checker .checker-list li{ opacity: calc(.2 + .8 * var(--lp, 1)); transform: translateX(calc((1 - var(--lp, 1)) * 40px)); transition: box-shadow .3s; }
html.sx #checker .checker-list li.sx-now{ box-shadow: 0 0 0 3px rgba(122,85,211,.18), 0 14px 30px -18px rgba(94,61,181,.5); }

/* One tap: the order's rules tick off in sequence, thin side first; the ticket image drifts */
html.sx #onetap .ot-points li{ opacity: calc(.25 + .75 * var(--lp, 1)); transform: translateX(calc((1 - var(--lp, 1)) * -24px)); }
html.sx #onetap .ot-points li::before{ transform: scale(calc(.4 + .6 * var(--lp, 1))) rotate(calc((1 - var(--lp, 1)) * -90deg)); }
html.sx #onetap .ot-media{ transform: translateY(calc((.5 - var(--p, .5)) * 40px)); }

/* Terminal: the screen tilts up flat as it arrives; the four features rise after it */
html.sx #terminal .tm-shot{ transform: perspective(1400px) rotateX(calc((1 - min(1, var(--p, 0) * 3)) * 22deg)) scale(calc(.9 + min(1, var(--p, 0) * 3) * .1)); transform-origin: 50% 100%; transition: transform .1s linear; }
html.sx #terminal .tm-f{ opacity: calc(.15 + .85 * var(--lp, 1)); transform: translateY(calc((1 - var(--lp, 1)) * 30px)); }
html.sx #terminal .tm-speed b{ display: inline-block; min-width: 4.2ch; font-variant-numeric: tabular-nums; }

/* How it works: a gold line runs through the four steps */
html.sx #how .steps{ position: relative; }
html.sx #how .steps::after{ content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(min(1, calc(var(--p, 0) * 1.6))); z-index: 2; }
html.sx #how .step{ opacity: calc(.3 + .7 * var(--lp, 1)); transform: translateY(calc((1 - var(--lp, 1)) * 16px)); transition: background .3s; }
html.sx #how .step.sx-now{ background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* Coaching: the path fills dot by dot */
html.sx #coaching .coach-path > li{ opacity: calc(.3 + .7 * var(--lp, 1)); }
html.sx #coaching .coach-path > li .cp-dot{ transform: scale(calc(.6 + .4 * var(--lp, 1))); }

/* Pricing: the plans rise in turn; the one most people pick lands last */
html.sx #pricing .price-card{ opacity: calc(.3 + .7 * var(--lp, 1)); transform: translateY(calc((1 - var(--lp, 1)) * 30px)); }

@media (prefers-reduced-motion: reduce){ html.sx *{ transition: none !important; animation: none !important; } }

html.sx .sx-spacer{ pointer-events: none; }
