/* ───────────────────────── BEERZ — stile condiviso (d00ds-style) ─────────────────────────
   Minimal monocromo: Inter, bianco/nero, dark mode, header fisso con blur,
   nav maiuscoletto, bottoni a pillola, titoli giganti in minuscolo. */

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --secondary: #f5f5f5;
  --muted: #737373;
  --border: #ebebeb;
  --green: #34d399;
  --red: #ef4444;
  --radius: 12px;
}
html.dark {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --secondary: #1f1f1f;
  --muted: #8c8c8c;
  --border: #242424;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  padding: 0 0 96px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
.wrap { max-width: 768px; margin: 0 auto; padding: 128px 24px 0; }
a { color: var(--fg); text-decoration: none; }
a:hover { opacity: .7; }
p a, .faq a, .tl-detail a, .meta-item a { text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Header fisso ───────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color .3s;
}
@media (min-width: 640px) { .topnav { padding: 0 40px; } }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover;
  background: var(--secondary);
}
.topnav .links {
  display: none;
  align-items: center; gap: 24px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
@media (min-width: 768px) { .topnav .links { display: flex; } }
.topnav .links a {
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg);
  transition: opacity .15s;
}
.topnav .links a:hover { opacity: .6; }
.topnav .links a.active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.topnav .links a:not(.active) { opacity: .85; }
.topnav .actions { display: flex; align-items: center; gap: 8px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--fg); color: var(--bg);
  border: none; border-radius: 50%;
  cursor: pointer;
  transition: opacity .15s, background-color .3s, color .3s;
}
.iconbtn:hover { opacity: .8; }
.iconbtn svg { width: 14px; height: 14px; }
.pill, a.pill {
  display: none;
  background: var(--fg); color: var(--bg);
  font-size: 12px; font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  transition: opacity .15s, background-color .3s, color .3s;
  white-space: nowrap;
}
.pill:hover { opacity: .8; }
@media (min-width: 640px) { .pill, a.pill { display: inline-block; } }
.iconbtn.menu { display: inline-flex; }
@media (min-width: 768px) { .iconbtn.menu { display: none; } }

/* ───────── Menu mobile ───────── */
.mobilemenu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 49;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.mobilemenu.open { display: block; }
.mobilemenu a {
  display: block;
  padding: 14px 24px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.mobilemenu a:last-child { border-bottom: none; }
.mobilemenu a:hover { background: var(--secondary); opacity: 1; }

/* ───────── Impostazioni (API key) ───────── */
.settings {
  display: none;
  position: fixed; top: 72px; right: 16px; z-index: 60;
  width: min(420px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  padding: 18px 20px;
}
.settings.open { display: block; }
.settings label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.settings input {
  width: 100%;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  font-family: inherit;
}
.settings input:focus { border-color: var(--fg); }
.settings .note { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ───────── Hero / titoli ───────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 64px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(56px, 12vw, 96px);
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: lowercase;
}
.hero .tag {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .025em;
}
.hero-img {
  margin-top: 40px;
  width: min(280px, 100%);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  display: block;
}
.page-title {
  font-weight: 700;
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: -.03em;
  line-height: 1.05;
  text-align: center;
  text-transform: lowercase;
  margin-bottom: 12px;
}
.page-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .025em;
  margin-bottom: 48px;
}
.section-title {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  margin: 64px 0 20px;
}

/* ───────── Manifesto (home) ───────── */
.manifesto { width: 100%; text-align: left; margin-top: 64px; }
.manifesto h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 24px; }
.manifesto section { margin-bottom: 28px; }
.manifesto h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.manifesto p {
  font-size: 14px; line-height: 1.65;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
  margin-bottom: 8px;
}
.manifesto ul, .manifesto ol {
  padding-left: 20px;
  font-size: 14px; line-height: 1.8;
  color: color-mix(in srgb, var(--fg) 70%, transparent);
}

