/* ============================================================
   Studio Eighty Five — Game pages (Product Hub + Theatre Mode)
   Scoped under .gph (hub) and .gth (theatre) to avoid class bleed.
   Relies on tokens from redesign.css (load redesign.css first).
   ============================================================ */

/* ─────────────  PRODUCT HUB  ───────────── */
.gph-hero {
  position: relative; min-height: 80vh; display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 88px) var(--edge) 64px; overflow: hidden; isolation: isolate;
}
.gph-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  opacity: 0; transform: scale(1.05); animation: imgEnter 1.6s var(--ease) 0.1s forwards; }
.gph-hero__overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(var(--obsidian-rgb),0.8) 0%, rgba(var(--obsidian-rgb),0.25) 32%, rgba(var(--obsidian-rgb),0.55) 70%, rgba(var(--obsidian-rgb),0.98) 100%),
    linear-gradient(to right, rgba(var(--obsidian-rgb),0.7) 0%, rgba(var(--obsidian-rgb),0) 62%); }
.gph-hero__inner { position: relative; z-index: 2; max-width: 1480px; margin: 0 auto; width: 100%; }
.gph-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--plasma); margin-bottom: 18px; }
.gph-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 10vw, 168px); line-height: 0.86; letter-spacing: -0.04em; text-transform: uppercase; color: var(--bone); }
.gph-genre { font-family: var(--font-body); font-size: 18px; color: rgba(var(--bone-rgb),0.78); margin-top: 16px; }
.gph-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.gph-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(var(--bone-rgb),0.8);
  border: 1px solid rgba(var(--bone-rgb),0.22); padding: 7px 12px; background: rgba(var(--obsidian-rgb),0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gph-launch-wrap { margin-top: 36px; }
.gph-launch {
  display: inline-flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-weight: 500;
  font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--obsidian);
  background: var(--plasma); padding: 22px 40px; text-decoration: none; border: none; cursor: pointer;
  transition: box-shadow 0.4s var(--ease-io), transform 0.3s var(--ease);
}
.gph-launch:hover { box-shadow: 0 0 60px rgba(var(--plasma-rgb),0.5); transform: translateY(-2px); }
.gph-launch .arrow { font-size: 18px; transition: transform 0.4s var(--ease); }
.gph-launch:hover .arrow { transform: translateX(8px); }

/* layout matrix */
.gph-matrix { max-width: 1480px; margin: 0 auto; padding: 96px var(--edge); display: grid;
  grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.gph-brief h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px,4vw,56px); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.03em; color: var(--bone); margin-bottom: 24px; }
.gph-brief p { font-family: var(--font-body); font-size: 17px; line-height: 1.7; color: rgba(var(--bone-rgb),0.78); margin-bottom: 20px; max-width: 60ch; }
.gph-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--plasma); margin: 40px 0 18px; }
.gph-features { list-style: none; display: grid; gap: 12px; }
.gph-features li { font-family: var(--font-body); font-size: 16px; color: rgba(var(--bone-rgb),0.8); padding-left: 22px; position: relative; }
.gph-features li::before { content: ''; position: absolute; left: 0; top: 11px; width: 9px; height: 1px; background: var(--plasma); }

.gph-media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gph-shot { aspect-ratio: 16/10; background: var(--ash-elev); border: 1px solid rgba(var(--bone-rgb),0.1); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gph-shot span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(var(--bone-rgb),0.35); }
.gph-shot img { width: 100%; height: 100%; object-fit: cover; }
.gph-specs { margin-top: 28px; border: 1px solid rgba(var(--bone-rgb),0.1); background: var(--ash-elev); }
.gph-spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid rgba(var(--bone-rgb),0.08); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.gph-spec-row:last-child { border-bottom: none; }
.gph-spec-row .k { color: rgba(var(--bone-rgb),0.5); }
.gph-spec-row .v { color: var(--bone); text-align: right; }

@media (max-width: 1024px) {
  .gph-matrix { grid-template-columns: 1fr; gap: 48px; padding: 64px var(--edge); }
}
@media (max-width: 640px) {
  .gph-hero { min-height: 70vh; }
  .gph-media { grid-template-columns: 1fr 1fr; }
}

/* ─────────────  THEATRE MODE  ───────────── */
.gth { background: #060709; min-height: 100vh; display: flex; flex-direction: column; }
.gth-bar-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid rgba(var(--bone-rgb),0.08);
  background: rgba(var(--obsidian-rgb),0.7); position: relative; z-index: 3;
}
.gth-brand { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone); text-decoration: none; }
.gth-brand span { color: var(--plasma); }
.gth-title-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(var(--bone-rgb),0.6); }

