@font-face {
  font-family: "VT323";
  src: url("/assets/fonts/vt323-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #1b2530;
  --panel: #24323f;
  --ledge: #3a4b5a;
  --rule: #2f3d4a;
  --text: #f5ead3;
  --soft: #d9d3c2;
  --quiet: #a3b1b6;
  --lamp: #ffd27a;
  --speech: #9fd8e8;
  --display: "Pixelify Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "VT323", ui-monospace, monospace;
  font-size: 23px;
  line-height: 1.4;
}

a { color: var(--text); }
a:hover, a:focus-visible { color: var(--lamp); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
h1 { font-size: 40px; font-weight: 600; }
h2 { font-size: 28px; font-weight: 600; color: var(--lamp); margin-bottom: 12px; }
h3 { font-size: 24px; font-weight: 400; margin-bottom: 8px; }
p { margin: 0 0 12px; }

.quiet { color: var(--quiet); font-family: inherit; font-size: inherit; font-weight: 400; }
h2.quiet { font-family: var(--display); font-size: 24px; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}
.logo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}
.logo-name {
  display: flex;
  align-items: flex-end;
  gap: 0.27em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 1px;
}
/* Charon stands in for the ampersand, sized with the text. */
.logo-name img {
  display: block;
  width: auto;
  height: 1.35em;
  margin-bottom: -0.08em;
  image-rendering: pixelated;
}
.logo-tagline { font-size: 24px; color: var(--quiet); }
.logo-tagline .game { color: var(--lamp); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 14px; }
.site-header nav a { text-decoration: none; padding: 8px 0; }
.site-header nav a[aria-current="page"] { color: var(--lamp); }

main { display: flex; flex-direction: column; gap: 40px; }

/* Erik's panel */
.scene {
  min-height: 580px;
  padding: 32px 32px 0;
  background: var(--panel);
  border-bottom: 6px solid var(--ledge);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 24px 48px;
}
.scene .dialogue {
  align-self: center;
  flex: 0 1 300px;
  font-size: 28px;
  line-height: 1.3;
}
.dialogue { color: var(--speech); }
.sprite {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.dialogue.is-narration { color: var(--soft); }
.hint { color: var(--quiet); }

/* Clickable Erik and his verb menu */
.erik { position: relative; flex: 0 0 auto; max-width: 100%; }
.erik-button {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.erik-button:focus-visible { outline: 3px dashed var(--lamp); outline-offset: 4px; }
.verb-menu {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  background: var(--bg);
  border: 3px solid var(--text);
  box-shadow: 4px 4px 0 #0f161d;
}
.verb-menu[hidden] { display: none; }
.verb-menu button {
  min-height: 44px;
  padding: 6px 16px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 24px;
  text-align: left;
  cursor: pointer;
}
.verb-menu button + button { border-top: 2px solid var(--rule); }
.verb-menu button:hover,
.verb-menu button:focus-visible { color: var(--bg); background: var(--lamp); outline: none; }

.scene--intro { min-height: 0; justify-content: space-between; }
.scene--intro .intro { flex: 1 1 380px; padding-bottom: 28px; }
.scene--intro h1 { font-size: 44px; margin-bottom: 14px; }
.lead { font-size: 26px; max-width: 34ch; }

/* Posts */
.meta { font-size: 20px; color: var(--quiet); margin-bottom: 8px; }
.newest h1 a { text-decoration: none; }
.teaser { color: var(--soft); max-width: 46ch; }
.action { display: inline-block; color: var(--lamp); text-decoration: none; padding: 8px 0; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li > a, .post-list li > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 2px solid var(--rule);
  text-decoration: none;
}
.post-list time, .post-list .quiet { color: var(--quiet); min-width: 180px; }

.post { max-width: 65ch; }
.post h1 { margin-bottom: 24px; }
.post img { max-width: 100%; height: auto; image-rendering: pixelated; }

/* AI page */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card { background: var(--panel); border-radius: 4px; padding: 20px 24px; }
.card ul, .rules { margin: 0; padding-left: 24px; }
.card li, .rules li { margin-bottom: 6px; }
.rules { max-width: 60ch; }

.site-footer {
  border-top: 2px solid var(--rule);
  padding-top: 16px;
  font-size: 20px;
  color: var(--quiet);
}

@media (max-width: 600px) {
  .scene { padding: 24px 16px 0; min-height: 0; }
  h1 { font-size: 34px; }
  .logo-name { font-size: 34px; }
  .logo-tagline { font-size: 20px; }
}
