:root {
  --bg: #16120e;
  --ink: #f3eadc;
  --muted: #a8947c;
  --accent: #d18a4c;
  --accent-ink: #1a1008;
  --line: #3a2f24;
  --raise: #221b15;
  font-family: "Segoe UI", "Palatino Linotype", Palatino, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 12% -8%, #2a1e14 0%, transparent 55%),
    linear-gradient(180deg, #1a1510 0%, var(--bg) 42%);
  color: var(--ink);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-wrap: wrap;
}

.brand strong {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand span {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}

nav { display: flex; gap: 18px; flex-wrap: wrap; }

nav a.active {
  color: var(--ink);
  font-weight: 700;
}

main { flex: 1; width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }

footer {
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding: 18px 28px 28px;
}

footer p {
  margin: 0;
}

footer .company {
  font-size: 12px;
}

footer .company + p {
  margin-top: 8px;
}

.hero h1, .card h2 { margin: 0 0 8px; }
.hero p, .meta, .note, .eyebrow { color: var(--muted); line-height: 1.5; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }

.about {
  max-width: 42rem;
}

.about .panel {
  margin-top: 20px;
}

.about .panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.about .panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.about .panel p:last-child {
  margin-bottom: 0;
}

.about .steps {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.grid:has(.game-card) {
  align-items: start;
}

.card {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.poster {
  height: 280px;
  overflow: hidden;
  display: grid;
  place-items: center;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
  background:
    repeating-linear-gradient(-18deg, #2a2118, #2a2118 12px, #34281e 12px, #34281e 24px);
}

.poster.has-art {
  position: relative;
  height: auto;
  aspect-ratio: 2 / 3;
  padding: 0;
  letter-spacing: 0;
  background: #110e0b;
}

.game-card .poster.has-art {
  aspect-ratio: 4 / 3;
}

.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.card .body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: auto;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.game-card {
  align-self: start;
  height: auto;
}

.game-card .body {
  flex: 0 0 auto;
  margin-top: 0;
}
.row strong { font-size: 18px; }

.game-card details { margin: 0; }
.game-card summary {
  list-style: none;
  cursor: pointer;
}
.game-card summary::-webkit-details-marker { display: none; }
.game-card summary h2 {
  margin: 0;
  padding: 16px 16px 0;
  line-height: 1.25;
  min-height: calc(16px + 2.5em);
}
.game-card summary h2::after {
  content: " ▾";
  color: var(--muted);
  font-size: 0.7em;
  font-weight: 600;
}
.game-card details[open] summary h2::after {
  content: " ▴";
}
.game-card .game-blurb {
  margin: 0;
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.buy, button.buy {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.buy.link { margin-top: 12px; }

.code {
  font-size: 42px;
  letter-spacing: 0.12em;
  margin: 8px 0 18px;
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raise);
}

.steps { color: var(--muted); padding-left: 20px; }
.steps li { margin: 8px 0; }

label { display: block; margin: 12px 0; color: var(--muted); }
input, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

code { font-family: Consolas, "Courier New", monospace; }
.muted { color: var(--muted); }

@media (max-width: 700px) {
  .top {
    padding: 16px;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .brand strong {
    font-size: 40px;
  }

  .brand span {
    font-size: 18px;
  }

  nav {
    gap: 18px;
  }

  nav a {
    font-size: 18px;
    font-weight: 600;
  }

  main {
    width: calc(100% - 24px);
    padding: 20px 0 48px;
  }

  footer {
    padding: 16px 16px 24px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 20px;
    justify-items: center;
  }

  .card {
    display: flex;
    flex-direction: column;
    width: max-content;
    max-width: 100%;
  }

  .poster,
  .poster.has-art {
    position: static;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    width: max-content;
    max-width: 100%;
  }

  .poster img {
    position: static;
    inset: auto;
    width: auto;
    height: 280px;
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
  }

  .game-card {
    width: 100%;
    max-width: 100%;
  }

  .game-card .poster,
  .game-card .poster.has-art {
    width: 100%;
    max-width: 100%;
  }

  .game-card .poster img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .card .body {
    width: 0;
    min-width: 100%;
    padding: 16px;
  }

  .card.game-card .body {
    width: auto;
    min-width: 0;
  }

  .card h2 {
    font-size: 20px;
  }

  .row strong {
    font-size: 22px;
  }

  .buy,
  button.buy {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 44px;
    min-width: 88px;
  }

  .code {
    font-size: 28px;
  }
}

