/* Studio game pages (/games/ and /games/<slug>/). Loaded after styles.css, only on those pages. */

/* Games index */
.games-index .games { gap: 20px; }
.game-card picture { display: block; }
.card__body .game-card__title { margin-bottom: 0; font-size: 1.6rem; font-weight: 600; }
.game-card__title a { text-decoration: none; }
.game-card__title a:hover { color: var(--red-hot); }

/* Hero: key art behind the title on wide screens, stacked above it on phones */
.game-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(520px, 56.25vw, 860px);
  padding: 96px max(16px, calc((100% - var(--max)) / 2 + 16px)) 64px;
  border-bottom: 1px solid var(--line);
}
.game-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 1%, rgba(5, 5, 7, .82) 30%, rgba(5, 5, 7, .22) 64%, rgba(5, 5, 7, .06)),
    linear-gradient(to right, rgba(5, 5, 7, .82), rgba(5, 5, 7, .35) 45%, transparent 72%);
}
.game-hero__art { position: absolute; inset: 0; z-index: -2; }
.game-hero__art picture { display: block; width: 100%; height: 100%; }
.game-hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.game-hero__credit {
  position: absolute; top: 16px; right: max(16px, calc((100% - var(--max)) / 2 + 16px));
  padding: 3px 10px; border-radius: 999px; background: rgba(5, 5, 7, .6); border: 1px solid rgba(255, 255, 255, .14);
  font: 600 11px var(--head); letter-spacing: .2em; text-transform: uppercase; color: rgba(236, 236, 240, .8);
}
.game-hero__body { position: relative; max-width: 640px; min-width: 0; animation: rise .8s .1s both; }
.game-hero .post__back { display: block; width: fit-content; margin-bottom: 20px; color: var(--steel); }
.game-hero .post__back:hover { color: var(--text); }
.game-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px;
  border: 1px solid rgba(255, 53, 80, .55); border-radius: 999px; background: rgba(216, 36, 60, .16);
  font: 600 12px var(--head); letter-spacing: .22em; text-transform: uppercase; color: #fff;
}
.game-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red-hot); box-shadow: 0 0 0 4px rgba(255, 53, 80, .22); }
.game-hero__title--logo { line-height: 0; }
.game-hero__title--logo img { display: block; width: min(100%, 460px); height: auto; filter: drop-shadow(0 4px 30px rgba(0, 0, 0, .55)); }
.game-hero__title { margin-top: 18px; font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 700; letter-spacing: .05em; text-shadow: 0 4px 30px rgba(0, 0, 0, .55); overflow-wrap: break-word; text-wrap: balance; }
.game-hero__title--long { font-size: clamp(2rem, 6.2vw, 4.4rem); }
.game-hero__pitch { margin-top: 14px; max-width: 40ch; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text); }
.game-hero__meta {
  list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px;
  font: 600 13px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--steel);
}
.game-hero__meta li { display: inline-flex; align-items: center; gap: 10px; }
.game-hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.game-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.game-stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* About + fact sheet */
.game-about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.game-about h2 { margin-bottom: 24px; }
.game-facts {
  position: relative; overflow: hidden; margin: 0; padding: 8px 24px;
  border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, var(--panel), var(--bg-2));
}
.game-facts::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--red), transparent); }
.game-facts div { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: 14px; padding: 14px 0; }
.game-facts div + div { border-top: 1px solid var(--line); }
.game-facts dt { padding-top: 3px; font: 600 12px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.game-facts dd { margin: 0; font-weight: 500; color: var(--text); }

/* What's in it now */
.game-now { border-top: 1px solid var(--line); }
.game-now__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-now__list li { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.game-now__list li::before { content: ""; position: absolute; top: -1px; left: 24px; width: 40px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.game-now__list h3 { font-size: 1.25rem; margin-bottom: 8px; }
.game-now__list p { color: var(--muted); font-size: 16px; }

/* Pre-alpha gallery */
.game-gallery { border-top: 1px solid var(--line); }
.game-gallery h2 { margin-bottom: 14px; }
.game-gallery__lead { color: var(--muted); max-width: 60ch; margin-bottom: 32px; }
.game-gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.game-shot { margin: 0; min-width: 0; }
.game-shot__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #08080b; }
.game-shot__media picture { display: block; width: 100%; height: 100%; }
.game-shot__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.game-shot__media:hover img { transform: scale(1.03); }
.game-shot__label {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(5, 5, 7, .74); border: 1px solid rgba(255, 255, 255, .16);
  font: 600 11px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--text);
}
.game-shot figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.game-gallery__feedback { margin-top: 32px; color: var(--muted); }
.game-gallery__feedback a { color: var(--red-hot); }

/* Playtests, under the newsletter form */
.join__extra {
  max-width: 560px; margin: 36px auto 0; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; justify-items: center; gap: 16px; color: var(--muted); font-size: 15px;
}

@media (max-width: 1000px) {
  .game-now__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-about { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .game-facts { max-width: 640px; }
}

@media (max-width: 760px) {
  .game-hero { display: block; min-height: 0; padding: 0 0 56px; }
  .game-hero::before { display: none; }
  .game-hero__art { position: relative; inset: auto; z-index: 0; aspect-ratio: 16 / 9; }
  .game-hero__art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, var(--bg), transparent); }
  .game-hero__credit { top: 10px; right: 10px; }
  .game-hero__body { margin-top: -20px; padding: 0 16px; }
  .game-facts { padding: 4px 18px; }
  .game-now__list, .game-gallery__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Press kit (/press/) */
.press-head .game-hero__actions { margin-top: 24px; }
.press-studio, .press-game, .press-logos { border-top: 1px solid var(--line); }
.press-game .prose h3 { margin: 24px 0 8px; font-size: 1.1rem; }
.press-game .prose h3:first-child { margin-top: 0; }
.press-sub { margin: 48px 0 14px; font-size: 1.25rem; }
.press-studio .game-facts div, .press-game .game-facts div { grid-template-columns: minmax(0, 7em) minmax(0, 1fr); }
.press-studio .game-facts dd, .press-game .game-facts dd { font-size: 15px; overflow-wrap: anywhere; }
.press-trailer { color: var(--muted); max-width: 60ch; }
.press-trailer a, .game-shot figcaption a, .press-logo figcaption a, .press-usage a { color: var(--red-hot); }
.press-keyart { max-width: 100%; }
.press-logos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 24px 20px; }
.press-logo { margin: 0; min-width: 0; }
.press-logo > a { display: grid; place-items: center; height: 200px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: #0c0c10; }
.press-logo img { max-width: 100%; max-height: 168px; width: auto; height: auto; object-fit: contain; }
.press-logo figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.press-usage { margin-top: 32px; max-width: 70ch; color: var(--muted); }

/* Game page: signup between "Built so far" and the gallery */
.game-signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; border-top: 1px solid var(--line); padding-top: 64px; padding-bottom: 64px; }
.game-signup h2 { margin-bottom: 10px; }
.game-signup p { color: var(--muted); }
.game-signup .join__form { margin: 0; }
@media (max-width: 760px) {
  .game-signup { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
