/*
 * A page per game (/games/<slug>), on project.css. The picture at the top is the card's
 * slideshow, larger (components/shots.js).
 */
.gm-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.gm-media { position: relative; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 1rem; background: #000; box-shadow: 0 60px 120px -50px #000; }
.gm-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 1.2s ease; }
.gm-hero__text { display: grid; gap: 1rem; justify-items: start; }
.gm-title { font: 200 clamp(2.4rem, 5.6vw, 5rem)/0.95 var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--star); }
.gm-title--long { font-size: clamp(1.9rem, 3.6vw, 3.4rem); overflow-wrap: anywhere; } /* long titles: [PlayerName]'s Nth Loop */
.gm-lede { max-width: 36ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgb(243 239 226 / 0.86); }
.gm-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.gm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--gap-item); margin: var(--gap-item) 0 0; padding: 0; list-style: none; }
.gm-gallery figure { margin: 0; }
.gm-gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); border-radius: 0.6rem; background: #000; }
.gm-gallery figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: rgb(243 239 226 / 0.75); }

/* Majorem: the browser build, loaded only when asked for */
.gm-play { position: relative; display: grid; place-items: center; overflow: hidden; margin-top: var(--gap-item); aspect-ratio: 16 / 7; border: 1px solid var(--line); border-radius: 1rem; background: #000; }
.gm-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.gm-play .btn { position: relative; }
.gm-play__note { position: absolute; left: 1rem; right: 1rem; bottom: 0.8rem; font: 400 0.6rem/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgb(243 239 226 / 0.75); }
/* the games are 960 x 600, and itch.io's embed adds its bar (about 36px) underneath */
.gm-play-wrap { container-type: inline-size; margin-top: var(--gap-item); }
.gm-play-wrap .gm-play { margin-top: 0; aspect-ratio: auto; height: calc(62.5cqw + 36px); }
.gm-play iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #02030a; }
/* itch.io's own bar (about 36px, with a full-screen button that only enlarges the frame) sits just
   below the panel's edge, out of sight: the game's own blue full-screen button is the one that works */
.gm-play[data-play] iframe { bottom: auto; height: calc(100% + 36px); }
.gm-play.is-on > img, .gm-play.is-on [data-play-start], .gm-play.is-on [data-play-note] { display: none; }
.gm-play-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; margin-top: 0.8rem; font-size: 0.9rem; color: var(--muted); }
.gm-play-bar kbd { padding: 0.05rem 0.35rem; border: 1px solid var(--line); border-radius: 0.3rem; font: 400 0.75rem/1.4 var(--mono); color: var(--star); }
.gm-touch { display: none; }
.touch .gm-touch { display: inline; color: var(--gold); }
/* Majorem: downloads, not a browser build */
.gm-downloads { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: var(--gap-item); }
.gm-downloads .btn small { font: inherit; opacity: 0.7; }

.gm-next { grid-template-columns: 9rem minmax(0, 1fr); align-items: center; column-gap: 1.2rem; }
.gm-next img { grid-row: 1 / span 3; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.5rem; }
.gm-next > * { min-width: 0; }
.gm-next b { overflow-wrap: anywhere; }
.gm-next--long b { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.05; } /* long names: [PlayerName]'s Nth Loop */

@media (max-width: 56rem) {
  .gm-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .gm-play { aspect-ratio: 4 / 3; }
  .gm-next { grid-template-columns: minmax(0, 1fr); }
  .gm-next img { grid-row: auto; }
}
