/* The game pages (/games/, /games/<slug>/) and the home page's games grid.
   Loaded after styles.css and built from its tokens only. A tile is a lobby
   big card: the mode's own art at 2:3, its name across the top. */

.games-main,
.mode-main {
  width: min(calc(100% - 48px), 1280px);
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) 0 clamp(48px, 8vh, 96px);
}

.crumbs {
  margin: 0 0 clamp(18px, 3vh, 32px);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--red);
}

.crumbs span[aria-hidden] {
  margin: 0 0.5em;
}

/* One game */

.mode-hero {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
}

.mode-art {
  margin: 0 0 0 8px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 2 / 3;
  background: var(--surface-hi);
  box-shadow: var(--shadow-card), 0 40px 60px -40px rgba(0, 0, 0, 0.45);
  transform: rotate(-2deg);
  animation: mode-art-in 520ms var(--ease) both;
}

.mode-art img,
.game-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes mode-art-in {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(0deg) scale(0.97);
  }
}

.mode-copy h1 {
  margin: 10px 0 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.mode-line {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--text-dim);
  font-family: var(--aside);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-style: italic;
  line-height: 1.3;
}

.mode-eyebrow[data-status='soon'] {
  color: var(--amber);
}

.mode-actions {
  display: flex;
  margin-top: 30px;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.mode-actions .app-store-badge {
  margin-top: 0;
}

.mode-actions .app-store-badge img {
  width: 216px;
  height: 72px;
}

.mode-get {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mode-play {
  display: inline-flex;
  min-height: 72px;
  padding: 0 28px;
  align-items: center;
  border-radius: 14px;
  background: var(--red-fill);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
  color: var(--on-fill);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms var(--ease), background-color 160ms ease;
}

.mode-play:hover {
  background: var(--red-fill-hover);
  transform: translateY(-2px);
}

.mode-play:active {
  transform: scale(0.98);
}

.mode-note {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.mode-more {
  margin-top: clamp(56px, 9vh, 104px);
  padding-top: clamp(28px, 4vh, 40px);
  border-top: 1px solid var(--line);
}

/* Grids */

.games-head h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.games-head p {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.games-shelf {
  margin-top: clamp(40px, 6vh, 64px);
}

.games-shelf h2,
.mode-more h2,
.home-games h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.games-grid {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 16px;
  list-style: none;
}

.game-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 2 / 3;
  background: var(--surface-hi);
  box-shadow: var(--shadow-card);
  color: #fff;
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}

.game-tile::before {
  position: absolute;
  inset: 0 0 auto;
  height: 46%;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  content: '';
  pointer-events: none;
}

.tile-name {
  position: absolute;
  inset: 10px 10px auto;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
}

.tile-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.78);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile-tag[data-tag='play'] {
  background: var(--red-fill);
}

.game-tile:hover,
.game-tile:focus-visible {
  box-shadow: var(--shadow-card), 0 0 0 2px var(--red-line);
  transform: translateY(-3px);
}

.game-tile:active {
  transform: scale(0.97);
}

.see-all {
  display: inline-block;
  margin-top: 22px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.see-all:hover {
  text-decoration: underline;
}

.home-games {
  padding-top: clamp(32px, 5vh, 48px);
  border-top: 1px solid var(--line);
}

.home-games > p {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.96rem;
}

@media (max-width: 760px) {
  .games-main,
  .mode-main {
    width: min(calc(100% - 32px), 1280px);
  }

  .mode-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .mode-art {
    width: min(50vw, 220px);
  }

  .mode-copy h1 {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }

  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .tile-name {
    inset: 8px 8px auto;
    font-size: 0.7rem;
  }

  .tile-tag {
    left: 8px;
    bottom: 8px;
    font-size: 0.58rem;
  }
}

/* How a game plays (sar 1106, AADO): rules, the day, who it suits, similar
   games, then the Crux facts. Plain reading width under the hero. */

.mode-details {
  display: grid;
  gap: clamp(20px, 3vh, 32px);
  max-width: 72ch;
  margin: clamp(36px, 7vh, 72px) 0 0;
}

.mode-section h2 {
  margin: 0 0 0.5em;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  letter-spacing: -0.01em;
}

.mode-section p,
.mode-section li {
  color: var(--text);
  line-height: 1.6;
}

.mode-section p {
  margin: 0;
}

.mode-steps,
.mode-similar {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 0.4em;
}

.mode-similar-note {
  margin-top: 0.6em;
  color: var(--text-dim);
  font-size: 0.9rem;
}
