/* Slide 2's phone: a drawn-in-code showcase instead of a screenshot. One trade, three buttons, and a
   12-second loop: a fingertip taps Breakeven (the stop moves to entry), taps Bank 50% (half the lots go,
   profit banked), then holds Close all (the bar fills, the trade folds away). Monochrome, transform and
   opacity only; it plays only while slide 2 is on screen and stands still with reduced motion. */
.shot.showcase { width: 256px; border: 0; border-radius: 42px; overflow: visible; background: none; box-shadow: none;
  clip-path: inset(100% -40px -40px -40px round 42px); }
.on .shot.showcase { clip-path: inset(-40px -40px -40px -40px round 42px); }
@media (min-width: 900px) { .slide[data-slide="1"] { grid-template-columns: minmax(0, 1fr) 256px; } .shot.showcase { width: 256px; } }

.sc-phone { --d: 12s; position: relative; width: 256px; height: 528px; padding: 8px; box-sizing: border-box; border-radius: 42px;
  background: linear-gradient(145deg, #3a3b3f 0%, #121214 22%, #0a0a0b 60%, #2a2b2e 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 1px rgba(255, 255, 255, .35), 0 40px 90px -20px rgba(0, 0, 0, .85), 0 0 80px -30px rgba(255, 255, 255, .25); }
.sc-phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;   /* a soft glass sheen */
  background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 30%); }
