/* Bybit cover (bybit-cover.js). One layered scene from the original cover: warm gradient, orbit
   rings, sparkles and streaks, the Bybit wordmark, two coins, the laptop and the phone. On load it
   assembles itself (laptop and phone swing in together, the coins pop out), then the devices play
   the BLIK flow in a loop; the five steps below jump to a screen. Reduced motion: a still. */
/* a rounded frame as wide as the shell: from the directory's left edge to the content's right edge */
.bp-cover{position:relative;width:100%;aspect-ratio:1040/600;max-height:88vh;border-radius:28px;overflow:hidden;isolation:isolate;
  background:radial-gradient(60% 75% at 16% 34%,#ffd6ad 0,rgba(255,214,173,0) 70%),radial-gradient(50% 70% at 88% 78%,#ffe2c2 0,rgba(255,226,194,0) 70%),linear-gradient(115deg,#fff1e2 0%,#fff8f0 55%,#fff3e6 100%)}
/* the screens' typeface for the typed amount and code: IBM Plex Sans, digits only (OFL) */
@font-face{font-family:"Plex Digits";src:url(/d-case/site/assets/fonts/plex-digits-400.woff) format("woff");font-weight:400;font-display:swap}
@font-face{font-family:"Plex Digits";src:url(/d-case/site/assets/fonts/plex-digits-500.woff) format("woff");font-weight:500;font-display:swap}
.bp-cover>*,.cv-bg>*,.cv-scene>*{position:absolute}
/* the composition: 1040 × 600 proportions, centred (short windows cap the height); every layer is placed in its % */
.cv-scene{top:0;bottom:0;left:50%;height:100%;aspect-ratio:1040/600;translate:-50% 0}
.cv-bg{inset:0;z-index:0;pointer-events:none}
.cv-rings{inset:0;width:100%;height:100%;overflow:visible}
.cv-ring{fill:none;stroke:#ffb15c;stroke-width:2.2;opacity:.55}
.cv-ring.r2{stroke:#ffc58a;opacity:.45}
.cv-ring.r3{stroke:#ffcf9e;opacity:.4}
.cv-streaks line{stroke:#ffb468;stroke-width:1.6;stroke-linecap:round;opacity:.5}
.cv-spark{width:2.2%;aspect-ratio:1;fill:#ff9c2e}
.cv-spark svg{display:block;width:100%;height:100%}
.cv-spark.k1{left:37%;top:13%}.cv-spark.k2{left:25%;top:36%;width:1.6%}.cv-spark.k3{left:52%;top:85%;width:1.8%}
.cv-spark.k4{left:93%;top:12%;width:1.5%}.cv-spark.k5{left:6.5%;top:60%;width:1.4%}
.cv-logo{left:5.5%;top:8.5%;width:15%;height:auto;z-index:2}
.cv-coin{height:auto;z-index:2;filter:drop-shadow(0 10px 16px rgba(160,80,0,.18))}
.cv-btc{left:9.5%;top:35%;width:11%}
.cv-usdc{left:19.5%;top:66%;width:7%}

/* the devices: the stage keeps the original two-device composition */
.bp-devices-stage{left:28.5%;top:10.5%;width:66%;aspect-ratio:3127/1785;z-index:3}
.cv-web,.cv-phone{position:absolute}
.cv-web{left:0;top:6.8%;width:80.96%} /* hero-web-full.png: the laptop completed, its right end tucked under the phone */
.cv-phone{left:72.4%;top:0;width:27.6%}
.cv-web>img,.cv-phone>img{display:block;width:100%;height:auto;filter:drop-shadow(0 22px 30px rgba(120,60,0,.2))}
/* screens laid into the device images, measured from hero-web.png and hero-mobile.png */
.cv-web-screen{position:absolute;left:10.79%;top:8.4%;width:78.42%;height:81.1%;overflow:hidden;pointer-events:none;container-type:size}
.cv-web-screen>img,.cv-web-code,.cv-web-setup{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top center;opacity:0;transition:opacity .5s ease}
.cv-web-code img,.cv-web-setup img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
/* two screenshots carry white the real page doesn't have: the setup view ends in 85 rows of white
   (of 1195), the cashier starts with one white row. Clip them, and let the page's own grey (setup)
   or the nav's near-black (cashier) fill in, so no white edge shows inside the laptop. */
/* every one of the four screenshots starts with a lighter first row (from how they were cropped),
   which showed as a thin light line under the bezel on all five steps: trim it off each layer and let
   the nav's near-black show instead */
.cv-web-screen{background:#121214}
.cv-web-screen>img,.cv-web-code,.cv-web-setup{clip-path:inset(1.5px 0 0)}
.cv-web-setup{background:#f5f7fa}
.cv-web-setup img{clip-path:inset(0 0 7.2% 0)}
.cv-web-screen img[data-web=done]{z-index:1}
.cv-web-screen>.on{opacity:1}
/* the web BLIK modal: the same code as the phone, typed into the six boxes (positions from the 1888 × 1195 view) */
.cv-wdigits i,.cv-wbox{position:absolute;top:49.37%;width:4.24%;height:6.61%;border-radius:.45cqw}
.cv-wdigits i{display:grid;place-items:center;color:#121214;font:400 2.86cqw/1 "Plex Digits","IBM Plex Sans",Inter,system-ui,sans-serif;font-style:normal;opacity:0;transform:scale(.7);transition:opacity .12s,transform .2s cubic-bezier(.3,1.6,.5,1)}
.cv-wdigits i.on{opacity:1;transform:none}
.cv-wdigits i:nth-child(1){left:35.49%}.cv-wdigits i:nth-child(2){left:40.41%}.cv-wdigits i:nth-child(3){left:45.34%}
.cv-wdigits i:nth-child(4){left:50.26%}.cv-wdigits i:nth-child(5){left:55.19%}.cv-wdigits i:nth-child(6){left:60.17%}
.cv-wbox{box-sizing:border-box;border:max(1px,.1cqw) solid #f7a600;opacity:0;transition:left .18s ease,opacity .2s}
.cv-wbox.on{opacity:1}
.cv-phone-screen{position:absolute;left:3.57%;top:2.24%;width:92.86%;height:95.53%;border-radius:11%/5.2%;overflow:hidden;container-type:size;pointer-events:none;background:#101014}
/* the incoming screen fades in on top of the outgoing one, which stays solid until it is covered */
.cv-shot{position:absolute;inset:0;opacity:0}
.cv-shot.on{opacity:1}
.cv-shot.in{z-index:1;animation:cv-in .35s ease both}
@keyframes cv-in{from{opacity:0}to{opacity:1}}
.cv-shot img{display:block;width:100%;height:100%;object-fit:cover}
/* typed amount over the placeholder, typed code over the six boxes (positions from the 600 × 1300 screens) */
.cv-amount{position:absolute;z-index:1;left:4.4%;top:17.6%;width:52%;height:4.4%;display:flex;align-items:center;padding-left:3%;background:#25282c;color:#fff;font:500 4.6cqw/1 "Plex Digits","IBM Plex Sans",Inter,system-ui,sans-serif}
.cv-amount:empty{display:none}
/* the web amount field (web-setup-view.png, 1888 × 1195): typed over its placeholder */
.cv-wamount{position:absolute;left:58.69%;top:37.66%;width:10.4%;height:3.1%;display:flex;align-items:center;background:#f3f5f7;color:#121214;font:500 1.38cqw/1 "Plex Digits","IBM Plex Sans",Inter,system-ui,sans-serif}
.cv-wamount:empty{display:none}
.cv-digits i{position:absolute;top:15.85%;width:13.3%;height:5.85%;display:grid;place-items:center;border-radius:6%/12%;background:#25282c;color:#fff;font:500 6cqw/1 "Plex Digits","IBM Plex Sans",Inter,system-ui,sans-serif;font-style:normal;opacity:0;transform:scale(.7);transition:opacity .12s,transform .2s cubic-bezier(.3,1.6,.5,1)}
.cv-digits i.on{opacity:1;transform:none}
.cv-digits i:nth-child(1){left:4%}.cv-digits i:nth-child(2){left:20%}.cv-digits i:nth-child(3){left:35.7%}
.cv-digits i:nth-child(4){left:51.5%}.cv-digits i:nth-child(5){left:67.2%}.cv-digits i:nth-child(6){left:83%}
.cv-box{position:absolute;top:15.85%;width:13.3%;height:5.85%;border:1.5px solid #f7a600;border-radius:6%/12%;opacity:0;transition:left .18s ease,opacity .2s;z-index:1}
.cv-box.on{opacity:1}
.cv-tap{position:absolute;left:0;top:0;width:12cqw;height:12cqw;margin:-6cqw 0 0 -6cqw;border-radius:50%;background:rgba(255,255,255,.55);box-shadow:0 0 0 2px rgba(255,255,255,.35);opacity:0;z-index:2}

/* the live flow: the step being played (buttons), and the hand-off annotation */
.cv-steps{left:5.5%;bottom:6%;z-index:4;display:flex;gap:6px;margin:0;padding:0;list-style:none}
/* each step is a button: it jumps the phone and laptop to that screen, holds, then the loop goes on */
.cv-steps button{display:flex;align-items:center;gap:6px;padding:4px 10px 4px 5px;border:0;border-radius:999px;background:rgba(255,255,255,.7);font:inherit;font-size:clamp(12px,.85vw,15px);color:var(--muted);cursor:pointer;transition:background .3s,color .3s,box-shadow .3s,transform .2s}
.cv-steps button:hover{background:#fff;color:var(--ink);transform:translateY(-1px)}
.cv-steps button:focus-visible{outline:2px solid var(--bp-gold,#f7a600);outline-offset:2px}
.cv-steps b{display:grid;place-items:center;width:1.5em;height:1.5em;border-radius:50%;background:#f1e4d3;font-size:10.5px;font-weight:600;color:var(--muted);transition:background .3s,color .3s}
.cv-steps button.on{background:#fff;color:var(--ink);box-shadow:0 4px 12px rgba(150,80,0,.12)}
.cv-steps button.on b{background:var(--bp-gold,#f7a600);color:#000}
.cv-note{left:67%;top:2.5%;z-index:4;margin:0;padding:6px 12px;border-radius:10px 10px 10px 2px;background:#1c1d21;color:#fff;font-size:12.5px;white-space:nowrap;opacity:0;transform:translateY(6px) scale(.95);transform-origin:0 100%;transition:opacity .3s,transform .35s cubic-bezier(.3,1.5,.5,1)}
.cv-note.on{opacity:1;transform:none}
/* gentle life: sparkles twinkle, the coins drift once the scene is built */
@media(prefers-reduced-motion:no-preference){
  .cv-spark{animation:cv-twinkle 3.2s ease-in-out infinite}
  .cv-spark.k2{animation-delay:-1.1s}.cv-spark.k3{animation-delay:-2.2s}.cv-spark.k4{animation-delay:-.6s}.cv-spark.k5{animation-delay:-1.7s}
  .bp-cover.is-built .cv-btc{animation:cv-float 6s ease-in-out infinite}
  .bp-cover.is-built .cv-usdc{animation:cv-float 7s ease-in-out -2.5s infinite}
  /* built once on load; before that every layer waits off its mark */
  .bp-cover .cv-ring{stroke-dasharray:1600;stroke-dashoffset:1600;transition:stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1) .1s}
  .bp-cover .cv-streaks line,.bp-cover .cv-spark{opacity:0;transition:opacity .6s ease}
  .bp-cover .cv-logo{opacity:0;transform:translateY(10px);transition:opacity .6s ease .15s,transform .8s cubic-bezier(.22,1,.36,1) .15s}
  .bp-cover .cv-web{opacity:0;transform:translateX(-16%) rotate(-5deg);transition:opacity .5s ease .3s,transform 1s cubic-bezier(.3,1.2,.5,1) .3s}
  /* laptop and phone swing in from either side at almost the same moment and land together */
  .bp-cover .cv-phone{opacity:0;transform:translate(34%,22%) rotate(12deg);transition:opacity .45s ease .42s,transform 1s cubic-bezier(.3,1.3,.5,1) .42s}
  .bp-cover .cv-coin{opacity:0;transform:scale(.3) rotate(-40deg);transition:opacity .4s ease,transform .9s cubic-bezier(.34,1.6,.5,1)}
  .bp-cover .cv-btc{transition-delay:.95s}.bp-cover .cv-usdc{transition-delay:1.1s}
  .bp-cover.is-in .cv-ring{stroke-dashoffset:0}
  .bp-cover.is-in .cv-streaks line,.bp-cover.is-in .cv-spark{opacity:.5}
  .bp-cover.is-in .cv-spark{opacity:1;transition-delay:1s}
  .bp-cover.is-in .cv-logo,.bp-cover.is-in .cv-web,.bp-cover.is-in .cv-phone,.bp-cover.is-in .cv-coin{opacity:1;transform:none}
  .bp-cover .bp-devices-stage{transition:transform .5s cubic-bezier(.22,1,.36,1)}
  .bp-cover .cv-steps{opacity:0;translate:0 8px;pointer-events:none;transition:opacity .5s ease,translate .6s cubic-bezier(.22,1,.36,1)}
  .bp-cover.is-built .cv-steps{opacity:1;translate:0 0;pointer-events:auto}
}
@keyframes cv-twinkle{0%,100%{transform:scale(1) rotate(0);opacity:.95}50%{transform:scale(.55) rotate(45deg);opacity:.5}}
@keyframes cv-float{0%,100%{translate:0 0}50%{translate:0 -6%}}


@media(max-width:700px){
  .bp-cover{aspect-ratio:4/3.5;max-height:none;border-radius:20px}
  .cv-scene{inset:0;height:auto;aspect-ratio:auto;translate:none}
  .bp-devices-stage{left:5%;top:26%;width:86%}
  .cv-logo{left:6%;top:8%;width:27%}
  .cv-btc{left:76%;top:4%;width:13%}
  .cv-usdc{left:64%;top:9%;width:8%}
  .cv-spark.k1{left:44%;top:10%;width:3.4%}.cv-spark.k2{left:58%;top:22%;width:2.6%}.cv-spark.k3{left:48%;top:92%;width:2.8%}.cv-spark.k4{display:none}.cv-spark.k5{left:5%;top:88%;width:2.6%}
  .cv-steps{left:6%;bottom:5%;gap:5px}
  .cv-steps button{padding:3px}
  .cv-steps button span{display:none}
  .cv-steps b{width:20px;height:20px;font-size:11px}
  .cv-note{left:auto;right:4%;top:auto;bottom:4%;font-size:11px}
    .bp-cover .cv-note{left:6%;right:auto;top:23%;bottom:auto}
  }
