:root {
  --black: #0d0916;
  --deep: #2a1052;      /* base purple */
  --darker: #1e0a3e;
  --purple: #5b21b6;
  --violet: #8b5cf6;
  --lavender: #c4b5fd;
  --yellow: #ffd60a;
  --amber: #e0a100;
  --white: #ffffff;
  --px: 4px;
  --head: "Press Start 2P", monospace;
  --body: "VT323", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--white);
  font-family: var(--head);
  text-transform: uppercase;
  line-height: 1.5;
}
img { image-rendering: pixelated; }
ul, ol { list-style: none; padding: 0; margin: 0 auto; }
h1 { font-size: clamp(34px, 9vw, 88px); line-height: 1.2; margin: 0 0 36px; text-shadow: 6px 6px 0 var(--black); }
h2 { font-size: clamp(18px, 3vw, 30px); margin: 0 0 44px; text-shadow: 4px 4px 0 var(--black); }
p { margin: 0 0 12px; }
.hl { color: var(--yellow); }
.eyebrow { font-size: 11px; color: var(--lavender); margin-bottom: 22px; letter-spacing: 1px; }

/* stepped pixel border */
.btn, .tiles li, .worlds li, .levels span {
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--black), 0 var(--px) 0 0 var(--black),
    calc(-1 * var(--px)) 0 0 0 var(--black), var(--px) 0 0 0 var(--black);
}

.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 14px;
  padding: 18px 26px;
  margin: 10px;
  text-decoration: none;
  border-bottom: var(--px) solid var(--amber);
}
.btn:hover { background: var(--white); }
.btn:active { transform: translateY(var(--px)); border-bottom-color: transparent; }
.btn-ghost { background: var(--black); color: var(--white); border-bottom-color: var(--purple); }
.btn-ghost:hover { background: var(--purple); }
.btn-small { font-size: 10px; padding: 10px 14px; margin: 0; }
a:focus-visible { outline: 3px dashed var(--white); outline-offset: 6px; }

/* HUD */
.hud {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 20px;
  background: var(--black);
}
.hud .brand { display: flex; }
.hud nav { margin-left: auto; display: flex; gap: 24px; }
.hud nav a { font-size: 10px; color: var(--white); text-decoration: none; }
.hud nav a:hover { color: var(--yellow); }

/* hero */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  padding: 96px 20px 0;
  background: var(--deep);
}
.hero > * { position: relative; }
.stars {
  position: absolute; inset: 0 0 44px 0;
  background-image:
    radial-gradient(var(--white) 1.5px, transparent 2px),
    radial-gradient(var(--yellow) 1.5px, transparent 2px);
  background-size: 140px 110px, 90px 150px;
  background-position: 10px 20px, 60px 70px;
  opacity: .6;
  animation: twinkle 2s steps(2) infinite;
}
.road { position: relative; height: 200px; margin: 40px -20px 0; }
.skyline {
  position: absolute; left: 0; right: 0; bottom: 44px; height: 152px;
  background: url(assets/skyline.svg) repeat-x 0 0 / 1912px 152px;
  image-rendering: pixelated;
  animation: skyline 96s steps(478) infinite;
}
.lane {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  background:
    repeating-linear-gradient(90deg, var(--yellow) 0 32px, transparent 32px 72px) center / 100% 6px no-repeat,
    var(--black);
  animation: scroll 0.6s steps(6) infinite;
}
.truck {
  position: absolute; bottom: 30px; left: 50%;
  width: 252px; margin-left: -126px;
  animation: bob .4s steps(2) infinite;
}

/* sections */
.section { padding: 88px 20px; text-align: center; }
.section.alt { background: var(--darker); }
.grid { display: grid; gap: 28px; max-width: 900px; }

h3 { font-size: 13px; font-weight: normal; margin: 0; line-height: 1.6; }

.tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tiles li {
  background: var(--purple);
  padding: 26px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.tiles span { color: var(--yellow); font-size: 22px; }
.tiles p { font-family: var(--body); text-transform: none; font-size: 22px; line-height: 1.2; margin: 0; color: var(--lavender); }
.tiles li:hover { background: var(--yellow); color: var(--black); }
.tiles li:hover span, .tiles li:hover p { color: var(--black); }

.worlds { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.worlds li {
  background: var(--purple); padding: 24px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.worlds .flag { height: 56px; width: auto; }
.worlds .flag.q { font-size: 26px; line-height: 56px; color: var(--yellow); }
.worlds .map { height: 88px; display: grid; place-items: center; }
.worlds .map img { max-height: 88px; width: auto; }
.worlds .map img[src$="globe.svg"] { width: 72px; }
.worlds b { font-weight: normal; font-size: 12px; color: var(--yellow); }
.worlds li:hover { transform: translateY(-4px); }

.levels { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 28px; max-width: 980px; }
.levels li { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 150px; }
.levels h3 { font-size: 11px; }
.levels span {
  width: 72px; height: 72px; display: grid; place-items: center;
  background: var(--white); color: var(--black); font-size: 20px;
}
.levels .boss span { background: var(--yellow); }
.levels .boss { color: var(--yellow); }

.start { background: var(--purple); }

footer { padding: 36px 20px; text-align: center; background: var(--black); color: var(--lavender); font-size: 10px; }
footer p { margin: 14px 0 0; }
footer .gg { color: var(--yellow); font-size: 16px; text-transform: none; }

@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes scroll { to { background-position: calc(50% - 72px) center, 0 0; } }
@keyframes skyline { to { background-position-x: -1912px; } }
@keyframes twinkle { 50% { opacity: .3; } }

@media (max-width: 760px) {
  .hud nav { display: none; }
  .hud .btn-small { margin-left: auto; }
  .truck { width: 210px; margin-left: -105px; }
  .levels { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Press Start form page ---------- */
.form-page { max-width: 820px; margin: 0 auto; padding-top: 56px; }
.form-title { font-size: clamp(22px, 5vw, 40px); margin-bottom: 20px; text-shadow: 4px 4px 0 var(--black); }
.form-intro { font-family: var(--body); text-transform: none; font-size: 24px; color: var(--lavender); margin-bottom: 36px; }
.demo-note { background: var(--yellow); color: var(--black); font-size: 9px; padding: 10px; margin-bottom: 36px; }

fieldset {
  border: var(--px) solid var(--black); background: var(--purple);
  margin: 0 0 32px; padding: 28px 22px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; text-align: left;
}
legend { background: var(--black); color: var(--yellow); font-size: 12px; padding: 8px 12px; }
fieldset label, .label { display: block; font-size: 9px; color: var(--lavender); line-height: 1.8; }
.wide { grid-column: 1 / -1; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 8px;
  background: var(--black); color: var(--white);
  border: var(--px) solid var(--black); border-radius: 0;
  font-family: var(--body); font-size: 24px; padding: 8px 10px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--yellow) 50%), linear-gradient(135deg, var(--yellow) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 12px) 50%; background-size: 8px 8px; background-repeat: no-repeat; padding-right: 36px; }
::placeholder { color: #7c6aa8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--yellow); }

.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; }
.chips span {
  display: flex; align-items: center; gap: 10px;
  background: var(--black); color: var(--white);
  border: var(--px) solid var(--black);
  font-size: 10px; padding: 10px 12px; min-height: 48px;
}
.chips img { height: 22px; width: auto; }
.chips input:checked + span { background: var(--yellow); color: var(--black); }
.chips input:focus-visible + span { border-color: var(--white); }

button.btn { font-family: var(--head); text-transform: uppercase; cursor: pointer; border-width: 0 0 var(--px); }
button.btn:disabled { opacity: .6; cursor: wait; }
.form-error { background: var(--black); color: var(--yellow); font-size: 10px; padding: 12px; }
.done img { margin: 12px 0 28px; }
.done:focus { outline: none; }

@media (max-width: 640px) {
  fieldset { grid-template-columns: 1fr; padding: 24px 14px 18px; }
}

input.trap:not([type=radio]):not([type=checkbox]) { position: absolute; left: -9999px; width: 1px; height: 1px; }

.label em { font-style: normal; color: var(--white); opacity: .7; }
.slot-note { font-family: var(--body); text-transform: none; font-size: 22px; color: var(--lavender); margin: 0; }
.done-slot { font-size: clamp(14px, 3vw, 22px); color: var(--yellow); margin: 0 0 20px; }

fieldset label .hint { display: block; font-family: var(--body); text-transform: none; font-style: normal; font-size: 18px; line-height: 1.1; color: var(--white); opacity: .75; }

fieldset { align-items: end; }

legend { line-height: 1.6; max-width: 100%; }

/* ---------- services page ---------- */
.more { margin: 44px 0 0; }
.services-page { max-width: 860px; margin: 0 auto; padding-top: 56px; }
.stage { font-size: 14px; color: var(--yellow); text-shadow: none; text-align: left; margin: 56px 0 24px; padding-bottom: 12px; border-bottom: var(--px) solid var(--black); }
.services { text-align: left; display: grid; gap: 24px; }
.services li {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--purple); padding: 22px 20px;
  box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--black), 0 var(--px) 0 0 var(--black),
    calc(-1 * var(--px)) 0 0 0 var(--black), var(--px) 0 0 0 var(--black);
}
.services span { flex: none; color: var(--yellow); font-size: 20px; width: 48px; }
.services h3 { margin-bottom: 10px; }
.services p { font-family: var(--body); text-transform: none; font-size: 22px; line-height: 1.25; margin: 0; color: var(--white); }
@media (max-width: 640px) {
  .services li { flex-direction: column; gap: 12px; }
}

.values span { font-size: 28px; }

.values { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 680px; }

/* ---------- country pages ---------- */
.worlds { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.worlds li { padding: 0; }
.worlds a {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 24px 12px; height: 100%; color: inherit; text-decoration: none;
}
.worlds b { font-size: 11px; line-height: 1.6; }
.worlds li:hover { background: var(--black); }

.world-page { max-width: 860px; margin: 0 auto; padding-top: 56px; }
.world-hero { display: flex; justify-content: center; align-items: center; gap: 36px; margin-bottom: 32px; }
.world-hero .flag { height: 64px; width: auto; }
.world-hero .map { max-height: 120px; width: auto; }
.world-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin: 44px auto 12px; }
.world-stats li {
  background: var(--black); padding: 18px 12px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 calc(-1 * var(--px)) 0 0 var(--black), 0 var(--px) 0 0 var(--black),
    calc(-1 * var(--px)) 0 0 0 var(--black), var(--px) 0 0 0 var(--black);
}
.world-stats span { font-size: 9px; color: var(--lavender); }
.world-stats b { font-weight: normal; font-size: 11px; line-height: 1.7; color: var(--yellow); }
.world-section { text-align: left; margin-top: 52px; }
.world-section h2 { font-size: 15px; color: var(--yellow); text-shadow: none; margin: 0 0 18px; padding-bottom: 12px; border-bottom: var(--px) solid var(--black); }
.world-section p, .world-note p { font-family: var(--body); text-transform: none; font-size: 23px; line-height: 1.3; margin: 0 0 16px; }
.world-note { text-align: left; margin-top: 56px; padding: 20px; background: var(--darker); border: var(--px) solid var(--black); }
.world-note p { font-size: 20px; color: var(--lavender); }
.world-note p:last-child { margin: 0; }
.world-note a { color: var(--yellow); }
@media (max-width: 640px) {
  .world-hero { gap: 20px; }
  .world-hero .map { max-height: 90px; }
}
.worlds li { display: block; }
