/* Code the Hero website: same pixel language as the game (src/ui/styles.css). */
@font-face { font-family: "Press Start 2P"; src: url("fonts/press-start-2p.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("fonts/pixelify-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("fonts/pixelify-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #14122a; --panel: #211e40; --ink: #ecebff; --muted: #a19cc9; --edge: #07061a; --chrome: #2a2650;
  --gold: #ffc93c; --mint: #3fd49a; --coral: #ff6b6b; --sky: #5fa8ff;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.px { font-family: "Press Start 2P", "Courier New", monospace; letter-spacing: .5px; line-height: 1.5; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(20, 18, 42, .94); border-bottom: 3px solid var(--edge); backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border: 2px solid var(--edge); }
.brand span { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--gold); }
.top nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 16px; }
.top nav a:not(.btn):hover { color: var(--gold); }
@media (max-width: 720px) { .top nav a:not(.btn) { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  background: var(--gold); color: #1d1a36; border: 3px solid var(--edge); box-shadow: 4px 4px 0 var(--edge);
  font: 700 17px "Pixelify Sans", sans-serif; text-decoration: none; border-radius: 2px;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--edge); }
.btn.run { background: var(--mint); }
.btn.ghost { background: var(--panel); color: var(--ink); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 15px; }

/* hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.hero h1 { font-family: "Press Start 2P", monospace; font-size: clamp(22px, 3.4vw, 34px); line-height: 1.45; margin: 0 0 18px; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.hero p.lead { font-size: 20px; margin: 0 0 24px; max-width: 34em; }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .note { font-size: 15px; margin-top: 14px; }
.frame { border: 3px solid var(--edge); box-shadow: 6px 6px 0 var(--edge); background: #000; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 32px; } }

/* sections */
section { padding: 48px 0; }
section h2 { font-family: "Press Start 2P", monospace; font-size: clamp(16px, 2.2vw, 22px); line-height: 1.5; margin: 0 0 10px; }
section .intro { max-width: 40em; margin: 0 0 26px; }
.box { background: var(--panel); border: 3px solid var(--edge); box-shadow: 4px 4px 0 var(--edge); padding: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid3 h3 { margin: 6px 0 6px; font-size: 20px; }
.grid3 p { margin: 0; }
.step { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--gold); }
@media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }

.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: #191731; color: #e9e6ff; border: 3px solid var(--edge); padding: 14px 16px; font-size: 15px; line-height: 1.7; overflow-x: auto; white-space: pre; margin: 0; }
.code .kw { color: #ff9ad5; } .code .fn { color: #8ecbff; } .code .num { color: #ffc93c; } .code .cm { color: #8a85b8; font-style: italic; }
.code .hl { background: rgba(255, 201, 60, .22); box-shadow: inset 3px 0 0 #ffc93c; display: inline-block; width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.enemies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.enemies li { display: flex; gap: 12px; align-items: baseline; }
.enemies b { color: var(--coral); white-space: nowrap; }

/* worlds */
.worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.world { padding: 0; overflow: hidden; }
.world img { width: 100%; aspect-ratio: 16 / 9; border-bottom: 3px solid var(--edge); }
.world div { padding: 12px 14px 14px; }
.world h3 { margin: 0 0 4px; font-size: 18px; }
.world p { margin: 0; font-size: 15px; color: var(--muted); }
.tag { display: inline-block; font-family: "Press Start 2P", monospace; font-size: 8px; padding: 5px 6px; margin-bottom: 8px; border: 2px solid var(--edge); }
.tag.free { background: var(--mint); color: #10301f; }
.tag.prem { background: var(--gold); color: #1d1a36; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.plans ul { margin: 10px 0 0; padding-left: 20px; }
.plans li { margin: 4px 0; }
.price { font-family: "Press Start 2P", monospace; font-size: 13px; color: var(--gold); }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }

/* faq */
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; font-size: 19px; min-height: 32px; }
details p { margin: 10px 0 0; }

/* cta band + footer */
.band { text-align: center; background: var(--chrome); border-top: 3px solid var(--edge); border-bottom: 3px solid var(--edge); }
.band h2 { color: var(--gold); }
footer { padding: 32px 0 48px; font-size: 15px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--muted); }

/* feedback page */
.fbform { display: grid; gap: 8px; margin-top: 20px; }
.fbform label { font-weight: 700; margin-top: 8px; }
.fbform textarea, .fbform input[type="email"] { width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; background: #191731; color: var(--ink); border: 3px solid var(--edge); border-radius: 2px; }
.fbform textarea { resize: vertical; min-height: 140px; }
.fbform .btn { justify-self: start; }
.fbform .small { font-size: 15px; margin: 4px 0 0; }
.types { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.types legend { font-weight: 700; margin-bottom: 6px; }
.types label { font-weight: 400; margin: 0; display: flex; gap: 6px; align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#status.ok { color: var(--mint); } #status.err { color: var(--coral); }

/* legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 16px 56px; }
.doc h1 { font-family: "Press Start 2P", monospace; font-size: 20px; line-height: 1.5; color: var(--gold); }
.doc h2 { font-size: 21px; margin: 28px 0 8px; }
.doc li { margin: 4px 0; }
.draft-note { border: 2px dashed var(--muted); padding: 10px 12px; }
