/* Devour Protocol - "Stronghold Plate". Tokens and rules per docs/design/DESIGN.md. */
:root {
  --floor: #a9b9cd;
  --tile-line: #9aabc1;
  --tile: #bccadb;
  --wall: #2e3138;
  --wall-hi: #3b3f48;
  --wall-ink: #e6ecf4;
  --wall-ink-2: #c9d3e0;
  --core: #4d6d9c;
  --core-hi: #7c9ccb;
  --swarm: #2fd3c1;
  --swarm-deep: #0e7f78;
  --hazard: #f0a12e;
  --loss: #e2685d;
  --ink: #1d2027;
  --px: 4px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--floor);
  background-image:
    linear-gradient(var(--tile-line) 2px, transparent 2px),
    linear-gradient(90deg, var(--tile-line) 2px, transparent 2px);
  background-size: 16px 16px;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
a { color: var(--ink); }
:focus-visible { outline: 3px dashed var(--hazard); outline-offset: 6px; }

main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 96px;
}
@media (min-width: 760px) {
  main.with-edge { padding-left: clamp(48px, 14vw, 200px); }
}

.label {
  font-family: Silkscreen, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: "Pixelify Sans", sans-serif; font-weight: 700; }
h2 { font-size: clamp(34px, 6vw, 56px); line-height: 1; }
h3 { font-size: 24px; line-height: 1.15; }

.slab {
  position: relative;
  background: var(--wall);
  color: var(--wall-ink);
  box-shadow: 0 0 0 var(--px) var(--ink), 8px 8px 0 0 rgb(29 32 39 / 0.35);
}
.slab a { color: var(--swarm); }
.rivets::before, .rivets::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--wall-hi);
}
.rivets::before { left: 8px; }
.rivets::after { right: 8px; }

.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; gap: 16px; }
.top a { color: var(--ink); }

/* swarm edge (player page only) */
#swarm { position: fixed; inset: 0 auto 0 0; width: min(22vw, 180px); pointer-events: none; z-index: 0; }
#swarm i { position: absolute; width: var(--s); height: var(--s); background: var(--c); }

/* buttons, tags */
.btn {
  display: inline-block;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  padding: 14px 22px;
  background: var(--swarm);
  color: var(--ink);
  box-shadow: 0 0 0 var(--px) var(--ink), inset 0 -6px 0 var(--swarm-deep);
}
.slab a.btn { color: var(--ink); }
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 0 0 0 var(--px) var(--ink), 4px 4px 0 var(--px) var(--ink), inset 0 -6px 0 var(--swarm-deep);
}
.tag { display: inline-block; padding: 6px 10px; background: var(--hazard); color: var(--ink); }

/* images / video: 4px ink frame, crisp pixels */
.frame { display: block; padding: var(--px); background: var(--ink); }
.frame img, .frame video { display: block; width: 100%; height: auto; image-rendering: pixelated; background: var(--ink); }

/* ---------- player page ---------- */
.hero { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.title { padding: 28px 24px 24px; }
.title h1 {
  font-size: clamp(48px, 11vw, 84px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  color: var(--wall-ink);
}
.title h1 span { color: var(--swarm); }
.pitch { margin-top: 18px; font-size: clamp(18px, 2.4vw, 21px); max-width: 38ch; color: var(--wall-ink-2); }
.pitch b { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 26px; align-items: center; }
.cta .ghost { font-family: Silkscreen, monospace; font-size: 13px; color: var(--wall-ink); }
.title .tag { margin-top: 20px; }

.feed { position: relative; }
.embed { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; list-style: none; padding: 0; }
.thumbs a { display: block; box-shadow: 0 0 0 2px var(--ink); }
.thumbs img { width: 100%; display: block; image-rendering: pixelated; }

.routes { margin-top: 56px; display: grid; gap: 16px; list-style: none; padding: 0; }
@media (min-width: 760px) { .routes { grid-template-columns: repeat(3, 1fr); } }
.route { padding: 18px 18px 20px; }
.route .word { display: block; font-family: "Pixelify Sans", sans-serif; font-weight: 700; font-size: 40px; line-height: 1; margin: 8px 0 12px; color: var(--wall-ink); }
.route.exposed .word { color: var(--hazard); }
.route p { font-size: 16px; color: var(--wall-ink-2); }
.routes-note { margin-top: 20px; max-width: 60ch; font-weight: 700; }

.kit-link { margin-top: 56px; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.kit-link p { max-width: 46ch; }

/* ---------- press page ---------- */
.press h1 { font-size: clamp(48px, 11vw, 84px); line-height: 0.9; }
.press .lede { margin-top: 10px; max-width: 52ch; }
.press section { margin-top: 56px; }
.press section > h2 { margin-bottom: 18px; }
.plate { padding: 22px 20px; }
dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; }
dt { font-family: Silkscreen, monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--core-hi); padding-top: 4px; }
dd { color: var(--wall-ink); overflow-wrap: anywhere; }
.facts { max-width: 760px; }
.facts-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .facts-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }

