/* Ported from experiences-page/v5 (assets/css/sections/offers.css), the
   offering cards cut down to the three Games. Changes, marked "games v2":
   - .offer is renamed .game (and .offers__grid .games__grid): this page's
     "Ways to run" section already owns .offer.
   - v5 sets each card in a .theme-dark context from its base.css; this page
     has none, so the card declares the dark tokens it reads itself.
   - The rules it relied on from v5's base.css (.btn--sm) are folded into
     the card's own rules.
   - The cards do not turn and do not hop: v5's back face, turn buttons and
     js/behaviour/offers.js are dropped.
   - The front holds the buttons: Request and See the trailer on a live
     Game; on the Game in development, one disabled button that says so,
     and the GESDA logo in the top left corner.

   Surface: class A landing page, light theme, the cards a local dark
   context (§10.4). No analytical claim.

   §10.9: a card grid, because the reader compares the Games. Three across
   at desktop; two across on tablet; one across below 768px, capped so a
   portrait card never fills a phone twice over (§5.3: the grid loses
   columns, the cards never shrink).

   The card: the cover image with the kind and title over a scrim at its
   foot (§14.2). The card itself is not interactive; its buttons carry the
   states. The cover is dark at its foot, so the buttons take the dark
   context (§10.1: white primary, ghost secondary). They keep the 44px touch
   floor (§13.2). Disabled (§10.1): {purple.100} background, muted text,
   not-allowed cursor.
   ========================================================================= */

.games__grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8) var(--space-6);
}

.game {
  /* Tier-3: the inset of everything on the card, the height of its
     buttons, which the caption keeps clear of, the title's size (the floor
     of {type.h3}), and the logo's height. */
  --game-inset: var(--space-6);
  --game-actions-h: 44px;
  --game-name-size: 1.25rem;
  --game-logo-h: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* --- the card ------------------------------------------------------------ */
.game__card {
  /* games v2: the dark context v5 takes from .theme-dark (§3.6) */
  --color-canvas: var(--canvas-dark);
  --color-ink: var(--ink-on-dark);
  --color-muted: var(--muted-on-dark);
  --color-hairline: var(--hairline-on-dark);
  --color-focus-ring: var(--purple-300);
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-canvas);
}
.game__card .todo { color: var(--p4-orange); border-bottom-color: var(--p4-orange); }
.game__cover {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* The GESDA logo, top left, on a Game without its own cover branding */
.game__logo {
  position: absolute; left: var(--game-inset); top: var(--game-inset);
  height: var(--game-logo-h);
  width: auto;
}

/* --- the kind and title over a scrim at the cover's foot ----------------- */
.game__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-12) var(--game-inset) calc(var(--game-actions-h) + 2 * var(--game-inset));
  background: linear-gradient(to top, var(--color-scrim-strong) 55%, transparent);
}
.game__kind {
  margin: 0;
  font-family: var(--font-accent);
  font-size: var(--type-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.game__name {
  margin: var(--space-2) 0 0;
  font-size: var(--game-name-size);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

/* --- the buttons, at the card's foot ------------------------------------- */
.game__actions {
  position: absolute; left: var(--game-inset); right: var(--game-inset); bottom: var(--game-inset);
  display: flex; gap: var(--space-2);
}
.game__actions .btn {
  min-height: var(--game-actions-h);
  padding: 0 var(--space-4);
  font-size: var(--type-body-sm);
  white-space: nowrap;
}
.game__actions .btn:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.game__actions .btn:disabled {
  background: var(--purple-100);
  border-color: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

/* ============================================================================
   RESPONSIVE (§13.1) — review at 1440, 1180, 980, 720, 480, 390.
   ========================================================================= */
@media (max-width: 1199px) {
  .game { --game-inset: var(--space-4); --game-name-size: var(--type-h4); --game-logo-h: 32px; }
  .game__actions .btn { padding: 0 var(--space-3); }
}
@media (max-width: 1023px) {
  .games__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game { --game-inset: var(--space-6); --game-name-size: 1.25rem; --game-logo-h: 40px; }
  .game__actions .btn { padding: 0 var(--space-4); }
}
/* width: the auto margins stop the grid stretching in its flex column, so
   without it the grid shrinks to its content, 0 wide, and the cards vanish. */
@media (max-width: 767px) {
  .games__grid { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 400px; margin-inline: auto; }
}