.gth-stage-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; position: relative; overflow-x: hidden; }

/* mobile-device frame — presents the portrait game like a phone on desktop */
.gth-phone {
  --gth-device-w: 360px;
  --gth-device-ratio: 390 / 844;
  --gth-device-radius: 46px;
  --gth-device-pad: 13px;
  --gth-screen-radius: 34px;
  position: relative; width: min(calc(100vw - 48px), var(--gth-device-w)); height: auto; box-sizing: border-box; aspect-ratio: var(--gth-device-ratio);
  background: linear-gradient(160deg, #15171c, #0b0c10);
  border-radius: var(--gth-device-radius); padding: var(--gth-device-pad);
  border: 1px solid rgba(var(--bone-rgb),0.14);
  box-shadow:
    0 0 0 2px rgba(var(--plasma-rgb),0.10),
    0 30px 90px rgba(0,0,0,0.7),
    inset 0 1px 2px rgba(var(--bone-rgb),0.10);
  transition: border-radius 0.28s ease, padding 0.28s ease;
}
.gth-phone[data-view="tablet"] {
  --gth-device-w: 984px;
  --gth-device-ratio: 4 / 3;
  --gth-device-radius: 34px;
  --gth-device-pad: 11px;
  --gth-screen-radius: 24px;
}
.gth-phone[data-view="desktop"] {
  --gth-device-w: 1312px;
  --gth-device-ratio: 16 / 9;
  --gth-device-radius: 24px;
  --gth-device-pad: 9px;
  --gth-screen-radius: 16px;
}
.gth-phone[data-view="tablet"] .gth-phone__notch,
.gth-phone[data-view="desktop"] .gth-phone__notch { display: none; }
.gth-phone__notch {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 36%; height: 24px; background: #0b0c10;
  border-radius: 0 0 16px 16px; z-index: 6; pointer-events: none;
}
.gth-phone__screen {
  position: relative; width: 100%; height: 100%; border-radius: var(--gth-screen-radius);
  overflow: hidden; background: #000;
}
.gth-phone__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.gth-phone__screen:fullscreen { border-radius: 0; height: 100vh; width: 100vw; }
.gth-phone__screen:fullscreen iframe { width: 100%; height: 100%; }

/* curtain */
.gth-curtain { position: absolute; inset: 0; z-index: 5; background: var(--obsidian); display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s var(--ease-io), visibility 0.5s; }
.gth-curtain.is-open { opacity: 0; visibility: hidden; }
.gth-curtain__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--plasma); animation: dotPulse 1.4s ease-in-out infinite; }

/* utility strip */
.gth-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto 32px; width: 100%; padding: 0 24px; }
.gth-btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone); background: transparent; border: 1px solid rgba(var(--bone-rgb),0.22); padding: 12px 18px; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.gth-btn:hover { border-color: var(--plasma); color: var(--plasma); }
.gth-controls { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(var(--bone-rgb),0.5); display: flex; gap: 18px; flex-wrap: wrap; }
.gth-controls b { color: var(--bone); font-weight: 500; }
.gth-views { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid rgba(var(--bone-rgb),0.14); background: rgba(var(--obsidian-rgb),0.42); }
.gth-view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 78px; border: 0; padding: 9px 12px; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(var(--bone-rgb),0.62); background: transparent;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.gth-view-btn:hover { color: var(--bone); background: rgba(var(--bone-rgb),0.07); }
.gth-view-btn.is-active { color: var(--obsidian); background: var(--plasma); box-shadow: 0 0 24px rgba(var(--plasma-rgb),0.24); }

@media (max-width: 640px) {
  .gth-stage-wrap { padding: 12px 10px; }
  .gth-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .gth-views { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); }
  .gth-view-btn { width: 100%; min-width: 0; padding: 11px 8px; }
  /* on real phones, drop the fake bezel and let the game fill the width */
  .gth-phone {
    width: min(100%, var(--gth-device-w)); aspect-ratio: var(--gth-device-ratio);
    padding: 0; border-radius: 18px;
    box-shadow: 0 0 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(var(--plasma-rgb),0.06);
  }
  .gth-phone__notch { display: none; }
  .gth-phone__screen { border-radius: 17px; }
}