/* ───────── Supply pill ───────── */
.supply-pill {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 28px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--secondary);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.supply-pill .bar {
  width: 110px; height: 4px; border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.supply-pill .bar i {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  background: var(--fg);
  transition: width .8s cubic-bezier(.2,.7,.2,1);
}
.supply-pill b { color: var(--fg); font-weight: 600; letter-spacing: 0; }

/* ───────── Bottoni ───────── */
button.cta, a.cta {
  display: inline-block;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--bg) !important;
  background: var(--fg);
  border: none; border-radius: 999px;
  padding: 12px 26px;
  cursor: pointer;
  transition: opacity .15s, background-color .3s, color .3s;
  text-align: center;
}
button.cta:hover, a.cta:hover { opacity: .8; }
button.cta:disabled { opacity: .5; cursor: wait; }
a.ghost {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 24px;
  transition: background-color .15s;
}
a.ghost:hover { background: var(--secondary); opacity: 1; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ───────── Card di ricerca (explorer) ───────── */
.search-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 22px;
}
.search-card label.title {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.search-row { display: flex; gap: 10px; }
.id-field {
  flex: 1;
  display: flex; align-items: center;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  transition: border-color .2s;
}
.id-field:focus-within { border-color: var(--fg); }
.id-field .hash {
  font-size: 22px; font-weight: 700;
  letter-spacing: -.02em;
  color: var(--muted);
  margin-right: 8px;
}
.id-field input {
  width: 100%;
  background: none; border: none; outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 24px; font-weight: 700;
  letter-spacing: -.02em;
  padding: 12px 0;
  -moz-appearance: textfield; appearance: textfield;
}
.id-field input::-webkit-outer-spin-button,
.id-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.id-field input::placeholder { color: var(--muted); opacity: .5; }
.search-row button.cta { padding: 0 26px; }
.search-hint {
  margin-top: 14px;
  font-size: 12px; color: var(--muted);
  text-align: center;
}

/* ───────── Status / spinner ───────── */
.status {
  text-align: center;
  margin: 28px auto 0;
  max-width: 520px;
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
}
.status.error {
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: 12px;
  padding: 14px 18px;
}
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--fg);
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 9px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Scheda NFT (explorer) ───────── */
.nft-card {
  display: none;
  margin-top: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  animation: fadeup .5s cubic-bezier(.2,.7,.2,1);
}
.nft-card.visible { display: block; }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.nft-top { display: flex; gap: 32px; flex-wrap: wrap; }
.nft-img-frame { position: relative; flex-shrink: 0; }
.nft-img {
  width: 280px; height: 280px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  background: var(--secondary);
  display: block;
}
.nft-info { flex: 1; min-width: 240px; }
.nft-info h2 {
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.nft-info .desc {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 20px;
  line-height: 1.6;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.meta-item {
  background: var(--secondary);
  border-radius: 10px;
  padding: 11px 14px;
}
.meta-item .k {
  font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.meta-item .v { font-size: 14px; font-weight: 500; }
.traits { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.trait {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
}
.trait .tname { color: var(--muted); margin-right: 6px; }
.trait .tval { font-weight: 600; }

/* ───────── Statistiche ───────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 28px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.stat .num {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
}
.stat .lbl {
  margin-top: 5px;
  font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

/* ───────── Timeline ───────── */
h3.section {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.02em;
  margin: 40px 0 22px;
}
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.tl-item { position: relative; padding: 0 0 26px 12px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot {
  position: absolute; left: -27px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--bg);
}
.tl-dot.mint { background: var(--green); }
.tl-dot.sale { background: var(--fg); }
.tl-dot.transfer { background: var(--muted); }
.tl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tl-label { font-weight: 600; font-size: 14px; }
.tl-label.mint { color: var(--green); }
.tl-label.sale { color: var(--fg); }
.tl-label.transfer { color: var(--muted); }
.tl-date { font-size: 12px; color: var(--muted); }
.tl-price {
  margin-left: auto;
  font-weight: 700; font-size: 16px;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.tl-detail { margin-top: 5px; font-size: 13px; color: var(--muted); }
.tl-detail .arrow { margin: 0 7px; opacity: .6; }
.tl-detail .tx { margin-left: 10px; font-size: 12px; }
.tl-token { font-weight: 600; }

/* ───────── Galleria ───────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.g-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  transition: transform .15s, box-shadow .15s;
}
.g-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  opacity: 1;
}
.g-card img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block;
  background: var(--secondary);
}
.g-card .g-body { padding: 10px 12px; }
.g-card .g-name { font-weight: 600; font-size: 13px; }
.g-card .g-id { margin-top: 2px; font-size: 11px; color: var(--muted); }
.load-more-row { text-align: center; margin-top: 28px; }

/* ───────── FAQ / info ───────── */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 16px 4px;
}
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ───────── Stato vuoto ───────── */
.empty-state {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px 30px;
}
.empty-state .big { font-size: 40px; }
.empty-state h3 {
  font-weight: 700; font-size: 22px;
  letter-spacing: -.02em;
  margin: 14px 0 8px;
}
.empty-state p { color: var(--muted); font-size: 14px; max-width: 420px; margin: 0 auto; line-height: 1.6; }
.empty-state .hero-cta { margin-top: 24px; }

/* ───────── Footer ───────── */
footer {
  margin-top: 96px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
  padding: 0 24px;
}
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer .dot { margin: 0 10px; opacity: .5; }

@media (max-width: 640px) {
  .wrap { padding-top: 104px; }
  .nft-card { padding: 22px; }
  .nft-img { width: 100%; height: auto; aspect-ratio: 1; }
  .nft-img-frame { width: 100%; }
  .tl-price { margin-left: 0; width: 100%; }
}
