/* ============================================================================
   game.css — the game page (/games/{slug}). Tokens and kit pieces only:
   the hero sits on the kit .page-top band (layout.css); the cards (.card
   + modifiers), chips, stats, the facts list (.facts), the FAQ shell
   (Shared/FaqSection: .split + .acc--editorial), the cover card
   (.game-card) and the closing .cta-band (Shared/CtaBand) come from
   components.css. This file lays them out. Media queries: the device
   ranges only (tokens.css).

   Contents
     1. Hero          .game-hero — cover + title on the .page-top band
     2. About         .game-about, .game-desc (description card), .game-loc (fan translation)
     3. Facts         .game-facts (holds the kit .facts list)
     4. Voice sample  .game-voice (the sample tile over the facts; game.js)
     5. FAQ           .game-faq (Shared/FaqSection)
     6. Similar       .game-similar__grid (.game-card, 5 in a row)
     7. Reduced motion
   ========================================================================== */


/* ── 1. Hero ────────────────────────────────────────────────────────────────
   The breadcrumb runs across the top. Phones: a 120px cover beside the
   eyebrow and title, both from the cover's top edge; the lead,
   facts and actions full width under them. From 768px the cover takes its
   own column (216px, 280px from 1024px — under the 300px source) and the
   text runs beside it. The cover stands in a violet underlight, with a
   stronger hairline, and tilts toward the cursor (kit [data-tilt]). The
   primary action glows through the kit .btn--glow (Button glow). */
/* The band (.page-top) adds only --nav-h on top; the hero pads itself. */
.game-hero { padding-block: calc(var(--nav-h) + clamp(2rem, 4.5vw, 3.5rem)) var(--space-16); }
.game-hero__light {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(30% 62% at 16% 62%, var(--ambient-violet), transparent 72%);
  pointer-events: none;
}

.game-hero__grid {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  grid-template-areas:
    'crumbs crumbs'
    'media  head'
    'body   body';
  align-items: start;
  gap: var(--space-6) var(--space-5);
}
.game-hero__crumbs { grid-area: crumbs; }
.game-hero__media { grid-area: media; position: relative; }
.game-hero__head  { grid-area: head; min-width: 0; }
.game-hero__body  { grid-area: body; min-width: 0; }
@media (min-width: 768px) {
  .game-hero__grid {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    grid-template-areas:
      'crumbs crumbs'
      'media  head'
      'media  body';
    grid-template-rows: auto auto 1fr;
    gap: var(--space-6) var(--space-10);
  }
}
@media (min-width: 1024px) {
  .game-hero__grid {
    grid-template-columns: 17.5rem minmax(0, 1fr);
    column-gap: var(--space-16);
  }
}

/* Cover: underlight below, a soft violet pool behind, a stronger edge. */
.game-hero__media::before {
  content: '';
  position: absolute;
  inset: 20% -18% -14%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 60%, var(--ambient-violet), transparent 72%);
  pointer-events: none;
}
.game-hero__frame {
  border-radius: var(--radius-lg);
  box-shadow: var(--underlight), var(--shadow-xl);
}
.game-hero__cover { border-radius: var(--radius-lg); }
.game-hero__cover::after { border-color: var(--line-strong); }
@media (max-width: 767px) {
  .game-hero__frame,
  .game-hero__cover { border-radius: var(--radius-md); }
  .game-hero__frame { box-shadow: var(--underlight-sm), var(--shadow-md); }
}

