/* ONCHAIN MACHINE — retro pixel lime landing (RH Machines structure) */
:root {
  --lime: #d6fe51;
  --lime-dark: #a8d400;
  --purple: #2b1a4a;
  --purple-soft: #4a2f7a;
  --white: #ffffff;
  --ink: #14101f;
  --card-shadow: 6px 6px 0 var(--purple);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Press Start 2P", monospace;
  background: linear-gradient(180deg, var(--lime) 0%, #eaffb3 55%, var(--lime) 100%);
  background-size: 200% 200%;
  animation: bgShift 24s ease-in-out infinite;
  color: var(--ink);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
}
body > * { position: relative; z-index: 1; }
a { color: var(--purple); text-decoration: none; }
img { display: block; max-width: 100%; }
em { color: var(--purple); font-style: normal; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: var(--lime); border-bottom: 4px solid var(--purple); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nav-logo { width: 40px; height: 40px; image-rendering: pixelated; }
.nav-links { margin-left: auto; display: flex; gap: 18px; font-size: 10px; align-items: center; }
.nav-links a { padding: 6px 8px; }
.nav-links a:hover { background: var(--purple); color: var(--lime); }

/* MARQUEE */
.marquee { background: var(--purple); color: var(--lime); border-bottom: 4px solid var(--lime); overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee-track span { font-size: 12px; padding: 12px 0; white-space: nowrap; letter-spacing: 2px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* BUTTONS */
.btn {
  display: inline-block; padding: 14px 22px;
  background: var(--purple); color: var(--lime);
  font-family: inherit; font-size: 12px; text-transform: uppercase;
  border: 3px solid var(--purple);
  box-shadow: 5px 5px 0 rgba(0,0,0,.25);
  cursor: pointer; transition: transform .08s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.btn-outline { background: var(--white); color: var(--purple); }
.btn-small { padding: 10px 14px; font-size: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-mint { background: var(--purple); color: var(--lime); border-color: var(--purple); animation: mintPulse 1.6s ease-in-out infinite; }
@keyframes mintPulse { 0%, 100% { box-shadow: 5px 5px 0 rgba(0,0,0,.25); } 50% { box-shadow: 5px 5px 0 var(--lime-dark), 0 0 18px var(--lime); } }

/* HERO */
.hero { text-align: center; padding: 28px 20px 56px; }
.hero-banner { width: 100%; max-width: 1100px; margin: 0 auto 34px; border: 4px solid var(--purple); box-shadow: var(--card-shadow); image-rendering: pixelated; }
.hero-logo { width: 120px; height: 120px; margin: 0 auto 16px; image-rendering: pixelated; }
.hero-kicker { font-size: 9px; color: var(--purple); letter-spacing: 2px; margin-bottom: 16px; }
.hero-title { font-size: 42px; color: var(--purple); text-shadow: 4px 4px 0 var(--white); letter-spacing: 4px; margin-bottom: 18px; line-height: 1.5; }
.hero-tagline { font-size: 11px; line-height: 2; max-width: 720px; margin: 0 auto 28px; color: var(--ink); }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 900px; margin: 40px auto 0; }

/* SECTIONS */
.section { padding: 64px 20px; }
.section-alt { background: var(--white); border-top: 4px solid var(--purple); border-bottom: 4px solid var(--purple); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 24px; color: var(--purple); text-align: center; text-shadow: 3px 3px 0 var(--lime); letter-spacing: 3px; margin-bottom: 14px; }
.section-sub { text-align: center; font-size: 10px; line-height: 2; margin-bottom: 36px; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-kicker { text-align: center; font-size: 9px; letter-spacing: 2px; color: var(--purple); margin-bottom: 12px; }

/* CARDS */
.card { background: var(--white); border: 3px solid var(--purple); box-shadow: var(--card-shadow); padding: 20px; }
.stat-card { text-align: center; padding: 24px 12px; }
.stat-num { display: block; font-size: 22px; color: var(--purple); margin-bottom: 10px; }
.stat-label { font-size: 9px; color: var(--ink); }

/* TWO PARTS */
.parts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.part-card { padding: 28px; }
.part-title { font-size: 13px; color: var(--purple); margin-bottom: 14px; }
.part-card p { font-size: 10px; line-height: 2.2; margin-bottom: 16px; }
.part-badge { display: inline-block; background: var(--lime); color: var(--purple); border: 2px solid var(--purple); padding: 6px 10px; font-size: 8px; }

/* STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card { text-align: center; padding: 24px 16px; }
.step-num { display: inline-block; width: 36px; height: 36px; line-height: 30px; background: var(--purple); color: var(--lime); border: 2px solid var(--lime); font-size: 14px; margin-bottom: 14px; }
.step-card h3 { font-size: 11px; color: var(--purple); margin-bottom: 10px; }
.step-card p { font-size: 8px; line-height: 2; }

/* FLYWHEEL */
.flywheel-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; max-width: 1000px; margin: 0 auto; }
.fw-card { text-align: center; padding: 20px 12px; }
.fw-card h3 { font-size: 9px; color: var(--purple); margin-bottom: 10px; }
.fw-card p { font-size: 8px; line-height: 1.8; }
.fw-arrow { display: flex; align-items: center; font-size: 20px; color: var(--purple); }

/* LEDGER */
.ledger-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.ledger-card { text-align: center; padding: 24px 12px; }
.contract-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contract-card { display: inline-block; }
.contract-label { display: block; font-size: 9px; color: var(--ink); margin-bottom: 10px; }
.contract-address { font-size: 9px; color: var(--purple); word-break: break-all; }

/* READY */
.ready { text-align: center; }

/* MINT PROGRESS + REVEAL */
.mint-progress { max-width: 720px; margin: 24px auto 16px; }
.progress-track { height: 26px; background: var(--white); border: 3px solid var(--purple); box-shadow: var(--card-shadow); padding: 3px; }
.progress-fill { height: 100%; background: repeating-linear-gradient(45deg, var(--purple) 0 8px, var(--purple-soft) 8px 16px); transition: width .8s ease; }
.progress-label { text-align: center; font-size: 9px; margin-top: 10px; }
.reveal-bar { max-width: 720px; margin: 16px auto 0; text-align: center; padding: 16px; }
.reveal-bar .stat-num { font-size: 14px; }
.reveal-bar.reveal-done { background: var(--lime); animation: mintPulse 1.6s ease-in-out infinite; }

/* GALLERY */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.nft-card { padding: 10px; text-align: center; }
.nft-card img { image-rendering: pixelated; border: 3px solid var(--purple); }
.nft-card span { display: block; margin-top: 10px; font-size: 9px; color: var(--purple); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; }
.faq-item summary { cursor: pointer; font-size: 11px; color: var(--purple); padding: 6px 0; }
.faq-item p { font-size: 9px; line-height: 2; margin-top: 12px; }

/* BAG / MY MACHINES */
.bag-connect { max-width: 640px; margin: 0 auto; text-align: center; }
.bag-connect p { font-size: 9px; line-height: 2; margin-bottom: 14px; }
.bag-address { color: var(--purple); word-break: break-all; }
.nft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.nft-bag-card { padding: 10px; text-align: center; }
.nft-bag-card img { width: 100%; image-rendering: pixelated; border: 3px solid var(--purple); }
.nft-bag-card span { display: block; margin-top: 8px; font-size: 8px; color: var(--purple); }

/* DISCLAIMER */
.disclaimer { max-width: 820px; margin: 14px auto 0; font-size: 7px; line-height: 1.9; opacity: .85; }

/* DASHBOARD / MINT */
.mint-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.mint-main { display: flex; flex-direction: column; gap: 20px; }
.mint-img { width: 100%; border: 4px solid var(--purple); box-shadow: var(--card-shadow); image-rendering: pixelated; }
.mint-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mint-stat { text-align: center; padding: 16px 8px; }
.mint-stat .stat-num { font-size: 12px; }
.mint-side { display: flex; flex-direction: column; gap: 16px; }
.mint-card { padding: 24px; text-align: center; }
.mint-card-title { font-size: 12px; color: var(--purple); margin-bottom: 12px; }
.mint-detail { font-size: 8px; line-height: 2; }
.mint-price { font-size: 18px; color: var(--purple); margin: 12px 0; }
.mint-card .btn { width: 100%; }
.mint-utility { list-style: none; text-align: left; }
.mint-utility li { font-size: 8px; line-height: 2; padding-left: 14px; position: relative; }
.mint-utility li::before { content: "▸"; position: absolute; left: 0; color: var(--purple); }

/* DOCS */
.docs { max-width: 900px; }
.docs-block { margin-bottom: 20px; padding: 28px; }
.docs-block p, .docs-block li { font-size: 9px; line-height: 2.2; }
.docs-h2 { font-size: 13px; color: var(--purple); margin-bottom: 14px; }
.docs-h3 { font-size: 10px; color: var(--purple); margin: 16px 0 10px; }
.docs-list { list-style: none; margin: 12px 0; }
.docs-list li { padding-left: 14px; position: relative; }
.docs-list li::before { content: "▸"; position: absolute; left: 0; color: var(--purple); }
.docs-formula { font-size: 10px; text-align: center; background: var(--lime); border: 2px solid var(--purple); padding: 12px; margin: 14px 0; color: var(--purple); }

/* FOOTER */
.footer { background: var(--purple); color: var(--lime); text-align: center; padding: 26px 20px; font-size: 8px; line-height: 2; }
.footer a { color: var(--lime); }

/* BACK TO TOP */
.back-top { position: fixed; bottom: 20px; right: 20px; z-index: 60; width: 46px; height: 46px; display: none; background: var(--purple); color: var(--lime); border: 3px solid var(--lime); font-family: inherit; font-size: 14px; cursor: pointer; box-shadow: 4px 4px 0 rgba(0,0,0,.25); }
.back-top.show { display: block; }

/* ANIMATED BG */
@keyframes bgShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pixelFloat { 0% { transform: translateY(0) rotate(0deg); opacity: 0; } 10% { opacity: var(--po, .18); } 90% { opacity: var(--po, .18); } 100% { transform: translateY(-110vh) rotate(180deg); opacity: 0; } }
.bg-pixels { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pixel { position: absolute; bottom: -40px; display: block; background: var(--pc, var(--purple)); animation: pixelFloat var(--pd, 18s) linear infinite; animation-delay: var(--pdl, 0s); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-stats, .ledger-grid { grid-template-columns: repeat(2, 1fr); }
  .parts-grid, .mint-layout { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .flywheel-grid { grid-template-columns: 1fr; }
  .fw-arrow { justify-content: center; transform: rotate(90deg); }
  .hero-title { font-size: 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .nft-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .nav-links { display: none; }
  .hero-stats, .steps-grid, .ledger-grid, .mint-info, .gallery, .nft-grid { grid-template-columns: 1fr; }
}
