/* Scatterhaus · "Live on Stake" gameplay showcase (case-vampir.html#gameplay, slots.html#vampir).
   Captured loops on a stage with chapters, a phone that follows the stage, a grid of stills and one lightbox.
   Markup: see case-vampir.html; behaviour: assets/showcase.js. Everything is prefixed gp-. */
.gp { --gp-r: 18px; --gp-blood: #e0263f; --gp-moon: #b9a8ff; }
.gp-sec { position: relative; isolation: isolate; overflow: hidden; }
.gp-sec::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(48% 40% at 78% 18%, rgba(139,92,255,.16), transparent 72%), radial-gradient(40% 36% at 12% 88%, rgba(224,38,63,.12), transparent 72%); }

/* ---------- head ---------- */
.gp-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 18px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.gp-head h2 { margin: 0; text-wrap: balance; }
.gp-head .lede { margin: 0; max-width: 54ch; }
@media (max-width: 860px) { .gp-head { grid-template-columns: 1fr; } }

/* ---------- stage: the big screen, its chapters and the phone beside it ---------- */
.gp-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .316fr); gap: 14px clamp(14px, 1.8vw, 22px); align-items: start; }
.gp-screen { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--gp-r); overflow: hidden; background: #0b0816 center / cover no-repeat;
  box-shadow: 0 50px 90px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1); }
.gp-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gp-zoom { position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gp-zoom:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; border-radius: var(--gp-r); }
.gp-cap { grid-column: 1; margin: 2px 2px 0; min-height: 3em; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 78ch; text-wrap: pretty; }
.gp-cap b { font: 700 15px/1.5 var(--display); letter-spacing: -.01em; color: var(--text); margin-right: 2px; }
.gp-src { position: absolute; z-index: 2; left: 14px; top: 14px; padding: 7px 11px; border-radius: 999px; pointer-events: none;
  font: 600 11px/1 var(--mono); letter-spacing: .04em; color: #e4def0; background: rgba(9,8,13,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.gp-src i { font-style: normal; color: var(--lime); }
.gp-pause { position: absolute; z-index: 3; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(9,8,13,.72); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px); transition: background .2s, color .2s, transform .3s var(--spring); }
.gp-pause:hover { background: var(--lime); color: var(--lime-ink); transform: scale(1.06); }
.gp-pause:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.gp-pause svg { width: 16px; height: 16px; }
.gp-pause .i-play, .gp-stage.paused .gp-pause .i-pause { display: none; }
.gp-stage.paused .gp-pause .i-play { display: block; }

.gp-chaps { grid-column: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gp-chap { position: relative; width: 100%; height: 100%; display: grid; gap: 4px; align-content: start; text-align: left; padding: 13px 14px 15px; border-radius: 14px; cursor: pointer; overflow: hidden;
  color: var(--muted); background: rgba(255,255,255,.035); border: 1px solid var(--line); transition: background .25s, border-color .25s, color .25s; }
.gp-chap b { font: 700 14px/1.2 var(--display); letter-spacing: -.01em; color: var(--text); }
.gp-chap span { font: 500 12px/1.35 var(--mono); color: var(--muted); }
.gp-chap::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lime); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.gp-chap:hover { border-color: rgba(255,255,255,.3); }
.gp-chap[aria-pressed="true"] { background: rgba(200,255,46,.07); border-color: rgba(200,255,46,.45); }
.gp-chap[aria-pressed="true"] span { color: #d6cfe2; }
.gp-chap:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

.gp-phone { grid-column: 2; grid-row: 1 / span 3; position: relative; margin: 0; display: grid; gap: 10px; justify-items: center; }
.gp-phone-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; padding: 0; border-radius: 30px; overflow: hidden; cursor: zoom-in;
  background: #0b0816; border: 7px solid #1d1829; box-shadow: 0 40px 70px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.06); }
.gp-phone-frame:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.gp-phone-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform 1.4s var(--ease); }
.gp-phone-frame img.on { opacity: 1; transform: none; }
.gp-phone figcaption { font: 600 12px/1.3 var(--mono); letter-spacing: .02em; color: var(--muted); text-align: center; }

@media (max-width: 999px) {
  .gp-stage { grid-template-columns: minmax(0, 1fr); }
  .gp-phone { display: none; }
}
@media (max-width: 640px) {
  .gp { --gp-r: 14px; }
  .gp-chaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-chap { padding: 11px 12px 13px; }
  .gp-chap b { font-size: 13px; }
  .gp-chap span { font-size: 11px; }
  .gp-cap { font-size: 14px; min-height: 7.5em; }
  .gp-cap b { font-size: 14px; }
  .gp-src { left: 10px; top: 10px; font-size: 11px; padding: 6px 9px; }
  .gp-pause { right: 10px; top: 10px; width: 36px; height: 36px; }
}

/* ---------- stills ---------- */
.gp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); margin: clamp(26px, 3.6vw, 40px) 0 0; padding: 0; list-style: none; }
.gp-tile { margin: 0; min-width: 0; }
.gp-tile figure { margin: 0; }
.gp-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; background: #0b0816;
  box-shadow: 0 26px 50px -28px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.09); }
