/* LivingRoom Play — the games' own table, on the web.
   The palette is lifted from the apps: felt green, the near-black green the
   menus sit on, and the one gold that only ever means "this is the thing to do".
   One theme on purpose: the games are a dark table, and so is this. */

:root {
  --felt: #125c36;
  --ground: #0c1813;
  --raised: #16251e;
  --raised-more: #1d2f26;
  --edge: rgba(255, 255, 255, 0.10);
  --ink: #f2f5f2;
  --ink-secondary: rgba(242, 245, 242, 0.72);
  --ink-faint: rgba(242, 245, 242, 0.55);
  --gold: #f5c961;
  --gold-deep: #d9a832;

  --radius-panel: 22px;
  --radius-control: 14px;
  --measure: 34rem;
  --page: 64rem;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #ffe0a0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #10130f; padding: 0.7em 1em;
  border-radius: 0 0 var(--radius-control) 0; font-weight: 700; z-index: 10;
}
.skip:focus { left: 0; }

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left));
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--edge);
  background: rgba(12, 24, 19, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 12px 24px;
  flex-wrap: wrap;
  padding-block: 12px;
}
.wordmark {
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.35em;
}
.wordmark span { color: var(--gold); }
.site-nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* Hero -------------------------------------------------------------------- */

.hero {
  background-color: var(--felt);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.5)), url("/assets/img/felt.jpg");
  background-size: auto, 256px 256px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.hero .wrap { padding-block: clamp(44px, 9vw, 92px); }
.hero p.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: var(--measure);
  margin-bottom: 0;
}
.hero .kicker {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem;
  font-weight: 700; color: var(--gold); margin-bottom: 1em;
}

/* Sections ---------------------------------------------------------------- */

section { padding-block: clamp(36px, 7vw, 68px); }
section + section { border-top: 1px solid var(--edge); }
.section-lede { color: var(--ink-secondary); max-width: var(--measure); }

/* Game cards -------------------------------------------------------------- */

.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 640px) { .games { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }

.game-card {
  background: var(--raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-panel);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  height: 100%;
}
.game-card img.icon { width: 76px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.game-card h3 { margin: 0; }
.game-card p { color: var(--ink-secondary); margin: 0; }
.game-card p.tagline { color: var(--ink); font-weight: 600; }
.game-card .links { margin-top: auto; padding-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.25em 0.7em; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold); white-space: nowrap;
}
.badge.soon { border-color: var(--edge); color: var(--ink-faint); }

/* Promises ---------------------------------------------------------------- */

.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 640px) { .promises { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.promises li {
  background: var(--raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-control);
  padding: 18px 20px;
}
.promises h3 { margin-bottom: 0.3em; font-size: 1.02rem; }
.promises p { margin: 0; color: var(--ink-secondary); font-size: 0.96rem; }

/* Game page --------------------------------------------------------------- */

.game-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.game-hero img.icon { width: 104px; border-radius: 24px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.game-hero .about { flex: 1 1 320px; }
.meta { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.button {
  display: inline-block; padding: 0.75em 1.4em; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 1px solid transparent;
}
.button.primary { background: var(--gold); color: #17120a; }
.button.primary:hover { background: #ffd97e; color: #17120a; }
.button.quiet { border-color: var(--edge); color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.button.quiet:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

.shots { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(180px, 280px)); justify-content: start; margin: 0; padding: 0; list-style: none; }
.shots figure { margin: 0; }
.shots img { border-radius: 20px; border: 1px solid var(--edge); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.shots figcaption { color: var(--ink-faint); font-size: 0.85rem; margin-top: 8px; }

/* Prose ------------------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--ink-secondary); }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: var(--measure); }
.steps > li {
  counter-increment: step;
  border-left: 2px solid rgba(245, 201, 97, 0.35);
  padding: 0 0 22px 20px;
  position: relative;
}
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -13px; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ground); border: 1px solid rgba(245, 201, 97, 0.5);
  color: var(--gold); font-size: 0.75rem; font-weight: 800;
  display: grid; place-items: center;
}
.steps h3 { margin: 0 0 0.3em; font-size: 1.05rem; color: var(--ink); }
.steps p { margin: 0; color: var(--ink-secondary); }

table.ranks { border-collapse: collapse; width: 100%; max-width: var(--measure); margin: 14px 0 0; }
table.ranks td { border-bottom: 1px solid var(--edge); padding: 10px 0; vertical-align: baseline; }
table.ranks td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; white-space: nowrap; padding-right: 18px; }
table.ranks td:last-child { color: var(--ink-secondary); text-align: right; }
table.ranks .red { color: #e8697a; }
.table-scroll { overflow-x: auto; }

.faq { max-width: var(--measure); }
.faq h3 { margin-top: 1.6em; }
.faq h3:first-child { margin-top: 0; }
.faq p { color: var(--ink-secondary); }

.note {
  border: 1px solid var(--edge); border-radius: var(--radius-control);
  background: var(--raised); padding: 16px 20px; max-width: var(--measure);
}
.note p:last-child { margin-bottom: 0; }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--edge);
  padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer nav a { color: var(--ink-secondary); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer p { margin: 0 0 0.5em; max-width: var(--measure); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
