:root {
  --bg: #1a1410;
  --ink: #f7f0e6;
  --muted: #a89888;
  --soft: #d4c4b0;
  --accent: #e8a07a;
  --accent2: #c4785a;
  --card: rgba(40, 30, 24, 0.75);
  --line: rgba(247, 240, 230, 0.12);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
img {
  display: block;
  max-width: 100%;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(232, 160, 122, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(196, 120, 90, 0.12), transparent 50%),
    var(--bg);
}

.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.92), rgba(26, 20, 16, 0.55) 80%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.brand em {
  font-style: normal;
  color: var(--accent);
}
.top-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pill {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(0, 0, 0, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s var(--ease), opacity 0.15s ease, box-shadow 0.15s ease;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.main {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a100c;
  box-shadow: 0 12px 36px rgba(196, 120, 90, 0.35);
}
.btn.main:not(:disabled):hover {
  transform: translateY(-1px);
}
.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
}
.btn.ghost:hover {
  color: var(--ink);
  border-color: rgba(247, 240, 230, 0.25);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  padding: 1.5rem 0 3rem;
  align-items: center;
}
.hero-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.hero-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.hero-gallery img:nth-child(2) {
  transform: translateY(18px);
}
.hero-gallery img:nth-child(3) {
  transform: translateY(-10px);
}
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.lede {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.mint-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(14px);
}
.mint-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.price {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
}
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.mint-status {
  min-height: 1.3em;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--accent);
}
.fine {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.fine code {
  font-size: 0.7rem;
  color: var(--soft);
}

.gallery-sec,
.bag {
  padding: 1rem 0 2.5rem;
}
.sec-head {
  margin-bottom: 1rem;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.8rem;
}
.sec-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.chip.active,
.chip:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(232, 160, 122, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 160, 122, 0.4);
}
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #2a221c;
}
.card-body {
  padding: 0.7rem 0.8rem 0.85rem;
}
.card-body strong {
  display: block;
  font-size: 0.92rem;
}
.card-body span {
  font-size: 0.78rem;
  color: var(--muted);
}
.rarity {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rarity.Common {
  background: #555;
  color: #eee;
}
.rarity.Uncommon {
  background: #2d6a4f;
  color: #d8f3dc;
}
.rarity.Rare {
  background: #1d4e89;
  color: #dbeafe;
}
.rarity.Legendary {
  background: #b45309;
  color: #ffedd5;
}

.load-more {
  display: block;
  margin: 1.25rem auto 0;
}

.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}
.dot {
  opacity: 0.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 1rem;
}
.modal[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #241c17;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.modal-card img {
  width: 100%;
  border-radius: 14px;
}
.modal-card h3 {
  margin: 0.85rem 0 0.4rem;
  font-family: var(--display);
}
.modal-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}
.modal-card li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}
.modal-x {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  font-size: 1.3rem;
  z-index: 2;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-gallery {
    order: -1;
    max-width: 420px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .mint-row {
    grid-template-columns: 1fr 1fr;
  }
  .mint-row > :last-child {
    grid-column: 1 / -1;
  }
}
