/* Sproto Pepe
   The art is a cel: flat fills, thick black ink, four colours. The page borrows exactly that
   language. Surfaces are flat, every container has an ink outline and a hard offset shadow
   (never a soft blur), the display type gets an ink stroke like the lettering on a 90s cartridge,
   and the only animation is one dash-in on load. */
:root {
  color-scheme: dark;
  --navy: #070b1c;
  --navy-2: #0d1640;
  --navy-3: #132065;
  --blue: #1f4bff;
  --blue-deep: #10288f;
  --yellow: #ffe600;
  --yellow-deep: #c9b400;
  --red: #ff2b2b;
  --ink: #000;
  --paper: #fff;
  --text: #f2f4ff;
  --muted: #aab3d6;
  --disp: "Lilita One", "Arial Black", Impact, sans-serif;
  --body: "Rubik", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --maxw: 1120px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --line: 3px;
  --shadow-y: 6px 6px 0 var(--yellow);
  --shadow-k: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--navy);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--disp); font-weight: 400; line-height: 1; text-wrap: balance; }
b { font-weight: 700; color: var(--yellow); }
code { font-family: var(--mono); }
p a { color: var(--yellow); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
p a:hover { color: var(--paper); }
:focus-visible { outline: var(--line) solid var(--yellow); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 12px var(--gutter);
  background: var(--navy);
  border-bottom: var(--line) solid var(--ink);
  box-shadow: 0 var(--line) 0 var(--blue);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--disp); font-size: 1.45rem; color: var(--yellow); }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; object-position: center 25%; background: var(--blue); border: var(--line) solid var(--ink); }
.links { display: flex; gap: 22px; margin-left: auto; font-weight: 500; color: var(--muted); }
.links a:hover { color: var(--paper); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border: var(--line) solid var(--ink); border-radius: 12px;
  background: var(--yellow); color: var(--ink); font: 700 1rem var(--body);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-blue { background: var(--blue); color: var(--paper); }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) var(--gutter) 40px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center;
  overflow: visible;
}
h1 { display: grid; font-size: clamp(4.6rem, 12vw, 9.5rem); line-height: 0.82; letter-spacing: 0.005em; }
.h1-a, .h1-b {
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 7px 7px 0 var(--ink);
}
.h1-a { color: var(--blue); }
.h1-b { color: var(--yellow); margin-left: 0.06em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 52ch; margin: 28px 0 24px; }
.lede b { color: var(--paper); }

.ca {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px; border: var(--line) solid var(--ink); border-radius: 12px;
  background: var(--navy-2); box-shadow: var(--shadow-y);
  margin-bottom: 26px;
}
.ca-label { font-family: var(--disp); color: var(--yellow); font-size: 1.1rem; }
.ca code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.copy { padding: 7px 14px; border: var(--line) solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink); font: 700 0.85rem var(--body); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.copy:active { transform: translate(2px, 2px); box-shadow: none; }
.copy.done { background: var(--blue); color: var(--paper); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img {
  position: relative; z-index: 1; width: min(100%, 520px);
  filter: drop-shadow(10px 10px 0 var(--ink));
  animation: dash-in 0.7s cubic-bezier(.2,.9,.2,1) both;
}
.art-missing { position: absolute; inset: 10%; display: grid; place-items: center; text-align: center; padding: 20px; border: var(--line) dashed var(--yellow); border-radius: 20px; color: var(--muted); }

/* speed lines: five bars behind the art, drawn once on load then parked */
.dash { position: absolute; left: -6%; top: 24%; width: 48%; height: 46%; pointer-events: none; z-index: 0; }
.dash i {
  position: absolute; left: 0; height: 14px; border-radius: 7px; border: var(--line) solid var(--ink);
  background: var(--blue); animation: streak 0.9s cubic-bezier(.2,.9,.2,1) both;
}
.dash i:nth-child(1) { top: 6%;  width: 58%; animation-delay: 0.02s; }
.dash i:nth-child(2) { top: 26%; width: 92%; background: var(--yellow); animation-delay: 0.08s; }
.dash i:nth-child(3) { top: 46%; width: 70%; animation-delay: 0.14s; }
.dash i:nth-child(4) { top: 66%; width: 100%; background: var(--red); animation-delay: 0.20s; }
.dash i:nth-child(5) { top: 86%; width: 50%; background: var(--yellow); animation-delay: 0.26s; }
.hero-copy { position: relative; z-index: 1; }
.hero-art { z-index: 1; }
@keyframes dash-in { from { transform: translateX(90px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes streak { from { transform: translateX(260px) scaleX(0.2); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }

/* ---------- strip ---------- */
.strip { overflow: hidden; background: var(--yellow); color: var(--ink); border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); }
.track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.track span { display: inline-flex; align-items: center; gap: 26px; padding: 11px 0 11px 26px; font-family: var(--disp); font-size: 1.1rem; letter-spacing: 0.02em; }
.track span::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--yellow); box-shadow: inset 0 0 0 3px var(--yellow), inset 0 0 0 5px var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 9vw, 110px) var(--gutter) 0; }
.section-head { margin-bottom: 30px; }
.section h2 { font-size: clamp(2.4rem, 5.2vw, 3.8rem); color: var(--paper); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--blue); }
.sub { color: var(--muted); margin: 14px 0 0; max-width: 62ch; font-size: 1.05rem; }
.fine { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }

