/* ═══════════════════════════════════════════════════════════════
   Pepe on Horse - $HORSE
   ═══════════════════════════════════════════════════════════════ */

:root {
  --pepe: #4cb050;
  --pepe-deep: #2f7a3a;
  --pepe-bright: #6fdb6e;
  --cream: #fff8e8;
  --paper: #faf3df;
  --ink: #1a1810;
  --ink-soft: #4d4836;
  --rule: rgba(26,24,16,.18);
  --shadow: 0 4px 0 rgba(26,24,16,.85);
  --gold: #d4a83c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}
.serif { font-family: 'VT323', monospace; }
.pixel { font-family: 'Press Start 2P', monospace; }

a { color: var(--pepe-deep); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ───────── CA BAR ───────── */
.ca-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: #0c0c0c;
  color: #f1f1f1;
  border-bottom: 3px solid var(--pepe);
  font-family: 'VT323', monospace;
  font-size: 18px;
  flex-wrap: wrap;
}
.ca-label {
  letter-spacing: .12em;
  color: var(--pepe-bright);
  font-weight: 600;
}
.ca-input {
  flex: 1; min-width: 220px;
  background: #1a1a1a;
  color: #efefef;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: .03em;
}
.ca-copy {
  background: var(--pepe);
  color: #0c0c0c;
  border: none; border-radius: 4px;
  padding: 7px 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,.6);
  transition: transform .08s, box-shadow .08s;
}
.ca-copy:hover { transform: translateY(-1px); }
.ca-copy:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.6); }
.ca-copy.copied { background: #aef0a8; }
.ca-socials { display: flex; gap: 10px; }
.ca-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: #1a1a1a; color: #efefef;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
}
.ca-socials a:hover { background: var(--pepe); color: #0c0c0c; }

/* ───────── MASTHEAD (compact title above generator) ───────── */
.masthead {
  text-align: center;
  padding: 36px 24px 12px;
  background:
    radial-gradient(900px 400px at 50% 0%, rgba(76,176,80,.16), transparent 60%),
    var(--cream);
}
.masthead-inner { max-width: 1100px; margin: 0 auto; }
.eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--pepe-deep);
  margin-bottom: 14px;
}
.wordmark {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(28px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0;
  text-shadow: 4px 4px 0 var(--pepe);
}
.tag {
  font-family: 'VT323', monospace;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--ink-soft);
  margin: 14px 0 0;
}
.hero-preview { display: none; }     /* mirror kept hidden - generator's preview is the focal element now */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  border: 3px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
  text-decoration: none;
}
.btn-primary { background: var(--pepe); color: var(--ink); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: var(--shadow); }
.btn-export { background: var(--gold); color: var(--ink); box-shadow: var(--shadow); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(26,24,16,.85); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(26,24,16,.85); }

.hero-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  margin-left: auto;
}
.hero-preview {
  position: relative;
  width: 100%; height: 100%;
  border: 4px solid var(--ink);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--pepe);
}
.hero-preview .layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

/* ───────── TICKER ───────── */
.ticker {
  margin: 56px -24px 0;        /* break out of the generator section's padding */
  background: var(--ink);
  color: var(--pepe-bright);
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  letter-spacing: .12em;
  border-top: 4px solid var(--pepe);
  border-bottom: 4px solid var(--pepe);
  overflow: hidden;
}
.ticker-track {
  display: inline-flex;
  gap: 30px;
  padding: 14px 0;
  white-space: nowrap;
  animation: scroll 28s linear infinite;
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ───────── GENERATOR (now the landing) ───────── */
.generator {
  padding: 24px 24px 0;
  background: var(--paper);
}

.gen-grid {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.preview-wrap { display: flex; flex-direction: column; gap: 18px; }
.preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #ffffff;
  border: 4px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--pepe);
}
.preview .layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.preview-actions { display: flex; gap: 12px; }
.preview-actions .btn { flex: 1; }

