/* Phone mockup for real app screens (js/phone.js) + the showcase section it lives in. */
.phone {
  --pw: 340px;
  position: relative; width: var(--pw); aspect-ratio: 430 / 932; flex: none;
  padding: calc(var(--pw) * .032); border-radius: calc(var(--pw) * .16);
  background: linear-gradient(145deg, #2a2a2e, #0d0d0f 40%, #1e1e22);
  box-shadow: inset 0 0 0 1.5px #3a3a40, inset 0 0 0 calc(var(--pw) * .012) #050506, 0 60px 90px -40px rgba(20, 14, 0, .55), 0 20px 30px -20px rgba(20, 14, 0, .35);
}
.phone::before, .phone::after { content: ''; position: absolute; right: -3px; width: 3px; border-radius: 0 2px 2px 0; background: #222; }
.phone::before { top: 22%; height: 9%; }
.phone::after { top: 34%; height: 14%; }
.phone-screen { position: relative; height: 100%; border-radius: calc(var(--pw) * .13); overflow: hidden; background: #fff; isolation: isolate; }
.phone-island { position: absolute; z-index: 5; left: 50%; top: 1.4%; width: 31%; height: 3.7%; translate: -50% 0; border-radius: 99px; background: #000; }
.ph-scr { position: absolute; inset: 0; background: #fff; will-change: transform; overflow: hidden; }
.ph-scr img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ph-scr.tall img { height: auto; }
.ph-scr img.ph-overlay { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; z-index: 1; }
.ph-tap {
  position: absolute; z-index: 6; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; margin: -7.5% 0 0 -7.5%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0 28%, rgba(255, 255, 255, .35) 30% 62%, transparent 64%);
  box-shadow: 0 0 0 2px rgba(18, 18, 18, .18), 0 6px 18px rgba(0, 0, 0, .25);
}

/* ---------------------------------------------------------------- showcase */
/* No scroll runway. The phone, its pop-out accents and the copy sit above the fixed 3D layer (#gl-hero, z 6),
   so the hero frames fly in BENEATH the phone; the background shapes stay below it. */
#showcase { position: relative; }
.sc-inner {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(20px, 4vw, 80px); padding: clamp(70px, 9svh, 110px) var(--gut) clamp(40px, 6svh, 80px);
}
.sc-deco { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sc-deco .d { transform-box: fill-box; transform-origin: 50% 50%; }
.sc-deco .d1 { animation: sc-breathe 9s ease-in-out infinite; }
.sc-deco .d5, .sc-deco .d7 { animation: sc-spin 18s linear infinite; }
.sc-deco .d6, .sc-deco .d8, .sc-deco .d9 { animation: sc-drift 7s ease-in-out infinite alternate; }
.sc-deco .d8 { animation-delay: -3s; } .sc-deco .d9 { animation-delay: -5s; }
@keyframes sc-breathe { 50% { transform: scale(1.05); } }
@keyframes sc-spin { from { transform: rotate(18deg); } to { transform: rotate(378deg); } }
@keyframes sc-drift { to { transform: translate(14px, -18px); } }
.sc-stage { position: relative; z-index: 7; display: grid; place-items: center; height: 100%; min-height: min(84svh, 860px); perspective: 1600px; }
.sc-pops { position: absolute; inset: 0; pointer-events: none; }
.sc-pop { position: absolute; left: 50%; top: 50%; width: calc(var(--pw-sc) * .42); height: auto; opacity: 0; filter: drop-shadow(0 18px 22px rgba(60, 40, 0, .22)); will-change: transform; }
.sc-float { position: relative; z-index: 1; animation: sc-bob 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes sc-bob { 0%, 100% { transform: translateY(-10px) rotateY(9deg) rotateZ(-2.2deg); } 50% { transform: translateY(12px) rotateY(5deg) rotateZ(-.8deg); } }
.sc-stage { --pw-sc: min(23.5vw, 39svh, 420px); }
.sc-phone { --pw: var(--pw-sc); }
.sc-copy { position: relative; z-index: 7; justify-self: center; max-width: 600px; padding-right: clamp(0px, 3vw, 60px); }
.sc-copy .display { font-size: clamp(40px, 4.6vw, 84px); }
.sc-list { list-style: none; margin: clamp(26px, 3.4vw, 48px) 0 0; padding: 0; display: grid; gap: 6px; }
.sc-list button {
  all: unset; box-sizing: border-box; width: 100%; display: grid; gap: 6px; padding: 14px 18px; border-radius: var(--r-md); cursor: pointer;
  transition: background .45s; -webkit-tap-highlight-color: transparent;
}
.sc-list button:hover { background: rgba(255, 246, 220, .6); }
.sc-list button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sc-t { display: flex; align-items: center; gap: 12px; }
.sc-list b { font: 800 clamp(22px, 2vw, 34px)/1 var(--display); letter-spacing: -.03em; opacity: .42; transition: opacity .45s; white-space: nowrap; }
/* each chapter has a coloured dot; the playing one opens into a ring that fills like a pie while it plays */
.sc-pie {
  --p: 0; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c); scale: .5;
  transition: scale .45s var(--ease), background-color .3s;
}
.sc-list li:nth-child(1) { --c: var(--red); }
.sc-list li:nth-child(2) { --c: var(--blue); }
.sc-list li:nth-child(3) { --c: #E8B730; }
.sc-list li:nth-child(4) { --c: var(--indigo); }
.sc-list li.on .sc-pie { scale: 1; background: conic-gradient(var(--c) calc(var(--p) * 1turn), transparent 0); box-shadow: inset 0 0 0 2px var(--c); }
.sc-d { font-size: clamp(15px, 1.1vw, 18px); color: var(--ink-dim); line-height: 1.4; max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); max-width: 44ch; }
.sc-list li.on button { background: var(--cream); }
.sc-list li.on b { opacity: 1; }
.sc-list li.on .sc-d { max-height: 4.4em; }
@media (max-width: 860px) {
  .sc-inner { grid-template-columns: 1fr; grid-template-rows: auto auto; padding-top: 80px; padding-bottom: 100px; gap: 12px; }
  .sc-stage { --pw-sc: min(55vw, 39svh); min-height: 0; padding-block: 10px; }
  .sc-copy { justify-self: start; padding-right: 0; }
  .sc-copy .display { font-size: clamp(28px, 7.4vw, 40px); }
  .sc-list { margin-top: 14px; }
  .sc-list button { padding: 10px 12px; }
  .sc-list b { font-size: 18px; }
  .sc-d { font-size: 14px; }
  .sc-deco .d2, .sc-deco .d4, .sc-deco .d6, .sc-deco .d8, .sc-deco .d9 { display: none; }   /* keep the text clear on phones */
}
@media (prefers-reduced-motion: reduce) { .sc-float, .sc-deco .d { animation: none; } }
