:root {
  color-scheme: dark;
  --bg: #09080f;
  --panel: #100e18;
  --panel-2: #15121f;
  --line: #292536;
  --line-bright: #3d374c;
  --text: #f5f2ff;
  --muted: #9c95ac;
  --lime: #baff2a;
  --green: #27ef72;
  --purple: #a993d4;
  --pixel: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.grid-noise { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(142,126,178,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(142,126,178,.035) 1px, transparent 1px), radial-gradient(circle at 50% -10%, rgba(104,81,152,.12), transparent 42%); background-size: 64px 64px, 64px 64px, auto; }

.site-header { position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(9,8,15,.9); backdrop-filter: blur(18px); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font: 900 1.25rem/1 var(--pixel); letter-spacing: .04em; }
.wordmark img { width: 32px; height: 32px; object-fit: cover; object-position: center 18%; border: 1px solid var(--line-bright); border-radius: 6px; image-rendering: pixelated; }
.site-header nav { display: flex; gap: 6px; padding: 4px; }
.nav-link { padding: 10px 19px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); font: 800 .82rem/1 var(--pixel); }
.nav-link:hover, .nav-link:focus-visible { color: var(--text); border-color: var(--line); }
.nav-link.active { color: #10120d; background: var(--lime); box-shadow: 0 0 26px rgba(186,255,42,.12); }
.header-actions { justify-self: end; display: flex; gap: 8px; }
.icon-link, .wallet-button { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #100e18; color: var(--text); font: 800 .75rem/1 var(--pixel); cursor: pointer; }
.icon-link { width: 40px; display: grid; place-items: center; color: var(--lime); }
.wallet-button { padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; }
.wallet-dot, .status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

.section-shell { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }
.hero { padding-top: 78px; }
.hero-copy { text-align: center; max-width: 880px; margin: 0 auto 42px; }
.overline { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 18px; color: #aca5bc; font: 700 .72rem/1.2 var(--pixel); letter-spacing: .17em; }
.overline span { width: 34px; height: 1px; background: var(--line-bright); }
.overline.left { justify-content: flex-start; }
h1, h2, h3 { margin: 0; font-family: var(--pixel); }
h1 { font-size: clamp(2.8rem, 7vw, 5.3rem); line-height: .95; letter-spacing: -.075em; text-transform: uppercase; text-shadow: 3px 3px 0 #24202f; }
h1 em { color: var(--lime); font-style: normal; text-shadow: 3px 3px 0 #3f5e08; }
.hero-intro { max-width: 680px; margin: 24px auto 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.hero-buttons { margin-top: 26px; display: flex; justify-content: center; gap: 10px; }
.lime-button, .ghost-button { min-height: 46px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font: 900 .78rem/1 var(--pixel); }
.lime-button { border: 1px solid var(--lime); color: #0c1006; background: var(--lime); box-shadow: 0 8px 28px rgba(186,255,42,.12); }
.ghost-button { border: 1px solid var(--line-bright); color: var(--text); background: #100e18; }
.lime-button:hover, .ghost-button:hover { transform: translateY(-2px); }

.signal-board { display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; }
.signal-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(21,18,31,.96), rgba(11,10,17,.96)); box-shadow: 0 28px 70px rgba(0,0,0,.18); }
.panel-head { min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: #b4adbf; font: 800 .69rem/1 var(--pixel); letter-spacing: .12em; }
.panel-head span { display: flex; align-items: center; gap: 9px; }
.panel-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(186,255,42,.65); }
.panel-head b { color: #6f687d; font-size: .64rem; }
.callout-panel { padding-bottom: 22px; }
.callout-user { margin: 24px 22px 0; display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; display: block; flex: 0 0 44px; border: 1px solid var(--line-bright); border-radius: 9px; background: transparent; object-fit: contain; object-position: center; image-rendering: pixelated; }
.callout-user div { display: grid; gap: 5px; }
.callout-user strong { font: 800 .9rem/1 var(--pixel); }
.callout-user small { color: var(--muted); }
.callout-text { margin: 26px 22px; font-size: clamp(1.15rem, 2.6vw, 1.7rem); line-height: 1.45; }
.callout-text strong { color: var(--lime); }
.contract-row { margin: 0 22px; display: flex; border: 1px solid var(--line-bright); border-radius: 9px; overflow: hidden; background: #09080f; }
.contract-row code { flex: 1; min-width: 0; padding: 13px; overflow: hidden; text-overflow: ellipsis; color: #bfb8cc; font: 700 .74rem/1 var(--pixel); white-space: nowrap; }
.contract-row button { padding: 0 14px; border: 0; border-left: 1px solid var(--line-bright); background: var(--lime); color: #10120d; font: 900 .7rem/1 var(--pixel); cursor: pointer; }
.microcopy { margin: 10px 22px 0; color: #716a7f; font-size: .79rem; }
.featured-art { width: 100%; aspect-ratio: 1.45; padding: 0; border: 0; background: #252032; cursor: pointer; overflow: hidden; }
.featured-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; transition: transform .18s ease; }
.featured-art:hover img { transform: scale(1.025); }
.featured-foot { min-height: 62px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.featured-foot div { display: grid; gap: 4px; }
.featured-foot small { color: var(--muted); font: 700 .6rem/1 var(--pixel); letter-spacing: .12em; }
.featured-foot strong { font: 900 .82rem/1 var(--pixel); }
.featured-foot button { padding: 9px 12px; border: 1px solid var(--line-bright); border-radius: 8px; background: transparent; color: var(--text); font: 800 .7rem/1 var(--pixel); cursor: pointer; }
.hero-stats { margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; background: rgba(15,13,22,.9); }
.hero-stats div { padding: 20px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats dt { color: var(--muted); font: 700 .64rem/1 var(--pixel); letter-spacing: .14em; }
.hero-stats dd { margin: 5px 0 0; font: 900 1.7rem/1 var(--pixel); }
.hero-stats span { color: #716a7f; font-size: .78rem; }

.collection, .how, .faq { padding-top: 110px; scroll-margin-top: 60px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.section-heading h2 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 1; letter-spacing: -.07em; }
.section-heading > div > p:last-child, .section-heading.compact > p { max-width: 560px; color: var(--muted); line-height: 1.6; }
.collection-tools { display: flex; gap: 10px; }
.search-box, .sort-box { min-height: 48px; display: flex; align-items: center; border: 1px solid var(--line-bright); border-radius: 10px; background: #100e18; }
.search-box { width: min(330px, 45vw); }
.search-box span { padding-left: 14px; color: var(--lime); font: 900 1rem/1 var(--pixel); }
.search-box input, .sort-box select { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input { padding: 0 13px; }
.sort-box { padding-left: 12px; color: var(--muted); font-size: .75rem; }
.sort-box select { padding: 0 32px 0 10px; height: 46px; }
.gallery-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.filters-panel { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(15,13,22,.95); scrollbar-width: thin; }
.filters-title { min-height: 50px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font: 900 .7rem/1 var(--pixel); letter-spacing: .12em; }
.filters-title button { border: 0; background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; }
.filters-panel fieldset { margin: 0; padding: 18px 15px; border: 0; border-bottom: 1px solid var(--line); }
.filters-panel legend { margin-bottom: 12px; font: 900 .77rem/1 var(--pixel); }
.filters-panel label { padding: 7px 0; display: flex; align-items: center; gap: 9px; color: #b2abbf; font-size: .84rem; cursor: pointer; }
.filters-panel input { width: 16px; height: 16px; accent-color: var(--lime); }
.filters-panel label b { margin-left: auto; color: #6e6879; font-weight: 500; }
.result-bar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 700 .7rem/1 var(--pixel); letter-spacing: .1em; }
.result-bar strong { color: var(--text); }
.result-bar strong span { color: var(--lime); }
.nft-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nft-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: transform .16s ease, border-color .16s ease; }
.nft-card:hover { transform: translateY(-3px); border-color: var(--line-bright); }
.nft-card button { width: 100%; padding: 0; border: 0; background: #201b2b; cursor: pointer; }
.nft-card img { width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; }
.nft-meta { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nft-meta div { min-width: 0; display: grid; gap: 5px; }
.nft-meta strong { font: 900 .83rem/1 var(--pixel); }
.nft-meta span { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.rarity-pill { flex: 0 0 auto; padding: 6px 7px; border-radius: 6px; color: #14110a; background: var(--lime); font: 900 .57rem/1 var(--pixel); text-transform: uppercase; }
.rarity-pill[data-tier="Mythic"], .rarity-pill[data-tier="Legendary"] { color: #fff; background: #6f38c6; }
.rarity-pill[data-tier="Rare"] { background: #3fd9da; }
.rarity-pill[data-tier="Uncommon"] { background: #f1b84b; }
.gallery-footer { padding: 26px 0 0; display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--muted); font-size: .8rem; }
.load-more { min-height: 44px; padding: 0 16px; border: 1px solid var(--lime); border-radius: 9px; background: var(--lime); color: #10120d; font: 900 .72rem/1 var(--pixel); cursor: pointer; }
.empty-state { padding: 50px 0; color: var(--muted); text-align: center; }

.section-heading.compact { align-items: center; }
.steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.steps li { min-height: 230px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: linear-gradient(150deg, rgba(21,18,31,.95), rgba(10,9,15,.95)); }
.steps li:last-child { border-right: 0; }
.steps > li > span { color: var(--lime); font: 900 .72rem/1 var(--pixel); }
.steps h3 { margin-bottom: 12px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.faq { padding-bottom: 110px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; font: 800 .95rem/1.3 var(--pixel); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--lime); font-size: 1.2rem; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { max-width: 760px; margin: -3px 0 22px; color: var(--muted); line-height: 1.65; }

.site-footer { min-height: 100px; padding: 24px max(20px, calc((100vw - 1220px)/2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--line); background: #07070b; }
.site-footer p, .site-footer > span { color: var(--muted); font-size: .76rem; }
.site-footer > span { justify-self: end; }

dialog { width: min(780px, calc(100% - 28px)); padding: 0; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 30px 100px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(4,3,7,.78); backdrop-filter: blur(8px); }
#nftDialog[open] { display: grid; grid-template-columns: 1fr .9fr; }
#nftDialog > img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.dialog-copy { padding: 42px 30px; }
.dialog-copy > p, .mint-dialog > p:first-of-type { color: var(--lime); font: 800 .67rem/1 var(--pixel); letter-spacing: .12em; }
.dialog-copy h2, .mint-dialog h2 { margin: 10px 0 24px; font-size: 1.9rem; }
.trait-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.trait-chips span { padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; color: #bcb4c9; background: #0c0b12; font-size: .69rem; }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border: 1px solid var(--line-bright); border-radius: 8px; background: rgba(9,8,15,.82); color: #fff; cursor: pointer; }
.mint-dialog { max-width: 500px; padding: 42px; text-align: center; }
.mint-dialog .status-light { display: block; margin: 0 auto 18px; }
.mint-dialog > p:last-of-type { color: var(--muted); line-height: 1.65; }
.dialog-action { margin: 12px auto 0; border: 0; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .signal-board { grid-template-columns: 1fr; }
  .featured-art { aspect-ratio: 1.8; }
  .nft-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li { border-bottom: 1px solid var(--line); }
  .steps li:nth-child(n+3) { border-bottom: 0; }
}

@media (max-width: 740px) {
  .site-header { height: 58px; padding: 0 12px; }
  .wordmark span { font-size: 1rem; }
  .header-actions .icon-link { display: none; }
  .wallet-button { min-height: 36px; padding: 0 10px; }
  .section-shell { width: min(100% - 24px, 1220px); }
  .hero { padding-top: 55px; }
  h1 { font-size: clamp(2.45rem, 14vw, 4.1rem); }
  .hero-buttons { flex-direction: column; }
  .featured-art { aspect-ratio: 1.15; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(2) { border-right: 0; }
  .hero-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .collection, .how, .faq { padding-top: 80px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .collection-tools { flex-direction: column; }
  .search-box { width: 100%; }
  .gallery-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; max-height: none; }
  .filters-panel fieldset { display: none; }
  .filters-panel.open fieldset { display: block; }
  .filters-title { cursor: pointer; }
  .nft-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .nft-meta { padding: 9px; }
  .rarity-pill { display: none; }
  .gallery-footer { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 170px; border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .steps li:last-child { border-bottom: 0 !important; }
  .section-heading.compact { align-items: stretch; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer .wordmark, .site-footer > span { justify-self: center; }
  #nftDialog[open] { grid-template-columns: 1fr; max-height: 90vh; overflow: auto; }
  #nftDialog > img { aspect-ratio: 1; }
  .dialog-copy { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .001ms !important; } }
