/* Layout: one long mine shaft. Each release is a floor you descend to,
   newest at the top, with a depth rail down the left edge. Dark by design. */
:root {
  --rock: #16110f;
  --rock-2: #211915;
  --ledge: #3a2c24;
  --parchment: #eadfcb;
  --dim: #b3a48e;
  --torch: #e8742a;
  --gold: #f2c14e;
  --moss: #9cc06f;
  --blood: #d9534f;
  --display: "Pixelify Sans", "Courier New", monospace;
  --body: "Alegreya Sans", "Trebuchet MS", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
h1, h2 { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
body {
  background: var(--rock);
  color: var(--parchment);
  font: 18px/1.6 var(--body);
}
a { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding-block: 40px 80px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Masthead */
.mast { display: grid; gap: 14px; padding-bottom: 28px; border-bottom: 2px dashed var(--ledge); }
.eyebrow { font: 500 13px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--torch); }
h1 {
  font: 700 clamp(44px, 9vw, 84px)/0.95 var(--display);
  margin: 0;
  color: var(--gold);
  text-shadow: 4px 4px 0 #5a2a10;
  text-wrap: balance;
}
.lede { max-width: 62ch; color: var(--dim); margin: 0; font-size: 19px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 22px; font: 500 14px var(--mono); color: var(--parchment); }
.stats b { color: var(--gold); font-weight: 500; }

/* Jump list */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.jump a {
  font: 500 13px var(--mono);
  text-decoration: none;
  color: var(--parchment);
  border: 1px solid var(--ledge);
  padding: 4px 10px;
  background: var(--rock-2);
}
.jump a:hover { border-color: var(--torch); color: var(--gold); }

/* The shaft */
.shaft { position: relative; margin-top: 36px; padding-left: 34px; }
.shaft::before {
  content: "";
  position: absolute; left: 9px; top: 0; bottom: 0; width: 4px;
  background: repeating-linear-gradient(to bottom, var(--ledge) 0 14px, transparent 14px 22px);
}
.floor { position: relative; padding-bottom: 56px; }
.floor::before {
  content: "";
  position: absolute; left: -31px; top: 10px; width: 16px; height: 16px;
  background: var(--torch);
  box-shadow: 0 0 0 4px var(--rock), 0 0 18px 2px rgba(232,116,42,.55);
}
.floor.patch::before { width: 10px; height: 10px; left: -28px; top: 12px; background: var(--dim); box-shadow: 0 0 0 4px var(--rock); }
.depth {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  font: 500 13px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em;
}
.depth .ver { color: var(--torch); font-size: 15px; }
.tag { font: 500 11px var(--mono); padding: 2px 7px; border: 1px solid currentColor; letter-spacing: 0.08em; }
.tag.new { color: var(--moss); }
.tag.fix { color: var(--blood); }
h2 {
  font: 700 clamp(26px, 4.6vw, 38px)/1.1 var(--display);
  margin: 8px 0 12px;
  color: var(--parchment);
  text-wrap: balance;
}
.floor.patch h2 { font-size: clamp(21px, 3.4vw, 26px); }
.floor p { max-width: 65ch; margin: 0 0 14px; }
.floor ul { max-width: 65ch; margin: 0 0 16px; padding-left: 20px; }
.floor li { margin: 4px 0; }
.floor li::marker { color: var(--torch); }
.floor strong { color: var(--gold); font-weight: 700; }
.quote {
  max-width: 62ch;
  margin: 0 0 16px;
  padding: 10px 16px;
  border-left: 4px solid var(--torch);
  background: var(--rock-2);
  font-style: italic;
  color: var(--parchment);
}
.quote cite { display: block; margin-top: 4px; font: 500 12px var(--mono); font-style: normal; color: var(--dim); }

/* Screenshots: phone-shaped frames */
.shots { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 18px; }
figure { margin: 0; width: 200px; max-width: 100%; display: grid; gap: 6px; }
figure.wide { width: 100%; }
figure img {
  display: block; width: 100%; height: auto;
  border: 3px solid var(--ledge);
  image-rendering: pixelated;
  background: #000;
}
figcaption { font-size: 14px; line-height: 1.35; color: var(--dim); }

table { border-collapse: collapse; font-size: 15px; min-width: 460px; }
.tbl { overflow-x: auto; max-width: 100%; margin: 0 0 16px; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--ledge); vertical-align: top; }
th { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--gold); white-space: nowrap; }

.next { margin-top: 10px; padding: 22px; border: 2px dashed var(--ledge); }
.credits { margin-top: 48px; }
.credits td { font-size: 15px; }
.credits td:first-child { white-space: nowrap; font-weight: 700; }
.next h2 { margin-top: 0; }
.foot { margin-top: 40px; font-size: 14px; color: var(--dim); }

