/* Deadbelt — the landing page. One story, told down the page; the pictures
   are the game's own. Plain on purpose: no scripts, no motion. */

@font-face {
  font-family: "PT Serif";
  src: url("fonts/PTSerif-Regular.ttf?v=a4951fade0") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("fonts/PTSerif-Italic.ttf?v=f57e95ff9d") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans Condensed";
  src: url("fonts/FiraSansCondensed-Heavy.otf?v=13a5a66a9d") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0a1c13;   /* the logo's deep woods */
  --moss:   #1d3a2a;   /* the logo's moss, lifted a step for rules */
  --bone:   #dfe4df;   /* the wordmark's pale, softened for long reading */
  --ash:    #8e9a91;   /* quiet text */
  --dusk:   #4a4350;   /* the evening sky of the third chapter */
  --measure: 34rem;
}

* { box-sizing: border-box; }

html { background: var(--ground); }

body {
  margin: 0;
  color: var(--bone);
  background: var(--ground);
  font-family: "PT Serif", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A fine, fixed grain over everything, like a print. It never moves. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

/* The opening: night at the treeline, and the name. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--ground) 100%);
}
.hero-mark {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 clamp(1rem, 6vw, 6rem) clamp(2.5rem, 9vh, 6rem);
}
.hero-mark img { width: clamp(15rem, 38vw, 34rem); }

/* The story. */
.story {
  padding: clamp(3rem, 10vh, 7rem) 0 2rem;
}
.chapter + .chapter { margin-top: clamp(5rem, 16vh, 10rem); }

.shot {
  margin: 0 auto;
  max-width: 90rem;
  padding: 0 clamp(0rem, 3vw, 2.5rem);
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--moss);
}

/* Two pictures of one scene, the second cut away left of a line the reader
   drags (chapter 6: lit, then dark). The range lies invisible over the whole
   picture, so a drag anywhere, a tap or the arrow keys move the line. */
.compare-frame { position: relative; }
.compare-frame img { display: block; }
.compare-dark {
  position: absolute;
  inset: 0;
  height: 100%;
  clip-path: inset(0 0 0 var(--cut));
}
.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut);
  width: 2px;
  margin-left: -1px;
  background: var(--bone);
  pointer-events: none;
}
.compare-line::after {
  content: "\2039\00a0\203A";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ground);
  border: 2px solid var(--bone);
  color: var(--bone);
  font: 800 1.35rem/2.45rem "Fira Sans Condensed", "Arial Narrow", sans-serif;
  text-align: center;
}
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare-frame:has(.compare-range:focus-visible) { outline: 2px solid var(--bone); outline-offset: 3px; }

.text {
  max-width: var(--measure);
  margin: clamp(2rem, 5vh, 3.25rem) auto 0;
  padding: 0 1rem;
}
.text p { margin: 0 0 1.1em; hyphens: manual; }
.text p:last-child { margin-bottom: 0; }

h2 {
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 1.1rem;
  color: var(--bone);
}
h2 .n {
  display: inline-block;
  min-width: 1.4em;
  color: var(--ash);
}

/* The end of the page. */
.foot {
  max-width: var(--measure);
  margin: clamp(6rem, 18vh, 11rem) auto 0;
  padding: 2.5rem 1rem 4rem;
  border-top: 1px solid var(--moss);
  color: var(--ash);
  font-size: 1rem;
  line-height: 1.6;
}
.foot .studio { width: 3.5rem; height: 3.5rem; margin-bottom: 1.25rem; opacity: 0.85; }
.foot p { margin: 0 0 0.9em; }
.foot .small { font-size: 0.8125rem; }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .hero { min-height: 85svh; }
}

/* The bar: three quiet links. Over the opening picture on the story; on top
   of a side page with the wordmark home. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 6vw, 6rem);
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 1rem;
}
.bar-over {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  justify-content: flex-end;
}
.bar nav, .bar-over { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.bar a { color: var(--bone); text-decoration: none; opacity: 0.8; }
.bar a:hover, .bar a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }
.bar .home img { width: 8.5rem; opacity: 1; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
}

/* A side page: one column at the story's measure. */
.page {
  max-width: var(--measure);
  margin: clamp(2rem, 8vh, 5rem) auto 0;
  padding: 0 1rem;
}
.facts { margin-bottom: 1rem; }
.page h1 {
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  margin: 0 0 1.25rem;
}
.page h2 { font-size: 1.35rem; margin: 2.5rem 0 0.6rem; }
.page p { margin: 0 0 1.1em; }
.page a { color: var(--bone); }
.lead { font-size: 1.25rem; color: var(--bone); }
.note { color: var(--ash); font-size: 1rem; margin-top: 2.5rem; }
.sub .foot { margin-top: clamp(4rem, 12vh, 7rem); }

.facts { margin: 0; display: grid; gap: 0.9rem; }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: baseline; }
.facts dt { font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif; font-weight: 800; font-size: 1.25rem; }
.facts dd { margin: 0; color: var(--ash); }

