/* Shared across the landing page and the game pages.
   Placeholder styling — the real design follows from the screenshots. */

:root {
  --bg: #f6f5f3;
  --fg: #16150f;
  --muted: #6b6862;
  --rule: #d9d5cd;
  --accent: #b4471f;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --fg: #ece8e0;
    --muted: #8e8a82;
    --rule: #2e2c28;
    --accent: #e0763f;
    --card: #1a1917;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 3rem 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

main { width: 100%; max-width: 52rem; margin: 0 auto; }

.eyebrow {
  font: 600 0.75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

p.lede { margin: 0 0 2rem; color: var(--muted); max-width: 36rem; }

img { max-width: 100%; height: auto; display: block; }

/* Landing — featured game + the rest */

.feature {
  display: block;
  margin: 0 0 2rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.feature:hover, .feature:focus-visible { border-color: var(--accent); }
.feature img { width: 100%; }

.feature-body { padding: 1.25rem; }
.feature-body h2 { margin: 0 0 0.35rem; font-size: 1.3rem; letter-spacing: -0.01em; }
.feature-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.games a, .games .soon {
  display: block;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}

.games a { transition: border-color 0.15s ease, transform 0.15s ease; }
.games a:hover, .games a:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.games .soon { border-style: dashed; background: transparent; }
.games h3 { margin: 0 0 0.35rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.games p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Game page */

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font: 0.85rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--accent); }

/* Click-to-play stage: the game is 311KB and starts audio, so it loads on
   intent rather than on page view. The iframe replaces the poster in place. */
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: #bfe6fa;
}
.stage img, .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage img { object-fit: cover; }

.stage-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(10, 12, 26, 0.35);
  color: #fff;
  font: 600 1rem/1 inherit;
  cursor: pointer;
}
.stage-btn span {
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.stage-btn:hover span { filter: brightness(1.08); }

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.85rem 0 0;
  font: 0.8rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}
.stage-meta a { color: var(--accent); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--rule);
}
.facts li { padding: 1rem; background: var(--card); }
.facts b { display: block; font-size: 1.4rem; letter-spacing: -0.02em; }
.facts span { font-size: 0.8rem; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery figure { margin: 0; }
.gallery img { border: 1px solid var(--rule); border-radius: 10px; }
.gallery figcaption { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); }

.placeholder {
  padding: 1.25rem;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}

footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
