/* shelf.css: the home page's Games and Coming soon rows. One capsule card per game, built by build-pages.ps1. */
.shelf-sec { padding-block: clamp(64px, 8vw, 120px) 0; }
.shelf-sec--soon { padding-bottom: clamp(32px, 4vw, 56px); }
.shelf-h {
  margin-bottom: clamp(24px, 3vw, 40px);
  font-size: clamp(32px, 4.2vw, 60px);
}

.shelf {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
}

.shelf-card { display: grid; gap: 14px; color: inherit; }
.shelf-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000;
  outline: 1px solid var(--line);
  outline-offset: -1px;
  transition: transform .35s var(--ease-out), outline-color .25s;
}
.shelf-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.shelf-title {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.2;
  color: var(--bone);
}
.shelf-age {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 5px 1px;
  vertical-align: 2px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .02em;
  color: #fff;
  background: var(--seal);
  border-radius: 2px;
}
.shelf-note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--fog);
}
/* each column stretches to the row's height, so the Steam buttons sit level even when a title wraps */
.shelf--games > li { display: flex; flex-direction: column; }
.shelf-steam { margin-top: auto; padding-inline: 8px; font-size: 12px; letter-spacing: .06em; }
.shelf--games .shelf-card { margin-bottom: 12px; }
/* where subgrid exists, every row (cover, title, status, button) lines up across the shelf */
@supports (grid-template-rows: subgrid) {
  .shelf--games { row-gap: clamp(28px, 3vw, 44px); }
  .shelf--games > li { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .shelf--games .shelf-card { grid-row: span 3; grid-template-rows: subgrid; gap: 0; margin-bottom: 0; }
  .shelf--games .shelf-title { margin-top: 14px; }
  .shelf--games .shelf-steam { margin-top: 12px; align-self: start; }
}
@media (hover: hover) {
  a.shelf-card:hover .shelf-art { transform: translateY(-4px); outline-color: var(--bone-2); }
}
a.shelf-card:focus-visible { outline: none; }
a.shelf-card:focus-visible .shelf-art { outline: 2px solid var(--gold); outline-offset: 2px; }

/* More from Jack Wilds: two small tiles, image strip over three short lines */
.shelf-sec--soon + .more-sec { padding-top: clamp(32px, 4vw, 56px); }
.more {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
}
.more-card { display: grid; align-content: start; }
.more-art {
  position: relative;
  display: block;
  aspect-ratio: 15 / 4;
  overflow: hidden;
  background: #000;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
.more-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.more-title {
  margin-top: 14px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.2;
  color: var(--bone);
}
.more-text { margin-top: 4px; max-width: 52ch; font-size: 14px; line-height: 1.5; color: var(--bone-2); }
.more-note { margin-top: 4px; font-size: 14px; color: var(--fog); }

@media (max-width: 900px) {
  .shelf--games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* the title's last word and its 18+ travel together, so the badge never sits alone on a line */
.shelf-keep { white-space: nowrap; }
@media (max-width: 700px) {
  .more { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 600px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .shelf-card { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-art { transition: none; }
}
