/* =========================================================================
   Rampay · scroll story
   One payment, told by scrolling: the real card leaves its box, turns in 3D,
   follows the customer through checkout and dissolves into USDC.
   Everything is scoped to #rs-story so it never touches the rest of the site.
   ========================================================================= */

#rs-story {
  --rs-bg: var(--bg, #0a0908);
  --rs-fg: var(--text, #f7f5f1);
  --rs-muted: var(--muted, #9b9893);
  --rs-accent: var(--accent, #f68c36);
  --rs-accent-2: var(--accent-2, #f7ac4d);
  --rs-display: var(--font-display, "Sora", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --rs-body: var(--font-body, "Manrope", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --rs-ph: min(640px, 70svh);                       /* phone height */
  --rs-pw: calc(var(--rs-ph) * 0.4885);             /* phone width (iPhone 6.1" proportions) */
  position: relative;
  height: calc(var(--rs-len, 1) * 100vh);
  height: calc(var(--rs-len, 1) * 100svh);
  height: calc(var(--rs-len, 1) * 100dvh);
  padding-block: 0;   /* this is a full-bleed sticky stage, not a regular content section */
  background: var(--rs-bg);
  color: var(--rs-fg);
  font-family: var(--rs-body);
}
#rs-story *, #rs-story *::before, #rs-story *::after { box-sizing: border-box; }
#rs-story img { max-width: none; }
#rs-story p { margin: 0; }

.rs-stage {
  /* svh locks to the viewport's smallest size (toolbar visible) so the story never jumps
     the moment it mounts — but on a real phone, once the toolbar auto-hides on scroll,
     that leaves the sticky stage shorter than the now-visible area: a flat black gap
     below it, which is this section's own background showing through. dvh tracks the
     toolbar live, so it closes that gap once it's actually safe to (mid-scroll, not on load) */
  position: sticky; top: 0; height: 100vh; height: 100svh; height: 100dvh;
  overflow: hidden; background: var(--rs-bg); isolation: isolate;
}
.rs-stage > * { position: absolute; }
.rs-bg { inset: 0; width: 100%; height: 100%; }

/* ---------- scene 0: the box ---------- */
.rs-intro { inset: 0; z-index: 10; }
.rs-intro-art {
  position: absolute; left: 0; top: 0; right: auto; bottom: auto;
  /* edges fade into the page, so the box never shows a hard border */
  -webkit-mask-image: radial-gradient(ellipse 66% 70% at var(--rs-mx, 50%) var(--rs-my, 60%), #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 66% 70% at var(--rs-mx, 50%) var(--rs-my, 60%), #000 58%, transparent 100%);
  will-change: transform, filter, opacity;
}
.rs-intro-art img, .rs-intro-art .rs-glow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rs-intro-art .rs-shadow { filter: brightness(0) blur(14px); opacity: 0; }
.rs-intro-art .rs-glow {
  opacity: 0; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(26% 22% at var(--rs-cx, 38%) var(--rs-cy, 62%), rgb(246 140 54 / .42), transparent 70%);
}
.rs-title {
  position: absolute; inset-inline: 20px; top: 10svh; text-align: center; z-index: 2;
}
.rs-title .rs-eyebrow { justify-content: center; }
.rs-title h2 {
  position: relative; margin: 10px 0 0; font-family: var(--rs-display); font-weight: 600; letter-spacing: -.03em;
  font-size: clamp(42px, 6.4vw, 92px); line-height: 1.02; text-wrap: balance;
  text-shadow: 0 2px 40px rgb(0 0 0 / .6);
}
.rs-title h2 em { font-style: normal; background: linear-gradient(135deg, #f7ac4d, #f27636); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* the closing line, at the very end of the coin finale: the same voice as .rs-title, nearly as big */
.rs-outro {
  position: absolute; inset-inline: 20px; bottom: 7svh; text-align: center; z-index: 2;
  opacity: 0; visibility: hidden;
}
.rs-outro .rs-eyebrow { justify-content: center; }
.rs-outro h2 {
  position: relative; margin: 10px 0 0; font-family: var(--rs-display); font-weight: 600; letter-spacing: -.03em;
  font-size: clamp(38px, 5.8vw, 84px); line-height: 1.04; text-wrap: balance;
  text-shadow: 0 2px 40px rgb(0 0 0 / .6);
}
.rs-outro h2 em { font-style: normal; background: linear-gradient(135deg, #f7ac4d, #f27636); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* a soft light sweep that glides across each headline once, on its entrance. Uses an
   explicit rgba(255,255,255,0) rather than the `transparent` keyword (which is really
   rgba(0,0,0,0) and leaves a visible grey fringe where it's interpolated next to white),
   and screen blending, which can only brighten, never dim, whatever's underneath. */
.rs-title h2::after, .rs-outro.rs-shine-play h2::after {
  content: ""; position: absolute; inset: -15% -6%;
  background: linear-gradient(100deg, rgb(255 255 255 / 0) 42%, rgb(255 255 255 / .85) 50%, rgb(255 255 255 / 0) 58%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: rs-shine 1.3s linear 1 both;
}
.rs-title h2::after { animation-delay: .5s; }
@keyframes rs-shine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) { .rs-title h2::after, .rs-outro.rs-shine-play h2::after { animation: none; display: none; } }

/* the Rampay mark, dim, signing off in the empty centre once the split lands */
.rs-outro-mark {
  left: 50%; top: 50%; translate: -50% -50%; z-index: 3; width: 84px; height: 84px;
  border-radius: 18px; opacity: 0; visibility: hidden; pointer-events: none;
  filter: drop-shadow(0 10px 28px rgb(0 0 0 / .5));
}
@media (max-width: 900px) { .rs-outro-mark { width: 64px; height: 64px; border-radius: 14px; } }
.rs-hint {
  position: absolute; inset-inline: 0; bottom: 4svh; text-align: center; z-index: 2;
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--rs-muted);
}
.rs-hint::after {
  content: ""; display: block; width: 1px; height: 30px; margin: 10px auto 0;
  background: linear-gradient(var(--rs-accent), transparent);
  animation: rs-hint 1.8s cubic-bezier(.2, .7, .1, 1) infinite;
}
@keyframes rs-hint {
  0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; }
}

.rs-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rs-accent);
}
.rs-eyebrow i { font-style: normal; font-family: var(--font-mono, ui-monospace, Menlo, monospace); color: var(--rs-muted); letter-spacing: 0; font-weight: 500; }

/* ---------- the real card, in 3D ---------- */
.rs-card {
  left: 0; top: 0; width: 600px; height: 952px; z-index: 11; opacity: 0;
  transform-origin: 0 0; transform-style: preserve-3d; pointer-events: none; will-change: transform;
}
.rs-card > * { position: absolute; inset: 0; border-radius: 35px; }
.rs-card .rs-face { width: 100%; height: 100%; display: block; transform: translateZ(0); }
.rs-card .rs-edge { background: #2b2b2d; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .16); }
.rs-card .rs-sheen {
  transform: translateZ(.5px); mix-blend-mode: screen; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / .18) 47%, rgb(247 172 77 / .12) 53%, transparent 68%) no-repeat;
  background-size: 300% 300%; background-position: var(--rs-sheen, 100%) 50%;
}
.rs-cardshadow {
  left: 0; top: 0; width: 300px; height: 120px; margin: -60px 0 0 -150px; z-index: 9; opacity: 0;
  border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .65), transparent);
  filter: blur(8px); pointer-events: none; will-change: transform, opacity;
}

/* ---------- iPhone ---------- */
.rs-phone {
  inset: 0; margin: auto; width: var(--rs-pw); height: var(--rs-ph); z-index: 4;
  opacity: 0; will-change: transform, opacity;
  --u: calc(var(--rs-pw) / 100);                    /* 1% of the phone width */
}
.rs-frame {
  position: absolute; inset: 0; border-radius: calc(var(--u) * 16.5);
  background:
    linear-gradient(90deg, rgb(255 255 255 / .22), transparent 3%, transparent 97%, rgb(255 255 255 / .18)),
    linear-gradient(160deg, #6b6863 0%, #2e2c2a 16%, #1c1b1a 48%, #2a2927 84%, #77736d 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / .28),
    inset 0 0 0 calc(var(--u) * .9) rgb(0 0 0 / .55),
    0 0 0 1px rgb(0 0 0 / .85),
    0 60px 120px -40px rgb(0 0 0 / .9),
    0 30px 90px -50px rgb(246 140 54 / .45);
}
.rs-bezel { position: absolute; inset: calc(var(--u) * 1.9); border-radius: calc(var(--u) * 14.6); background: #050505; }
.rs-screen {
  position: absolute; inset: calc(var(--u) * 4.3); border-radius: calc(var(--u) * 12.3);
  overflow: hidden; background: #f2f2f7; color: #000;
  font-family: -apple-system, "SF Pro Text", var(--rs-body); font-size: calc(var(--u) * 4.9);
}
.rs-island {
  position: absolute; z-index: 5; top: calc(var(--u) * 3.2); left: 50%; transform: translateX(-50%);
  width: calc(var(--u) * 31); height: calc(var(--u) * 9.2); border-radius: 999px; background: #000;
}
.rs-island::after {   /* camera lens */
  content: ""; position: absolute; right: calc(var(--u) * 3.6); top: 50%; transform: translateY(-50%);
  width: calc(var(--u) * 3.6); height: calc(var(--u) * 3.6); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b3a55, #0b0f18 60%);
}
.rs-status {
  position: absolute; z-index: 4; inset: 0 0 auto 0; height: calc(var(--u) * 15.5);
  display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--u) * 9) 0 calc(var(--u) * 10.5);
  font-weight: 600; font-size: calc(var(--u) * 5.1); letter-spacing: -.01em; color: #000;
}
.rs-status svg { height: calc(var(--u) * 3.9); width: auto; display: block; }
.rs-status .rs-icons { display: flex; gap: calc(var(--u) * 1.6); align-items: center; }
.rs-home {
  position: absolute; z-index: 4; bottom: calc(var(--u) * 2.2); left: 50%; transform: translateX(-50%);
  width: calc(var(--u) * 36); height: calc(var(--u) * 1.5); border-radius: 999px; background: rgb(0 0 0 / .85);
}
.rs-glare {
  position: absolute; inset: calc(var(--u) * 4.3); border-radius: calc(var(--u) * 12.3); z-index: 6; pointer-events: none;
  background: linear-gradient(118deg, rgb(255 255 255 / .16) 0%, rgb(255 255 255 / .04) 22%, transparent 38%);
}
.rs-key { position: absolute; width: calc(var(--u) * 1.3); border-radius: 2px;
  background: linear-gradient(90deg, #1d1c1b, #6a6762 45%, #2a2927); }
.rs-key.l { left: calc(var(--u) * -.95); }
.rs-key.r { right: calc(var(--u) * -.95); }
.rs-key.k1 { top: 17.5%; height: 5.5%; }
.rs-key.k2 { top: 26%; height: 9.5%; }
.rs-key.k3 { top: 37.5%; height: 9.5%; }
.rs-key.k4 { top: 28%; height: 14%; }

/* screens inside the phone: same look as the product */
.rs-scr {
  position: absolute; inset: 0; padding: 4.6em 1.35em 1.9em; opacity: 0; visibility: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.rs-brand { display: flex; align-items: center; gap: .4em; font-weight: 700; font-size: .93em; color: #1c1c1e; }
.rs-brand img { width: 1.2em; height: 1.2em; border-radius: .33em; display: block; }
.rs-brand .rs-mark { width: 1.2em; height: 1.2em; border-radius: .33em; background: linear-gradient(135deg, #f7ac4d, #f27636); }
.rs-pcard { width: 100%; background: #fff; border-radius: 1.05em; padding: 1em 1.05em; margin-top: 1.1em; text-align: start; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.rs-k { font-size: .8em; color: #6e6e73; }
.rs-v { font-size: 1.85em; font-weight: 700; letter-spacing: -.02em; margin-top: .1em; }
.rs-scr h4 { margin: .9em 0 .4em; font-size: 1.45em; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.rs-sub { font-size: .92em; color: #6e6e73; line-height: 1.4; max-width: 24ch; }
/* #0066cc / 10px radius are Rampay's actual wallet-app tokens (app.rampay.cc), not generic iOS ones */
.rs-btn { margin-top: auto; width: 100%; min-height: 3.2em; border-radius: .6em; background: #0066cc; color: #fff; font-weight: 600; letter-spacing: -.01em; display: grid; place-items: center; font-size: 1.05em; }
.rs-btn.ghost { background: rgba(60, 60, 67, .08); color: #0066cc; min-height: 3.2em; margin-top: .55em; }
/* the primary call to action: a soft halo that breathes, so the eye lands on it first */
.rs-arrive-send { box-shadow: 0 8px 20px rgba(0, 102, 204, .32), 0 0 0 0 rgba(0, 102, 204, .45); animation: rs-cta-pulse 1.8s ease-out .9s infinite; }
@keyframes rs-cta-pulse {
  0%, 30% { box-shadow: 0 8px 20px rgba(0, 102, 204, .32), 0 0 0 0 rgba(0, 102, 204, .45); }
  100% { box-shadow: 0 8px 20px rgba(0, 102, 204, .32), 0 0 0 14px rgba(0, 102, 204, 0); }
}
@media (prefers-reduced-motion: reduce) { .rs-arrive-send { animation: none; } }
.rs-glyph { position: relative; width: 5.4em; height: 5.4em; border-radius: 1.5em; background: rgba(0, 102, 204, .12); display: grid; place-items: center; margin-top: 1.6em; }
.rs-glyph svg { width: 3em; height: 3em; stroke: #0066cc; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rs-glyph::before, .rs-glyph::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1.5px solid #0066cc; opacity: 0; pointer-events: none;
  animation: rs-glyph-pulse 2s ease-out infinite;
}
.rs-glyph::after { animation-delay: .15s; }
/* two fast pulses (0-0.5s, 0.5-1s), then a 1s break, then the 2s cycle repeats */
@keyframes rs-glyph-pulse {
  0%      { transform: scale(1);   opacity: .5; }
  25%     { transform: scale(1.5); opacity: 0; }
  25.001% { transform: scale(1);   opacity: .5; }
  50%, 100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .rs-glyph::before, .rs-glyph::after { animation: none; opacity: 0; } }
.rs-check { position: relative; width: 5.6em; height: 5.6em; border-radius: 50%; background: #34c759; display: grid; place-items: center; margin-top: 1.4em; }
.rs-check svg { width: 2.7em; height: 2.7em; stroke: #fff; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; z-index: 1; }
.rs-check-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #34c759; opacity: 0; pointer-events: none; }
.rs-check-dot {
  position: absolute; top: 50%; left: 50%; width: .5em; height: .5em; margin: -.25em 0 0 -.25em;
  border-radius: 50%; background: #34c759; opacity: 0; pointer-events: none;
}

/* iOS-style activity indicator: 8 fixed spokes, opacity sweeps in sequence (not a spinning ring) */
.rs-spin { position: relative; width: 3.6em; height: 3.6em; margin-top: 1.8em; }
.rs-spin i { position: absolute; inset: 0; transform-origin: 50% 50%; }
.rs-spin i::after {
  content: ""; position: absolute; top: 4%; left: 50%; width: 9%; height: 26%; margin-left: -4.5%;
  border-radius: 999px; background: #8e8e93; opacity: .18;
  animation: rs-tick .8s linear infinite;
}
.rs-spin i:nth-child(1) { transform: rotate(0deg); }
.rs-spin i:nth-child(2) { transform: rotate(45deg); }
.rs-spin i:nth-child(3) { transform: rotate(90deg); }
.rs-spin i:nth-child(4) { transform: rotate(135deg); }
.rs-spin i:nth-child(5) { transform: rotate(180deg); }
.rs-spin i:nth-child(6) { transform: rotate(225deg); }
.rs-spin i:nth-child(7) { transform: rotate(270deg); }
.rs-spin i:nth-child(8) { transform: rotate(315deg); }
.rs-spin i:nth-child(1)::after { animation-delay: -.7s; }
.rs-spin i:nth-child(2)::after { animation-delay: -.6s; }
.rs-spin i:nth-child(3)::after { animation-delay: -.5s; }
.rs-spin i:nth-child(4)::after { animation-delay: -.4s; }
.rs-spin i:nth-child(5)::after { animation-delay: -.3s; }
.rs-spin i:nth-child(6)::after { animation-delay: -.2s; }
.rs-spin i:nth-child(7)::after { animation-delay: -.1s; }
.rs-spin i:nth-child(8)::after { animation-delay: 0s; }
@keyframes rs-tick { 0% { opacity: 1 } 100% { opacity: .18 } }
@media (prefers-reduced-motion: reduce) { .rs-spin i::after { animation: none; opacity: .5; } }
.rs-big { font-size: 2.6em; font-weight: 800; letter-spacing: -.03em; margin-top: .3em; }
.rs-big span { font-size: .45em; font-weight: 600; color: #6e6e73; }
.rs-wallets { width: 100%; display: flex; gap: .6em; margin-top: 1.3em; }
.rs-wallet-btn {
  flex: 1; min-height: 2.9em; border-radius: .6em; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: .3em; font-weight: 600; font-size: 1.05em;
}
.rs-wallet-btn img { height: 1.3em; width: auto; display: block; }
.rs-wallet-btn.rs-gpay img { height: 1.1em; }
.rs-divider { width: 100%; display: flex; align-items: center; gap: .7em; margin-top: 1.1em; font-size: .78em; color: #8e8e93; }
.rs-divider i { flex: 1; height: 1px; background: rgba(60, 60, 67, .22); }
.rs-networks { display: flex; gap: .6em; justify-content: center; align-items: center; margin-top: 1em; height: 2.9em; }
.rs-networks img.rs-logo { height: 2.9em; width: auto; border-radius: .6em; box-shadow: 0 1px 3px rgb(0 0 0 / .18); display: block; }
.rs-networks .rs-name {
  height: 2em; padding: 0 .7em; background: #fff; border-radius: .35em;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06); display: grid; place-items: center; font-size: .8em; font-weight: 700; color: #1c1c1e;
}
.rs-field { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: .9em; padding: .9em 1em; margin-top: .8em; font-size: .9em; color: #6e6e73; }
.rs-field b { color: #000; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; }
.rs-chip { display: inline-flex; align-items: center; gap: .4em; margin-top: .8em; padding: .35em .75em; border-radius: 999px; background: #fff; font-size: .8em; font-weight: 600; color: #1c1c1e; }
.rs-chip img { height: 1.2em; width: auto; display: block; }
.rs-rows { width: 100%; background: #fff; border-radius: 1em; margin-top: 1em; padding: .2em 1em; text-align: start; }
.rs-row { display: flex; justify-content: space-between; align-items: center; gap: .6em; padding: .75em 0; font-size: .88em; color: #3a3a3c; border-bottom: 1px solid #ececf0; }
.rs-row:last-child { border-bottom: 0; }
.rs-row b { color: #000; font-weight: 600; white-space: nowrap; }
.rs-row.total b { font-size: 1.1em; }
.rs-row .rs-lbl { display: inline-flex; align-items: center; gap: .4em; }
.rs-row .rs-lbl img { height: 1.15em; width: auto; display: block; }

/* the store's checkout (scene 2): looks like the merchant, not like Rampay */
.rs-shop { padding: 3.9em 1.15em 1.5em; align-items: stretch; text-align: start; background: #fff; }
.rs-shop-head { display: flex; justify-content: space-between; align-items: center; }
.rs-shop-logo { display: inline-flex; align-items: center; gap: .45em; font-weight: 800; font-size: 1.02em; letter-spacing: -.02em; color: #111; }
.rs-shop-logo i { width: 1.25em; height: 1.25em; border-radius: 50%; background: conic-gradient(from 200deg, #7c5cff, #29c5f6, #ffd23f, #ff5c8a, #7c5cff); }
.rs-shop-bag { position: relative; display: grid; place-items: center; width: 1.9em; height: 1.9em; }
.rs-shop-bag svg { width: 1.45em; height: 1.45em; fill: none; stroke: #111; stroke-width: 1.8; stroke-linejoin: round; }
.rs-shop-bag b { position: absolute; top: -.1em; right: -.2em; min-width: 1.15em; height: 1.15em; border-radius: 999px; background: #7c5cff; color: #fff; font-size: .62em; display: grid; place-items: center; }
.rs-shop-steps { display: flex; align-items: center; gap: .45em; margin-top: .9em; font-size: .72em; color: #a1a1a6; font-weight: 600; }
.rs-shop-steps .on { color: #111; }
.rs-shop-steps i { flex: 1; height: 1px; background: #e5e5ea; }
#rs-story .rs-shop-title { margin-top: 1.05em; font-size: 1.3em; font-weight: 800; letter-spacing: -.02em; color: #111; }
.rs-items { margin-top: .55em; }
.rs-item { display: flex; align-items: center; gap: .7em; padding: .65em 0; border-bottom: 1px solid #f0f0f3; }
.rs-thumb { flex: none; width: 3em; height: 3em; border-radius: .8em; display: grid; place-items: center; }
.rs-thumb.t1 { background: #ece8ff; }
.rs-thumb.t2 { background: #fff1d6; }
.rs-thumb svg { width: 2.2em; height: 2.2em; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rs-thumb.t1 svg { stroke: #5b3fd9; }
.rs-thumb.t2 svg { stroke: #d98a00; }
.rs-thumb.t2 svg .f { fill: #d98a00; stroke: none; }
.rs-item-txt { flex: 1; min-width: 0; display: grid; gap: .1em; }
.rs-item-txt b { font-size: .86em; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-item-txt small { font-size: .72em; color: #8e8e93; }
.rs-price { font-size: .86em; font-weight: 700; color: #111; }
.rs-sum { margin-top: .8em; display: grid; gap: .45em; font-size: .82em; color: #6e6e73; }
.rs-sum > div { display: flex; justify-content: space-between; }
.rs-sum .rs-total { margin-top: .35em; padding-top: .7em; border-top: 1px solid #e5e5ea; font-size: 1.25em; font-weight: 800; color: #111; letter-spacing: -.01em; }
.rs-shop-btn { background: #111; border-radius: 999px; font-weight: 700; }

/* ---------- the 3D coin finale (assets/story/coins.js) ---------- */
.rs-coin-gl { inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.rs-dest {
  z-index: 6; opacity: 0; visibility: hidden; translate: -50% 0; text-align: center;
  white-space: nowrap; pointer-events: none; will-change: transform, opacity;
}
.rs-dest-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--rs-fg); }
.rs-dest-who i { width: 18px; height: 18px; border-radius: 50%; display: block; }
.rs-dest-store .rs-dest-who i { background: conic-gradient(from 200deg, #7c5cff, #29c5f6, #ffd23f, #ff5c8a, #7c5cff); }
.rs-dest-fee .rs-dest-who i { border-radius: 5px; background: linear-gradient(135deg, #f7ac4d, #f27636); }
.rs-dest-amt { margin-top: 6px; font: 600 clamp(22px, 2.2vw, 30px)/1.1 var(--rs-display); letter-spacing: -.02em; color: var(--rs-fg); }
.rs-dest-amt small { font-size: .5em; color: var(--rs-muted); font-weight: 500; margin-left: 4px; }
.rs-dest-what { margin-top: 4px; font-size: 13px; color: var(--rs-muted); }
/* fallback (no WebGL): a fixed, CSS-only spot either side of the phone, no coins.js layout needed.
   The phone never fades in this path, so this has to clear its bottom edge within the viewport. */
.rs-dest-static.rs-dest-store { left: calc(50% - 170px); top: calc(50% + var(--rs-ph) / 2 + 18px); }
.rs-dest-static.rs-dest-fee { left: calc(50% + 170px); top: calc(50% + var(--rs-ph) / 2 + 18px); }
@media (max-width: 900px) {
  .rs-dest-static.rs-dest-store { left: calc(50% - 90px); }
  .rs-dest-static.rs-dest-fee { left: calc(50% + 90px); }
}
@media (max-width: 900px) {
  .rs-dest-who { font-size: 13px; }
  .rs-dest-what { font-size: 11px; }
}

.rs-badge {
  left: 50%; translate: -50% 0; top: calc(50% + var(--rs-ph) / 2 + 18px); z-index: 7; opacity: 0;
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rs-muted); white-space: nowrap;
}
.rs-badge img { height: 20px; width: auto; display: block; }

.rs-fx { inset: 0; width: 100%; height: 100%; z-index: 12; pointer-events: none; }

/* ---------- captions: left column on desktop, under the phone on mobile ---------- */
.rs-cap {
  z-index: 8; opacity: 0; visibility: hidden;
  left: max(24px, calc(50% - 560px)); top: 50%; translate: 0 -50%; width: min(340px, calc(50% - var(--rs-pw) / 2 - 64px));
}
.rs-cap h3 {
  margin: 12px 0 0; font-family: var(--rs-display); font-weight: 600; letter-spacing: -.025em;
  font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; color: var(--rs-fg);
}
.rs-cap p { margin-top: 12px; font-size: 17px; line-height: 1.5; color: var(--rs-muted); }
/* the coin finale's own captions: by then the coin is centred and the destinations spread
   left/right, so the usual left-column spot would collide with them */
.rs-cap-top { left: 20px; right: 20px; top: 10svh; translate: none; width: auto; text-align: center; }
.rs-cap-top .rs-eyebrow { justify-content: center; }

.rs-loader { inset-inline: 0; bottom: 0; height: 2px; z-index: 20; background: transparent; }
.rs-loader span { display: block; height: 100%; width: 0; background: var(--rs-accent); transition: width .2s; }
.rs-loader.done { opacity: 0; transition: opacity .6s; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  #rs-story { --rs-ph: min(560px, 58svh); }
  /* the site nav is position:fixed (it overlays the page, it doesn't push content down),
     and it's visible almost the entire time the story is on screen (it un-fades past
     60px of scroll). Its real height is the safe-area inset plus ~52px, which on tall-
     notch phones can exceed a plain svh-based offset, hiding whatever sits under it — so
     these titles clear it by its actual height instead of guessing a percentage. */
  .rs-title, .rs-cap, .rs-cap-top { top: calc(env(safe-area-inset-top, 0px) + 68px); }
  .rs-cap {
    left: 20px; right: 20px; width: auto; bottom: auto; translate: none; text-align: center;
  }
  .rs-cap .rs-eyebrow { justify-content: center; }
  .rs-cap h3 { font-size: 22px; margin-top: 6px; }
  .rs-cap p { font-size: 14px; margin-top: 6px; line-height: 1.4; }
  .rs-badge { display: none; }
  /* "It starts with a card." always wraps to two lines at this width anyway, so it may
     as well use the room that gives it instead of sitting at the single-line-fit floor */
  .rs-title h2 { font-size: clamp(50px, 13vw, 64px); }
}
@media (max-width: 900px) and (max-height: 700px) {
  #rs-story { --rs-ph: min(480px, 54svh); }
  /* drop the description line only — .rs-eyebrow is also a <p>, and it's the step label,
     not the thing short screens have no room for */
  .rs-cap p:not(.rs-eyebrow) { display: none; }
}

/* ---------- reduced motion: the opening picture and the story as text ---------- */
#rs-story.rs-static { height: auto; }
#rs-story.rs-static .rs-stage { position: relative; height: 100svh; }
#rs-story.rs-static .rs-hint, #rs-story.rs-static .rs-loader { display: none; }
#rs-story.rs-static .rs-list { display: grid; gap: 28px; padding: 56px 20px 80px; max-width: 640px; margin: 0 auto; }
#rs-story.rs-static .rs-list .rs-cap { position: static; opacity: 1; visibility: visible; translate: none; width: auto; text-align: start; }
#rs-story.rs-static .rs-list .rs-cap .rs-eyebrow { justify-content: flex-start; }
