@font-face {
  font-family: 'Press Start 2P';
  src: url('/fonts/press-start-2p-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'VT323';
  src: url('/fonts/vt323-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #080814;
  --panel: #12122a;
  --cell: #0c0c1e;
  --gap: #1f1f4a;
  --ink: #eef0ff;
  --ink2: #9a9ad8;
  --pink: #ff3b75;
  --cyan: #29e3ff;
  --yellow: #ffd84d;
  --violet: #a066ff;
  --bar-h: 38px;
  --notch-w: 200px;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --mono: 'VT323', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 22px/1.35 var(--mono);
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  z-index: 50;
}
canvas { display: block; image-rendering: pixelated; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 16px;
}
h1 { font-size: clamp(22px, 4.4vw, 44px); text-shadow: 0 0 14px rgba(255, 59, 117, .55); }
h2 { font-size: clamp(16px, 2.6vw, 24px); }
h3 { font-size: 13px; }
p { margin: 0 0 12px; }
.lead { color: var(--ink2); font-size: 24px; max-width: 40ch; }
.c-yellow { color: var(--yellow); }
.c-cyan { color: var(--cyan); }
.c-pink { color: var(--pink); }

/* Menu bar with the fake notch */
.menubar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--gap);
  z-index: 40;
}
.menubar__notch {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--notch-w);
  height: 32px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 0 0 14px 14px;
}
.menubar__left {
  position: absolute;
  right: calc(50% + var(--notch-w) / 2 + 16px);
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.menubar__brand { font: 11px var(--pixel); text-transform: uppercase; }
.menubar__stats { color: var(--yellow); font-size: 20px; }
.menubar__canvas {
  position: absolute;
  top: 1px;
  left: calc(50% + var(--notch-w) / 2 + 6px);
  width: calc(50% - var(--notch-w) / 2 - 6px);
  height: 36px;
}

/* Hero */
.hero {
  min-height: 88vh;
  padding: calc(var(--bar-h) + 72px) 0 72px;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, rgba(41, 227, 255, .12), transparent 60%);
}
.hero__kicker { color: var(--cyan); font-size: 24px; margin-bottom: 20px; animation: nudge 1.6s steps(2) infinite; }
.hero .lead { margin: 0 auto 28px; }
@keyframes nudge { 50% { transform: translateY(-4px); } }

/* Signup */
.signup-box { max-width: 520px; margin: 0 auto; }
.signup__row { display: flex; gap: 8px; }
.signup input[type='email'] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  background: var(--cell);
  color: var(--ink);
  border: 2px solid var(--gap);
  border-radius: 9px;
  font: 22px var(--mono);
}
.signup input[type='email']:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(41, 227, 255, .25); }
.btn {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: var(--pink);
  color: var(--bg);
  font: 12px var(--pixel);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(255, 59, 117, .45);
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--cyan); box-shadow: none; display: inline-flex; align-items: center; text-decoration: none; }
.signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup__captcha { display: flex; justify-content: center; margin-top: 10px; }
.signup__captcha:empty { display: none; }
.signup__status { min-height: 1.4em; margin: 10px 0 0; color: var(--ink2); font-size: 20px; }
.fineprint { color: var(--ink2); font-size: 18px; margin-top: 8px; }

.thanks { background: var(--panel); border: 2px solid var(--yellow); border-radius: 10px; padding: 20px; box-shadow: 0 0 0 3px rgba(255, 216, 77, .2); }
.thanks h3 { color: var(--yellow); font-size: 16px; }
.thanks h3:focus { outline: none; }
.thanks__q { margin: 16px 0 8px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.choice {
  height: 40px;
  padding: 0 14px;
  background: var(--cell);
  color: var(--ink);
  border: 2px solid var(--gap);
  border-radius: 9px;
  font: 20px var(--mono);
  cursor: pointer;
}
.choice:hover:not(:disabled) { border-color: var(--cyan); }
.choice[aria-pressed='true'] { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 216, 77, .28); }
.choice:disabled { cursor: default; }
.choice:disabled:not([aria-pressed='true']) { opacity: .45; }

/* Sections */
.section { padding: 96px 0; border-top: 1px solid var(--gap); }
.section__head { max-width: 680px; margin-bottom: 40px; }
.card { background: var(--panel); border: 2px solid var(--gap); border-radius: 10px; padding: 16px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps canvas { width: 100%; height: 140px; margin-bottom: 14px; background: var(--cell); border-radius: 6px; }

.agents { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 20px 0; }
.checklist li { position: relative; padding-left: 24px; margin-bottom: 10px; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .45em;
  width: 10px;
  height: 10px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}
.tag { display: inline-block; border: 1px solid rgba(41, 227, 255, .45); border-radius: 6px; padding: 0 8px; margin: 0 6px 6px 0; color: var(--cyan); }
.terminal { background: #05050d; border: 2px solid var(--gap); border-radius: 10px; overflow: hidden; }
.terminal__bar { display: flex; gap: 6px; padding: 8px 12px; background: var(--panel); }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--gap); }
.terminal__body { min-height: 170px; margin: 0; padding: 12px 16px; font: 20px/1.4 var(--mono); color: var(--ink); white-space: pre-wrap; }
.terminal__foot { display: flex; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--gap); color: var(--ink2); }
.terminal__foot b { color: var(--cyan); font-weight: 400; }
.mana { margin: 16px 0; }
.mana__label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.mana__label b { color: var(--pink); font-weight: 400; }
.mana__track { height: 14px; background: var(--cell); border: 2px solid rgba(255, 59, 117, .45); border-radius: 7px; overflow: hidden; }
.mana__fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--pink), #ff8fb0); box-shadow: 0 0 10px var(--pink); transition: width .2s linear; }
.agents__stage { width: 100%; height: 180px; background: var(--cell); border: 2px solid var(--gap); border-radius: 10px; }

