:root {
  --indigo-900: #0e1640;
  --indigo-700: #1f2c7a;
  --indigo-500: #3a4bd1;
  --blue-400:   #3f8efc;
  --ink:        #11142b;
  --muted:      #5b627a;
  --line:       #e3e6f1;
  --bg:         #f6f8ff;
  --card:       #ffffff;
  --accent:     #1f8eff;
  --success:    #128a5b;
  --danger:     #c0392b;
  --radius:     14px;
  --shadow-sm:  0 1px 2px rgba(15,23,75,.06), 0 1px 4px rgba(15,23,75,.06);
  --shadow-md:  0 4px 14px rgba(15,23,75,.10);
  --shadow-lg:  0 16px 48px rgba(15,23,75,.18);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--indigo-500); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, 92%); margin: 0 auto; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.small { font-size: 13px; color: var(--muted); }
.micro { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; }
.primary-nav { display: flex; gap: 22px; }
.primary-nav a { color: var(--ink); font-weight: 500; font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .04s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--indigo-700), var(--accent)); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); text-decoration: none; }
.btn-secondary { background: #fff; color: var(--indigo-700); border-color: var(--indigo-500); }
.btn-secondary:hover { background: #eef2ff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--indigo-700); border-color: var(--line); }
.btn-ghost:hover { background: #f0f3ff; text-decoration: none; }
.btn-sm { padding: 8px 13px; font-size: 14px; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 64px 0 32px; text-align: center; }
.hero .kicker { text-align: center; }
.hero .hero-cta { justify-content: center; }
.kicker { color: var(--indigo-700); font-weight: 700; letter-spacing: .14em; font-size: 12px; margin: 0 0 14px; text-transform: uppercase; }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); line-height: 1.1; margin: 0 auto 18px; letter-spacing: -.02em; max-width: 20ch; }
.hero h1 .accent { background: linear-gradient(135deg, var(--indigo-500), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--muted); max-width: 64ch; font-size: 17px; margin: 0 auto 24px; text-align: center; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-sub { margin: 16px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.hero-sub a { color: var(--indigo-700); }

/* Sections */
section { padding: 56px 0; scroll-margin-top: 80px; }
#marketplace, #how-it-works, #sell, #custom { padding-top: 72px; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 8px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); max-width: 70ch; margin: 0; }

/* Marketplace grid */
.marketplace { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

.listing {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.listing:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #c9d1ec; }
.listing .thumb { aspect-ratio: 1 / 1; background: #f3f5ff; }
.listing .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing.is-art .thumb { aspect-ratio: 3 / 2; max-height: 230px; background: #15171f; }
.listing.is-art .thumb img { object-fit: contain; }
.listing .thumb { position: relative; }
.sold-ribbon { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; box-shadow: var(--shadow-md); }
.listing.is-sold .thumb img { opacity: .72; }
.listing.is-sold { opacity: .96; }
.btn-sold { background: #eef0f6; color: var(--muted); border-color: var(--line); cursor: default; flex: 1; }
.sold-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #ffffff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 22px; box-shadow: var(--shadow-sm); font-size: 14px; color: var(--ink); }
.sold-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(18,138,91,.18); flex: none; }
.sold-strip .sales { color: var(--muted); }
.sold-strip strong { color: var(--indigo-700); }
.listing .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.listing h3 { margin: 0; font-size: 18px; }
.listing .artist { margin: 0; font-size: 13px; color: var(--indigo-700); font-style: italic; font-weight: 600; }
.listing .seller { margin: 0; font-size: 12px; color: var(--muted); }
.listing .seller strong { color: var(--indigo-700); font-weight: 700; }
.listing .summary { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.listing .chain-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip { display: inline-block; font-size: 11px; color: var(--indigo-700); background: #eef2ff; padding: 3px 9px; border-radius: 999px; font-weight: 600; letter-spacing: .02em; }
.listing .price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; gap: 8px; }
.listing .price-row .price-label { font-size: 12px; color: var(--muted); }
.listing .price-row .price { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.listing .actions { display: flex; gap: 8px; margin-top: 12px; }
.listing .actions .btn { flex: 1; }

/* How */
.how .steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.how .steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo-700), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.how h3 { margin: 0 0 6px; font-size: 17px; }
.how p { margin: 0; color: var(--muted); font-size: 14px; }

/* Custom */
.custom { background: linear-gradient(180deg, #ffffff, #eef2ff); border-top: 1px solid var(--line); }
.sell { background: #f6f8ff; border-top: 1px solid var(--line); }
.mint { background: linear-gradient(180deg, #eef2ff, #ffffff); border-top: 1px solid var(--line); }
.mint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 36px; }
.mint-tile { display: flex; flex-direction: column; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; padding: 0; font: inherit; color: inherit; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
.mint-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--indigo-500); }
.mint-tile.is-selected { border-color: var(--indigo-700); box-shadow: 0 0 0 2px var(--indigo-500), var(--shadow-md); }
.mint-tile .mt-img { display: block; aspect-ratio: 16 / 10; background: #f3f5ff; }
.mint-tile .mt-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mint-tile .mt-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.mint-tile .mt-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.mint-tile .mt-desc { font-size: 13px; color: var(--muted); flex: 1; }
.mint-tile .mt-cta { font-size: 13px; font-weight: 700; color: var(--indigo-700); margin-top: 4px; }
.mint-form-title { font-size: 20px; margin: 0 0 14px; color: var(--ink); }
.mint-link-row { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.mint-link-row p { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; margin: 0; }
.mint-wrap { max-width: 620px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.check-line input { margin-top: 2px; }
.contact-form { max-width: 620px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--indigo-500); outline-offset: 1px; border-color: var(--indigo-500); }
.form-status { font-size: 13px; color: var(--success); margin: 10px 0 0; }

/* Footer */
.site-footer { background: #0b1230; color: #c3c9e2; padding: 28px 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { color: #8a93b8; }

/* 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(11, 18, 48, .55); }
.modal-panel { position: relative; background: #fff; border-radius: 16px; padding: 22px; width: min(420px, 90%); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); font-size: 14px; }
.modal-panel h2 { font-size: 19px; }
.modal-panel .field input, .modal-panel .field select { padding: 8px 10px; font-size: 14px; }
.modal-panel .field { margin-bottom: 9px; }
.modal-close { position: absolute; top: 12px; right: 12px; background: transparent; border: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.modal h2 { margin: 0 0 10px; }
.modal .modal-summary { color: var(--muted); margin: 0 0 18px; }
.order-total { display: flex; justify-content: space-between; padding: 12px 14px; background: #f3f5ff; border-radius: 10px; margin: 8px 0 14px; }
.pay-section-label { font-size: 14px; font-weight: 700; color: var(--indigo-700); margin: 18px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.pay-error { background: #feebeb; border: 1px solid #f5c2c2; color: #b91c1c; padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.pay-error a { color: #991b1b; text-decoration: underline; font-weight: 600; }
.copyright-note { font-size: 12.5px; font-weight: 600; color: var(--indigo-700); margin: 4px 0 0; }
.pay-success { background: #e9f9ef; border: 1px solid #b7e6c8; color: #166534; padding: 14px 16px; border-radius: 8px; font-size: 14px; line-height: 1.55; }
.pay-success a { color: #166534; font-weight: 600; }
.order-total strong { font-size: 20px; color: var(--ink); }

@media (max-width: 720px) {
  .primary-nav { display: none; }
  .hero { padding-top: 36px; }
}
