/* Home page */

.hero {
  background-image: radial-gradient(circle, var(--desk-dot) 1px, transparent 1.5px);
  background-size: 20px 20px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 40px 56px;
  padding-block: 64px 72px;
}
.eyebrow {
  margin: 0 0 14px;
  font: 600 12px/1.2 "Martian Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.hero h1 {
  margin: 0 0 18px;
  font: 400 clamp(32px, 4.6vw, 54px)/1.04 "Bungee", "Arial Black", Impact, sans-serif;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.lede {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Live demo: a small copy of Drift Recall running on its own */
.demo {
  overflow: hidden;
  border: 1.5px solid var(--win-line);
  border-radius: 14px;
  background: var(--win);
  box-shadow: var(--win-shadow);
}
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bar);
  color: var(--bar-ink);
}
.demo-name { font: 400 12px/1 "Bungee", "Arial Black", Impact, sans-serif; letter-spacing: 0.08em; }
.demo-state {
  font: 600 11px/1 "Martian Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bar-muted);
}
.demo-time { color: var(--bar-ink); font-variant-numeric: tabular-nums; }
.demo-timer { height: 3px; background: var(--bar); }
.demo-timer-fill {
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
}
.demo-field {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--field);
  background-image:
    linear-gradient(var(--field-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--field-line) 1px, transparent 1px);
  background-size: 12.5% 20%;
}
.demo-tile {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--dtpx, 48px);
  aspect-ratio: 1 / 1;
  padding-bottom: calc(var(--dtpx, 48px) * 0.07);
  border-radius: 17%;
  background: var(--tile);
  color: var(--tile-ink);
  box-shadow:
    inset 0 calc(var(--dtpx, 48px) * -0.07) 0 var(--tile-rim),
    0 calc(var(--dtpx, 48px) * 0.09) calc(var(--dtpx, 48px) * 0.2) var(--tile-shadow);
  font: 400 calc(var(--dtpx, 48px) * 0.46)/1 "Bungee", "Arial Black", Impact, sans-serif;
  will-change: transform;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.demo-tile.is-found {
  background: var(--ok);
  color: var(--on-state);
  box-shadow:
    inset 0 calc(var(--dtpx, 48px) * -0.07) 0 var(--ok-rim),
    0 calc(var(--dtpx, 48px) * 0.09) calc(var(--dtpx, 48px) * 0.2) var(--tile-shadow);
}

/* ---------- Games ---------- */
.games { padding-block: 56px 24px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  margin-bottom: 20px;
}
.section-head h2,
.faq h2 {
  margin: 0;
  font: 400 24px/1.1 "Bungee", "Arial Black", Impact, sans-serif;
  letter-spacing: 0.02em;
}
.section-head p { margin: 0; color: var(--muted); }

.game-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.game-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--win);
}
.game-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--field);
  background-image:
    linear-gradient(var(--field-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--field-line) 1px, transparent 1px);
  background-size: 12.5% 20%;
}
.thumb-tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: 20%;
  aspect-ratio: 1 / 1;
  border-radius: 17%;
  background: var(--tile);
  color: var(--tile-ink);
  box-shadow: inset 0 -3px 0 var(--tile-rim), 0 4px 8px var(--tile-shadow);
  font: 400 18px/1 "Bungee", "Arial Black", Impact, sans-serif;
}
.thumb-tile.is-found { background: var(--ok); color: var(--on-state); box-shadow: inset 0 -3px 0 var(--ok-rim), 0 4px 8px var(--tile-shadow); }
.thumb-tile:nth-child(1) { left: 8%; top: 12%; }
.thumb-tile:nth-child(2) { left: 36%; top: 8%; }
.thumb-tile:nth-child(3) { left: 70%; top: 18%; }
.thumb-tile:nth-child(4) { left: 16%; top: 58%; }
.thumb-tile:nth-child(5) { left: 47%; top: 50%; }
.thumb-tile:nth-child(6) { left: 74%; top: 62%; }

.game-info h3 { margin: 0 0 6px; font: 400 20px/1.15 "Bungee", "Arial Black", Impact, sans-serif; }
.game-info h3 a { text-decoration: none; }
.game-info h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.game-info p { margin: 0 0 12px; max-width: 62ch; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 400 11px/1 "Martian Mono", ui-monospace, Menlo, monospace;
  color: var(--muted);
  white-space: nowrap;
}
.game-side { display: grid; justify-items: end; gap: 10px; }
.game-best {
  margin: 0;
  font: 400 12px/1.3 "Martian Mono", ui-monospace, Menlo, monospace;
  color: var(--muted);
  text-align: right;
}
.game-best.has-best { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { padding-block: 40px 64px; }
.faq-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
}
.faq-list { display: grid; max-width: 720px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* The +/- marker is decoration: the empty alt text after "/" keeps screen readers quiet */
.faq summary::after {
  content: "+";
  content: "+" / "";
  flex: none;
  font: 600 16px/1.2 "Martian Mono", ui-monospace, Menlo, monospace;
  color: var(--muted);
}
.faq details[open] summary::after { content: "\2212"; content: "\2212" / ""; }
.faq details p { margin: 0 0 16px; max-width: 62ch; color: var(--muted); }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 40px 48px; }
  .game-row { grid-template-columns: 160px minmax(0, 1fr); }
  .game-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .game-best { text-align: left; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .game-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .thumb-tile { font-size: 16px; }
  .lede { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-tile { transition: none; }
}
