/* ycgNem — "the cabinet": one dark arcade world, amber + teal lifted from the games' own palettes.
   Layout: header bar, then full-width bands of content on a 1180px column (1400px on the home page). */
:root {
  --bg: #15101c;        /* night plum */
  --bg-2: #1d1627;      /* panels */
  --bg-3: #261d33;      /* raised */
  --line: #3a2e4b;
  --ink: #fff1d6;       /* parchment */
  --ink-2: #cdbfd9;
  --ink-3: #9a8bab;
  --amber: #f5a623;
  --amber-deep: #b8631e;
  --teal: #3fd8c2;
  --rose: #ff6b8b;
  --violet: #a98bff;

  --f-display: "Pixelify Sans", "Trebuchet MS", sans-serif;
  --f-pixel: "Silkscreen", "Courier New", monospace;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --col: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { max-width: var(--col); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; font-weight: 500; }
p { margin: 0; }
.eyebrow { font-family: var(--f-pixel); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--f-pixel); font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 0.75em 1.2em; border-radius: var(--r);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--amber); color: #1b1424; box-shadow: 0 4px 0 var(--amber-deep); }
.btn-primary:hover { background: #ffbb48; color: #1b1424; }
.btn-primary:active { box-shadow: 0 2px 0 var(--amber-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { font-size: 0.8rem; padding: 0.55em 0.9em; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--f-pixel); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3em 0.65em; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.st-released { color: var(--teal); }
.st-playable { color: var(--amber); }
.st-playtest { color: var(--violet); }
.st-prototype { color: var(--rose); }
.st-indev { color: var(--ink-3); }

.stat {
  font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-2);
  border-left: 2px solid var(--amber); padding-left: 0.7em; font-variant-numeric: tabular-nums;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; }
.logo img { height: 30px; width: auto; image-rendering: pixelated; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  font-family: var(--f-pixel); font-size: 0.85rem; color: var(--ink-2); text-decoration: none;
  padding: 0.5em 0.75em; border-radius: var(--r);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--bg-3); }
@media (max-width: 720px) {
  .site-head .wrap { padding-block: 10px; gap: 8px; }
  .nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .nav a { padding: 0.45em 0.4em; font-size: 0.78rem; }
  .head-cta { display: none; }
}

/* ---------- bands ---------- */
.band { padding-block: clamp(56px, 8vw, 96px); }
.band + .band { border-top: 1px solid var(--line); }
.band-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 36px; }
.band-head > div { display: grid; gap: 10px; }

