/* Home page: the "Economic Games" block (tools/games.js). Only rules under .home-games; the section head, its h2 and
   the card colors are the site's own (home-page.css: .section-head, --card, --hair, --card-hover, --edge-hover, --accent). */
.home-games { padding: 19px 0; }
.home-games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-games .home-game-card { position: relative; min-width: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--hair); border-radius: 5px; color: var(--ink); transition: border-color .16s, background .16s; }
.home-games .home-game-card:hover { border-color: var(--edge-hover); background: var(--card-hover); }
.home-games .home-game-card:focus-within { border-color: var(--edge-hover); }
.home-games .home-game-art { width: 150px; height: auto; aspect-ratio: 8 / 5; object-fit: contain; background: var(--art-panel); border-radius: 8px; }
.home-games .home-game-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.home-games .home-game-title { font: 600 17px/1.17 var(--serif); letter-spacing: normal; margin: 0 0 7px; }
.home-games .home-game-desc { font: 12px/1.47 var(--sans); color: var(--ink2); margin: 0 0 6px; }
.home-games .home-game-meta { font: 11px/1.4 var(--sans); color: var(--ink2); margin: 0 0 8px; }
.home-games .home-game-play { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font: 600 13px var(--serif); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.home-games .home-game-play .arrow { width: 14px; height: 14px; }
/* the whole card is the link's tap target; the link stays the one focusable element */
.home-games .home-game-play::after { content: ""; position: absolute; inset: 0; border-radius: 5px; }
.home-games .home-game-play:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 1100px) { .home-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .home-games-grid { grid-template-columns: minmax(0, 1fr); }
  .home-games { padding: 24px 0 23px; }
}
@media (max-width: 420px) {
  .home-games .home-game-card { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 11px; }
  .home-games .home-game-art { width: 104px; }
}
@media (prefers-reduced-motion: reduce) { .home-games .home-game-card { transition: none; } }
/* "All games" at the right of the section head (home block and "More games"); the section page /games/ (tools/games.js) */
.home-games .home-games-all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; flex: none; font: 600 15px var(--serif); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.home-games .home-games-all .arrow { width: 14px; height: 14px; }
.home-games .home-games-all:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.game-more { margin-top: 40px; }
.games-index h1 { font: 700 clamp(30px, 5vw, 44px)/1.12 var(--serif); letter-spacing: -.01em; margin: 4px 0 0; }
.games-index .games-intro { font: 17px/1.6 var(--serif); max-width: 68ch; margin: 0 0 8px; }

/* Keep the existing section heading and link within narrow translated layouts. */
.home-games .section-head { flex-wrap: wrap; }

/* Trading Simulator feature, shared by the home page, catalog and related games. */
.home-games .home-game-feature { grid-column: 1 / -1; min-width: 0; }
.home-games .home-game-feature .home-game-card {
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(18px, 3.5vw, 48px);
  color: #f6f3e8;
  background: radial-gradient(ellipse at 88% 75%, #263f35, transparent 61%), #111b18;
  border: 1px solid #41524a;
  border-radius: 14px;
}
.home-game-feature .home-game-text { grid-area: 1 / 1; }
.home-games .home-game-feature .home-game-title {
  margin: 0 0 14px;
  font-size: clamp(29px, 3.5vw, 52px);
  line-height: 1.03;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.home-games .home-game-feature .home-game-desc {
  max-width: 43ch;
  color: #e1e6df;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.5;
  margin-bottom: 12px;
}
.home-games .home-game-feature .home-game-meta {
  color: #b8c8bd;
  font-size: 13px;
  margin-bottom: 22px;
}
.home-games .home-game-feature .home-game-play {
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  gap: 12px;
  border-radius: 6px;
  background: #c7edaa;
  color: #162119;
  font: 700 15px/1.25 var(--sans);
  text-decoration: none;
}
.home-game-feature .home-game-play::after { z-index: 2; }
.home-games .home-game-feature .home-game-card:hover,
.home-games .home-game-feature .home-game-card:focus-within { border-color: #9cbba5; }
.home-game-feature .home-game-card:hover .home-game-play { background: #dcf6c7; }
.home-game-feature .home-game-shots {
  position: relative;
  grid-area: 1 / 2;
  width: 100%;
  aspect-ratio: 1.84;
  min-width: 0;
  pointer-events: none;
}
.home-game-feature .home-game-shots img {
  position: absolute;
  display: block;
  object-fit: cover;
  object-position: left top;
  border: 1px solid #536459;
  border-radius: 7px;
  box-shadow: 0 10px 24px #0006;
  background: #111;
}
.home-game-feature .home-game-shots img:first-child {
  inset: 0 auto auto 0;
  width: 87%;
  height: 92%;
}
.home-game-feature .home-game-shots img:last-child {
  inset: auto 0 0 auto;
  width: 34%;
  height: 47%;
  object-view-box: inset(0 36% 45% 0);
}
@media (max-width: 720px) {
  .home-games .home-game-feature .home-game-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-game-feature .home-game-shots { grid-area: 2 / 1; }
  .home-games .home-game-feature .home-game-meta { margin-bottom: 14px; }
}
