@font-face {
  font-family: "Press Start 2P";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg-top: #0A1FCC;
  --bg-bottom: #00C2FF;
  --ink: #000000;
  --white: #FFFFFF;
  --accent: #FF2E9F;
  --dim: rgba(255,255,255,.7);
  --font-pixel: "Press Start 2P", monospace;
  --font-body: "Inter", "Archivo", system-ui, sans-serif;
  --steps: steps(6);
  --section-pad: clamp(56px, 9vw, 120px);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none), (pointer: coarse) { body { cursor: auto; } }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-drag: none; user-select: none; -webkit-user-select: none; }
button, a, input { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
.pixelated { image-rendering: pixelated; }

.section {
  position: relative;
  padding: var(--section-pad) 20px;
  max-width: 1300px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  color: var(--white);
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 56px);
  text-shadow: 3px 3px 0 var(--ink);
}

/* ---------- pixel cursor ---------- */
.pixel-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-2px, -2px);
}
.cur-arrow { width: 26px; height: 26px; image-rendering: pixelated; }
.cur-hourglass { width: 24px; height: 24px; display: none; }
.pixel-cursor.busy .cur-arrow { display: none; }
.pixel-cursor.busy .cur-hourglass { display: block; animation: hgSpin .9s steps(4) infinite; }
@keyframes hgSpin { to { transform: rotate(360deg); } }
@media (hover: none), (pointer: coarse) { .pixel-cursor { display: none; } }

/* ---------- top loading bar ---------- */
.loadbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 700;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 2px, transparent 2px 4px);
}
.loadbar-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--white) 0 8px, var(--accent) 8px 10px);
}

/* ---------- mode tag + toast ---------- */
.mode-tag {
  position: fixed;
  bottom: 18px; left: 18px;
  z-index: 850;
  font-family: var(--font-pixel);
  font-size: 10px;
  background: var(--ink);
  color: var(--white);
  border: 2px solid var(--accent);
  padding: 8px 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s var(--ease, ease), transform .3s;
  pointer-events: none;
}
.mode-tag.show { opacity: 1; transform: translateY(0); }

