/* ============================================================
   GAME PAGES  (/games/<id>/, generated by games/build_game_pages.py)
   The key art full bleed behind a big title, a facts strip, the story
   beside what's inside, then the worlds released either side of it.
   ============================================================ */

/* ---- Hero --------------------------------------------------------------- */
.game-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: max(620px, 88svh);
  padding: clamp(130px, 16svh, 180px) var(--gutter) clamp(50px, 7svh, 80px);
  overflow: hidden;
}
.game-hero__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 13, .92) 0, rgba(8, 9, 13, .6) 38%, rgba(8, 9, 13, .1) 70%),
    linear-gradient(0deg, #0b0e14 0, rgba(11, 14, 20, .6) 22%, transparent 50%),
    linear-gradient(180deg, rgba(8, 9, 13, .7) 0, transparent 22%),
    var(--art) center 35% / cover no-repeat;
  animation: game-art-in 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes game-art-in { from { opacity: 0; transform: scale(1.06); } }
.game-hero__copy { max-width: 900px; }
.game-crumbs { display: flex; gap: 10px; margin-bottom: 26px; font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #9aa4b0; }
.game-crumbs a { color: #e4e8ee; text-decoration: none; border-bottom: 1px solid rgba(228, 232, 238, .4); }
.game-crumbs a:hover { color: #fff; border-color: var(--red); }
.game-crumbs span[aria-hidden] { color: var(--red); }
.game-hero .eyebrow { color: #cdd4dc; }
.game-hero .eyebrow i { margin: 0 6px; font-style: normal; color: var(--red); }
.game-hero__title {
  margin: 18px 0 18px;
  font: 900 clamp(84px, 13vw, 230px)/.82 var(--display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #f6f3f1;
  text-shadow: 0 14px 50px rgba(0, 0, 0, .6);
  overflow-wrap: anywhere;
}
.game-hero__title em { display: inline-block; width: .12em; height: .12em; margin-left: .05em; vertical-align: baseline; background: var(--red); }
.game-hero__lead { max-width: 34ch; margin: 0 0 30px; font-size: clamp(19px, 1.9vw, 27px); line-height: 1.35; color: #e4e8ee; }
.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 8px; }
.game-actions__quiet {
  padding: 12px 2px;
  border-bottom: 1px solid rgba(233, 228, 230, .5);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f1ecee;
  text-decoration: none;
}
.game-actions__quiet:hover { border-color: var(--red); }

/* ---- Facts --------------------------------------------------------------- */
.game-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0 var(--gutter);
  border: 1px solid var(--edge-soft, rgba(233, 238, 245, .12));
  border-radius: var(--r-lg, 22px);
  background: linear-gradient(160deg, rgba(27, 31, 41, .86), rgba(12, 14, 20, .94));
  overflow: hidden;
}
.game-facts div { padding: 22px 26px 24px; border-left: 1px solid var(--edge-soft, rgba(233, 238, 245, .12)); }
.game-facts div:first-child { border-left: 0; }
.game-facts dt { font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8f9aa8; }
.game-facts dd { margin: 12px 0 0; font: 800 clamp(24px, 2.4vw, 36px)/1 var(--display); text-transform: uppercase; color: #f1f4f8; }
.game-facts dd small { font: 500 9px/1 var(--mono); letter-spacing: .14em; color: #8f9aa8; }
.game-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.game-code i { font: 400 16px/1 var(--body); font-style: normal; color: var(--red); transition: transform .2s ease; }
.game-code:hover i, .game-code:focus-visible i { transform: scale(1.2); }
.game-code.is-copied span::after { content: " ✓"; color: #7fd0a0; }

/* ---- Story --------------------------------------------------------------- */
.game-about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(40px, 6vw, 110px);
  padding: clamp(80px, 8vw, 130px) var(--gutter);
}
.game-about__story p:not(.eyebrow) { max-width: 40ch; margin: 22px 0 0; font-size: clamp(20px, 2vw, 30px); line-height: 1.4; color: #e6eaef; }
.game-about__story p:not(.eyebrow):first-of-type::first-letter { color: var(--red); }
.game-related { font-size: 16px !important; color: #aeb8c4 !important; }
.game-related a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.game-features { display: grid; gap: 0; margin: 18px 0 26px; padding: 0; list-style: none; }
.game-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--edge-soft, rgba(233, 238, 245, .12));
  font-size: 16px;
  color: #dfe4ea;
}
.game-features li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--red); rotate: 45deg; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.game-tags li { padding: 7px 11px; border: 1px solid var(--edge, rgba(233, 238, 245, .2)); border-radius: 999px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #c9d1db; }
.game-tip { margin: 0; font: 500 10px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8f9aa8; }

/* ---- Before / after ------------------------------------------------------ */
.game-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 var(--gutter) clamp(90px, 9vw, 140px);
}
.game-next {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--edge-soft, rgba(233, 238, 245, .12));
  border-radius: var(--r-md, 18px);
  background: linear-gradient(160deg, rgba(27, 31, 41, .86), rgba(12, 14, 20, .94));
  color: #fff;
  text-decoration: none;
  transition: border-color .25s ease, translate .25s ease;
}
.game-next--next { flex-direction: row-reverse; text-align: right; }
.game-next img { flex: none; display: block; width: clamp(110px, 12vw, 180px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; filter: saturate(.85) brightness(.85); }
.game-next span { display: grid; gap: 6px; min-width: 0; }
.game-next small { font: 500 9px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #8f9aa8; }
.game-next b { font: 800 clamp(22px, 2.2vw, 32px)/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.game-next:hover, .game-next:focus-visible { border-color: rgba(214, 48, 76, .8); translate: 0 -3px; }
.game-next:hover img { filter: none; }
.game-more__all {
  padding: 14px 4px;
  border-bottom: 1px solid rgba(233, 228, 230, .5);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #f1ecee;
  text-decoration: none;
  white-space: nowrap;
}
.game-more__all:hover { border-color: var(--red); }

@media (max-width: 900px) {
  .game-facts { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-facts div:nth-child(odd) { border-left: 0; }
  .game-facts div:nth-child(n + 3) { border-top: 1px solid var(--edge-soft, rgba(233, 238, 245, .12)); }
  .game-about { grid-template-columns: minmax(0, 1fr); }
  .game-more { grid-template-columns: minmax(0, 1fr); }
  .game-more__all { justify-self: center; order: 3; }
  .game-next--next { flex-direction: row; text-align: left; }
}
@media (max-width: 540px) {
  .game-facts div { padding: 18px 16px 20px; }
  .game-hero { min-height: max(560px, 80svh); }
}
@media (prefers-reduced-motion: reduce) { .game-hero__art { animation: none; } }

/* On tall screens the key art is cropped hard: keep the game's main
   character in view (--focus comes from "focus" in js/games.js). Only the
   last layer is the art; the gradients above it fill the box anyway. */
@media (max-width: 900px) {
  .game-hero__art { background-position: 0 0, 0 0, 0 0, var(--focus, center 35%); }
}
