:root {
  --bg: #16151d;
  --panel: #211f2b;
  --text: #ece8df;
  --muted: #a9a4b3;
  --accent: #f2b84b;
  --line: #36333f;
  --gutter: clamp(16px, 4vw, 72px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}

h1, h2 { line-height: 1.25; }
h1 { margin: 0 0 12px; font-size: clamp(32px, 4vw, 64px); color: var(--accent); }
h2 { margin: 0 0 8px; font-size: 19px; color: var(--accent); }
a { color: var(--accent); }
ul { padding-left: 22px; }
li { margin: 6px 0; }
code { color: var(--accent); }
h2 img { width: 32px; height: 32px; margin: -8px 10px -8px 0; vertical-align: -9px; image-rendering: pixelated; }
.loot { display: flex; gap: 16px; margin: 0 0 24px; }
.loot img { width: 48px; height: 48px; image-rendering: pixelated; }

.logo { margin: 0 0 24px; line-height: 0; }
.logo img { width: min(100%, 560px); image-rendering: pixelated; }

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.intro {
  align-self: center;
  padding: 40px var(--gutter);
}

.tagline { margin: 0 0 28px; color: var(--muted); }

.start {
  margin: 0 0 28px;
  padding: 14px 16px;
  background: var(--panel);
  border-left: 4px solid var(--accent);
}

.links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 24px;
  place-items: center;
  padding: 40px var(--gutter);
  background: var(--panel);
}

.wall img {
  width: min(100%, 128px);
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.chicken {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.chicken img { display: block; }
.chicken:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.chicken.angry img { animation: rage 700ms steps(1) both; }

@keyframes rage {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-8px, -14px) rotate(-10deg) scale(1.1); }
  20%  { transform: translate(8px, -22px) rotate(10deg) scale(1.2); filter: saturate(2) brightness(1.15); }
  30%  { transform: translate(-8px, -10px) rotate(-12deg) scale(1.2); filter: saturate(2) brightness(1.15); }
  40%  { transform: translate(8px, -18px) rotate(12deg) scale(1.3); filter: saturate(2) brightness(1.15); }
  50%  { transform: translate(-6px, -8px) rotate(-8deg) scale(1.2); filter: saturate(2) brightness(1.15); }
  60%  { transform: translate(6px, -14px) rotate(8deg) scale(1.2); }
  70%  { transform: translate(-4px, -6px) rotate(-4deg) scale(1.1); }
  85%  { transform: translate(2px, 0) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

.yell {
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 1;
  padding: 2px 8px;
  background: var(--accent);
  color: var(--bg);
  font: bold 15px/1.4 ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  white-space: nowrap;
  pointer-events: none;
  animation: yell 900ms steps(6) both;
}

@keyframes yell {
  0%   { opacity: 1; transform: translate(-50%, 8px); }
  70%  { opacity: 1; transform: translate(-50%, -14px); }
  100% { opacity: 0; transform: translate(-50%, -22px); }
}

.feather {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #f4f1ea;
  pointer-events: none;
  animation: feather 800ms steps(8) both;
}

@keyframes feather {
  0%   { opacity: 1; transform: translate(0, 0); }
  70%  { opacity: 1; transform: translate(var(--x), var(--y)) rotate(90deg); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 44px)) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .chicken.angry img { animation: none; }
}

.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 100vh;
  padding: 40px 16px;
  text-align: center;
}

.lost img { width: min(100%, 560px); image-rendering: pixelated; }
.lost p { margin: 0; }
.lost .tagline { margin-top: 28px; }
.lost .links { margin-top: 20px; }

.policy {
  display: grid;
  grid-template-columns: minmax(280px, 24%) minmax(0, 1fr);
  min-height: 100vh;
}

aside {
  padding: 40px var(--gutter);
  background: var(--panel);
}

aside h1 { font-size: clamp(28px, 2.6vw, 40px); }
aside nav { position: sticky; top: 24px; display: grid; gap: 4px; margin-top: 28px; }
.updated { color: var(--muted); }

.policy main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--gutter);
  align-content: start;
  padding: 40px var(--gutter);
}

.policy section { scroll-margin-top: 24px; }
.policy .wide { grid-column: 1 / -1; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 24px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: normal; }

@media (max-width: 1100px) {
  .policy main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .home, .policy { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  aside nav { position: static; }
  .wall { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  table, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { padding: 0 0 4px; border: 0; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
}