.toast {
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translate(-50%, 16px);
  z-index: 900;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 6px; left: 0; right: 0;
  z-index: 500;
  background: rgba(10, 20, 110, .5);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255,255,255,.18);
}
.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 12px;
  position: relative;
}
.tm-face { width: 20px; height: 20px; border-radius: 50%; background: var(--white); position: relative; flex: none; }
.tm-face::after { content: ""; position: absolute; inset: 6px 3px auto 3px; height: 3px; background: var(--ink); }
.spec-ca {
  display: none;
  background: none;
  border: none;
  color: var(--dim);
  font-family: monospace;
  font-size: 11px;
  cursor: pointer;
}
.spec-ca:hover { color: var(--white); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sound-toggle {
  background: none;
  border: 2px solid rgba(255,255,255,.4);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  cursor: pointer;
  position: relative;
}
.sound-toggle svg { width: 15px; height: 15px; }
.sound-toggle .i-sound-off { display: none; }
.sound-toggle[aria-pressed="false"] .i-sound-on { display: none; }
.sound-toggle[aria-pressed="false"] .i-sound-off { display: block; }
.buy-pill {
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s var(--steps);
}
.buy-pill:hover { transform: translate(-2px,-2px); }
@media (min-width: 640px) { .spec-ca { display: block; } }

/* ---------- wear-glasses (DEAL WITH IT overlay) ---------- */
.wear-glasses { position: relative; }
.wear-glasses::after {
  content: "";
  position: absolute;
  display: none;
  width: 60%;
  aspect-ratio: 530/400;
  top: 18%;
  left: 20%;
  background: url("/assets/obj-glasses.webp") center/contain no-repeat;
  pointer-events: none;
  z-index: 3;
}
.deal-mode .wear-glasses::after { display: block; }
.deal-mode .tm-face::after { opacity: 0; }
.deal-mode body { }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  z-index: -1;
  opacity: .8;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,31,204,.55), rgba(0,194,255,.25) 60%, rgba(10,31,204,.6));
}
.hero-inner { position: relative; z-index: 2; }
.hero-kicker {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--dim);
  margin-bottom: 20px;
}
.hero-figure-wrap {
  position: relative;
  width: min(280px, 60vw);
  margin: 0 auto 10px;
}
.hero-figure { width: 100%; height: auto; filter: drop-shadow(0 16px 20px rgba(0,0,0,.35)); }
.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 9vw, 4.4rem);
  text-shadow: 4px 4px 0 var(--ink);
  margin-top: 4px;
}
.hero-sub { font-family: var(--font-pixel); font-size: 10px; color: var(--dim); margin-top: 16px; }
.hero-sub2 { font-family: monospace; font-size: 12px; color: var(--dim); margin-top: 10px; }
.hero-cta {
  display: inline-block;
  margin-top: 22px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 13px;
  padding: 16px 26px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s var(--steps), box-shadow .15s var(--steps);
}
.hero-cta:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--accent); }
.scroll-cue {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--dim);
  text-align: center;
}
.scroll-cue span { display: block; animation: cueBounce 1s var(--steps) infinite; }
@keyframes cueBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- epoch horizontal spine ---------- */
.epoch-pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.epoch-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 400%;
  will-change: transform;
}
.epoch-panel {
  position: relative;
  width: 25%;
  height: 100%;
  flex: none;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.epoch-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,14,60,.35), rgba(6,14,60,.05) 40%, rgba(6,14,60,.55));
}
.epoch-glitch {
  position: absolute;
  top: 0; bottom: 0; right: -2px;
  width: 6px;
  background: var(--accent);
  box-shadow: -4px 0 12px rgba(255,46,159,.7), 4px 0 12px rgba(0,194,255,.7);
  z-index: 4;
  opacity: .8;
}
.epoch-now .epoch-glitch { display: none; }
.epoch-walker {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: clamp(90px, 12vw, 160px);
  transform: translateX(-50%);
  z-index: 3;
  animation: walkerBob .5s var(--steps) infinite;
}
.epoch-walker img { width: 100%; filter: drop-shadow(0 10px 10px rgba(0,0,0,.4)); }
@keyframes walkerBob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
.epoch-label {
  position: relative;
  z-index: 3;
  padding: 0 8% 14% 8%;
  max-width: 480px;
}
.epoch-year { font-family: var(--font-pixel); font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--accent); text-shadow: 3px 3px 0 var(--ink); display: block; }
.epoch-name { font-family: var(--font-pixel); font-size: clamp(.9rem, 2vw, 1.2rem); display: block; margin-top: 8px; }
.epoch-copy { font-family: var(--font-body); font-size: clamp(.85rem, 1.4vw, 1rem); margin-top: 10px; color: rgba(255,255,255,.92); text-shadow: 1px 1px 0 rgba(0,0,0,.5); }

/* ---------- deal with it ---------- */
.dealwithit { text-align: center; }
.dwi-sub { font-family: monospace; font-size: 13px; color: var(--dim); margin-bottom: 40px; }
.dwi-btn {
  position: relative;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-pixel);
  font-size: clamp(.9rem, 2vw, 1.2rem);
  padding: clamp(20px, 4vw, 30px) clamp(30px, 6vw, 60px);
  border: 3px solid var(--white);
  box-shadow: 6px 6px 0 var(--accent);
  cursor: pointer;
  transition: transform .15s var(--steps);
}
.dwi-btn:hover:not(:disabled) { transform: translate(-3px,-3px); }
.dwi-btn:disabled { cursor: default; opacity: .7; }
.dwi-glasses-drop {
  position: fixed;
  left: 50%;
  top: -200px;
  width: 140px;
  transform: translateX(-50%);
  z-index: 950;
  pointer-events: none;
}
.dwi-glasses-drop img { width: 100%; image-rendering: pixelated; }
.dwi-note { margin-top: 22px; font-family: monospace; font-size: 12px; color: var(--dim); }