.controls { display: flex; flex-direction: column; gap: 14px; }
.control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--pepe-deep);
}
.control-row { display: flex; flex-direction: column; gap: 6px; }
.control-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: .08em;
}
.control select {
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--cream);
  cursor: pointer;
}
.lock-btn {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 6px;
  width: 44px; height: 44px;
  font-size: 20px;
  cursor: pointer;
  transition: background .12s;
}
.lock-btn[aria-pressed="true"] { background: var(--gold); }

.export-row {
  max-width: 1100px;
  margin: 36px auto 0;
  display: flex; gap: 14px; flex-wrap: wrap;
  justify-content: center;
}
.export-status {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 14px;
  min-height: 1.5em;
}
.export-status.error { color: #c0392b; }
.export-status.success { color: var(--pepe-deep); }

/* ───────── LORE ───────── */
.lore {
  padding: 80px 24px;
  background: var(--ink);
  color: var(--cream);
}
.lore-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.lore h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 3vw, 36px);
  margin: 0 0 24px;
  color: var(--pepe-bright);
  letter-spacing: -.005em;
}
.lore p {
  font-family: 'VT323', monospace;
  font-size: 24px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--cream);
}
.lore p em { color: var(--pepe-bright); font-style: italic; }
.lore p strong { color: var(--pepe-bright); font-weight: 700; }

/* ───────── HOW-TO STEPS ───────── */
.howto {
  padding: 80px 24px;
  background: var(--paper);
  border-top: 4px solid var(--ink);
}
.howto-inner { max-width: 980px; margin: 0 auto; }
.howto h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 3vw, 36px);
  margin: 0 0 32px;
  text-align: center;
  letter-spacing: -.005em;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--pepe);
}
.step-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  color: var(--pepe-deep);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 56px;
  text-align: center;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
}
.step-body { display: flex; flex-direction: column; gap: 6px; }
.step-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.4;
}
.step-text {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.step-text strong { color: var(--pepe-deep); }
.step-text code {
  font-family: 'VT323', monospace;
  font-size: 18px;
  background: var(--ink);
  color: var(--pepe-bright);
  padding: 2px 8px;
  border-radius: 4px;
  word-break: break-all;
}

/* ───────── TOKEN ───────── */
.token {
  padding: 80px 24px;
  background: var(--paper);
  border-top: 4px solid var(--ink);
}
.token-inner { max-width: 980px; margin: 0 auto; }
.token h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 32px;
  text-align: center;
}
.tokenomics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.tok-cell {
  padding: 24px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--pepe);
  text-align: center;
}
.tok-k {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.tok-v {
  font-family: 'VT323', monospace;
  font-size: 28px;
  color: var(--ink);
}
.token-ca {
  display: flex; gap: 12px; align-items: center;
  padding: 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 8px;
  flex-wrap: wrap;
}
.token-ca .lbl {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--pepe-bright);
}

/* ───────── FOOTER ───────── */
.footer {
  padding: 40px 24px;
  background: var(--ink);
  color: var(--cream);
  border-top: 4px solid var(--pepe);
  text-align: center;
}
.footer p {
  font-family: 'VT323', monospace;
  font-size: 18px;
  margin: 0 0 8px;
}
.footer .copy {
  color: var(--ink-soft);
  font-size: 14px;
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stack { max-width: 360px; margin: 0 auto; }
  .hero h1 { text-align: center; }
  .hero-text > * { text-align: center; }
  .hero-actions { justify-content: center; }
  .gen-grid { grid-template-columns: 1fr; gap: 28px; }
  .preview-wrap { max-width: 480px; margin: 0 auto; width: 100%; }
}
@media (max-width: 540px) {
  .ca-bar { font-size: 14px; }
  .ca-input { font-size: 14px; }
  .ticker-track { animation-duration: 18s; }
  .ticker { font-size: 11px; }
  .btn { padding: 12px 16px; font-size: 11px; }
}
