/* Palette is Thumb & Tomb's (assets/README.md in the game repo), so the site
   and the splash logo share exact colors. */
:root {
  --bg: #0B1018;
  --dim: #394A66;
  --fg: #E6F0FF;
  --bright: #FFC857;
  --accent: #7BD4F0;
  --green: #37946E;
  --muted: #8A9BB8;         /* not a game color: small text needs more contrast than --dim gives */

  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  /* The game's night sky, pixel for pixel (tools/gen_site_art.py in the
     game repo: the title screen's stars) -- on html, not body, so the
     shooting stars (js/fire.js, a canvas behind everything) show over it. */
  background: var(--bg) url("/img/bg/stars.png") repeat;
  image-rendering: pixelated;
  /* A 90s pixel cursor (Ian, 2026-10-23), the knight's sword over links
     (gen_site_art.py draws both) */
  cursor: url("/img/cursor/arrow.png") 0 0, auto;
}
a, button, summary, label { cursor: url("/img/cursor/sword.png") 2 2, pointer; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font: 16px/1.6 var(--mono);
}

/* The title screen's fire along the bottom of every page, a few of Tedy's
   monsters walking through it (gen_site_art.py). Body is a flex column, so
   this sits after the footer. */
body::after {
  content: "";
  display: block;
  height: 150px;
  background:
    url("/img/bg/walkers.png") no-repeat center bottom / auto 150px,
    url("/img/bg/fire.png") repeat-x left bottom / auto 150px;
  image-rendering: pixelated;
  pointer-events: none;
}

/* Text and illustrations stay smooth; only the pixel art above is blocky. */
main, header, footer, nav { image-rendering: auto; }

img { max-width: 100%; height: auto; display: block; }

.studio {
  padding: 48px 16px 24px;
  text-align: center;
}

.studio h1 { margin: 0; }

.logo {
  width: 432px;             /* 3x the 144px source (Tedy's portrait logo: all of its drips) */
  margin: 0 auto;
  image-rendering: pixelated;
}

.tagline {
  margin: 16px 0 0;
  color: var(--accent);
  letter-spacing: 0.05em;
}

h1.tagline {                /* the 404 page's heading */
  margin-top: 16px;
  font-size: 1.125rem;
  font-weight: normal;
}

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h2, .label {
  margin: 0 0 16px;
  font-size: 0.875rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.game {
  border: 2px solid var(--dim);
  background: var(--bg);
}

.game-art {
  width: 100%;
  border-bottom: 2px solid var(--dim);
}

.game-body { padding: 20px 24px 24px; }

.game h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--fg);
}

.hook {
  margin: 4px 0 16px;
  color: var(--bright);
}

.game p { max-width: 65ch; }

.status { margin-bottom: 0; }

.badge {
  display: inline-block;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

footer {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

footer p { margin: 0; }

a { color: var(--accent); }
a:hover { color: var(--bright); }

@media (max-width: 480px) {
  .studio { padding-top: 32px; }
  .game-body { padding: 16px; }
}

/* Home page's pointer to the current game. */
.now { text-align: center; }
.now p { margin: 0; }
.now .wishlist-row { margin-top: 20px; }

/* WISHLIST ON STEAM (Ian, 2026-10-30): a chunky button in the game's
   bright, a hard shadow that it presses into. */
.wishlist-row { margin: 0 0 20px; }
.wishlist {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid var(--bright);
  background: var(--bright);
  color: var(--bg);
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  box-shadow: 4px 4px 0 var(--dim);
}
.wishlist:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.wishlist:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--dim); }
.wishlist:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Site navigation, top right on every page. */
.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  width: 100%;              /* body is a flex column: without this, auto */
  max-width: 960px;         /* margins shrink the nav and center it */
  margin: 0 auto;
  padding: 16px 16px 0;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover { color: var(--bright); }

.site-nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom: 2px solid var(--bright);
}

/* Inner pages: a smaller logo that links home. */
.studio-small { padding: 16px 16px 8px; }
.studio-small .logo { width: 288px; }   /* 2x */

/* A bordered box, same frame as the game card. */
.panel {
  padding: 20px 24px 24px;
  border: 2px solid var(--dim);
  background: var(--bg);
}

.panel p { max-width: 65ch; }

.panel-title {
  margin: 0;
  font-size: 1.5rem;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.panel h3 + .credits { margin-bottom: 24px; }

.credits-section { margin-top: 40px; }

.credits {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits li {
  padding: 8px 0;
  border-top: 1px solid var(--dim);
}

.credits li:last-child { border-bottom: 1px solid var(--dim); }

.credits span { display: block; }

.credit-game { color: var(--fg); }

.credit-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.credit-role { color: var(--bright); }

.source {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.credits-footer { margin-top: 16px; }

@media (max-width: 480px) {
  .panel { padding: 16px; }
}

/* The devlog (2026-10-20): a post is a panel; its screenshots are the
   game's own pixels, scaled crisp. */
.post h2 {
  margin: 32px 0 8px;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.post p, .post ul { max-width: 65ch; }

.post li { margin-bottom: 8px; }

.post-meta {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post figure { margin: 24px 0; }

.shot {
  width: 100%;
  max-width: 516px;
  border: 2px solid var(--dim);
  image-rendering: pixelated;
}
video.shot { display: block; height: auto; }   /* a looping clip, sized like a shot */

/* A code block in a post (the "Why C" devlog): the file list. */
.post pre.code {
  margin: 0;
  padding: 12px 16px;
  overflow-x: auto;
  border: 2px solid var(--dim);
  background: var(--bg);
  font: 0.8125rem/1.5 var(--mono);
  color: var(--fg);
}
.post blockquote {
  margin: 16px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--bright);
  color: var(--bright);
}
.post blockquote p { margin: 8px 0; }

.post figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.875rem;
}

.back { margin: 32px 0 0; }

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li + li { margin-top: 24px; }

.post-card {
  display: flex;
  gap: 20px;
  padding: 16px;
  border: 2px solid var(--dim);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
}

.post-card:hover { border-color: var(--bright); color: var(--fg); }

.post-card .shot { max-width: 240px; flex: none; }

/* two screens side by side (a before and an after) */
.shot.shot-pair { max-width: 1044px; }

.post-card-body { display: flex; flex-direction: column; }

.post-card-title {
  font-size: 1.25rem;
  color: var(--fg);
}

.post-card-text {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .post-card { flex-direction: column; }
  .post-card .shot { max-width: 100%; }
}

/* A game's title on the Games page links to its own page. */
.game h3 a { color: var(--fg); text-decoration: none; }
.game h3 a:hover { color: var(--bright); }

/* The game page's screenshots: two across, one on a phone. */
.shots {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.shots img { width: 100%; border: 2px solid var(--dim); }
@media (max-width: 600px) { .shots { grid-template-columns: 1fr; } }

/* The live fire and the shooting stars (js/fire.js): the still band above
   steps aside once the script is running. */
html.live-fire body::after { display: none; }
canvas.fire {
  display: block;
  width: 100%;
  height: 150px;
  image-rendering: pixelated;
}
canvas.stars {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  image-rendering: pixelated;
}
