/* SwapMe page: the one animated page on the site. Loaded only there.
   Motion uses transform and opacity only; every loop stops under prefers-reduced-motion. */
.sm-stage {
  --e-out: cubic-bezier(.23, 1, .32, 1); --e-io: cubic-bezier(.77, 0, .175, 1);
  --e-back: cubic-bezier(.34, 1.56, .64, 1); --e-sine: cubic-bezier(.37, 0, .63, 1);
  --R: 17cqw; --r: 5.2cqw; --coin: 7.4cqw;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 20px; margin-inline: 0;
  background: #101012; color: #FFF3E6; container-type: inline-size; isolation: isolate;
}
.sm-stage img { max-width: none; border-radius: 0; aspect-ratio: auto; object-fit: contain; }
.sm-bg, .sm-copy { position: absolute; inset: 0; }
.sm-bg { inset: -3%; z-index: 0; }
.sm-copy { z-index: 2; }

/* backdrop: two drifting lights, Prague skyline, rising embers */
.sm-blob { position: absolute; border-radius: 50%; }
.sm-blob.b1 { width: 74cqw; height: 74cqw; right: -14cqw; top: -14cqw; background: radial-gradient(closest-side, rgba(255, 89, 0, .62), rgba(255, 89, 0, .14) 55%, transparent); animation: sm-fade 1.2s both, sm-drift1 16s var(--e-sine) infinite alternate; }
.sm-blob.b2 { width: 50cqw; height: 50cqw; left: -14cqw; bottom: -26cqw; background: radial-gradient(closest-side, rgba(255, 178, 92, .30), transparent); animation: sm-fade 1.2s .2s both, sm-drift2 21s var(--e-sine) infinite alternate; }
.sm-sky { position: absolute; left: 0; bottom: 2%; width: 100%; height: 36%; }
.sm-sky.back { fill: rgba(255, 140, 60, .13); animation: sm-sky 1.4s .05s var(--e-out) both; }
.sm-sky.front { fill: #0B0B0D; animation: sm-sky 1.2s .2s var(--e-out) both; }
.sm-p { position: absolute; bottom: 0; width: .7cqw; height: .7cqw; border-radius: 50%; background: #FFB25C; opacity: 0; animation: sm-up 7s linear infinite; }
.sm-p.p1 { left: 12%; animation-delay: 1.2s; } .sm-p.p2 { left: 31%; animation-delay: 3.6s; animation-duration: 9s; width: .5cqw; height: .5cqw; }
.sm-p.p3 { left: 47%; animation-delay: 2.1s; animation-duration: 8s; } .sm-p.p4 { left: 63%; animation-delay: 5s; width: .5cqw; height: .5cqw; }
.sm-p.p5 { left: 82%; animation-delay: .4s; animation-duration: 10s; } .sm-p.p6 { left: 93%; animation-delay: 4.2s; animation-duration: 8s; width: .9cqw; height: .9cqw; }

/* copy: logo wipe with a light sweep, tagline word by word, the swap reel */
.sm-logo-w { position: absolute; left: 7%; top: 16%; width: 37%; aspect-ratio: 640 / 112; animation: sm-wipe 1s .15s var(--e-out) both; }
.sm-logo-w img { display: block; width: 100%; height: 100%; }
.sm-shine { position: absolute; inset: 0; overflow: hidden; -webkit-mask: url(/assets/img/swapme-logo.webp) center / 100% 100% no-repeat; mask: url(/assets/img/swapme-logo.webp) center / 100% 100% no-repeat; }
.sm-shine::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 36%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95), transparent); transform: translateX(-120%); animation: sm-shine 6.5s 1.3s var(--e-io) infinite; }
.sm-tag { position: absolute; left: 7%; top: 36%; margin: 0; max-width: 48%; font: 800 3.5cqw/1.14 var(--font-head); letter-spacing: -.01em; color: #FFF3E6; text-wrap: balance; }
.sm-tag::before { content: ""; display: block; width: 9cqw; height: .6cqw; margin-bottom: 1.7cqw; border-radius: 1cqw; background: #FF5900; transform-origin: left; animation: sm-line .8s .4s var(--e-out) both; }
.sm-tag .w { display: inline-block; animation: sm-rise .7s var(--e-out) both; animation-delay: calc(.5s + var(--i) * 70ms); }
.sm-cap { position: absolute; left: 7%; top: 64.5%; margin: 0; font: 700 1.45cqw/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: #FFB25C; animation: sm-rise .7s .95s var(--e-out) both; }
.sm-slot { position: absolute; left: 7%; top: 70%; display: flex; align-items: center; gap: 1.3cqw; padding: 1.1cqw 1.3cqw; border-radius: 99cqw; background: rgba(255, 243, 230, .07); border: 1px solid rgba(255, 243, 230, .18); animation: sm-rise .8s 1.05s var(--e-out) both; }
.sm-reel { display: block; height: 4.6cqw; overflow: hidden; border-radius: 99cqw; }
.sm-reel > span { display: flex; flex-direction: column; animation: sm-reel 9s 2.4s var(--e-io) infinite; }
.sm-reel b { display: grid; place-items: center; height: 4.6cqw; min-width: 12.5cqw; padding: 0 2cqw; border-radius: 99cqw; font: 800 2.2cqw/1 var(--font-head); background: #FFF3E6; color: #141416; }
.sm-reel.r2 b { background: #FF5900; color: #fff; }
.sm-reel.r2 > span { animation-delay: 2.52s; }
.sm-ico { width: 3.2cqw; height: 3.2cqw; color: #FFB25C; animation: sm-flip 9s 2.4s var(--e-io) infinite; }

/* hero: mascot with coins on an orbit that passes behind and in front of it */
.sm-hero { position: absolute; z-index: 3; right: 2%; top: 0; bottom: 0; width: 44%; }
.sm-ring { position: absolute; left: 50%; top: 60%; width: calc(var(--R) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--R) * -1); border: 1px solid rgba(255, 178, 92, .34); border-radius: 50%; z-index: 3; animation: sm-fade 1.2s 1s both; }
.sm-shadow { position: absolute; left: 50%; bottom: 2%; width: 24cqw; height: 3.4cqw; margin-left: -12cqw; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); z-index: 4; animation: sm-fade .8s .5s both, sm-shadow 5.5s 1.3s ease-in-out infinite; }
.sm-stage img.sm-fox { position: absolute; left: 50%; bottom: 2%; z-index: 5; height: 51cqw; width: 28.99cqw; margin-left: -14.5cqw; transform-origin: 50% 100%; filter: drop-shadow(0 1.5cqw 2.5cqw rgba(0, 0, 0, .45)); animation: sm-pop .9s .25s var(--e-back) both, sm-float 5.5s 1.3s ease-in-out infinite; }
.sm-orb { position: absolute; left: 50%; top: 60%; width: 0; height: 0; z-index: 4; transform: translateX(calc(var(--R) * var(--sx))); animation: sm-ox 7s var(--e-sine) infinite alternate, sm-oz 14s step-end infinite; animation-delay: calc(var(--k) * -2.333s - 3.5s), calc(var(--k) * -2.333s); }
.sm-oy { display: block; transform: translateY(calc(var(--r) * var(--sy))); animation: sm-oy 7s var(--e-sine) infinite alternate; animation-delay: calc(var(--k) * -2.333s); }
.sm-coin { display: grid; place-items: center; width: var(--coin); height: var(--coin); margin: calc(var(--coin) / -2); border-radius: 50%; font: 800 calc(var(--coin) * .21)/1 var(--font-head); color: #141416; background: radial-gradient(circle at 30% 25%, #fff, #FFE9CF 60%, #F2C894); box-shadow: inset 0 0 0 calc(var(--coin) * .05) rgba(20, 20, 22, .12), 0 1cqw 2cqw rgba(0, 0, 0, .4); animation: sm-coin .6s var(--e-back) both; animation-delay: calc(1.1s + var(--k) * 90ms); }
.sm-coin.f { color: #fff; background: radial-gradient(circle at 30% 25%, #FF8A3D, #FF5900 60%, #D94A00); }
.sm-paused *, .sm-paused *::before { animation-play-state: paused !important; }

@keyframes sm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sm-rise { from { opacity: 0; transform: translateY(2.6cqw); } to { opacity: 1; transform: none; } }
@keyframes sm-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sm-wipe { from { clip-path: inset(0 100% 0 0); opacity: 0; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes sm-shine { 0% { transform: translateX(-120%); } 24%, 100% { transform: translateX(400%); } }
@keyframes sm-sky { from { opacity: 0; transform: translateY(18%); } to { opacity: 1; transform: none; } }
@keyframes sm-drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-7cqw, 5cqw) scale(1.14); } }
@keyframes sm-drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(9cqw, -6cqw) scale(1.2); } }
@keyframes sm-up { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .85; } 100% { transform: translateY(-52cqw); opacity: 0; } }
@keyframes sm-pop { from { opacity: 0; transform: translateY(10%) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes sm-float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -1.6%; rotate: -1.2deg; } }
@keyframes sm-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.9); opacity: .75; } }
@keyframes sm-coin { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sm-ox { from { transform: translateX(calc(var(--R) * -1)); } to { transform: translateX(var(--R)); } }
@keyframes sm-oy { from { transform: translateY(calc(var(--r) * -1)) scale(.62); opacity: .55; } to { transform: translateY(var(--r)) scale(1.08); opacity: 1; } }
@keyframes sm-oz { 0% { z-index: 4; } 25% { z-index: 6; } 75%, 100% { z-index: 4; } }
@keyframes sm-reel { 0%, 24% { transform: translateY(0); } 33%, 57% { transform: translateY(-25%); } 66%, 90% { transform: translateY(-50%); } 99%, 100% { transform: translateY(-75%); } }
@keyframes sm-flip { 0%, 24% { transform: rotate(0); } 33%, 57% { transform: rotate(180deg); } 66%, 90% { transform: rotate(360deg); } 99%, 100% { transform: rotate(540deg); } }
@keyframes sm-pulse { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

/* phone: taller stage, copy on top, mascot below */
@media (max-width: 640px) {
  .sm-stage { aspect-ratio: 4 / 5; --R: 31cqw; --r: 8.5cqw; --coin: 11.5cqw; border-radius: 16px; }
  .sm-logo-w { left: 8%; top: 6.5%; width: 58%; }
  .sm-tag { left: 8%; top: 17.5%; max-width: 86%; font-size: 6.2cqw; }
  .sm-tag::before { width: 14cqw; height: 1cqw; margin-bottom: 2.6cqw; }
  .sm-cap { left: 8%; top: 37.5%; font-size: 2.7cqw; }
  .sm-slot { left: 8%; top: 41%; gap: 2.2cqw; padding: 1.8cqw 2.2cqw; }
  .sm-reel, .sm-reel b { height: 8cqw; } .sm-reel b { min-width: 21cqw; padding: 0 3cqw; font-size: 3.9cqw; }
  .sm-ico { width: 5.4cqw; height: 5.4cqw; }
  .sm-hero { right: 0; width: 100%; top: 50%; }
  .sm-stage img.sm-fox { height: 60cqw; width: 34.1cqw; margin-left: -17.05cqw; }
  .sm-shadow { width: 36cqw; height: 5cqw; margin-left: -18cqw; }
  .sm-p { width: 1.2cqw; height: 1.2cqw; }
}

/* article body on this page: numbered steps as a timeline, accent bars, address pill */
.sm-page .prose h2::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 10px; border-radius: 4px; background: #FF5900; transform-origin: left; }
.sm-page .prose > ol { list-style: none; padding-left: 0; counter-reset: sm; }
.sm-page .prose > ol > li { position: relative; margin: 0; padding: .1em 0 1.3em 3.3em; counter-increment: sm; }
.sm-page .prose > ol > li::before { content: counter(sm); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; font: 800 .95em/1 var(--font-head); color: #fff; background: #FF5900; box-shadow: 0 0 0 5px rgba(255, 89, 0, .16); }
.sm-page .prose > ol > li:not(:last-child)::after { content: ""; position: absolute; left: 1.05em; top: 2.5em; bottom: .15em; width: 2px; margin-left: -1px; background: linear-gradient(#FF5900, rgba(255, 89, 0, .15)); transform-origin: top; }
.sm-addr { display: inline-flex; align-items: center; gap: .5em; padding: .3em .85em .3em .55em; border-radius: 99px; background: rgba(255, 89, 0, .1); border: 1px solid rgba(255, 89, 0, .4); }
.sm-pin { position: relative; flex: none; width: 1.15em; height: 1.15em; color: #FF5900; }
.sm-pin svg { display: block; width: 100%; height: 100%; }
.sm-pin::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 12px; height: 5px; margin-left: -6px; border: 2px solid #FF5900; border-radius: 50%; animation: sm-pulse 2.4s cubic-bezier(.23, 1, .32, 1) infinite; }

/* scroll reveal: classes are added by swapme.js, so without JS everything is simply visible */
.sm-rv { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.23, 1, .32, 1), transform .6s cubic-bezier(.23, 1, .32, 1); transition-delay: calc(var(--i, 0) * 70ms); }
tr.sm-rv { transform: none; }
.sm-rv.sm-in { opacity: 1; transform: none; }
.sm-page .prose h2.sm-rv::after { transform: scaleX(0); transition: transform .7s .18s cubic-bezier(.23, 1, .32, 1); }
.sm-page .prose h2.sm-rv.sm-in::after { transform: scaleX(1); }
.sm-page .prose > ol > li.sm-rv::before { opacity: 0; transform: scale(.9); transition: opacity .3s, transform .5s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i, 0) * 70ms + 80ms); }
.sm-page .prose > ol > li.sm-rv.sm-in::before { opacity: 1; transform: none; }
.sm-page .prose > ol > li.sm-rv::after { transform: scaleY(0); transition: transform .8s cubic-bezier(.23, 1, .32, 1); transition-delay: calc(var(--i, 0) * 70ms + 220ms); }
.sm-page .prose > ol > li.sm-rv.sm-in::after { transform: scaleY(1); }
.sm-rv .sm-pin svg { opacity: 0; transform: translateY(-16px); transition: opacity .25s .35s, transform .6s .35s cubic-bezier(.34, 1.56, .64, 1); }
.sm-rv.sm-in .sm-pin svg { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sm-stage *, .sm-stage *::before, .sm-stage *::after, .sm-pin::after { animation: none !important; }
  .sm-shine, .sm-p, .sm-pin::after { display: none; }
}

/* very bottom of the page: topic tags and, on the Russian page, the Telegram contact */
.sm-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 1.4em 0 .4em; font-size: .78rem; color: var(--ink-3); }
.sm-contact { margin: 0; font-size: .78rem; color: var(--ink-3); }
.sm-contact a { color: inherit; }
.sm-page .prose a.sm-tg { display: inline-block; padding: .15em .7em; border-radius: 99px; background: #FF5900; color: #fff; font-weight: 700; text-decoration: none; }
.sm-page .prose a.sm-tg:hover { background: #D94A00; }