.sc-screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: radial-gradient(120% 60% at 50% 0%, #1a1a1c 0%, #08080a 60%);
  font-family: var(--font, system-ui, sans-serif); color: #fff; font-variant-numeric: tabular-nums; }
.sc-island { position: absolute; top: 9px; left: 50%; width: 72px; height: 20px; margin-left: -36px; border-radius: 12px; background: #000; }
.sc-status { position: absolute; top: 10px; left: 22px; right: 20px; display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.sc-status i { display: inline-block; width: 16px; height: 8px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 2px; position: relative; top: 1px; }
.sc-status i::after { content: ""; position: absolute; inset: 1px 3px 1px 1px; background: #fff; border-radius: 1px; }

.sc-head { position: absolute; top: 44px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; }
.sc-brand { font-size: 12px; font-weight: 700; letter-spacing: .22em; }
.sc-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16);
  font: 500 9px var(--font-mono, ui-monospace, monospace); letter-spacing: .14em; color: rgba(255, 255, 255, .75); }
.sc-live b { width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }

.sc-eq { position: absolute; top: 80px; left: 18px; right: 18px; }
.sc-lbl { font: 500 9px var(--font-mono, ui-monospace, monospace); letter-spacing: .18em; color: rgba(255, 255, 255, .5); text-transform: uppercase; }
.sc-num { margin-top: 4px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.sc-num small { font-size: 17px; color: rgba(255, 255, 255, .55); font-weight: 500; }
.sc-spark { display: block; width: 100%; height: 44px; margin-top: 10px; overflow: visible; }
.sc-spark path { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.sc-spark .area { stroke: none; fill: url(#scFade); opacity: 0; }
.sc-spark circle { fill: #fff; opacity: 0; }
.on .sc-spark path:not(.area) { animation: sc-draw 1.6s var(--ease-out, ease-out) .5s forwards; }
.on .sc-spark .area { animation: sc-in .8s ease-out 1.4s forwards; }
.on .sc-spark circle { animation: sc-in .4s ease-out 2s forwards, sc-pulse 2.4s ease-in-out 2.4s infinite; }

/* the one open trade */
.sc-card { position: absolute; top: 200px; left: 14px; right: 14px; height: 92px; padding: 13px 14px; box-sizing: border-box; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)); border: 1px solid rgba(255, 255, 255, .1); transform-origin: 50% 0; }
.sc-row { display: flex; justify-content: space-between; align-items: baseline; }
.sc-sym { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.sc-sym em { font-style: normal; margin-left: 6px; font: 500 9.5px var(--font-mono, ui-monospace, monospace); letter-spacing: .12em; color: rgba(255, 255, 255, .6); }
.sc-pl { font-size: 15px; font-weight: 600; }
.sc-sub { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, .5); }
.sc-swap { position: relative; display: inline-block; }
.sc-swap > * { display: inline-block; }
.sc-swap > :last-child { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }
.sc-swap.r > :last-child { left: auto; right: 0; }
.sc-sl { position: absolute; left: 14px; bottom: 11px; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .18); font: 500 9.5px var(--font-mono, ui-monospace, monospace); letter-spacing: .06em; color: rgba(255, 255, 255, .75); }
.sc-sl svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sc-empty { position: absolute; top: 232px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .45); opacity: 0; }

/* the short note that slides in after a tap */
.sc-toast { position: absolute; top: 306px; left: 50%; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 99px; white-space: nowrap;
  background: #fff; color: #000; font-size: 11.5px; font-weight: 600; opacity: 0; transform: translate3d(-50%, 6px, 0) scale(.96); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.sc-toast svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* the three buttons */
.sc-btns { position: absolute; left: 14px; right: 14px; top: 352px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-b { position: relative; height: 58px; padding: 10px 12px; box-sizing: border-box; border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); text-align: left; }
.sc-b b { display: block; font-size: 12.5px; font-weight: 600; }
.sc-b span { display: block; margin-top: 3px; font-size: 9.5px; color: rgba(255, 255, 255, .5); }
.sc-b::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, .16); opacity: 0; }
.sc-b.all { grid-column: 1 / -1; height: 50px; display: flex; align-items: center; justify-content: center; text-align: center;
  background: #fff; border-color: #fff; color: #000; }
.sc-b.all b { font-size: 13px; position: relative; z-index: 1; }
.sc-b.all::before { display: none; }
.sc-fill { position: absolute; inset: 0; background: linear-gradient(90deg, #cfd0d3, #9b9ca0); transform: scaleX(0); transform-origin: 0 50%; }
.sc-home { position: absolute; bottom: 8px; left: 50%; width: 92px; height: 4px; margin-left: -46px; border-radius: 4px; background: rgba(255, 255, 255, .55); }

/* the fingertip */
.sc-finger { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .22) 45%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); transform: translate3d(183px, 540px, 0); }

/* ---------- the loop (runs only while the slide is on) ---------- */
.on .sc-finger { animation: sc-finger var(--d) var(--ease-in-out, ease-in-out) 1.2s infinite; }
.on .sc-b.be::before { animation: sc-tapA var(--d) linear 1.2s infinite; }
.on .sc-b.bank::before { animation: sc-tapB var(--d) linear 1.2s infinite; }
.on .sc-fill { animation: sc-fill var(--d) linear 1.2s infinite; }
.on .sc-sl .sc-swap > :first-child { animation: sc-outA var(--d) linear 1.2s infinite; }
.on .sc-sl .sc-swap > :last-child { animation: sc-inA var(--d) linear 1.2s infinite; }
.on .sc-lots > :first-child, .on .sc-pl > :first-child { animation: sc-outB var(--d) linear 1.2s infinite; }
.on .sc-lots > :last-child, .on .sc-pl > :last-child { animation: sc-inB var(--d) linear 1.2s infinite; }
.on .sc-toast.t1 { animation: sc-toastA var(--d) var(--ease-out, ease-out) 1.2s infinite; }
.on .sc-toast.t2 { animation: sc-toastB var(--d) var(--ease-out, ease-out) 1.2s infinite; }
.on .sc-toast.t3 { animation: sc-toastC var(--d) var(--ease-out, ease-out) 1.2s infinite; }
.on .sc-card { animation: sc-card var(--d) var(--ease-out, ease-out) 1.2s infinite; }
.on .sc-empty { animation: sc-empty var(--d) linear 1.2s infinite; }

/* fingertip: rest → Breakeven (tap 12%) → Bank 50% (tap 34%) → hold Close all (58–70%) → away */
@keyframes sc-finger {
  0%, 4% { opacity: 0; transform: translate3d(183px, 540px, 0) scale(1); }
  10% { opacity: 1; transform: translate3d(48px, 364px, 0) scale(1); }
  12% { transform: translate3d(48px, 364px, 0) scale(.8); }
  14%, 28% { opacity: 1; transform: translate3d(48px, 364px, 0) scale(1); }
  32% { transform: translate3d(156px, 364px, 0) scale(1); }
  34% { transform: translate3d(156px, 364px, 0) scale(.8); }
  36%, 50% { transform: translate3d(156px, 364px, 0) scale(1); }
  56% { transform: translate3d(103px, 428px, 0) scale(1); }
  58%, 70% { opacity: 1; transform: translate3d(103px, 428px, 0) scale(.8); }
  73% { opacity: 1; transform: translate3d(103px, 428px, 0) scale(1); }
  80%, 100% { opacity: 0; transform: translate3d(140px, 520px, 0) scale(1); }
}
@keyframes sc-tapA { 0%, 11.5% { opacity: 0; } 12.5% { opacity: 1; } 17%, 100% { opacity: 0; } }
@keyframes sc-tapB { 0%, 33.5% { opacity: 0; } 34.5% { opacity: 1; } 39%, 100% { opacity: 0; } }
@keyframes sc-fill { 0%, 58% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 74% { transform: scaleX(1); opacity: 0; } 75%, 100% { transform: scaleX(0); opacity: 0; } }
/* the stop: "SL 2,318.40" → "SL at entry" at the first tap, back at the loop's end */
@keyframes sc-outA { 0%, 12% { opacity: 1; transform: none; } 14.5%, 93% { opacity: 0; transform: translate3d(0, -5px, 0); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes sc-inA { 0%, 12.5% { opacity: 0; transform: translate3d(0, 5px, 0); } 15%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translate3d(0, 5px, 0); } }
/* lots and profit halve at the second tap */
@keyframes sc-outB { 0%, 34% { opacity: 1; transform: none; } 36.5%, 93% { opacity: 0; transform: translate3d(0, -5px, 0); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes sc-inB { 0%, 34.5% { opacity: 0; transform: translate3d(0, 5px, 0); } 37%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translate3d(0, 5px, 0); } }
@keyframes sc-toastA { 0%, 13% { opacity: 0; transform: translate3d(-50%, 6px, 0) scale(.96); } 15.5%, 25% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); } 28%, 100% { opacity: 0; transform: translate3d(-50%, -4px, 0) scale(.98); } }
@keyframes sc-toastB { 0%, 35% { opacity: 0; transform: translate3d(-50%, 6px, 0) scale(.96); } 37.5%, 48% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); } 51%, 100% { opacity: 0; transform: translate3d(-50%, -4px, 0) scale(.98); } }
@keyframes sc-toastC { 0%, 71% { opacity: 0; transform: translate3d(-50%, 6px, 0) scale(.96); } 73.5%, 88% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); } 91%, 100% { opacity: 0; transform: translate3d(-50%, -4px, 0) scale(.98); } }
@keyframes sc-card { 0%, 70% { opacity: 1; transform: none; } 73.5%, 93% { opacity: 0; transform: translate3d(0, -8px, 0) scale(.96); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes sc-empty { 0%, 73% { opacity: 0; } 76%, 91% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
@keyframes sc-in { to { opacity: 1; } }
@keyframes sc-pulse { 0%, 100% { r: 3; } 50% { r: 4.5; } }

/* reduced motion: one still frame (stop at entry, everything shown) */
@media (prefers-reduced-motion: reduce) {
  .shot.showcase { clip-path: none; }
  .sc-finger, .sc-toast, .sc-empty { display: none; }
  .on .sc-phone *, .on .sc-phone *::before { animation: none !important; }
  .sc-spark path:not(.area) { stroke-dashoffset: 0; } .sc-spark .area, .sc-spark circle { opacity: 1; }
  .sc-sl .sc-swap > :first-child { opacity: 0; } .sc-sl .sc-swap > :last-child { opacity: 1; }
}

/* phones: the copy after the 3D scene (js/showcase.js), centred, scaled down a touch on narrow screens */
.sc-mobile { display: none; }
@media (max-width: 899px) {
  .sc-mobile:not([hidden]) { display: flex; justify-content: center; padding: 72px 16px 8px; }
  .sc-mobile .shot.showcase { display: block; position: relative; right: auto; bottom: auto; width: 256px; }
}
@media (max-width: 359px) { .sc-mobile .sc-phone { zoom: .9; } }
