/* Adventure cards: full-width scenes and colours from their worlds. */
.escape-index .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.escape-index .worksheet-intro {
  background: linear-gradient(115deg, #e6f0fa, #fff8e7 66%, #f5e6c7);
}
.escape-index .worksheet-intro h1 { max-width: none; }
.escape-index .worksheet-intro::after { display: none; }
.escape-index .worksheet-intro > p:not(.worksheet-kicker) { max-width: 48rem; }

.games-page.escape-index .game-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-color: var(--adventure-border);
  background: var(--adventure-background);
}
.games-page.escape-index .game-card::before { display: none; }
.games-page.escape-index .game-card[data-theme="castle"] {
  --adventure-background: linear-gradient(145deg, #203a55, #14263b);
  --adventure-border: #b18a4c;
  --adventure-heading: #fff1cc;
  --adventure-text: #e0e9f2;
  --adventure-accent: #f2cc83;
  --adventure-button: #f2cc83;
  --adventure-button-ink: #172b40;
  --adventure-button-hover: #ffe0a1;
}
.games-page.escape-index .game-card[data-theme="lighthouse"] {
  --adventure-background: linear-gradient(145deg, #e7f8f5, #d2eeeb);
  --adventure-border: #7fbbb3;
  --adventure-heading: #164d58;
  --adventure-text: #295965;
  --adventure-accent: #136454;
  --adventure-button: #116b5d;
  --adventure-button-ink: #ffffff;
  --adventure-button-hover: #0b5146;
}
.games-page.escape-index .game-card[data-theme="observatory"] {
  --adventure-background: linear-gradient(145deg, #283150, #1c203b);
  --adventure-border: #8e81b4;
  --adventure-heading: #fff1cf;
  --adventure-text: #e5e1f2;
  --adventure-accent: #ddc5ff;
  --adventure-button: #d9c1ff;
  --adventure-button-ink: #28213d;
  --adventure-button-hover: #e8d9ff;
}
.games-page.escape-index .game-card > .escape-release-preview {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  flex: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.games-page.escape-index .escape-release-preview img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}
.games-page.escape-index .game-card:hover .escape-release-preview img:first-child {
  transform: scale(1.035);
}
.games-page.escape-index .escape-preview-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18, 33, 52, .84);
  border: 1.5px solid rgba(255, 232, 168, .65);
  color: #fff6dc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28);
  backdrop-filter: blur(4px);
  animation: escapeBadgePulse 4.2s ease-in-out infinite;
}
.games-page.escape-index .escape-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #ffd978;
}
.games-page.escape-index .escape-badge-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.games-page.escape-index .game-card[data-theme="lighthouse"] .escape-preview-badge {
  background: rgba(15, 68, 66, .86);
  border-color: rgba(173, 240, 224, .75);
  animation-delay: .8s;
}
.games-page.escape-index .game-card[data-theme="robot"] .escape-preview-badge {
  background: rgba(20, 62, 66, .86);
  border-color: rgba(255, 211, 142, .75);
  animation-delay: 1.6s;
}
.games-page.escape-index .game-card[data-theme="observatory"] .escape-preview-badge {
  background: rgba(34, 28, 66, .86);
  border-color: rgba(224, 198, 255, .75);
  animation-delay: 2.4s;
}
.games-page.escape-index .game-card[data-theme="lighthouse"] .escape-release-preview::after {
  content: "";
  position: absolute;
  inset: -20% -30%;
  background: linear-gradient(108deg, transparent 40%, rgba(255, 247, 194, .28) 50%, transparent 60%);
  pointer-events: none;
  animation: lighthouseSweep 5.6s ease-in-out infinite;
}
.games-page.escape-index .game-card[data-theme="observatory"] .escape-release-preview::after,
.games-page.escape-index .game-card[data-theme="castle"] .escape-release-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 24% 28%, rgba(255, 236, 168, .28) 0 18%, transparent 52%);
  pointer-events: none;
  animation: escapeSceneGlow 4.4s ease-in-out infinite;
}
@keyframes escapeBadgePulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}
@keyframes lighthouseSweep {
  0%, 100% { transform: translateX(-22%) rotate(-4deg); opacity: .45; }
  50% { transform: translateX(22%) rotate(4deg); opacity: .9; }
}
@keyframes escapeSceneGlow {
  0%, 100% { opacity: .35; }
  50% { opacity: .85; }
}
@media (prefers-reduced-motion: reduce) {
  .games-page.escape-index .escape-preview-badge,
  .games-page.escape-index .escape-release-preview::after {
    animation: none !important;
  }
}
.games-page.escape-index .game-card > div:last-child { padding: 24px; }
.games-page.escape-index .game-card h2 { color: var(--adventure-heading); }
.games-page.escape-index .game-card p { color: var(--adventure-text); }
.games-page.escape-index .game-card .worksheet-kicker { color: var(--adventure-accent); }
.games-page.escape-index .game-card .game-count { margin-block: auto 16px; padding-top: 8px; }
.games-page.escape-index .game-card .game-primary {
  color: var(--adventure-button-ink);
  background: var(--adventure-button);
  border-color: var(--adventure-button);
  box-shadow: 0 3px 0 #0003;
}
.games-page.escape-index .game-card .game-primary:hover { background: var(--adventure-button-hover); border-color: var(--adventure-button-hover); }
.games-page.escape-index .game-card :focus-visible { outline-color: var(--adventure-accent); }
@media (max-width: 1099px) {
  .escape-index .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .escape-index .games-grid { grid-template-columns: minmax(0, 1fr); }
  .games-page.escape-index .game-card > div:last-child { padding: 22px; }
}