/* ---------- meme machine ---------- */
.mm-grid {
  display: grid;
  gap: clamp(24px, 5vw, 50px);
}
@media (min-width: 860px) { .mm-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.mm-preview {
  position: relative;
  background: rgba(0,0,0,.25);
  border: 3px solid var(--white);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
}
.mm-bubble-wrap { position: relative; width: min(280px, 80%); margin-bottom: -10px; z-index: 2; }
.mm-bubble-img { width: 100%; image-rendering: pixelated; }
.mm-bubble-text {
  position: absolute;
  inset: 14% 16% auto 16%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(.7rem, 1.6vw, .95rem);
  color: var(--ink);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}
.mm-pose { width: min(200px, 60%); z-index: 1; }
.mm-watermark {
  position: absolute;
  bottom: 10px; right: 12px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: rgba(255,255,255,.6);
}
.mm-controls { display: flex; flex-direction: column; gap: 10px; }
.mm-label { font-family: var(--font-pixel); font-size: 9px; color: var(--dim); margin-top: 8px; }
.mm-input {
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 12px 14px;
  font-family: monospace;
  font-size: 14px;
}
.mm-poses { display: flex; gap: 8px; }
.mm-pose-btn {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
  padding: 8px 12px;
  font-family: monospace;
  font-size: 12px;
  cursor: pointer;
}
.mm-pose-btn.active { background: var(--white); color: var(--ink); border-color: var(--ink); }
.mm-export {
  margin-top: 14px;
  background: var(--accent);
  color: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform .15s var(--steps);
}
.mm-export:hover { transform: translate(-2px,-2px); }

/* ---------- floppy / tokenomics ---------- */
.floppy-section { text-align: center; }
.floppy-rig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.floppy-drive {
  width: min(320px, 90vw);
  height: 60px;
  background: linear-gradient(180deg, #1a1f3a, #0a0d1f);
  border: 3px solid var(--ink);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floppy-shutter {
  position: absolute;
  inset: 6px;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floppy-readout {
  font-family: monospace;
  font-size: 10px;
  color: #6CF;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 14px;
  white-space: nowrap;
  transform: translateY(70px);
  transition: transform .4s var(--steps);
}
.floppy-readout p { margin: 0; }
.floppy-drive.active .floppy-readout { transform: translateY(0); }
.floppy-disk {
  background: none;
  border: none;
  cursor: pointer;
  width: min(180px, 50vw);
  transition: transform .15s var(--steps);
}
.floppy-disk img { width: 100%; }
.floppy-disk:hover { transform: translateY(-6px) rotate(-2deg); }
.floppy-hint { margin-top: 16px; font-family: monospace; font-size: 12px; color: var(--dim); }

/* ---------- crt swap ---------- */
.crt-section { text-align: center; }
.crt-wrap {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  width: min(340px, 80vw);
  margin: 0 auto;
  display: block;
}
.crt-img { width: 100%; transition: transform .15s var(--steps); }
.crt-wrap:hover .crt-img { transform: scale(1.03); }
.crt-screen-loop {
  position: absolute;
  top: 11%;
  left: 19%;
  width: 44%;
  border-radius: 4px;
  animation: crtFlicker 2.4s steps(2) infinite;
}
@keyframes crtFlicker { 0%,100% { opacity: .95; } 50% { opacity: .7; } }
.crt-hint { margin-top: 16px; font-family: monospace; font-size: 12px; color: var(--dim); }

.crt-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  padding: 20px;
}
.crt-modal.show { opacity: 1; pointer-events: auto; }
.crt-modal-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 4px);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.crt-modal-inner {
  position: relative;
  background: #001a3a;
  border: 3px solid #6CF;
  padding: 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,194,255,.4);
}
.crt-modal-title { font-family: var(--font-pixel); font-size: 13px; color: #6CF; margin-bottom: 16px; }
.crt-modal-copy { font-family: monospace; font-size: 13px; color: var(--dim); line-height: 1.5; }
.crt-modal-link {
  display: inline-block;
  margin-top: 20px;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 14px 20px;
}
.crt-modal-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 32px; height: 32px;
  background: var(--white);
  border: 2px solid var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.x-glyph { position: relative; width: 12px; height: 12px; }
.x-glyph::before, .x-glyph::after { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: var(--ink); }
.x-glyph::before { transform: rotate(45deg); }
.x-glyph::after { transform: rotate(-45deg); }

/* ---------- roadmap ---------- */
.version-list { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.version-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,.2);
  border: 2px solid rgba(255,255,255,.25);
  padding: 14px 16px;
  font-family: monospace;
  font-size: 13px;
}
.v-name { font-family: var(--font-pixel); font-size: 10px; flex: none; width: 130px; }
.v-status { margin-left: auto; color: var(--dim); flex: none; }
.v-ok { color: #7CFFB2; }
.v-err { color: var(--accent); }
.v-progress { flex: 1; height: 10px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); }
.v-progress-fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, var(--white) 0 6px, var(--accent) 6px 8px); }

