@font-face {
  font-family: "Pixel";
  src: url("fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #040b33;
  --navy: #07143f;
  --navy-2: #0c1f5c;
  --blue: #1e6fd6;
  --sky: #5fb3f0;
  --gold: #f5b82e;
  --gold-dark: #b8780a;
  --gold-deep: #6b3f04;
  --text: #e8f1ff;
  --muted: #a9bfe4;
  --cyan: #7be6ff;
}

* { box-sizing: border-box; }
html { background: #0a2a8a; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  position: relative;
  min-height: 100vh;
}

/* Fixed night sky: deep blue at the top, light blue at the horizon, pixel stars on top */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #040b33 0%, #0a2480 38%, #1769d1 74%, #58aeee 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image: url("img/fx/stars.png");
  background-size: 600px 600px;
  image-rendering: pixelated;
  animation: twinkle 3.2s steps(2) infinite alternate;
  pointer-events: none;
}
@keyframes twinkle { from { opacity: 1; } to { opacity: 0.72; } }

img { image-rendering: pixelated; max-width: 100%; }
a { color: var(--gold); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.px { font-family: "Pixel", monospace; }

/* Pixel panel: notched corners via four offset shadows */
.panel, .card, .plaque, .btn, header, .chip {
  --b: 4px;
}
.card, .plaque {
  background: var(--navy);
  box-shadow:
    0 calc(var(--b) * -1) 0 0 var(--gold),
    0 var(--b) 0 0 var(--gold),
    calc(var(--b) * -1) 0 0 0 var(--gold),
    var(--b) 0 0 0 var(--gold),
    0 calc(var(--b) * 2) 0 0 rgba(0, 0, 0, 0.35);
  margin: var(--b);
}
.card { padding: 26px; }

/* ---------- Header ---------- */
header {
  background: var(--night);
  border-bottom: 4px solid var(--gold);
  position: sticky; top: 0; z-index: 30;
}
header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 12px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 42px; width: auto; filter: invert(1); }
.brand span { font-family: "Pixel", monospace; font-size: 0.68rem; line-height: 1.5; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { font-family: "Pixel", monospace; font-size: 0.6rem; text-decoration: none; color: var(--text); padding: 10px 12px; border: 3px solid transparent; }
nav a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 34px; align-items: center; grid-template-columns: 1fr; position: relative; z-index: 2; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.25fr 0.75fr; } }
.hero .badge { font-family: "Pixel", monospace; font-size: 0.6rem; display: inline-block; background: var(--gold); color: var(--gold-deep); padding: 8px 10px; margin-bottom: 18px; box-shadow: 0 4px 0 var(--gold-dark); }
.hero h1 { font-family: "Pixel", monospace; margin: 0 0 20px; font-size: clamp(1.05rem, 4.4vw, 2rem); line-height: 1.55; text-shadow: 4px 4px 0 var(--night); }
.hero h1 span { display: block; }
.hero h1 .l2 { color: var(--gold); }
.hero h1 .l3 { color: var(--cyan); }
.hero p.lead { color: var(--text); max-width: 520px; font-size: 1.05rem; margin: 0 0 6px; text-shadow: 2px 2px 0 var(--night); }
.hero-art { position: relative; justify-self: center; width: min(78vw, 340px); }
.hero-art .frame {
  background: var(--night); padding: 0; line-height: 0;
  box-shadow: 0 -6px 0 0 var(--gold), 0 6px 0 0 var(--gold), -6px 0 0 0 var(--gold), 6px 0 0 0 var(--gold), 0 14px 0 0 rgba(0,0,0,.35);
  margin: 6px;
  animation: bob 1.6s steps(4) infinite alternate;
}
.hero-art .frame img { width: 100%; height: auto; display: block; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.cloud { position: absolute; z-index: 1; image-rendering: pixelated; opacity: 0.95; }
.cloud.c1 { width: 184px; left: -20px; top: 70px; animation: drift 16s ease-in-out infinite alternate; }
.cloud.c2 { width: 136px; right: 6%; top: 40px; animation: drift 20s ease-in-out infinite alternate-reverse; }
.cloud.c3 { width: 240px; right: -40px; bottom: 30px; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(36px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .frame, .cloud, body::after { animation: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Pixel", monospace;
  font-size: 0.68rem; line-height: 1.5;
  text-decoration: none;
  color: var(--gold-deep);
  background: var(--gold);
  padding: 15px 18px;
  margin: 18px 12px 6px 4px;
  box-shadow: 0 -4px 0 0 #ffd76a, 0 4px 0 0 var(--gold-dark), -4px 0 0 0 var(--gold-dark), 4px 0 0 0 var(--gold-dark), 0 10px 0 0 rgba(0,0,0,.35);
}
.btn:hover { background: #ffd05a; transform: translateY(-2px); }
.btn:active { transform: translateY(4px); }
.btn.ghost { background: var(--navy); color: var(--text); box-shadow: 0 -4px 0 0 var(--gold), 0 4px 0 0 var(--gold), -4px 0 0 0 var(--gold), 4px 0 0 0 var(--gold), 0 10px 0 0 rgba(0,0,0,.35); }
.btn.ghost:hover { background: var(--navy-2); }

/* ---------- Sections ---------- */
section { padding: 38px 0 6px; }
.plaque { display: inline-block; font-family: "Pixel", monospace; font-size: clamp(0.78rem, 2.6vw, 1.05rem); line-height: 1.6; color: var(--gold); padding: 12px 18px; margin: 4px 4px 26px; text-shadow: 3px 3px 0 var(--night); }
.sub { color: var(--text); max-width: 640px; margin: -8px 0 24px 4px; text-shadow: 2px 2px 0 var(--night); }

.steps { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.step .art { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--night); margin-bottom: 18px; padding: 12px; }
.step .art img { max-height: 126px; width: auto; }
.step h3 { font-family: "Pixel", monospace; font-size: 0.82rem; line-height: 1.6; margin: 0 0 8px; color: var(--gold); }
.step p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.shelf { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; padding: 6px 0; }
.shelf img { height: 60px; width: auto; }
.shelf.coins img { height: auto; width: 112px; }
.shelf-label { font-family: "Pixel", monospace; font-size: 0.6rem; color: var(--cyan); margin: 18px 0 6px; text-align: center; }
.shelf-label:first-child { margin-top: 0; }
.shelf-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 22px 0 0; }

.worlds { scrollbar-color: var(--gold) var(--navy); scrollbar-width: thin; display: flex; gap: 18px; overflow-x: auto; padding: 8px 6px 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.world { flex: 0 0 150px; scroll-snap-align: start; text-align: center; }
.world .phone { background: #000; padding: 0; line-height: 0; margin: 4px; box-shadow: 0 -4px 0 0 var(--gold), 0 4px 0 0 var(--gold), -4px 0 0 0 var(--gold), 4px 0 0 0 var(--gold), 0 10px 0 0 rgba(0,0,0,.35); }
.world .phone img { width: 100%; height: auto; display: block; image-rendering: auto; }
.world span { display: block; font-family: "Pixel", monospace; font-size: 0.52rem; line-height: 1.6; margin-top: 18px; color: var(--text); text-shadow: 2px 2px 0 var(--night); }
@media (min-width: 960px) { .worlds { overflow: visible; justify-content: space-between; } .world { flex: 1 1 0; } }

.feat { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feat .card { padding: 20px; }
.feat h4 { font-family: "Pixel", monospace; font-size: 0.7rem; line-height: 1.6; margin: 0 0 8px; color: var(--cyan); }
.feat p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.cta { text-align: center; padding: 34px 20px; }
.cta h2 { font-family: "Pixel", monospace; font-size: clamp(0.9rem, 3vw, 1.2rem); line-height: 1.7; margin: 0 0 6px; color: var(--gold); }
.cta p { color: var(--muted); margin: 0; }

.pill { display: inline-block; font-family: "Pixel", monospace; font-size: 0.56rem; padding: 7px 9px; margin-bottom: 14px; color: var(--night); }
.pill.live { background: #8ee38a; }
.pill.next { background: var(--gold); }
.pill.plan { background: #9ccaff; }
.pill.dream { background: #d4b8ff; }
ul.list { margin: 0; padding-left: 22px; }
ul.list li { margin: 8px 0; }
.note { color: var(--text); font-size: 0.92rem; margin: 20px 4px 0; text-shadow: 2px 2px 0 var(--night); }
.stack > * + * { margin-top: 30px; }
.roadmap-head { padding-top: 52px; padding-bottom: 18px; }
.roadmap-head h1 { font-family: "Pixel", monospace; font-size: clamp(1.05rem, 4.4vw, 1.9rem); line-height: 1.6; margin: 0 0 14px; text-shadow: 4px 4px 0 var(--night); }
.roadmap-head h1 em { font-style: normal; color: var(--gold); }
.roadmap-head p { max-width: 560px; margin: 0; text-shadow: 2px 2px 0 var(--night); }

/* ---------- Footer with pixel hills ---------- */
footer { margin-top: 70px; position: relative; color: var(--text); }
footer .hills { height: 224px; background: url("img/fx/hills.png") repeat-x bottom center; background-size: auto 224px; image-rendering: pixelated; }
footer .bar { background: #12442c; padding: 22px 0 34px; margin-top: -2px; }
footer .bar .wrap { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; align-items: center; font-size: 0.9rem; }
footer a { color: #cfe9d6; }
footer a:hover { color: var(--gold); }
footer .brand-foot { display: flex; align-items: center; gap: 10px; }
footer .brand-foot img { height: 30px; filter: invert(1); opacity: 0.9; }

/* ---------- Legal pages ---------- */
.legal-card { margin-top: 36px; }
.legal h1 { font-family: "Pixel", monospace; font-size: clamp(0.95rem, 3.4vw, 1.3rem); line-height: 1.6; margin: 0 0 12px; color: var(--gold); }
.legal h2 { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin: 28px 0 8px; color: var(--cyan); }
.legal p, .legal li { color: var(--text); }
.legal a { color: var(--gold); word-break: break-word; }

/* ---------- Small screens ---------- */
@media (max-width: 620px) {
  body { font-size: 16px; }
  header { position: static; }
  header .wrap { justify-content: center; gap: 6px; }
  .brand img { height: 34px; }
  .brand span { font-size: 0.6rem; }
  nav { justify-content: center; gap: 0; width: 100%; }
  nav a { font-size: 0.54rem; padding: 8px 7px; }
  .hero { padding: 34px 0 52px; }
  .hero-grid { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-art { order: -1; width: min(60vw, 240px); }
  .btn { font-size: 0.58rem; padding: 13px 12px; margin: 16px 8px 4px; }
  .cloud.c1 { width: 120px; top: 30px; left: -30px; }
  .cloud.c2 { width: 96px; top: 20px; }
  .cloud.c3 { display: none; }
  .card { padding: 20px; }
  footer .hills { height: 140px; background-size: auto 140px; }
  .plaque { margin-bottom: 20px; }
}