.gp-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .4s; }
.gp-shot::after { content: ''; position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .35s var(--spring);
  background: rgba(9,8,13,.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f1f8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h5v5M9 20H4v-5M20 4l-6 6M4 20l6-6'/%3E%3C/svg%3E") center / 15px no-repeat; }
.gp-shot:hover img, .gp-shot:focus-visible img { transform: scale(1.045); }
.gp-shot:hover::after, .gp-shot:focus-visible::after { opacity: 1; transform: none; }
.gp-shot:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.gp-tile figcaption { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.gp-tile figcaption b { display: block; margin-bottom: 2px; font: 700 15px/1.25 var(--display); letter-spacing: -.01em; color: var(--text); }
@media (max-width: 900px) { .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .gp-grid { gap: 14px 10px; }
  .gp-shot { border-radius: 10px; }
  .gp-tile figcaption { margin-top: 8px; font-size: 12.5px; }
  .gp-tile figcaption b { font-size: 13px; }
  .gp-tile figcaption span { display: none; }
}

/* phone framings: their own row on narrow screens (wide screens get them in the phone beside the stage) */
.gp-phones { display: none; }
@media (max-width: 999px) {
  .gp-phones { display: flex; gap: 12px; margin: 28px -16px 0; padding: 0 16px 6px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .gp-phones::-webkit-scrollbar { display: none; }
  .gp-phones li { flex: 0 0 auto; width: clamp(132px, 38vw, 200px); scroll-snap-align: start; }
  .gp-phones .gp-shot { aspect-ratio: 9 / 16; border-radius: 20px; border: 5px solid #1d1829; }
}

/* ---------- foot: the honest note and the way to the real thing ---------- */
.gp-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 44px); padding: 18px 20px 18px 22px; border-radius: 18px;
  background: linear-gradient(100deg, rgba(200,255,46,.1), rgba(200,255,46,.02)); box-shadow: inset 0 0 0 1px rgba(200,255,46,.28); }
.gp-note { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; color: #ddd7e8; }
.gp-note .status { flex: none; }
.gp-foot .row { display: flex; gap: 10px; flex-wrap: wrap; }
.gp-foot .btn { padding: 12px 18px; font-size: 15px; }
@media (max-width: 640px) { .gp-note { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; } .gp-foot .row, .gp-foot .row .btn { width: 100%; } }

.gp-ext { width: 14px; height: 14px; flex: none; }

/* compact stage (slots.html): no phone, chapters as a slim row */
.gp-compact .gp-stage { grid-template-columns: minmax(0, 1fr); }
.gp-compact .gp-phone { display: none; }
.gp-compact .gp-chap { padding: 10px 12px 12px; }
.gp-compact .gp-chap b { font-size: 13px; }
.gp-compact .gp-chap span { display: none; }
.gp-compact .gp-cap { font-size: 14px; }
.gp-compact .gp-cap b { font-size: 14px; }
.gp-compact .gp-note-s { margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); }

/* ---------- lightbox ---------- */
dialog.gp-lb { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); overflow: hidden; }
dialog.gp-lb::backdrop { background: rgba(5,4,10,.93); backdrop-filter: blur(8px); }
dialog.gp-lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: gpIn .4s var(--ease); }
@keyframes gpIn { from { opacity: 0; } }
.gp-lb-media { position: relative; display: grid; place-items: center; min-height: 0; padding: clamp(56px, 7vh, 72px) clamp(12px, 7vw, 96px) 12px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gp-lb-media img, .gp-lb-media video { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 14px; background: #0b0816; box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.1); animation: gpPop .45s var(--ease); }
.gp-lb-media.tall img { border-radius: 22px; }
@keyframes gpPop { from { opacity: 0; transform: scale(.97); } }
.gp-lb-bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; width: min(1200px, 100% - 32px); margin: 0 auto; padding: 8px 0 max(20px, env(safe-area-inset-bottom)); }
.gp-lb-cap { flex: 1 1 360px; margin: 0; font-size: 15px; line-height: 1.5; color: #d9d3e4; }
.gp-lb-cap b { color: var(--text); font-family: var(--display); font-weight: 700; letter-spacing: -.01em; margin-right: 6px; }
.gp-lb-n { font: 600 12px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.gp-lb .btn { padding: 11px 16px; font-size: 14px; }
.gp-lb-x, .gp-lb-nav { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(21,18,30,.88); border: 1px solid rgba(255,255,255,.18); transition: background .2s, color .2s, transform .3s var(--spring); }
.gp-lb-x:hover, .gp-lb-nav:hover { background: var(--lime); color: var(--lime-ink); }
.gp-lb-x:focus-visible, .gp-lb-nav:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.gp-lb-x svg, .gp-lb-nav svg { width: 18px; height: 18px; }
.gp-lb-x { top: 12px; right: 12px; }
.gp-lb-nav { top: calc(50% - 60px); }
.gp-lb-prev { left: clamp(8px, 2vw, 28px); }
.gp-lb-next { right: clamp(8px, 2vw, 28px); }
.gp-lb-prev:hover { transform: translateX(-3px); }
.gp-lb-next:hover { transform: translateX(3px); }
@media (max-width: 700px) {
  .gp-lb-media { padding: 64px 10px 10px; }
  .gp-lb-nav { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); width: 44px; height: 44px; }
  .gp-lb-prev { left: auto; right: 64px; }
  .gp-lb-next { right: 12px; }
  .gp-lb-bar { padding-right: 112px; }
  .gp-lb-cap { font-size: 13.5px; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gp-phone-frame img, .gp-shot img { transition: opacity .2s; transform: none !important; }
  dialog.gp-lb[open], .gp-lb-media img, .gp-lb-media video { animation: none; }
}