/* ---------- grass block ---------- */
.grass-section { text-align: center; position: relative; }
.grass-block { background: none; border: none; cursor: pointer; width: min(160px, 40vw); margin: 0 auto; transition: transform .1s var(--steps); }
.grass-block img { width: 100%; image-rendering: pixelated; }
.grass-block.hit { animation: grassShake .12s var(--steps); }
@keyframes grassShake { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.grass-block.broken { opacity: 0; transform: scale(.4); transition: opacity .3s, transform .3s; }
.grass-hint { margin-top: 16px; font-family: monospace; font-size: 12px; color: var(--dim); }
.grass-particles {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  pointer-events: none;
}
.grass-particle {
  position: absolute;
  width: 8px; height: 8px;
  background: #6B4A2C;
}
.grass-coin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.grass-coin.pop { animation: coinPop .8s var(--steps) forwards; }
@keyframes coinPop {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  30% { transform: translate(-50%,-90%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-160%) scale(1); opacity: 0; }
}

/* ---------- footer ---------- */
.footer { position: relative; min-height: 46vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.footer-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .5; filter: grayscale(.3); }
.footer-bg::after { content: ""; position: absolute; inset: 0; background: rgba(4,10,50,.72); }
.footer-content { position: relative; z-index: 2; text-align: center; padding: 20px; }
.footer-line { font-family: var(--font-pixel); font-size: clamp(.85rem, 2vw, 1.1rem); text-shadow: 2px 2px 0 var(--ink); max-width: 600px; }
.footer-links { display: flex; gap: 20px; align-items: center; justify-content: center; margin-top: 24px; }
.footer-links a { color: var(--white); text-decoration: none; font-family: monospace; font-size: 12px; display: flex; align-items: center; position: relative; }
.footer-links a:hover { color: var(--accent); }
.footer-ca { margin-top: 18px; font-family: monospace; font-size: 10px; color: var(--dim); opacity: .7; }
.footer-sig { margin-top: 10px; font-family: var(--font-pixel); font-size: 9px; color: var(--dim); }

/* ---------- deal mode glitch flash ---------- */
.glitching body,
.glitching .topbar,
.glitching main {
  animation: glitchFlash .38s steps(3);
}
@keyframes glitchFlash {
  0% { filter: none; transform: translate(0,0); }
  20% { filter: invert(1) hue-rotate(90deg); transform: translate(4px,0); }
  40% { filter: none; transform: translate(-6px,0); }
  60% { filter: invert(1); transform: translate(3px,0); }
  80% { filter: none; transform: translate(-2px,0); }
  100% { filter: none; transform: translate(0,0); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
}
