@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 700; font-display: swap; src: url("fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #1b1325;
  --panel: #241a33;
  --ink: #f4ede1;
  --red: #ff4a4a;
  --mint: #8ff5d2;
  --mint-ink: #10261f;
  --frame: #6e5c8a;
  --gold: #f0a93b;
  --paper: #f3ece0;
  --paper-ink: #1b1325;
  --paper-red: #c81f2a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, #2a1d3d 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 500 19px/1.3 "Barlow Condensed", "Arial Narrow", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* CRT scanlines over everything; purely decorative. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
  z-index: 10;
}

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

a { color: inherit; text-decoration: underline; text-decoration-color: rgba(143, 245, 210, .5); text-underline-offset: 2px; }
a:hover { color: var(--mint); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }

.page { max-width: 680px; margin: 0 auto; padding: 16px 16px 64px; }

/* Nav + eyebrow */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(110, 92, 138, .6);
  font-size: 15px;
}
.nav a { text-decoration: none; white-space: nowrap; }
/* Dot after (not before) each link, so a wrapped line never starts with one. */
.nav a:not(:last-child)::after { content: "·"; margin: 0 5px; color: var(--frame); }

.eyebrow { margin: 10px 0 0; text-align: center; font-size: 14px; }

/* Hero. Explicit widths: flex items default to min-width:auto, which won't let an image shrink below its file size. */
.hero-art { display: flex; align-items: center; margin-top: 8px; }
.logo { flex: none; width: 68%; margin: 0; line-height: 0; }
.hero-robot { flex: none; width: 34%; margin-left: -4%; margin-top: 12%; filter: drop-shadow(0 0 18px rgba(255, 74, 74, .25)); }

.torn {
  position: relative;
  margin: -6% 4% 0;
  padding: 16px 22px 18px;
  background: var(--paper);
  color: var(--paper-ink);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-3deg);
  clip-path: polygon(0 14%, 4% 4%, 9% 10%, 15% 0, 22% 7%, 30% 2%, 38% 9%, 46% 1%, 55% 8%, 63% 0, 71% 6%, 79% 1%, 87% 9%, 94% 2%, 100% 10%, 98% 50%, 100% 88%, 95% 97%, 88% 90%, 80% 100%, 72% 93%, 63% 99%, 54% 92%, 45% 100%, 36% 93%, 27% 99%, 18% 92%, 10% 100%, 3% 93%, 1% 55%);
}
.torn strong { color: var(--paper-red); }

.badges {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 34px 4px 0;
  padding: 0;
}
/* Pixel-art frames throughout: four offset box-shadows leave the corners notched. */
.badge {
  --c: var(--frame);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 8px 6px;
  background: var(--panel);
  text-align: center;
  font-size: 17px;
  line-height: 1.05;
  box-shadow: 0 -4px 0 0 var(--c), 0 4px 0 0 var(--c), -4px 0 0 0 var(--c), 4px 0 0 0 var(--c), inset 0 0 0 2px rgba(0, 0, 0, .35);
}
.badge b { display: block; font-size: 28px; }
.badge-gold { --c: var(--gold); }
.ghost-perch { position: absolute; width: 38px; top: -34px; right: -6px; }

.cta { position: relative; margin-top: 34px; text-align: center; }
.ghost-cta { position: absolute; width: 40px; right: 0; bottom: -46px; }

.btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 -4px 0 0 #c9fbe9, 0 4px 0 0 #4fc9a3, -4px 0 0 0 #c9fbe9, 4px 0 0 0 #4fc9a3, 0 0 22px 4px rgba(143, 245, 210, .4);
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { color: var(--mint-ink); filter: brightness(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

/* Sections */
section { position: relative; margin-top: 44px; }
h2 { margin: 0 0 10px; font-weight: 700; font-size: 42px; line-height: 1; }
h2.red { color: var(--red); }
h2.mint { color: var(--mint); }
p { margin: 0 0 12px; }
.center { text-align: center; }
.small { font-size: 17px; }

.has-ghosts .ghost-trio { position: absolute; top: -18px; right: 0; display: flex; align-items: flex-start; gap: 6px; }
.ghost-trio img:nth-child(1) { width: 26px; margin-top: 18px; }
.ghost-trio img:nth-child(2) { width: 36px; }
.ghost-trio img:nth-child(3) { width: 40px; margin-top: 30px; }

.steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 42px 1fr; gap: 14px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  height: 40px;
  margin: 4px;
  background: var(--panel);
  color: var(--red);
  font: 700 24px "Pixelify Sans", monospace;
  box-shadow: 0 -4px 0 0 var(--frame), 0 4px 0 0 var(--frame), -4px 0 0 0 var(--frame), 4px 0 0 0 var(--frame);
}

.panel {
  padding: 16px 18px 6px;
  background: rgba(36, 26, 51, .7);
  box-shadow: 0 -4px 0 0 var(--frame), 0 4px 0 0 var(--frame), -4px 0 0 0 var(--frame), 4px 0 0 0 var(--frame);
  margin-left: 4px;
  margin-right: 4px;
}

.flanked { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.flanked > img { width: 36px; flex: none; }
.panel h2 { font-size: 38px; }

.hp { display: inline-flex; align-items: center; gap: 4px; flex: 1; max-width: 120px; }
.hp img { width: 28px; flex: none; }
.hp .bar {
  flex: 1;
  height: 12px;
  background: linear-gradient(to right, var(--red) 70%, #3a2c4f 70%);
  box-shadow: 0 -3px 0 0 var(--frame), 0 3px 0 0 var(--frame), -3px 0 0 0 var(--frame), 3px 0 0 0 var(--frame);
  margin: 0 4px;
}

.loot { list-style: none; margin: 14px 0 0; padding: 0; }
.loot li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; margin-bottom: 12px; }

.dialog {
  margin: 20px 4px 0;
  padding: 14px 18px 8px;
  background: rgba(36, 26, 51, .85);
  box-shadow: 0 -4px 0 0 var(--frame), 0 4px 0 0 var(--frame), -4px 0 0 0 var(--frame), 4px 0 0 0 var(--frame), inset 0 0 30px rgba(0, 0, 0, .35);
}
.dialog h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 30px; line-height: 1.05; }
.dialog h3 img { width: 44px; }
.dialog ul { margin: 0 0 8px; padding-left: 20px; }
.dialog li { margin-bottom: 3px; }

.contacts { margin: 0; padding-left: 20px; }
.contacts li { margin-bottom: 8px; }
.contacts li::marker { color: var(--mint); }

#sign-up .btn, #consent-form .btn { margin: 6px 0 4px; }

/* Gentle bob for the ghosts; off for anyone who asks for less motion. */
.ghost { animation: bob 3.2s ease-in-out infinite; }
.ghost-trio img:nth-child(2) { animation-delay: -1s; }
.ghost-trio img:nth-child(3) { animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .ghost { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 400px) {
  body { font-size: 18px; }
  h2 { font-size: 36px; }
  .torn { font-size: 19px; }
  .badge { font-size: 15px; min-height: 84px; }
  .badge b { font-size: 23px; }
  .btn { font-size: 21px; padding: 10px 16px; }
  .dialog h3 { font-size: 26px; }
  .panel h2 { font-size: 32px; }
  .flanked > img { width: 28px; }
}

@media (min-width: 760px) {
  body { font-size: 21px; }
  .page { max-width: 760px; padding-top: 24px; }
  .nav { font-size: 18px; }
  .eyebrow { font-size: 16px; }
  h2, .panel h2 { font-size: 50px; }
  .flanked > img { width: 56px; }
  .torn { font-size: 28px; }
  .badge { min-height: 110px; font-size: 20px; }
  .badge b { font-size: 34px; }
  .btn { font-size: 28px; padding: 12px 28px; }
  .ghost-perch { width: 48px; top: -44px; }
  .ghost-cta { width: 52px; right: 40px; }
}