/* ---------- flow ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 28px; counter-reset: hop; }
.flow li { position: relative; counter-increment: hop; }
.flow li::after {
  /* ink arrow to the next hop */
  content: ""; position: absolute; top: 34px; right: -24px; width: 0; height: 0;
  border: 11px solid transparent; border-left: 16px solid var(--yellow); border-right: 0;
  filter: drop-shadow(2px 2px 0 var(--ink));
}
.flow li:last-child::after { display: none; }
.flow-icon {
  width: 84px; height: 84px; border: var(--line) solid var(--ink); border-radius: 50%;
  background: var(--navy-2); box-shadow: 5px 5px 0 var(--yellow); position: relative; margin-bottom: 18px;
}
.flow-icon::before { content: counter(hop); position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink); border: var(--line) solid var(--ink); font: 1rem/24px var(--disp); text-align: center; }
/* the four glyphs: a coin, a three-way split, a bridge arc, a gremlin eye */
.flow-trade::after { content: "$"; position: absolute; inset: 0; display: grid; place-items: center; font: 2.4rem var(--disp); color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.flow-split::after { content: ""; position: absolute; left: 24px; right: 24px; top: 24px; bottom: 24px; background: linear-gradient(90deg, var(--yellow) 0 30%, transparent 30% 35%, var(--blue) 35% 65%, transparent 65% 70%, var(--red) 70%); border: var(--line) solid var(--ink); border-radius: 6px; }
.flow-bridge::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 26px; height: 30px; border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 40px 40px 0 0; background: var(--blue); }
.flow-gremlin::after { content: ""; position: absolute; left: 22px; top: 26px; width: 40px; height: 30px; border-radius: 50%; background: var(--yellow); border: var(--line) solid var(--ink); box-shadow: inset -12px 0 0 var(--ink); }
.flow h3 { font-size: 1.45rem; color: var(--yellow); margin-bottom: 10px; letter-spacing: 0.01em; }
.flow p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- HUD ---------- */
.hud { border: var(--line) solid var(--ink); border-radius: 18px; background: var(--navy-2); box-shadow: var(--shadow-y); padding: 22px; }
.hud-status { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--navy); font-weight: 700; font-size: 0.92rem; margin-bottom: 18px; }
.led { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); border: 2px solid var(--ink); }
.hud-status.ok .led { background: #4ff07a; }
.hud-status.warn .led { background: var(--yellow); }
.hud-status.bad .led { background: var(--red); }
.hud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hud-cell { padding: 16px 18px; border: var(--line) solid var(--ink); border-radius: 12px; background: var(--navy); display: grid; gap: 2px; }
.hud-cell .k { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.hud-cell .v { font: clamp(1.9rem, 3.4vw, 2.7rem)/1.1 var(--disp); color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.hud-cell .v.up { color: #4ff07a; }
.hud-cell .v.down { color: var(--red); }
.hud-cell .u { color: var(--muted); font-size: 0.82rem; }
.hud-fuel { background: var(--yellow); }
.hud-fuel .k, .hud-fuel .u { color: var(--ink); }
.hud-fuel .v { color: var(--paper); }
.curve { margin-top: 14px; padding: 16px 18px; border: var(--line) solid var(--ink); border-radius: 12px; background: var(--navy); }
.curve-head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }
.bar { height: 22px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--navy-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--yellow-deep) 14px 28px); border-right: var(--line) solid var(--ink); transition: width 0.8s cubic-bezier(.2,.8,.2,1); }

/* ---------- vault ---------- */
.vault { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin-bottom: 24px; }
.vault-count { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.count { font: clamp(5rem, 12vw, 9rem)/0.85 var(--disp); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 7px 7px 0 var(--ink); font-variant-numeric: tabular-nums; }
.of { font-weight: 500; color: var(--muted); font-size: 1.15rem; line-height: 1.25; }
.badge { padding: 6px 12px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--navy-2); color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.badge.ok { background: #4ff07a; color: var(--ink); }
.badge.warn { background: var(--yellow); color: var(--ink); }
.badge.bad { background: var(--red); color: var(--paper); }
.vault-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: right; }
.vault-links a { color: var(--yellow); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; }
.vault-links a:hover { color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px; }
.grid a { position: relative; aspect-ratio: 1; border: var(--line) solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--navy-2); box-shadow: 4px 4px 0 var(--yellow); transition: transform 0.1s, box-shadow 0.1s; }
.grid a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--yellow); }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.grid span { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); color: var(--ink); font: 700 0.75rem var(--body); }
.grid .empty { grid-column: 1 / -1; aspect-ratio: auto; padding: 34px 20px; text-align: center; color: var(--muted); border-style: dashed; box-shadow: none; }
.grid .empty:hover { transform: none; box-shadow: none; }

