/* "Your game. Front and center." (Phil 2026-10-19.) Only the intro is scroll-driven: the section pins for about one
   screen while the big headline swings away and the phone zooms into its place, then it scrolls on like any section.
   The recordings play at normal speed once the phone has landed, the next chapter starts when one ends, chapter buttons
   jump, and callouts light as the recording reaches them. showcase.js sets --intro, --reveal and --copy. */
.showcase{--pin-top:60px;--run:105svh;--start-y:12svh;--start-scale:.5;position:relative;height:calc(100svh - var(--pin-top) + var(--run));background:radial-gradient(120% 70% at 50% 0%,#141a24,#0d0f14 60%)}
.showcase-pin{--intro:0;--reveal:0;--copy:0;--red-glow:1;--blue-glow:.35;position:sticky;top:var(--pin-top);height:calc(100svh - var(--pin-top));overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:clamp(28px,4vw,72px);padding:0 max(6%,calc((100% - 1240px)/2))}
.showcase-glow{position:absolute;inset:-10%;pointer-events:none;background:radial-gradient(34% 46% at 50% 55%,rgb(225 39 53/calc(.30*var(--red-glow))),transparent 70%),radial-gradient(30% 42% at 54% 50%,rgb(37 138 255/calc(.34*var(--blue-glow))),transparent 70%);opacity:var(--reveal)}

.showcase-intro{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:9svh;pointer-events:none;z-index:3;font:700 clamp(64px,9.2vw,148px)/.88 var(--display);text-align:center;opacity:calc(1 - var(--intro)*1.25);transform:perspective(900px) translateY(calc(var(--intro)*-12svh)) rotateX(calc(var(--intro)*48deg)) scale(calc(1 - var(--intro)*.16));transform-origin:50% 0}
.showcase-intro span:last-child{background:linear-gradient(90deg,#ff5a66,#73b5ff);-webkit-background-clip:text;background-clip:text;color:transparent}

.showcase-copy{position:relative;z-index:2;opacity:var(--copy);transform:translateX(calc((1 - var(--copy))*-40px))}
.showcase-copy h2{font-size:clamp(38px,3.6vw,52px)}
.showcase-copy .lead{font-size:15px;line-height:1.7;margin-top:16px;max-width:420px}
.showcase-steps{list-style:none;margin:26px 0 18px;padding:0;display:grid;gap:4px;border-top:1px solid #ffffff1a}
.showcase-step{position:relative;display:grid;grid-template-columns:40px 1fr;gap:10px;width:100%;padding:16px 0 18px;background:none;border:0;border-bottom:1px solid #ffffff1a;color:inherit;text-align:left;opacity:.42;transition:opacity .35s}
.showcase-step[aria-current=true]{opacity:1}
.showcase-step:hover{opacity:.85}
.showcase-index{font:600 24px/1 var(--display);color:#73b5ff}
.showcase-step strong{display:block;font-size:17px;line-height:1.3}
.showcase-step small{display:block;font-size:14px;color:#9fb0c3;margin-top:5px;line-height:1.5}
.showcase-fill{position:absolute;left:0;right:0;bottom:-1px;height:2px;overflow:hidden}
.showcase-fill span{display:block;height:100%;background:linear-gradient(90deg,var(--red),#73b5ff);transform:scaleX(var(--fill,0));transform-origin:left}
.showcase-spr{font-size:13px;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.showcase-spr .text-link{font-size:13px;color:#e8edf4}

.showcase-device{position:relative;z-index:2;perspective:1400px;display:grid;place-items:center}
.showcase .showcase-phone{position:relative;inset:auto;margin:0;--bezel:9px;--corner:48px;width:min(360px,calc((100svh - var(--pin-top) - 48px)*.455));transform:translateY(calc((1 - var(--reveal))*var(--start-y))) rotateX(calc((1 - var(--reveal))*14deg)) scale(calc(var(--start-scale) + (1 - var(--start-scale))*var(--reveal)));box-shadow:0 0 0 1px #080a0e,inset 0 0 0 2px #292e37,0 40px 80px #000a,0 0 120px rgb(37 138 255/calc(.16*var(--reveal)));will-change:transform}
.showcase-screen{position:relative;aspect-ratio:1206/2622;border-radius:calc(var(--corner) - var(--bezel) - 2px);overflow:hidden;background:#0b0f15}
.showcase .showcase-video{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:cover;border-radius:0;background:transparent;opacity:0;transform:scale(1.04);transition:opacity .3s,transform .45s cubic-bezier(.2,.8,.2,1)}
.showcase .showcase-video[data-active]{opacity:1;transform:none}
.showcase-glare{position:absolute;inset:var(--bezel);border-radius:calc(var(--corner) - var(--bezel) - 2px);pointer-events:none;background:linear-gradient(105deg,transparent 35%,#ffffff2e 48%,transparent 60%);background-size:300% 100%;background-position:120% 0;opacity:0;mix-blend-mode:screen}

.showcase-notes{position:relative;z-index:2;align-self:center;height:240px;opacity:var(--copy)}
.showcase-callouts{position:absolute;inset:0;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;gap:26px;opacity:0;visibility:hidden;transition:opacity .3s,visibility 0s .3s}
.showcase-callouts.is-active{opacity:1;visibility:visible;transition:opacity .3s}
.showcase-callouts li{position:relative;font:700 clamp(22px,2vw,30px)/1.08 var(--display);color:#fff;max-width:300px;opacity:.16;transform:translateX(18px);transition:opacity .4s,transform .5s cubic-bezier(.2,.8,.2,1)}
.showcase-callouts li.is-lit{opacity:.5;transform:none}
.showcase-callouts li.is-current{opacity:1}
.showcase-callouts li::before{content:'';position:absolute;right:calc(100% + 16px);top:.55em;width:0;height:2px;background:linear-gradient(90deg,transparent,#73b5ff);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.showcase-callouts li.is-current::before{width:clamp(28px,4vw,64px)}
.showcase-callouts li::after{content:'';position:absolute;right:calc(100% + 12px);top:calc(.55em - 3px);width:8px;height:8px;border-radius:50%;background:#73b5ff;box-shadow:0 0 12px #73b5ff;opacity:0;transition:opacity .3s}
.showcase-callouts li.is-current::after{opacity:1}
.showcase-chip,.showcase-meter{display:none}

[data-theme=light] .showcase{background:linear-gradient(115deg,#f8fafc 20%,#dbeafb 100%);color:#172331}
[data-theme=light] .showcase-intro span:first-child{color:#111318}
[data-theme=light] .showcase-intro span:last-child{background-image:linear-gradient(90deg,#c71c29,#0863bc)}
[data-theme=light] .showcase-steps,[data-theme=light] .showcase-step{border-color:#20395822}
[data-theme=light] .showcase-index{color:#0863bc}
[data-theme=light] .showcase-step small{color:#54677c}
[data-theme=light] .showcase-spr .text-link{color:#172331}
[data-theme=light] .showcase-callouts li{color:#111318}
[data-theme=light] .showcase-callouts li::before{background:linear-gradient(90deg,transparent,#0863bc)}
[data-theme=light] .showcase-callouts li::after{background:#0863bc;box-shadow:0 0 12px #258aff88}
[data-theme=light] .showcase .showcase-phone{box-shadow:0 0 0 1px #080a0e,inset 0 0 0 2px #292e37,0 40px 70px #1b2c4466}

@media(max-width:1100px) and (min-width:761px){
  .showcase-pin{grid-template-columns:minmax(0,1.1fr) auto minmax(0,.7fr);gap:28px}
  .showcase-copy .lead{display:none}
  .showcase-callouts li{font-size:21px}
}
@media(max-height:760px) and (min-width:761px){.showcase-copy .lead{display:none}.showcase-steps{margin-top:18px}.showcase-step{padding:11px 0 13px}}

/* Phones: after the intro, the phone owns the stage; the three chapters sit under it as tabs and the current callout
   rides on the phone as a chip. */
@media(max-width:760px){
  .showcase{--pin-top:56px;--start-y:8svh;--start-scale:.52}
  .showcase-pin{grid-template-columns:1fr;grid-template-rows:1fr auto;justify-items:center;gap:10px;padding:14px 5% 18px}
  .showcase-intro{padding-top:7svh;font-size:clamp(54px,16vw,76px)}
  .showcase-copy{display:contents}
  .showcase-copy>.eyebrow,.showcase-copy>h2,.showcase-copy>.lead,.showcase-spr{display:none}
  .showcase-device{grid-row:1;align-self:center}
  .showcase .showcase-phone{--bezel:7px;--corner:36px;width:min(280px,calc((100svh - var(--pin-top) - 150px)*.455))}
  .showcase-steps{grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;margin:0;border:0;opacity:var(--copy)}
  .showcase-step{grid-template-columns:1fr;gap:3px;padding:8px 4px 12px;border:0;text-align:center;justify-items:center}
  .showcase-index{font-size:16px}
  .showcase-step strong{font-size:14px}
  .showcase-step small{display:none}
  .showcase-fill{left:8px;right:8px;height:3px;border-radius:2px;background:#ffffff1f}
  [data-theme=light] .showcase-fill{background:#20395720}
  .showcase-notes{display:none}
  .showcase-chip{display:block;position:absolute;left:50%;bottom:9%;z-index:3;max-width:min(300px,86vw);width:max-content;padding:9px 14px;border-radius:16px;background:#0d1219e6;border:1px solid #73b5ff66;box-shadow:0 10px 30px #0008;font-size:14px;line-height:1.35;font-weight:700;color:#fff;text-align:center;opacity:calc(var(--copy)*var(--chip,0));transform:translate(-50%,calc((1 - var(--chip,0))*10px));transition:opacity .3s,transform .4s cubic-bezier(.2,.8,.2,1)}
  [data-theme=light] .showcase-chip{background:#ffffffeb;color:#111318;border-color:#0863bc55;box-shadow:0 10px 30px #1b2c4433}
}

/* Reduced motion: no pin and no intro; copy beside (phones: above) the phone; chapter buttons play a chapter. */
.showcase.is-static{height:auto}
.showcase.is-static .showcase-pin{--reveal:1;--copy:1;position:relative;top:auto;height:auto;padding-block:100px}
.showcase.is-static .showcase-intro{display:none}
.showcase.is-static .showcase-phone{transform:none}
@media(max-width:760px){
  .showcase.is-static .showcase-pin{grid-template-rows:auto;padding-block:60px}
  .showcase.is-static .showcase-copy>.eyebrow,.showcase.is-static .showcase-copy>h2{display:block;justify-self:start}
  .showcase.is-static .showcase-copy>.eyebrow{grid-row:1}.showcase.is-static .showcase-copy>h2{grid-row:2}
  .showcase.is-static .showcase-device{grid-row:3}.showcase.is-static .showcase-steps{grid-row:4}
}
@media(prefers-reduced-motion:reduce){.showcase *{transition:none!important}}
