/* Playthound — shared styles for the public and private landing pages.
 *
 * Palette: night-yard indigo with a brass "collar tag" accent for public
 * things and a copper accent for the private room. Cards are chunky
 * pixel-buttons (hard 2px borders, offset solid shadows) to match the
 * pixel-art games they link to.
 */

:root {
  --night:  #1b2240;
  --panel:  #252e52;
  --line:   #39426b;
  --cream:  #f4ebda;
  --muted:  #9aa3c4;
  --brass:  #f0a93c;
  --copper: #e0704f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 24rem at 50% -8rem, rgba(240, 169, 60, 0.07), transparent 70%),
    var(--night);
  color: var(--cream);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* ---- header ------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand svg {
  width: 5.5rem;
  height: auto;
  flex: none;
}

.brand h1 {
  margin: 0;
  font-family: "Bungee", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  letter-spacing: 0.02em;
}

.brand h1 a {
  color: var(--cream);
  text-decoration: none;
}

.tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Pixel hound: two tail frames swapped on a steps() clock = a wag. */
.tail-mid { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .tail-up  { animation: wag-a 0.9s steps(1) infinite; }
  .tail-mid { animation: wag-b 0.9s steps(1) infinite; }
}

@keyframes wag-a { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes wag-b { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }

/* ---- sections ----------------------------------------------------- */

.room {
  margin-top: 3.5rem;
}

.room-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.room-head::after {
  content: "";
  flex: 1;
  border-top: 2px solid var(--line);
}

.eyebrow {
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.eyebrow-private { color: var(--copper); }

.room-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42rem;
}

/* ---- game cards --------------------------------------------------- */

.grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.card:hover,
.card:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  border-color: var(--brass);
}

/* Thumbnail strip: full-bleed to the card border. Game screenshots are
 * mostly pixel art — keep the pixels crisp when scaled. */
.thumb {
  aspect-ratio: 16 / 10;
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.thumb-missing {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(0, 0, 0, 0.12) 10px 20px),
    var(--night);
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-family: "Bungee", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
}

.card h3 a {
  color: var(--cream);
  text-decoration: none;
}

.card:hover h3 a,
.card:focus-within h3 a { color: var(--brass); }

.tags {
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.blurb {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}

.links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.links a {
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

a.play { color: var(--brass); }

a.link2 { color: var(--muted); }

a.link2:hover, a.link2:focus-visible { color: var(--brass); }

.empty {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 2px dashed var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- private-room gate (on the public page) ----------------------- */

.gate {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--copper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.gate p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--brass);
  color: var(--night);
  border: 2px solid var(--brass);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.35);
}

/* ---- misc --------------------------------------------------------- */

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.back:hover, .back:focus-visible { color: var(--brass); }

footer {
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
  font-family: "Silkscreen", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
}
