/* Standalone stylesheet for /games/ (the catalog page and every game
   page under it, e.g. /games/anoor-bird/) - deliberately not shared
   with (or imported from) the main site's style.css, matching every
   other isolated section of this frontend (see hiking/style.css's own
   note). Token values match the main site's look by eye, not by
   reference. Shared across the whole /games/ family (unlike top-level
   sections, which each get their own copy) since a game page is a
   sub-page of the catalog, not a sibling section of its own. */

:root {
  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-border: #cfcfcb;
  --color-text-primary: #0a0a0a;
  --color-text-secondary: #555555;
  --color-text-tertiary: #737373;
  --color-accent: #55684A;
  --color-accent-soft: #EAEFE5;
  --color-accent-soft-border: #C4D0B9;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #17181a;
    --color-surface: #1e2022;
    --color-border: #35383b;
    --color-text-primary: #ece9e4;
    --color-text-secondary: #a6a49f;
    --color-text-tertiary: #79776f;
    --color-accent: #A3B78F;
    --color-accent-soft: #212A1D;
    --color-accent-soft-border: #3F5236;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
}

.masthead {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.wordmark {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  text-decoration: none;
  margin-bottom: 28px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 10px;
}

.masthead h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.dek {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 58ch;
  margin: 0;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* ---------- catalog grid (index.html) ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 8px 0 40px;
}

.game-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.game-tile:hover,
.game-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-accent-soft-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.game-tile:active {
  transform: scale(0.98);
  transition: transform 0.05s ease;
}

.game-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.game-tile-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.game-tile-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
  flex: 1;
}

.game-tile-status {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
  flex: none;
  color: #1f9d55;
  background: rgba(31, 157, 85, 0.1);
  border-color: rgba(31, 157, 85, 0.3);
}

.game-tile-status.status-soon {
  color: var(--color-text-tertiary);
  background: var(--color-bg);
  border-color: var(--color-border);
}

.game-tile-cta {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
}

/* A real, non-interactive tile for a game that isn't built yet - never
   an <a> (no dead link), reduced opacity, no hover-lift, so it reads
   as roadmap rather than a broken card (see the main site's own
   .tile-disabled). */
.game-tile-disabled {
  opacity: 0.6;
  cursor: default;
}

.game-tile-disabled:hover,
.game-tile-disabled:focus-visible {
  transform: none;
  border-color: var(--color-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.04);
}

/* ---------- game stage (a single game's own page) ---------- */

.game-stage {
  padding: 8px 0 40px;
  text-align: center;
}

.game-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.game-note {
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin: 16px 0 0;
}

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-accent);
}
