:root {
  --bg: #151a24;
  --panel: #1f2533;
  --panel-2: #262d3d;
  --border: #323a4d;
  --text: #e8ebf0;
  --muted: #9aa3b2;
  --gold: #fde68a;
  --crimson: #c8342b;
  --ivory: #ece4cf;
  --green: #4ade80;
  --dark-tile: #4a5d3f;
  --light-tile: #c9b98f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* the game's endless checkerboard, tilted and fading into the haze */
.backdrop {
  position: fixed;
  inset: -40% -40% auto;
  height: 120vh;
  z-index: -1;
  background:
    conic-gradient(var(--dark-tile) 25%, var(--light-tile) 0 50%, var(--dark-tile) 0 75%, var(--light-tile) 0) 0 0 / 120px 120px;
  transform: perspective(900px) rotateX(58deg) rotateZ(45deg);
  transform-origin: 50% 0;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 20px 24px;
  text-align: center;
}

.app-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

h1 {
  margin: 20px 0 4px;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--gold);
  font-weight: 600;
}

.lede {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--muted);
}

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h2 { text-align: center; font-size: 28px; margin: 48px 0 4px; }

.note { text-align: center; color: var(--muted); margin: 0 0 24px; }

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* an odd last row sits in the middle */
  gap: 16px;
}
.cards .card { flex: 0 1 calc((100% - 64px) / 5); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 18px 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 18px;
}

.card .logo { width: 44px; height: 44px; fill: var(--text); }
.card h3 { margin: 14px 0 2px; font-size: 20px; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

.btn {
  margin-top: auto;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: default;
}

.badge-mine {
  display: none;
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #052e16;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.card.mine { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 12px 30px rgba(74, 222, 128, 0.12); }
.card.mine .badge-mine { display: block; }

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 56px 0 0;
}

.shots figure { margin: 0; }

.shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.shots figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 14px; }

footer {
  margin: 64px 0 0;
  padding: 28px 20px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p { margin: 4px 0; }
.small { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .cards .card { flex-basis: calc((100% - 16px) / 2); }
  .shots { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 460px) {
  .hero { padding-top: 48px; }
  .cards .card { flex-basis: 100%; }
  .card { flex-direction: row; text-align: left; flex-wrap: wrap; column-gap: 14px; padding: 18px; }
  .card .logo { width: 36px; height: 36px; }
  .card h3 { margin: 0; }
  .card p { margin: 0; width: 100%; padding-left: 50px; margin-top: -4px; }
  .card .btn { margin: 12px 0 0 50px; }
  .card h3 { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