/* The stats beside the valley map: wider than the column, centred on it. */
.overview {
  width: min(62rem, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 22rem minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-top: 2.5rem;
}
.overview h2 { margin-top: 0; }
.overview .facts div { grid-template-columns: 6.5rem 1fr; }
.map { margin: 0; }
.map-frame { position: relative; }
.map img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 1px var(--moss); }
.map-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-marks text {
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 50px;
  fill: var(--bone);
  paint-order: stroke;
  stroke: var(--ground);
  stroke-width: 10px;
  stroke-linejoin: round;
}
.map-marks circle { fill: none; stroke: var(--bone); stroke-width: 5px; }
.map-marks path { fill: none; stroke: var(--bone); stroke-width: 6px; stroke-linejoin: round; }
.map figcaption {
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-size: 0.95rem;
  color: var(--ash);
  margin-top: 0.6rem;
}
/* A section beside its plate, the plates alternating sides. */
.feature {
  width: min(62rem, calc(100vw - 2rem));
  margin: 4.5rem 0 0 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
.feature.flip .plate { order: 2; }
.feature h2 { margin-top: 0; }
.plate { margin: 0; }
.plate img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 1px var(--moss); }

@media (max-width: 62rem) {
  .overview { width: auto; margin-left: 0; transform: none; grid-template-columns: 1fr; gap: 2.5rem; }
  .feature { width: auto; margin-left: 0; transform: none; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3.5rem; }
  .feature .plate, .feature.flip .plate { order: 2; }
}

/* Forms. */
.form { display: grid; gap: 0.4rem; margin: 2rem 0 0; }
.form label { font-size: 1rem; color: var(--ash); margin-top: 0.8rem; }
.form input, .form select, .form textarea {
  font: inherit;
  font-size: 1.0625rem;
  color: var(--bone);
  background: #0d2418;
  border: 1px solid var(--moss);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  width: 100%;
}
.form textarea { resize: vertical; }
.form button {
  justify-self: start;
  margin-top: 1.4rem;
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ground);
  background: var(--bone);
  border: 0;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
}
.out { margin-top: 2.5rem; }
.snippet {
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  background: #0d2418;
  border: 1px solid var(--moss);
  padding: 0.8rem 1rem;
  margin: 0;
}
/* The command a tester runs: a read-only field, so a selection stays inside
   it, and its copy button. */
.command { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: stretch; }
textarea.snippet {
  display: block;
  width: 100%;
  color: var(--bone);
  border: 0;
  padding: 0.45rem 0.6rem;
  resize: none;
  overflow: hidden;
}
.command button {
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ground);
  background: var(--bone);
  border: 0;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 40rem) {
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .bar .home img { width: 7rem; }
}
.list { margin: 0 0 1.1em; padding-left: 1.2rem; }
.list li { margin: 0 0 0.6em; }

/* The bottom-right corner, fixed: the Impressum and Datenschutz links on
   every page (Alex, 2026-11-02), and on the front page the title theme's
   button above them, so it can be paused from any chapter. */
.corner {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(0.5rem, 1.5vw, 1rem);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
.legal, .corner.legal {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 0.2em 0.8em;
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-size: 0.85rem;
  background: rgba(10, 28, 19, 0.82);
  border-radius: 1em;
}
.legal a { color: var(--ash); text-decoration: none; }
.legal a:hover, .legal a[aria-current="page"] { color: var(--bone); text-decoration: underline; text-underline-offset: 0.3em; }
.theme-button {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 1em;
  font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--bone);
  background: rgba(10, 28, 19, 0.82);
  border: 1px solid var(--moss);
  border-radius: 2em;
  cursor: pointer;
  opacity: 0.85;
}
.theme-button:hover, .theme-button[aria-pressed="true"] { opacity: 1; }
.theme-icon { font-size: 1.15em; line-height: 1; }
/* The fixed corner never hides the last lines of a page. */
.foot { padding-bottom: 7rem; }

/* The contact form: its outcome above it, and the field only bots fill,
   off screen. */
.status { padding: 0.8em 1em; border: 1px solid var(--moss); border-radius: 0.3em; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The roadmap: each promise with its mark. */
.road { list-style: none; padding: 0; margin: 1rem 0 0; }
.road li { padding: 0.9rem 0; border-top: 1px solid var(--moss); display: grid; grid-template-columns: 7.5rem 1fr; column-gap: 1rem; }
.road .what { grid-column: 2; color: var(--bone); }
.road .detail { grid-column: 2; color: var(--ash); font-size: 1rem; line-height: 1.55; margin-top: 0.25rem; }
.road .mark { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 0.2rem; font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15em 0.6em; border-radius: 1em; justify-self: start; }
.road .built .mark { background: var(--bone); color: var(--ground); }
.road .progress .mark { border: 1px solid var(--bone); color: var(--bone); }
.road .planned .mark { border: 1px dashed var(--ash); color: var(--ash); }
.road.after { counter-reset: after; }
.road.after li { grid-template-columns: 2rem 1fr; counter-increment: after; }
.road.after li::before { content: counter(after); grid-column: 1; color: var(--ash); font-family: "Fira Sans Condensed", "Arial Narrow", sans-serif; font-weight: 800; }
@media (max-width: 30rem) {
  .road li { grid-template-columns: 1fr; }
  .road .mark, .road .what, .road .detail { grid-column: 1; grid-row: auto; }
  .road .mark { margin: 0 0 0.35rem; }
}

/* The bar never breaks a link's words: on a narrow screen its links wrap
   below the wordmark instead. */
.bar { flex-wrap: wrap; }
.bar nav, .bar-over { flex-wrap: wrap; row-gap: 0.3rem; }
.bar a { white-space: nowrap; }
