/* Shared by every page on the site: paper, ink, masthead, buttons, kickers, footer.
   Page-specific layout (poster, hero, story) stays inline in each page. */
:root {
  --paper: #efebe1;
  --paper-deep: #e6e1d4;
  --ink: #121212;
  --ink-soft: #3a3833;
  --muted: #6d6a62;
  --red: #b3261e;
  --rule: rgba(18, 18, 18, 0.18);
  --serif: "Literata", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --black: "UnifrakturCook", "Literata", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* halftone grain over the whole sheet */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(18,18,18,.07) 0.6px, transparent 0.7px);
  background-size: 4px 4px;
}
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }

.sheet {
  position: relative; z-index: 2;
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
}
.col { max-width: 600px; }

/* ── masthead ── */
.masthead {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0 14px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: .2em; font-weight: 500; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.masthead nav { display: flex; gap: 18px; }
.masthead nav a { text-decoration: none; opacity: .75; }
.masthead nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.dateline {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
}

/* GitHub + Discord, side by side */
.social { display: flex; gap: 8px; }
.social a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); color: var(--ink); background: var(--paper);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.social a:hover { background: var(--ink); color: var(--paper); transform: translate(-1px,-1px); }
.social svg, .btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.masthead .right { display: flex; align-items: center; gap: 22px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding: 15px 22px 14px; border: 2px solid var(--ink);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { box-shadow: 4px 4px 0 var(--red); }
.fine { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); display: flex; gap: 14px; align-items: baseline; margin-bottom: 26px;
}
.kicker b { color: var(--red); font-weight: 500; }
h2 { font-weight: 800; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 34px; max-width: 16ch; }
h2 em { font-style: italic; font-weight: 400; }

/* numbered steps */
.steps { display: grid; gap: 0; border-top: 2px solid var(--ink); counter-reset: s; }
.steps div { padding: 26px 0 26px 92px; border-bottom: 1px solid var(--rule); position: relative; }
.steps div::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 14px;
  font-family: var(--black); font-size: 58px; line-height: 1;
}
.steps h3 { font-size: 24px; font-weight: 600; }
.steps p { color: var(--ink-soft); font-size: 18px; margin-top: 4px; }

/* fine print */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; }
.notes h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px; color: var(--ink-soft); }
.notes p { font-size: 17px; color: var(--ink-soft); }

footer a { color: var(--ink); text-underline-offset: 3px; }
footer {
  position: relative; z-index: 3; background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax);
  border-top: 2px solid var(--ink); padding: 20px 0 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 900px) {
  body { font-size: 18px; }
  .masthead, .dateline { position: relative; z-index: 3; background: var(--paper); }
  .masthead { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .dateline { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .masthead nav { display: none; }
  .dateline span:last-child { display: none; }
  .steps div { padding-left: 74px; }
  .steps div::before { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