/* ---------- comic ---------- */
.comic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.panel { margin: 0; display: grid; grid-template-rows: 1fr auto; border: 4px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow-k); overflow: hidden; background: var(--blue); min-height: 400px; }
.panel img { width: 100%; height: 100%; object-fit: cover; }
.panel-pepe { object-position: center 30%; transform: scaleX(-1) scale(1.08); transform-origin: center; }
.panel-quote { background: var(--paper); }
.panel-gremlin { object-fit: cover; }
.panel-vow { background: var(--yellow); }
.vow { margin: 0; display: grid; place-items: center; text-align: center; padding: 24px; font: clamp(2.2rem, 3.6vw, 3rem)/0.95 var(--disp); color: var(--ink); }
.panel figcaption { padding: 14px 16px; background: var(--paper); color: var(--ink); border-top: 4px solid var(--ink); font-size: 0.95rem; line-height: 1.45; }
.panel-quote figcaption { background: var(--yellow); font-style: italic; }
.panel figcaption cite { display: block; margin-top: 6px; font-style: normal; font-size: 0.82rem; color: #4b4b4b; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { border: var(--line) solid var(--ink); border-radius: 12px; background: var(--navy-2); padding: 0 18px; transition: box-shadow 0.12s; }
details[open] { box-shadow: var(--shadow-y); }
summary { cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; width: 28px; height: 28px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--yellow); color: var(--ink); font: 1.2rem/22px var(--disp); text-align: center; flex: none; transition: transform 0.15s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 18px; color: var(--muted); }
details code { color: var(--yellow); font-size: 0.85em; word-break: break-all; }

/* ---------- footer ---------- */
.foot { max-width: var(--maxw); margin: 90px auto 0; padding: 28px var(--gutter) 56px; border-top: var(--line) solid var(--ink); box-shadow: 0 calc(-1 * var(--line)) 0 var(--blue); display: grid; gap: 14px; color: var(--muted); font-size: 0.9rem; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--yellow); font-family: var(--disp); font-size: 1.2rem; }
.foot-brand img { border-radius: 50%; object-fit: contain; object-position: center 25%; background: var(--blue); border: 2px solid var(--ink); }
.foot p { margin: 0; max-width: 80ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 500; }
.foot nav a:hover { color: var(--yellow); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(2)::after { display: none; }
  .comic { grid-template-columns: 1fr; }
  .panel { min-height: 320px; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 26px; }
  .hero-art { order: -1; max-width: 340px; margin: 0 auto; }
  .links { display: none; }
  .vault { grid-template-columns: 1fr; }
  .vault-links { text-align: left; }
}
@media (max-width: 600px) {
  .flow { grid-template-columns: 1fr; }
  .flow li::after { display: none; }
  .hud-grid { grid-template-columns: 1fr 1fr; }
  .hud-cell .v { font-size: 1.6rem; }
  .cta .btn { flex: 1 1 100%; }
  .nav .btn-sm { margin-left: auto; }
  h1 { font-size: clamp(4rem, 20vw, 5.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art img, .dash i, .track { animation: none; }
  .bar i, .btn, .grid a, details { transition: none; }
}