.core { background: var(--core); color: #fff; padding: 22px 20px; box-shadow: 0 0 0 var(--px) var(--ink), inset 0 0 0 10px var(--core-hi); }
.core .inner { padding: 6px; }
.core h3 { margin-bottom: 8px; }
.core p { margin-bottom: 10px; }
.core p:last-child { margin-bottom: 0; }

.copy { padding: 22px 20px; max-width: 760px; }
.copy h3 { margin: 22px 0 6px; color: var(--wall-ink); }
.copy h3:first-child { margin-top: 0; }
.copy p + p { margin-top: 10px; }
.copy .label { color: var(--core-hi); display: block; margin-bottom: 10px; }
.bullets { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 12px; max-width: 760px; }
.bullets li { padding: 14px 16px 14px 20px; border-left: 8px solid var(--swarm); background: var(--wall); color: var(--wall-ink); box-shadow: 0 0 0 var(--px) var(--ink); margin-left: 4px; margin-right: 4px; }
.bullets b { font-family: "Pixelify Sans", sans-serif; font-size: 20px; color: #fff; display: block; }

.shots, .loops { display: grid; gap: 20px; list-style: none; padding: 0; }
@media (min-width: 640px) { .shots, .loops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shots figure, .loops figure { display: grid; gap: 8px; }
.shots figcaption, .loops figcaption { font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }

.rows { list-style: none; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.row { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; }
.row .name { word-break: break-all; }
.row .meta { color: var(--wall-ink-2); font-size: 15px; }
.art-preview { display: grid; gap: 20px; margin-bottom: 20px; }
@media (min-width: 760px) { .art-preview { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.logo-box { background: var(--wall); padding: 20px; display: grid; place-items: center; box-shadow: 0 0 0 var(--px) var(--ink); }
.logo-box img { width: 100%; max-width: 360px; height: auto; image-rendering: pixelated; }

.trailer { max-width: 760px; }

.keys {
  max-width: 760px;
  padding: 20px 22px;
  background-color: var(--hazard);
  color: var(--ink);
  box-shadow: 0 0 0 var(--px) var(--ink);
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgb(29 32 39 / 0.12) 18px 30px);
}
.keys h2 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 10px; }
.keys ul { padding-left: 20px; display: grid; gap: 6px; }
.keys a { color: var(--ink); font-weight: 700; }

.zip { max-width: 760px; padding: 24px 22px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.zip p { max-width: 36ch; color: var(--wall-ink-2); }

.footer-note { margin-top: 56px; }

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: reveal 0.5s steps(5) both; }
  .hero > *:nth-child(2) { animation-delay: 0.25s; }
  @keyframes reveal { from { clip-path: inset(-16px 100% -16px -16px); } to { clip-path: inset(-16px -16px -16px -16px); } }
}
.copy.second { margin-top: 24px; }
.trailer .after { margin-top: 12px; }
.press .note { margin: 0 0 16px; max-width: 62ch; color: var(--wall-ink-2); }