/* ---------- home: showcase (featured switcher, pure CSS radios) ---------- */
.wrap.wide { max-width: 1400px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.showcase { padding-block: 20px 0; }
.spot-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.slide {
  display: none; position: relative; align-items: flex-end; overflow: hidden;
  min-height: clamp(420px, 44vw, 620px); background: #000; border-radius: 8px; border: 1px solid var(--line);
}
#spot-0:checked ~ .spot-stage .s0, #spot-1:checked ~ .spot-stage .s1,
#spot-2:checked ~ .spot-stage .s2, #spot-3:checked ~ .spot-stage .s3 { display: flex; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-panel {
  position: relative; margin: clamp(16px, 2.5vw, 28px); max-width: 560px; padding: 26px 30px;
  background: rgb(21 16 28 / 0.92); border: 1px solid var(--line); border-radius: 6px; display: grid; gap: 14px;
}
.slide-panel h2 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; }
.slide-panel .pitch { color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ver { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kicker { font-family: var(--f-pixel); font-size: 0.95rem; color: var(--amber); letter-spacing: 0.03em; }
.slide-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.spot-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 12px; }
.spot-tab {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px; cursor: pointer;
  background: var(--bg-2); border: 2px solid var(--line); border-radius: 6px; transition: border-color 0.15s;
}
.spot-tab:hover { border-color: #57476d; }
.spot-tab img { width: 80px; height: 45px; object-fit: cover; flex: none; border-radius: 2px; image-rendering: pixelated; }
.spot-tab > span { display: grid; line-height: 1.25; min-width: 0; }
.spot-tab b { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.spot-tab span span { font-size: 0.85rem; color: var(--ink-3); }
#spot-0:checked ~ .spot-tabs [for="spot-0"], #spot-1:checked ~ .spot-tabs [for="spot-1"],
#spot-2:checked ~ .spot-tabs [for="spot-2"], #spot-3:checked ~ .spot-tabs [for="spot-3"] { border-color: var(--amber); }
#spot-0:focus-visible ~ .spot-tabs [for="spot-0"], #spot-1:focus-visible ~ .spot-tabs [for="spot-1"],
#spot-2:focus-visible ~ .spot-tabs [for="spot-2"], #spot-3:focus-visible ~ .spot-tabs [for="spot-3"] { outline: 2px solid var(--amber); outline-offset: 3px; }
@media (max-width: 720px) {
  .slide { flex-direction: column; align-items: stretch; min-height: 0; }
  .slide > img { position: static; aspect-ratio: 16 / 9; height: auto; }
  .slide-panel { margin: 0; max-width: none; border: 0; border-radius: 0; background: var(--bg-2); padding: 22px; }
}
.proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.proof li { font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink-3); }
.proof b { color: var(--ink); font-weight: 600; }

/* ---------- home: shelves ---------- */
.shelves { display: grid; gap: clamp(48px, 6vw, 72px); }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 22px; }
.shelf-head h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 32px 24px; }
.shelf-grid.sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 28px 20px; }
.feature-card + .shelf-grid { margin-top: 28px; }
.shelf-card { display: grid; gap: 10px; align-content: start; color: inherit; text-decoration: none; }
.shelf-card img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; image-rendering: pixelated;
  outline: 3px solid transparent; transition: outline-color 0.12s, transform 0.12s;
}
.shelf-card:hover img { outline-color: var(--amber); transform: translateY(-3px); }
.shelf-card:hover h3 { color: var(--teal); }
.shelf-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.shelf-title h3 { font-size: 1.45rem; font-weight: 600; }
.shelf-grid.sm .shelf-title h3 { font-size: 1.2rem; }
.shelf-card .pitch { color: var(--ink-2); font-size: 0.97rem; }
.shelf-card .genre { color: var(--ink-3); font-size: 0.92rem; }
.shelf-card .stat { justify-self: start; }
.soon { font-family: var(--f-pixel); font-size: 0.75rem; color: var(--ink-3); }
.shelf-note { margin-top: 40px; font-size: 0.95rem; }
.feature-card {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: var(--amber); }
.feature-card:hover h3 { color: var(--teal); }
.feature-card img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; }
.feature-body { padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: center; }
.feature-body h3 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 600; }
.feature-body .genre { color: var(--ink-3); font-size: 0.95rem; }
.feature-body .pitch { color: var(--ink-2); }
.feature-body .stat { justify-self: start; }
@media (max-width: 860px) { .feature-card { grid-template-columns: 1fr; } .feature-card img { height: auto; } }
@media (prefers-reduced-motion: reduce) { .shelf-card:hover img { transform: none; } }

/* ---------- home: devlog + join ---------- */
.home-devlog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 32px 56px; align-items: start; }
.home-devlog-head { display: grid; gap: 12px; justify-items: start; }
.post-list a {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 6px 24px; align-items: baseline;
  padding-block: 20px; border-top: 1px solid var(--line); color: inherit; text-decoration: none;
}
.post-list a:last-child { border-bottom: 1px solid var(--line); }
.post-list a:hover h3 { color: var(--teal); }
.post-list time { font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink-3); }
.post-list div { display: grid; gap: 4px; }
.post-list p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 860px) { .home-devlog { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .post-list a { grid-template-columns: 1fr; } }
.join {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px 48px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: clamp(26px, 4vw, 44px);
}
.join-copy { display: grid; gap: 12px; }
.join-actions { display: grid; gap: 12px; }
.join-actions .btn { justify-content: center; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } }

