/* =============================================================
   Game pages: /games/one-button/ and /games/code-name/.
   Only what site.css does not already cover. Colours and fonts come
   from the tokens in site.css. Motion stops under reduced motion
   because site.css switches off every animation and transition.
   ============================================================= */

/* ---- Hero extras ------------------------------------------- */
.hero--game { min-height: min(780px, 92svh); }
.hero--game .hero-body h1 { font-size: clamp(56px, 15vw, 176px); }
.hero--game picture { position: absolute; inset: 0; }
.hero--game picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

/* ---- One Button: the game, plus the fact table ------------- */
.game-two {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}
.game-two .h2 { max-width: 14ch; }
.facts { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
}
.facts > div:last-child { border: 0; }
.facts dt {
  color: var(--mut);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  padding-top: 3px;
}
.facts dd { margin: 0; }

/* ---- Zoomed crops: one character cut from a wide art sheet ---
   The image is drawn --s times the box height, then slid so the point
   (--cx, --cy) of the picture sits in the middle of the box. Hover
   zooms the whole crop gently. */
.crop { position: absolute; inset: 0; overflow: hidden; }
.crop picture { position: absolute; inset: 0; display: block; transition: transform .7s var(--ease-out); }
.crop img {
  position: absolute; left: 50%; top: 50%;
  height: calc(100% * var(--s, 1.8)); width: auto; max-width: none;
  transform: translate(calc(var(--cx, 50%) * -1), calc(var(--cy, 50%) * -1));
}
.cast-card:hover .crop picture, .role:hover .crop picture { transform: scale(1.08); }

/* Cast cards from site.css, with the crop inside. */
.players { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.players .cast-card { height: 420px; }

/* ---- Gallery of four ---------------------------------------- */
.gal--four {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 540px;
  padding-left: 0; padding-right: 0; padding-bottom: 0;
}
.gal--four > :first-child { grid-row: 1 / 3; }
.gal--four > :nth-child(2) { grid-column: 2 / 4; }
.gal--four picture { display: block; width: 100%; height: 100%; }
.gal--four img { transition: transform .7s var(--ease-out); }
.gal--four > *:hover img { transform: scale(1.06); }

/* ---- Code Name: the four roles ------------------------------ */
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.role {
  border-radius: 14px;
  overflow: hidden;
  background: #12111A;
  border-bottom: 6px solid var(--c);
  transition: transform .3s var(--ease-out);
}
.role:hover { transform: translateY(-8px); }
.role .im { height: 300px; position: relative; background: #0D1B2E; }
.role b {
  display: block;
  padding: 18px 20px 20px;
  font-family: var(--font-display);
  font-size: 38px;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1;
  color: var(--c);
}

/* Outpost art beside the notify card. */
.notify-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.art-card { border-radius: 16px; overflow: hidden; position: relative; min-height: 420px; }
.art-card picture, .art-card img { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-card img { object-fit: cover; transition: transform .7s var(--ease-out); }
.art-card:hover img { transform: scale(1.06); }
.art-card em {
  position: absolute; z-index: 2; left: 16px; top: 14px;
  font-style: normal; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  background: rgba(7,7,12,.7); padding: 5px 9px; border-radius: 4px;
}
.notify-card {
  background: #12111A;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(28px, 4vw, 40px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
}
.notify-card .d { font-size: clamp(40px, 5vw, 54px); }
.notify-card p { margin: 0; }

/* ---- Phone and tablet --------------------------------------- */
@media (max-width: 960px) {
  .game-two, .notify-row { grid-template-columns: 1fr; gap: 32px; }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .players .cast-card { height: 340px; }
}
@media (max-width: 860px) {
  .gal--four { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; }
  .gal--four > :first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .gal--four > :not(:first-child) { grid-column: auto; aspect-ratio: 1; }
  .gal--four > :nth-child(4) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .players .cast-card { height: 260px; }
  .roles { gap: 10px; }
  .role .im { height: 200px; }
  .role b { font-size: 30px; padding: 14px 14px 16px; }
  .art-card { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .cast-card:hover .crop picture, .role:hover .crop picture { transform: none; }
  .role:hover { transform: none; }
}
