@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/platform/fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations");
}

:root {
  --page: #1a2030;
  --bar-ink: #cdd5e4;
  --bar-ink-dim: #8f9ab0;
  --bar-h: 3.25rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--page);
  color: var(--bar-ink);
  font: 400 1rem/1.5 "Archivo Variable", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: -6px; }

/* ---------- top bar ---------- */
.bar {
  height: var(--bar-h);
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { font-weight: 800; font-stretch: 125%; letter-spacing: 0.01em; }
.who { display: flex; gap: 1.25rem; align-items: center; color: var(--bar-ink-dim); font-size: 0.9rem; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a { color: var(--bar-ink); text-underline-offset: 3px; }
.who a:focus-visible { outline-offset: 4px; }

/* ---------- the wall: one full-bleed colour panel per game ---------- */
.wall {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  min-height: calc(100vh - var(--bar-h));
}

.panel {
  --ground: #333;
  --accent: #ddd;
  --ink: #fff;
  --on-accent: #111;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 22rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--ground);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}
/* the accent edge grows under the title when the panel is hovered or focused */
.panel::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0.5rem;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0.18);
  transition: transform 0.35s ease;
  z-index: -1;
}
.panel:hover::before, .panel:focus-visible::before { transform: scaleX(1); }

.sub { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--accent); }
.title {
  margin: 0;
  font-weight: 850;
  font-stretch: 125%;
  font-size: clamp(2.4rem, 5.2vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.desc { margin: 0; max-width: 34ch; font-size: 1rem; line-height: 1.55; opacity: 0.88; }
.play {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-stretch: 110%;
  border-radius: 0.2rem;
}
.panel:hover .play, .panel:focus-visible .play { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- empty + error states ---------- */
.note {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  max-width: 34rem;
  margin: 0;
  padding: 2rem 1.25rem;
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
}
.note strong { display: block; margin-bottom: 0.4rem; font-size: 1.8rem; font-weight: 800; font-stretch: 120%; line-height: 1.1; color: #fff; }
.note button {
  margin-top: 1.25rem;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  color: #111;
  background: #cdd5e4;
  border: 0;
  border-radius: 0.2rem;
  cursor: pointer;
}

@media (max-width: 40rem) {
  .panel { min-height: 17rem; }
}
@media (prefers-reduced-motion: reduce) {
  .panel::before { transition: none; }
}