.game-hero__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .game-hero__head { gap: var(--space-4); padding-top: var(--space-2); }
}
.game-hero__genres {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Phones and tablets: the tags only in "Szczegóły VoicePacka" (MetaCard),
   so the title stays right under the cover. */
@media (max-width: 1023px), (min-width: 1024px) and (max-width: 1366px) and (pointer: coarse) {
  .game-hero__genres { display: none; }
}
.game-hero__title {
  margin: 0;
  max-width: 22ch;
  color: var(--text-strong);
  font-size: clamp(1.75rem, 0.9rem + 3.6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.game-hero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}
.game-hero__lead {
  margin: 0;
  max-width: 60ch;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.65;
  text-wrap: pretty;
}
.game-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.game-hero__meta .chip svg { color: var(--text-3); }
.game-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
/* "Wymaga spolszczenia autorstwa …" under the actions (packs with a fan translation). */
.game-hero__loc {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.game-hero__loc svg { flex-shrink: 0; align-self: center; color: var(--text-3); }
.game-hero__loc strong { color: var(--text-strong); font-weight: 600; }
.game-hero__loc-sep { margin-inline: 0.25rem; color: var(--text-3); }
@media (max-width: 767px) {
  .game-hero__lead { font-size: 1rem; }
  .game-hero__actions { width: 100%; }
  .game-hero__actions > .btn { flex: 1 1 100%; }
}


/* ── 2. About: description card + facts aside ──────────────────────────────
   The aside is the RIGHT column (desktop): the voice sample tile on top,
   then the facts card, which stays in view while the description is read —
   only the facts card is sticky (the aside stretches to the row's height
   and gives it room), so the tile never makes the sticky part taller.
   The description card is a kit card (--pad, --sheen) with more room from
   768px and a little less on phones. */
.game-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
.game-about__aside {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  min-width: 0;
}
@media (min-width: 1024px) {
  .game-about__grid {
    grid-template-columns: minmax(0, 1fr) 22.5rem;
    align-items: start;
    gap: var(--space-8);
  }
  .game-about__aside { align-self: stretch; gap: var(--space-6); }
  .game-about__aside > .game-facts {
    position: sticky;
    top: calc(var(--head-h) + var(--space-6));
  }
}

.game-desc {
  gap: var(--space-4);
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1.75;
}
@media (max-width: 767px) {
  .game-desc { padding: var(--space-5); }
}
@media (min-width: 768px) {
  .game-desc { padding: var(--space-8) var(--space-10) var(--space-10); }
}
.game-desc p { margin: 0; max-width: 68ch; }
.game-desc strong { color: var(--text-strong); font-weight: 600; }
.game-desc code {
  padding: 0.0625rem 0.375rem;
  color: var(--accent-300);
  background-color: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.game-desc__intro {
  padding-bottom: var(--space-5);
  color: var(--text-strong);
  border-bottom: 1px solid var(--line-subtle);
  font-size: var(--fs-lead);
  line-height: 1.65;
}
.game-desc__heading {
  margin: var(--space-4) 0 0;
  color: var(--text-strong);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
/* The fan translation card (LocalizationCard) under the description: the
   author's initial beside the eyebrow, name and role; the text; the split
   buttons (download, author's page), full width on phones; a small note. */
.game-about__main {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  min-width: 0;
}
.game-loc { gap: var(--space-5); }
@media (max-width: 767px) {
  .game-loc { padding: var(--space-5); }
}
@media (min-width: 768px) {
  .game-loc { padding: var(--space-8) var(--space-10); }
}
.game-loc__head {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}
.game-loc__who {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.game-loc__who .eyebrow { margin: 0; }
.game-loc__author {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.game-loc__role {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.game-loc__text {
  margin: 0;
  max-width: 68ch;
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1.75;
}
.game-loc__text strong { color: var(--text-strong); font-weight: 600; }
.game-loc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
@media (max-width: 767px) {
  .game-loc__actions > .btn { flex: 1 1 100%; }
}
.game-loc__help {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-sm);
}
.game-loc__help svg { flex-shrink: 0; color: var(--text-3); }
.game-loc__note {
  margin: 0;
  padding-top: var(--space-4);
  color: var(--text-2);
  border-top: 1px solid var(--line-subtle);
  font-size: var(--fs-sm);
}


/* ── 3. Facts card (kit card --pad --sheen --shadow, an .eyebrow--muted
   title) ────────────────────────────────────────────────────────────── */
.game-facts { gap: var(--space-5); }
/* Two numbers side by side at every width (the kit row stacks on phones). */
.game-facts__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
}
.game-facts__stats > .stat { padding: var(--space-4) var(--space-4) var(--space-4) 0; }
.game-facts__stats > .stat + .stat {
  padding-left: var(--space-5);
  border-top: 0;
  border-left: 1px solid var(--line);
}
.game-facts__stats .stat__value { font-size: 1.625rem; }
.game-facts__stats .stat__label { font-size: 0.8125rem; }

/* The tags: plain values like the other rows, one per line. */
.game-facts__tags {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-facts__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-subtle);
}
.game-facts__hint {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: center;
}


/* ── 4. Voice sample tile (kit card --pad-md --sheen --shadow) ─────────────
   Head: the muted eyebrow and the source note (mono). Player row: the round
   play button, the voice over a kit .meter (game.js fills it while it
   plays), the time. Under it the line as a quoted subtitle on a violet
   hairline, and "Inna próbka" when the voice has more. Without a sample:
   the kit EmptyState (compact), as the kit draws it. */
.game-voice { gap: var(--space-4); }
.game-voice__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.game-voice__head .eyebrow { margin: 0; }
.game-voice__source {
  flex: none;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.game-voice__player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
}
/* the play triangle (kit lg round icon button) reads as centred a hair to the right */
.game-voice:not(.is-playing) .game-voice__toggle svg { margin-left: 0.125rem; }
.game-voice__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.game-voice__voice {
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-voice__time {
  min-width: 2.25rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.game-voice__line {
  margin: 0;
  padding-left: var(--space-3);
  color: var(--text-1);
  border-left: 2px solid var(--accent-line);
  font-size: var(--fs-sm);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.game-voice__line::before { content: '„'; }
.game-voice__line::after  { content: '”'; }
.game-voice__next { align-self: flex-start; }


/* ── 5. FAQ (Shared/FaqSection: kit .split, header left — not sticky —
   and the editorial accordion right; the open item's light is the kit's).
   The page only tightens the header column. */
.game-faq .split__head { gap: var(--space-6); }
.game-faq .section-header__desc { max-width: 34ch; }
.game-faq__more {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
}


/* ── 6. Similar VoicePacks — a plain grid of .game-card ─────────────────────
   5 in a row from 1024px; tablets show the first 3, phones the first 4
   (2 × 2), so no row is left half empty. */
.game-similar__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);   /* phones */
  margin: 0;
  padding: 0;
  list-style: none;
}
.game-similar__item { display: flex; min-width: 0; }
.game-similar__item > .game-card { flex: 1 1 auto; }
.game-similar__item:nth-child(n + 5) { display: none; }
@media (min-width: 768px) {
  .game-similar__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  .game-similar__item:nth-child(n + 4) { display: none; }
}
@media (min-width: 1024px) {
  .game-similar__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-6); }
  .game-similar__item:nth-child(n + 4) { display: flex; }
}


/* ── 7. Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .game-hero__frame.tilt { transform: none; }
}
