*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080808;
  --surface:   #111111;
  --surface2:  #181818;
  --border:    #222222;
  --border2:   #2e2e2e;
  --accent:    #f0e040;
  --accent-glow: rgba(240,224,64,0.18);
  --orange:    #ff6b35;
  --text:      #f0ece0;
  --muted:     #777;
  --muted2:    #555;
  --radius:    16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  gap: 16px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a08;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px 36px;
  width: 100%;
  border-radius: 12px;
  letter-spacing: -0.01em;
}
.btn-primary:hover:not(:disabled) {
  background: #f5e840;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(240,224,64,0.25);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary.loading { opacity: 0.65; cursor: wait; }

.btn-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  font-size: 1.3rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Ticker ──────────────────────────────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: var(--accent);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ticker {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
  width: max-content;
}
.ticker span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0a0a08;
}
.ticker .sep { opacity: 0.4; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Main ────────────────────────────────────────────────────────────── */
main { flex: 1; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px 100px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: start;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 24px;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  padding: 0 32px 0 0;
}
.stat:first-child { padding-left: 0; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border2);
  margin-right: 32px;
}

/* ── Mint Card ───────────────────────────────────────────────────────── */
.mint-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 32px;
  position: sticky;
  top: 84px;
}

.mint-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 24px;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: pulse-green 2s ease infinite;
  flex-shrink: 0;
}
@keyframes pulse-green {
  0%  { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.progress-section { margin-bottom: 28px; }
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}

.mint-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.amount-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 12px 16px;
  width: 100%;
  justify-content: space-between;
}
.amount-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.amount {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-width: 48px;
  text-align: center;
}
.amount-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.wallet-limit {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.tx-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  word-break: break-all;
  line-height: 1.5;
}
.tx-status.hidden { display: none; }
.tx-status.pending { background: rgba(240,224,64,0.08); border: 1px solid rgba(240,224,64,0.25); color: var(--accent); }
.tx-status.success { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25); color: #4ade80; }
.tx-status.error   { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); color: #f87171; }

.mint-footnote {
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted2);
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* ── Sections ────────────────────────────────────────────────────────── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px;
  border-top: 1px solid var(--border);
}

.section-header {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border2);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.section p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* ── Gallery ─────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.nft-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}
.nft-card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.nft-image-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.nft-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tier-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.tier-COMMON     { background: rgba(120,120,120,0.7); color: #ccc; }
.tier-UNCOMMON   { background: rgba(74,222,128,0.2);  color: #4ade80; border: 1px solid rgba(74,222,128,0.4); }
.tier-RARE       { background: rgba(96,165,250,0.2);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.4); }
.tier-LEGENDARY  { background: rgba(251,191,36,0.2);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.5); }

.nft-info {
  padding: 14px 16px;
}
.nft-id {
  font-size: 0.7rem;
  color: var(--muted2);
  margin-bottom: 3px;
  font-weight: 500;
}
.nft-art {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nft-bathroom {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Traits Grid ─────────────────────────────────────────────────────── */
.traits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trait-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}
.trait-card:hover { border-color: var(--border2); }

.trait-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.trait-emoji { font-size: 1.6rem; }
.trait-count {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.trait-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.trait-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* ── On-chain Section ────────────────────────────────────────────────── */
.onchain-section {
  background: var(--surface);
  max-width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}

.onchain-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 64px;
  align-items: center;
}

.onchain-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.onchain-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.onchain-text strong { color: var(--text); }

.chain-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.chain-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text);
}
.chain-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Code Block ──────────────────────────────────────────────────────── */
.code-block {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius);
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}
.code-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.code-dot.red    { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green  { background: #27c93f; }
.code-title {
  font-size: 0.8rem;
  color: #8b949e;
  margin-left: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.code-block pre {
  padding: 24px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #c9d1d9;
  overflow-x: auto;
}
.kw  { color: #ff7b72; }
.fn  { color: #d2a8ff; }
.cm  { color: #8b949e; font-style: italic; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 780px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] { border-color: var(--border2); }
.faq-item p {
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {}
.footer-tagline {
  font-size: 0.82rem;
  color: var(--muted2);
  margin-top: 4px;
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

/* ── Wallet badge ────────────────────────────────────────────────────── */
.wallet-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.wallet-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1fr; gap: 48px; }
  .mint-card { position: static; max-width: 480px; }
  .onchain-grid { grid-template-columns: 1fr; gap: 40px; }
  .traits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  header { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero { padding: 48px 20px 60px; }
  .section { padding: 56px 20px; }
  .onchain-grid { padding: 0 20px; }
  footer { padding: 24px 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .traits-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-stats { gap: 0; }
  .stat { padding: 0 20px 0 0; }
  .stat-divider { margin-right: 20px; }
}
