/* The film on the landing page (page styles are in land.css): a sticky 440×400 "film" that plays one example hour as the steps scroll past. Shares tokens with style.css. */
.scrolly { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 0 72px; align-items: start; }
.steps { grid-column: 1; grid-row: 1; }
.stage-wrap { grid-column: 2; grid-row: 1; position: sticky; top: max(88px, calc(50vh - 200px)); }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .3s; }
.step:first-child { min-height: 62vh; }
.step.on { opacity: 1; }
.step .at { font: 500 14px "JetBrains Mono", monospace; color: var(--accent); }
.step h3 { font-size: clamp(26px, 4.4vw, 36px); line-height: 1.08; letter-spacing: -0.03em; margin: 8px 0 12px; text-wrap: balance; }
.step p { font-size: 18px; color: var(--body); margin: 0; max-width: 29em; }

/* the film is drawn at 440×400 and scaled to fit by how.js */
.stage { width: 440px; max-width: 100%; height: 400px; margin: 0 auto; overflow: hidden; border-radius: 22px; box-shadow: 0 44px 70px -36px rgba(15,80,40,.34), 0 6px 16px -8px rgba(13,19,15,.1); } /* clipped until how.js scales the film, or a phone widens the whole page to fit it */
.film { position: relative; width: 440px; height: 400px; transform-origin: 0 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; font-size: 14px; line-height: 1.35; }
.film img { display: block; border-radius: 50%; object-fit: cover; background: var(--line); }
.chrome { position: absolute; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.clk { font: 500 15px "JetBrains Mono", monospace; letter-spacing: -0.02em; }
.prog { display: flex; gap: 4px; }
.prog i { width: 18px; height: 3px; border-radius: 2px; background: rgba(13,19,15,.12); transition: background .3s; }
.prog i.on { background: var(--accent); }
.sc { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.sc.on { opacity: 1; visibility: visible; transition: opacity .35s .05s; }

/* 1. backing: five coins race for three slots */
.lb-head { position: absolute; left: 22px; right: 22px; top: 58px; display: flex; justify-content: space-between; align-items: baseline; }
.lb-head b { font-size: 16px; font-weight: 600; }
.lb-head span { color: var(--muted); font-size: 13px; }
.lb { list-style: none; margin: 0; padding: 0; position: absolute; left: 22px; right: 22px; top: 94px; height: 280px; }
.lb li { position: absolute; left: 0; right: 0; top: 0; height: 46px; display: grid; grid-template-columns: 16px 34px 1fr auto; gap: 0 10px; align-items: center; transition: transform .5s cubic-bezier(.3,.7,.2,1), opacity .4s; }
.lb .rk { font: 500 13px "JetBrains Mono", monospace; color: var(--muted); transition: color .3s; }
.lb img { width: 34px; height: 34px; }
.lb .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb .tr { height: 6px; border-radius: 3px; background: rgba(13,19,15,.07); margin-top: 6px; overflow: hidden; }
.lb .fl { height: 100%; width: 0; border-radius: 3px; background: #b9c4bc; transition: width .5s cubic-bezier(.3,.7,.2,1), background .3s; }
.lb .am { font: 500 13px "JetBrains Mono", monospace; min-width: 4.2em; text-align: right; }
.lb li.in .rk { color: var(--accent); }
.lb li.in .fl { background: #16a34a; }
.lb li:not(.in) { opacity: .5; }
.lb .plus { position: absolute; right: 0; top: 2px; font: 500 12px "JetBrains Mono", monospace; color: var(--accent); pointer-events: none; }
.cut { position: absolute; left: 22px; right: 22px; top: 261px; border-top: 1.5px dashed rgba(21,128,61,.45); }

/* 2 and 3. the Bag */
.bag-head { transition: opacity .3s; }
.sc-bag.picking .bag-head { opacity: 0; }
.grid { position: absolute; left: 0; top: 0; }
.tok { position: absolute; width: 76px; text-align: center; opacity: 0; transform: translateY(14px) scale(.7); transition: opacity .35s, transform .45s cubic-bezier(.3,1.3,.5,1), filter .4s; }
.grid.in .tok { opacity: 1; transform: none; }
.tok img { width: 52px; height: 52px; margin: 0 auto; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); transition: box-shadow .25s; }
.tok span { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok .dot, .legend .dot { width: 14px; height: 14px; border-radius: 50%; background: #16a34a; border: 2.5px solid var(--card); }
.tok .dot { position: absolute; left: 47px; top: -3px; }
.tok.hot img { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #16a34a; }
.sc-bag.picked .tok:not(.pick) { opacity: .26; filter: grayscale(.7); }
.sc-bag.picked .tok.pick { transform: scale(1.14); }
.sc-bag.picked .tok.pick img { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #16a34a, 0 10px 24px rgba(21,128,61,.25); }
.sc-bag.picked .tok.pick span { color: var(--text); font-weight: 600; }
.ring { display: none; }
.under { position: absolute; left: 22px; right: 22px; top: 286px; height: 22px; font-size: 13px; }
.under > span { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); transition: opacity .3s; }
.legend .dot { border-color: var(--card); flex: none; }
.under .result { opacity: 0; color: var(--text); font-size: 15px; }
.under .result b { font-weight: 700; margin-left: -3px; }
.sc-bag.picked .legend { opacity: 0; }
.sc-bag.picked .result { opacity: 1; }
.seal { position: absolute; left: 22px; right: 22px; top: 326px; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s, color .3s; }
.seal.show { opacity: 1; transform: none; }
.seal .sh { transform: translateY(-3px); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.seal code { flex: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; transition: color .3s; }
.seal .chip { opacity: 0; transform: scale(.8); transition: opacity .25s, transform .3s cubic-bezier(.3,1.6,.5,1); }
.seal.sealed { color: var(--accent); }
.seal.sealed .sh { transform: none; }
.seal.sealed code { color: var(--text); }
.seal.sealed .chip { opacity: 1; transform: none; }
/* the chain: blocks slide in, the decider stops in the middle */
.chain { position: absolute; left: 0; right: 0; top: 50px; height: 40px; overflow: hidden; opacity: 0; transition: opacity .3s; -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.sc-bag.picking .chain { opacity: 1; }
.belt { position: absolute; left: 0; top: 4px; display: flex; gap: 8px; transform: translateX(204px); }
.belt i { flex: none; width: 32px; height: 32px; border-radius: 8px; background: #fff; border: 1px solid var(--line); position: relative; transition: background .3s, border-color .3s; }
.belt i::before, .belt i::after { content: ""; position: absolute; left: 7px; right: 7px; height: 2px; border-radius: 1px; background: var(--line); top: 11px; transition: background .3s; }
.belt i::after { top: 18px; right: 13px; }
.sc-bag.picking .belt { animation: belt 1.5s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes belt { to { transform: translateX(4px); } }
.sc-bag.decided .belt .dec { background: #16a34a; border-color: #16a34a; }
.sc-bag.decided .belt .dec::before, .sc-bag.decided .belt .dec::after { background: rgba(255,255,255,.75); }

/* 4. the buy */
.fees { position: absolute; left: 30px; top: 78px; }
.fees span { color: var(--muted); font-size: 13px; }
.pile { display: flex; margin-top: 12px; }
.pile img { width: 34px; height: 34px; margin-right: -12px; box-shadow: 0 0 0 2px var(--card); }
.flow { position: absolute; left: 152px; top: 116px; width: 110px; height: 22px; border-top: 2px dashed rgba(13,19,15,.14); margin-top: 10px; }
.flow img { position: absolute; left: 0; top: -12px; width: 22px; height: 22px; opacity: 0; }
.sc-buy.go .flow img { animation: fee 1.6s linear infinite; }
.flow img:nth-child(2) { animation-delay: .4s !important; } .flow img:nth-child(3) { animation-delay: .8s !important; } .flow img:nth-child(4) { animation-delay: 1.2s !important; }
@keyframes fee { 0% { transform: translateX(-6px) scale(.8); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(104px) scale(.7); opacity: 0; } }
.big { position: absolute; left: 286px; top: 74px; width: 96px; height: 96px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line), 0 14px 30px rgba(13,19,15,.1); }
.sc-buy.go .big { animation: gulp .4s ease-in-out infinite; }
@keyframes gulp { 50% { transform: scale(1.045); } }
.sc-buy.done .flow img, .sc-buy.done .big { animation: none; }
.got { position: absolute; left: 30px; top: 196px; display: flex; align-items: baseline; gap: 9px; }
.got b { font: 500 26px "JetBrains Mono", monospace; letter-spacing: -0.04em; }
.got span { color: var(--muted); font-size: 13px; }
.chart { position: absolute; left: 40px; top: 252px; overflow: visible; }
.chart path { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart .jump { stroke: #16a34a; stroke-width: 3.4; }
.chart .mk { fill: #16a34a; opacity: 0; transform-box: fill-box; transform-origin: center; }
.chart .mkt { font: 600 13px "Inter Tight", sans-serif; fill: var(--accent); opacity: 0; }
.sc-buy.go .pre { animation: draw 1.1s .3s linear forwards; }
.sc-buy.go .jump { animation: draw .22s 1.4s ease-out forwards; }
.sc-buy.go .post { animation: draw .9s 1.62s linear forwards; }
.sc-buy.go .mk { animation: pop .4s 1.5s cubic-bezier(.3,1.8,.5,1) forwards; }
.sc-buy.go .mkt { animation: fade .3s 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { to { opacity: 1; } }

/* 5. the drop */
.src { position: absolute; left: 188px; top: 50px; width: 64px; height: 64px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); z-index: 2; }
.wallets { position: absolute; left: 0; top: 0; }
.wallets i { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.wallets i.has { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.14); }
.wallets img { position: absolute; left: 211px; top: 73px; width: 18px; height: 18px; opacity: 0; z-index: 1; }
.landed { position: absolute; left: 41px; top: 340px; display: flex; align-items: baseline; gap: 9px; }
.landed b { font: 500 26px "JetBrains Mono", monospace; letter-spacing: -0.04em; }
.landed span { color: var(--muted); font-size: 13px; }

/* 6. the post */
.post { position: absolute; left: 30px; right: 30px; top: 58px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 12px; box-shadow: 0 12px 30px rgba(13,19,15,.06); }
.post > * { opacity: 0; transform: translateY(8px); }
.sc-post.go .post > * { animation: rise .4s cubic-bezier(.3,.7,.2,1) forwards; }
.sc-post.go .post > :nth-child(2) { animation-delay: .15s; } .sc-post.go .post > :nth-child(3) { animation-delay: .3s; } .sc-post.go .post > :nth-child(4) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.who { display: flex; align-items: center; gap: 10px; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font: 800 26px/1 "Inter Tight", sans-serif; color: #16a34a; }
.who b { display: block; font-size: 15px; font-weight: 700; }
.who div span { color: var(--muted); font-size: 13px; }
.post p { margin: 12px 0; font-size: 15.500px; line-height: 1.4; color: var(--text); }
.attach { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.attach img { width: 40px; height: 40px; }
.attach b { display: block; font-size: 15px; }
.attach span { color: var(--muted); font-size: 13px; }
.icons { display: flex; justify-content: space-between; margin-top: 12px; padding: 0 6px; }
.icons svg { width: 18px; height: 18px; fill: none; stroke: #9aa39d; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.again { position: absolute; left: 30px; right: 30px; top: 338px; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 13px; }
.again b { font: 500 22px "JetBrains Mono", monospace; letter-spacing: -0.04em; color: var(--text); }

@media (max-width: 859px) {
  .scrolly { display: block; }
  .stage-wrap { top: 0; z-index: 6; margin: 0 -20px; padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .step, .step:first-child { min-height: 52vh; justify-content: flex-start; padding-top: 30px; }
  .step:last-child { min-height: 40vh; }
  .step p { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .film *, .film *::before, .film *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .step { transition: none; }
}