/* Laptop: closed strip and open panel */
.laptop {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  background: radial-gradient(90% 70% at 50% 100%, #1d1240, #0c0c1e);
  border: 10px solid #1d1d38;
  border-bottom-width: 16px;
  border-radius: 18px 18px 8px 8px;
  overflow: hidden;
  cursor: pointer;
}
.laptop__bar { position: absolute; inset: 0 0 auto 0; height: 36px; background: rgba(18, 18, 42, .92); }
.laptop__notch {
  position: absolute;
  left: 50%;
  top: 0;
  width: 22%;
  height: 32px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  z-index: 2;
  transition: width .35s steps(6), height .35s steps(6), border-radius .35s;
}
.laptop.is-open .laptop__notch { width: 70%; height: 72%; border-radius: 0 0 24px 24px; box-shadow: 0 0 30px rgba(41, 227, 255, .25); }
.laptop__strip { position: absolute; top: 1px; left: 62%; width: 36%; height: 34px; transition: opacity .2s; }
.laptop.is-open .laptop__strip { opacity: 0; }
.laptop__panel {
  position: absolute;
  inset: 38px 14px 14px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px;
  opacity: 0;
  transition: opacity .2s .25s;
}
.laptop.is-open .laptop__panel { opacity: 1; }
.laptop__tabs { grid-column: 1 / -1; display: flex; gap: 14px; font-size: 18px; color: var(--ink2); }
.laptop__tabs .is-active { color: var(--yellow); }
.laptop__panel canvas { width: 100%; height: 100%; min-height: 0; background: var(--cell); border-radius: 8px; }
.loot-list { list-style: none; margin: 0; padding: 0; font-size: 18px; }
.loot-list li { padding: 2px 0; border-bottom: 1px solid var(--gap); }
.captions { display: flex; justify-content: center; gap: 24px; margin-top: 16px; color: var(--ink2); }
.laptop:not(.is-open) ~ .captions [data-state='closed'],
.laptop.is-open ~ .captions [data-state='open'] { color: var(--yellow); }

/* Rarity colors */
.r-common { color: var(--ink2); }
.r-rare { color: var(--cyan); }
.r-epic { color: var(--violet); }
.r-legendary { color: var(--yellow); }

/* Grimoire */
.grimoire { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.grimoire__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.slot {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--panel);
  border: 2px solid #3a3a6e;
  border-radius: 8px;
  color: var(--ink2);
  font: 16px var(--pixel);
  cursor: pointer;
}
.slot canvas { width: 72px; height: 72px; }
.slot[data-rarity='rare'] { border-color: var(--cyan); }
.slot[data-rarity='epic'] { border-color: var(--violet); }
.slot[data-rarity='legendary'] { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 216, 77, .4); }
.slot[aria-pressed='true'] { outline: 2px solid var(--ink); outline-offset: 2px; }
.slot--locked { border-style: dashed; cursor: default; }
.grimoire__detail {
  position: sticky;
  top: calc(var(--bar-h) + 24px);
  min-height: 180px;
  background: var(--panel);
  border: 2px solid var(--gap);
  border-radius: 10px;
  padding: 20px;
}
.grimoire__detail .kind { font: 11px var(--pixel); text-transform: uppercase; margin-bottom: 10px; }

/* Why */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why h3 { color: var(--cyan); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--gap); padding: 14px 0; }
.faq summary { cursor: pointer; list-style: none; font-size: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+'; color: var(--pink); display: inline-block; width: 24px; }
.faq details[open] summary::before { content: '-'; }
.faq details p { color: var(--ink2); margin: 8px 0 0 24px; }

/* Final CTA */
.cta { text-align: center; background: radial-gradient(80% 60% at 50% 100%, rgba(255, 59, 117, .14), transparent 70%); }
.cta__dragon { width: 100%; max-width: 560px; height: 200px; margin: 0 auto 24px; }
.cta .lead { margin: 0 auto 24px; }
.steam-wishlist { margin-top: 20px; }

.footer { padding: 40px 0 56px; border-top: 1px solid var(--gap); color: var(--ink2); text-align: center; }

/* Privacy page */
.doc { max-width: 720px; padding-top: calc(var(--bar-h) + 56px); padding-bottom: 64px; }
.doc h2 { margin-top: 32px; }

@media (max-width: 900px) {
  .why { grid-template-columns: repeat(2, 1fr); }
  .grimoire { grid-template-columns: 1fr; }
  .grimoire__detail { position: static; }
}

@media (max-width: 760px) {
  :root { --notch-w: 96px; }
  body { font-size: 21px; }
  .wrap { padding: 0 16px; }
  .menubar__notch { top: 6px; height: 26px; border-radius: 13px; }
  .menubar__brand { display: none; }
  .section { padding: 64px 0; }
  .steps, .agents, .why { grid-template-columns: 1fr; }
  .signup__row { flex-direction: column; }
  .laptop { aspect-ratio: 4 / 3.4; border-width: 6px; border-bottom-width: 10px; }
  .laptop__notch { width: 26%; }
  .laptop.is-open .laptop__notch { width: 92%; height: 86%; }
  .laptop__panel { grid-template-columns: 1fr; }
  .loot-list { display: none; }
  .laptop__strip { left: 64%; width: 35%; }
  .grimoire__grid { grid-template-columns: repeat(4, 1fr); }
  .slot canvas { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__kicker { animation: none; }
  .laptop__notch, .laptop__panel, .laptop__strip, .mana__fill { transition: none; }
}
