:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --maxw: 1200px;
  --radius: 8px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 1px; }
.brand-logo { width: 28px; height: 28px; }
.brand-name { font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { font-size: 13px; letter-spacing: 1px; }

/* wallet chip (shown after connect, next to logo) */
.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #0a0a0a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: #fff;
}
.wallet-chip:hover { background: #1a1a1a; text-decoration: none; }
.wallet-chip .w-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

/* connect button + dropdown */
.connect-wrap { position: relative; display: inline-flex; }
.connect-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: #0a0a0a;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  display: none;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}
.connect-menu.open { display: block; }
.cm-account { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cm-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.cm-addr { font-size: 13px; font-weight: 700; word-break: break-all; }
.cm-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.cm-row-label { color: var(--muted); }
.cm-row-value { font-weight: 700; }
.cm-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cm-btn {
  text-align: left;
  background: #000;
  border: 1px solid var(--line-strong);
  color: #fff;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
}
.cm-btn:hover { background: #1a1a1a; }
.cm-btn-danger { color: #ff7777; border-color: #5a2a2a; }
.cm-btn-danger:hover { background: #2a0a0a; color: #ff9999; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}
.btn:hover { background: #fff; color: #000; text-decoration: none; }
.btn-primary { background: #fff; color: #000; border-color: #fff; }
.btn-primary:hover { background: #e6e6e6; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; padding: 14px 18px; }

.btn-buy-inline {
  background: rgba(0,0,0,0.85);
  color: #fff !important;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid #fff;
}
.btn-buy-inline:hover { background: #000; color: #fff !important; text-decoration: none; }

/* Hero layout */
.hero-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 28px;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: start;
}
.hero-col-left { position: sticky; top: 88px; }
.hero-col-right { min-width: 0; }

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0a0a0a;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  background: #0a0a0a;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  pointer-events: none;
}

/* Right column */
.hero-status {
  margin: 0 0 8px;
  color: #d0d0d0;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.hero-sub {
  margin: 0 0 20px;
  color: #cfcfcf;
  font-size: 13.5px;
}

/* Progress */
.progress { margin: 0 0 22px; }
.progress-bar {
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #0a0a0a;
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: #fff;
}
.progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Mint card */
.mint-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  background: #0a0a0a;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.row:last-of-type { border-bottom: none; }
.row-label { color: #cfcfcf; letter-spacing: 0.5px; }
.row-value { text-align: right; }
.total-row { font-size: 16px; padding-top: 14px; }

.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  justify-content: flex-end;
}
.qty-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: linear-gradient(to right, #fff 0%, #fff var(--p, 0%), #2a2a2a var(--p, 0%), #2a2a2a 100%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.qty-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
}
.qty-controls input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
}
.qty-value { min-width: 24px; text-align: right; font-size: 14px; }

.soldout-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.wallet-note {
  margin: 12px 0;
  padding: 8px 10px;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
}
.wallet-note a { color: #fff; text-decoration: underline; }

.btn.is-loading { opacity: 0.7; cursor: progress; }
.btn.is-disabled { opacity: 0.4; cursor: not-allowed; }
.btn.is-disabled:hover { background: var(--line-strong); color: var(--muted); }
.mint-label { flex: 0 0 auto; }

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 28px;
  text-align: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-footer p { margin: 6px 0; font-size: 13px; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: #0a0a0a;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  width: min(420px, 92vw);
  z-index: 1;
}
.modal-card h3 { margin: 0 0 10px; font-size: 18px; }
.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.wallet-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #000;
  border: 1px solid var(--line-strong);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}
.wallet-btn:hover { background: #1a1a1a; }
.w-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* Responsive */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-col-left { position: static; max-width: 480px; margin: 0 auto; width: 100%; }
  .hero-wrap { padding: 20px 16px; }
  .site-header { padding: 14px 16px; }
  .site-nav { gap: 10px; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}