/* ---------- game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 28px; }
.card {
  display: grid; grid-template-rows: auto 1fr; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #57476d; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
.card-img { position: relative; aspect-ratio: 16 / 9; background: #000; display: block; }
.card-img img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.card-img .chip { position: absolute; bottom: 12px; left: 12px; background: rgb(21 16 28 / 0.9); }
.card-body { display: grid; gap: 12px; padding: 20px 20px 22px; align-content: start; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title h3 a { color: var(--ink); text-decoration: none; }
.card-title h3 a:hover { color: var(--teal); }
.card-title .ver { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; }
.card .genre { font-size: 0.9rem; color: var(--ink-3); margin-top: -6px; }
.card .pitch { color: var(--ink-2); font-size: 0.98rem; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
@media (min-width: 1160px) {
  .card.feature { grid-column: span 2; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: none; }
  .card.feature .card-img { aspect-ratio: auto; height: 100%; }
  .card.feature .card-body { align-content: center; padding: 28px; }
}

/* ---------- devlog list ---------- */
.posts { display: grid; gap: 0; }
.post-row {
  display: grid; grid-template-columns: 9.5rem 200px minmax(0, 1fr); gap: 24px; align-items: center;
  padding-block: 22px; border-top: 1px solid var(--line); text-decoration: none; color: inherit;
}
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row:hover h3 { color: var(--teal); }
.post-row time { font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink-3); }
.post-row img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; image-rendering: pixelated; }
.post-row div { display: grid; gap: 6px; min-width: 0; }
.post-row p { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 720px) { .post-row { grid-template-columns: 1fr; gap: 10px; } .post-row img { max-width: 320px; } }

/* ---------- community ---------- */
.community { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.discord-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: grid; gap: 16px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 0.92rem;
}
.socials a:hover { border-color: var(--teal); color: var(--ink); }
.socials svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .community { grid-template-columns: 1fr; } }

/* ---------- game page ---------- */
.crumbs { font-family: var(--f-pixel); font-size: 0.8rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.game-head { display: grid; gap: 14px; padding-block: 40px 28px; }
.game-head .meta { display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: brightness(0.55); }
.player .start {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; width: 100%;
}
.player .start span.press { font-family: var(--f-pixel); font-size: clamp(1.2rem, 3vw, 2rem); text-shadow: 0 3px 0 #000; }
.player .start span.hint { font-size: 0.9rem; color: var(--ink-2); text-shadow: 0 1px 2px #000; }
.player .start:hover span.press { color: var(--amber); }
.player .start:focus-visible { outline-offset: -6px; }
.player-bar { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 14px 0; }
.mobile-note { display: none; font-size: 0.9rem; color: var(--ink-3); margin-top: 12px; }
@media (hover: none) and (pointer: coarse) { .mobile-note { display: block; } }

.game-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-block: 48px; }
.prose { display: grid; gap: 18px; max-width: 66ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: 1.5rem; margin-top: 18px; }
.prose h3 { margin-top: 10px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.prose strong { color: var(--ink); }
.prose img { border-radius: 6px; border: 1px solid var(--line); image-rendering: pixelated; }
.prose blockquote { margin: 0; padding-left: 16px; border-left: 3px solid var(--amber); color: var(--ink); }
.prose code { font-family: var(--f-mono); font-size: 0.9em; background: var(--bg-3); padding: 0.1em 0.35em; border-radius: 3px; }
.facts { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 22px; display: grid; gap: 18px; align-self: start; }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dt { font-family: var(--f-pixel); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-size: 0.95rem; }
.keys { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.keys td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.keys td:last-child { text-align: right; font-family: var(--f-mono); font-size: 0.82rem; color: var(--amber); padding-left: 12px; }
.made { font-size: 0.9rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 960px) { .game-body { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; image-rendering: pixelated; }

.comments { padding-block: 8px 64px; display: grid; gap: 18px; }
.comments-off { padding: 22px; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-3); }

/* ---------- post page ---------- */
.post-head { display: grid; gap: 14px; padding-block: 48px 28px; max-width: 66ch; }
.post-head time { font-family: var(--f-mono); color: var(--ink-3); font-size: 0.9rem; }
.post-cover { border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; image-rendering: pixelated; }
.post-body { padding-block: 40px 56px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 24px; display: grid; gap: 12px; align-content: start; }
.panel ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 6px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px; color: var(--ink-3); font-size: 0.9rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.site-foot img { height: 22px; width: auto; image-rendering: pixelated; opacity: 0.85; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-3); }
.site-foot a:hover { color: var(--ink); }