@media (max-width: 520px) {
  body { font-size: 17px; }
  figure { width: calc(50% - 7px); }
  .shaft { padding-left: 26px; }
  .floor::before { left: -24px; }
  .floor.patch::before { left: -21px; }
  .shaft::before { left: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .floor:first-child::before { animation: flicker 2.4s infinite steps(1); }
  @keyframes flicker { 0%, 100% { opacity: 1; } 40% { opacity: .7; } 42% { opacity: 1; } 70% { opacity: .85; } }
}

/* ---------- Site chrome (shared by every page) ---------- */
html { background: var(--rock); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
body > main.page, body > .wrap { flex: 1; width: 100%; }
img { max-width: 100%; height: auto; }
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22,17,15,.94);
  border-bottom: 2px solid var(--ledge);
  backdrop-filter: blur(4px);
}
.site-head .bar {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  padding: 10px max(16px, env(safe-area-inset-left, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--parchment); }
.brand svg { width: 28px; height: 40px; flex: none; }
.brand span { font: 700 21px/1 var(--display); letter-spacing: .02em; }
.brand span b { color: var(--torch); font-weight: 700; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .1em;
  text-decoration: none; color: var(--dim); padding: 6px 10px; border: 1px solid transparent;
}
.site-nav a:hover { color: var(--gold); border-color: var(--ledge); }
.site-nav a[aria-current="page"] { color: var(--gold); border-color: var(--torch); }

.site-foot {
  border-top: 2px dashed var(--ledge);
  padding: 28px 16px 40px; text-align: center;
  font-size: 14px; color: var(--dim);
}
.site-foot .drip { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--torch); margin-bottom: 6px; }

/* Torch logo flicker + drip */
.flame { transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .flame { animation: flame 1.6s infinite steps(2); }
  .drop { animation: drip 2.8s infinite ease-in; }
  @keyframes flame { 0%,100% { transform: scale(1,1); } 33% { transform: scale(.92,1.06); } 66% { transform: scale(1.05,.95); } }
  @keyframes drip { 0%,55% { transform: translateY(0); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
}

/* Page body */
.page { max-width: 1100px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 80px; }
.section { padding-top: 56px; }
.section > .eyebrow { margin-bottom: 8px; }
.section h2 { font: 700 clamp(28px, 5vw, 42px)/1.1 var(--display); margin: 0 0 14px; color: var(--parchment); text-wrap: balance; }
.section p { max-width: 65ch; }
.btn {
  display: inline-block; font: 700 17px var(--display); letter-spacing: .03em;
  text-decoration: none; padding: 10px 18px;
  background: var(--torch); color: #1a0d05; border: 2px solid #f39a5a;
  box-shadow: 4px 4px 0 #5a2a10;
}
.btn:hover { background: var(--gold); }
.btn.ghost { background: transparent; color: var(--gold); border-color: var(--ledge); box-shadow: none; }
.btn.ghost:hover { border-color: var(--torch); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* Home hero: torch glow over rock */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 9vw, 110px) 0 56px;
  border-bottom: 2px dashed var(--ledge);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(232,116,42,.28), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(48px, 10vw, 104px); }
.hero .lede { margin-top: 18px; font-size: 20px; }
.hero-shots { display: flex; gap: 12px; justify-content: center; }
.hero-shots img { width: 46%; border: 3px solid var(--ledge); image-rendering: pixelated; background: #000; }
.hero-shots img:nth-child(2) { margin-top: 40px; }

/* Game card */
.game-card {
  display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start;
  padding: 24px; background: var(--rock-2); border: 2px solid var(--ledge);
}
.game-card img { width: 100%; border: 3px solid var(--ledge); image-rendering: pixelated; background: #000; }
.game-card h3 { font: 700 clamp(26px, 4vw, 36px)/1.1 var(--display); margin: 6px 0 10px; color: var(--gold); }
.status { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--moss); border: 1px solid currentColor; padding: 2px 8px; }

/* Devblog teasers */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.post {
  display: block; text-decoration: none; color: var(--parchment);
  padding: 18px; background: var(--rock-2); border: 1px solid var(--ledge);
}
.post:hover { border-color: var(--torch); }
.post .depth { margin-bottom: 6px; }
.post h3 { font: 700 21px/1.2 var(--display); margin: 0 0 8px; color: var(--parchment); }
.post p { margin: 0; font-size: 16px; color: var(--dim); }

/* Game page */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.feature-list li { padding: 16px; background: var(--rock-2); border-left: 4px solid var(--torch); }
.feature-list b { display: block; font: 700 19px var(--display); color: var(--gold); margin-bottom: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.gallery figure { width: auto; }
.gallery figure.wide { grid-column: 1 / -1; }
.trailer {
  aspect-ratio: 16 / 9; max-width: 820px; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, var(--rock-2) 0 14px, var(--rock) 14px 28px);
  border: 2px dashed var(--ledge); color: var(--dim); font: 500 14px var(--mono); padding: 16px;
}
.trailer b { display: block; font: 700 24px var(--display); color: var(--parchment); margin-bottom: 6px; }
.controls td:first-child { font-family: var(--mono); color: var(--gold); white-space: nowrap; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.card { padding: 22px; background: var(--rock-2); border: 2px solid var(--ledge); }
.card h3 { font: 700 22px var(--display); margin: 0 0 10px; color: var(--gold); }

@media (max-width: 760px) {
  .hero-grid, .game-card, .about-grid { grid-template-columns: 1fr; }
  .game-card img { max-width: 220px; }
  .hero-shots { justify-content: flex-start; }
  .hero-shots img { width: 40%; max-width: 180px; }
}
