/* ============================================================
   SHILLIN — 500 Unique Pixel Legends
   ============================================================ */

:root {
  --bg: #0d0a06;
  --bg-panel: #151009;
  --bg-panel-2: #1a130b;
  --border: #3d2c17;
  --border-soft: #2c2011;
  --orange: #f0862a;
  --orange-bright: #f79b3f;
  --orange-dim: #b05f1a;
  --text: #ece3d3;
  --muted: #b9a887;
  --muted-2: #8d7c5f;
  --green: #3fbf5a;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100vh;
}

#bg-speckles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

section { scroll-margin-top: 90px; }

canvas.pixel-avatar {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* ============ Buttons ============ */

.btn {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  border: none;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: translateY(2px); }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 5px;
  padding: 11px 20px;
  font-size: 13px;
}
.btn-outline:hover { background: rgba(240, 134, 42, .12); }

.btn-mint {
  background: var(--orange);
  color: #2b1503;
  border-radius: 5px;
  border-bottom: 3px solid var(--orange-dim);
}
.btn-mint:hover { filter: brightness(1.07); }
.btn-mint:disabled {
  cursor: default;
  filter: saturate(.4) brightness(.8);
  transform: none;
}
.btn-mint.is-minted {
  background: var(--green);
  border-bottom-color: #2a8a40;
  filter: none;
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 10, 6, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-box {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #c77b2e;
  flex: none;
}
.logo-box canvas,
.logo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

.logo-text {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 15px;
  color: var(--orange);
  letter-spacing: .02em;
}

.main-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 6px 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.nav-link:hover { color: var(--orange-bright); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link.is-active { color: var(--orange); }
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.btn-connect { white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.btn-connect.is-connected { color: var(--green); border-color: var(--green); }
.btn-connect.is-connected:hover { background: rgba(63, 191, 90, .1); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ Hero ============ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 36px 0 8px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  inset: -24%;
  background: radial-gradient(circle at 50% 48%,
    rgba(240, 134, 42, .32) 0%,
    rgba(240, 134, 42, .13) 26%,
    rgba(13, 10, 6, 0) 52%);
  pointer-events: none;
}

#hero-speckles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-img {
  position: relative;
  display: block;
  width: 88%;
  height: 84%;
  margin: 8% auto 8%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 30px rgba(240, 134, 42, .25));
  user-select: none;
  animation: art-in 1s cubic-bezier(.16, 1, .3, 1) .35s both;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, rgba(0, 0, 0, .55) 87%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 74%, rgba(0, 0, 0, .55) 87%, transparent 99%);
}

@keyframes art-in {
  from { opacity: 0; transform: translateY(4vh); }
  to   { opacity: 1; transform: none; }
}

/* staggered hero entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero-copy > * { animation: rise .7s cubic-bezier(.16, 1, .3, 1) both; }
.hero-copy > *:nth-child(1) { animation-delay: .1s; }
.hero-copy > *:nth-child(2) { animation-delay: .22s; }
.hero-copy > *:nth-child(3) { animation-delay: .34s; }
.hero-copy > *:nth-child(4) { animation-delay: .46s; }
.hero-copy > *:nth-child(5) { animation-delay: .58s; }
.hero-copy > *:nth-child(6) { animation-delay: .7s; }

@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-copy > * { animation: none; }
}

.hero-title {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: clamp(34px, 5.6vw, 74px);
  line-height: 1.05;
  letter-spacing: .01em;
  color: var(--orange);
  /* dithered two-tone pixel fill, like the original artwork */
  background:
    repeating-conic-gradient(#f5933a 0% 25%, #d9741f 0% 50%)
    0 0 / 7px 7px;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .55));
}

.hero-sub {
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: .14em;
  margin-top: 14px;
  color: var(--text);
}

.hero-tag {
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
  max-width: 560px;
}

.stat-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(21, 16, 9, .6);
  padding: 18px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  letter-spacing: .02em;
}

.btn-mint-hero {
  margin-top: 24px;
  width: 100%;
  max-width: 560px;
  padding: 20px 28px;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.btn-mint-hero .mint-arrow { margin-left: auto; font-size: 22px; }

.wallet-status {
  margin-top: 14px;
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(21, 16, 9, .6);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .1em;
}
.status-dot { display: inline-flex; }

/* ============ Panels ============ */

.panel {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(19, 14, 8, .6);
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.panel-icon { font-size: 18px; line-height: 1; }
.panel-icon.faq-icon {
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 16px;
}

canvas.pixel-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 22px;
  height: auto;
  flex: none;
}

.view-all {
  background: none;
  border: none;
  color: var(--orange);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.view-all:hover { color: var(--orange-bright); }

/* ============ Preview + Mint grid ============ */

.mid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.nft-card {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-panel-2);
  transition: transform .12s ease, border-color .12s ease;
}
.nft-card:hover {
  transform: translateY(-3px);
  border-color: var(--orange-dim);
}
.nft-card canvas,
.nft-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
}
.nft-card .card-name {
  display: block;
  text-align: center;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text);
  background: #100c07;
  border-top: 1px solid var(--border-soft);
}

/* ============ Mint panel ============ */

.mint-panel {
  align-self: start;
  position: sticky;
  top: 94px;
}

.mint-body { display: flex; flex-direction: column; }

.mint-label {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.mint-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 44px;
  color: var(--orange);
  line-height: 1;
  letter-spacing: .02em;
}

.mint-note {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 26px;
}

.qty-row {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  background: rgba(16, 12, 7, .8);
}

.qty-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  font-family: var(--font-mono);
  cursor: pointer;
  padding: 12px 0;
}
.qty-btn:hover { background: rgba(240, 134, 42, .12); color: var(--orange); }
.qty-btn:first-child { border-right: 1px solid var(--border); }
.qty-btn:last-child { border-left: 1px solid var(--border); }

.qty-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.btn-mint-panel { padding: 18px; font-size: 17px; }

.mint-meta {
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.mint-meta-left { display: flex; flex-direction: column; gap: 12px; }

.max-wallet {
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
}

.network {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
}

.sol-icon { opacity: .9; }

/* ============ Bottom grid ============ */

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) minmax(0, 1.15fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.bottom-col { display: flex; flex-direction: column; gap: 24px; }

.about-body p { color: var(--muted); font-size: 14px; }
.about-body p + p { margin-top: 16px; }
.about-body p:last-child { color: var(--text); }

/* FAQ */

.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--orange);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-align: left;
  padding: 14px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.faq-question:hover { color: var(--orange-bright); }

.faq-chevron {
  flex: none;
  transition: transform .2s ease;
  color: var(--orange);
}
.faq-item.is-open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}
.faq-item.is-open .faq-answer { max-height: 120px; }
.faq-answer p {
  padding: 0 4px 14px;
  color: var(--text);
  font-size: 13px;
}

/* Roadmap */

.roadmap-list { padding: 6px 4px; }

.roadmap-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

canvas.roadmap-icon {
  width: 52px;
  height: auto;
  flex: none;
  margin-top: 2px;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.5));
}

.roadmap-item h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--orange);
  margin-bottom: 6px;
}

.roadmap-item p { color: var(--muted); font-size: 14px; }

.roadmap-connector {
  width: 3px;
  height: 34px;
  margin: 8px 0 8px 26px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0 6px,
    transparent 6px 12px
  );
}

/* Whitelist */

.whitelist-sub {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 16px;
  color: var(--text);
}

.whitelist-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}

.wl-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--muted);
}

.wl-num {
  color: var(--muted-2);
  min-width: 26px;
  text-align: right;
  flex: none;
}

.wl-name { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wl-check { flex: none; display: inline-flex; }

/* ============ Footer ============ */

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
  background: rgba(13, 10, 6, .8);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand > div { display: flex; flex-direction: column; }

.footer-copy {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: .08em;
  margin-top: 2px;
}

.footer-made {
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: .12em;
  margin-top: 4px;
}
.footer-made a { color: var(--muted-2); text-decoration: none; }
.footer-made a:hover { color: var(--orange); }

.footer-socials { display: flex; gap: 28px; flex-wrap: wrap; }

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}
.social-link:hover { color: var(--orange); }

/* ============ Toast ============ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-panel-2);
  border: 1px solid var(--orange);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 12px 22px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 100;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.is-success { border-color: var(--green); color: var(--green); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1080px) {
  .mid-grid { grid-template-columns: 1fr; }
  .mint-panel { position: static; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .whitelist-panel { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
    text-align: center;
  }
  .hero-art { max-width: 420px; }
  .stats-row, .btn-mint-hero, .wallet-status { margin-left: auto; margin-right: auto; }

  .main-nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(13, 10, 6, .98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    margin-left: 0;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
    z-index: 49;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-link { padding: 14px 2px; border-bottom: 1px solid var(--border-soft); }
  .nav-link.is-active { border-bottom-color: var(--border-soft); }

  .hamburger { display: flex; }
  .header-inner { gap: 14px; }
  .logo { margin-right: auto; }
}

@media (max-width: 720px) {
  .bottom-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body { font-size: 14px; }
}

@media (max-width: 560px) {
  main { padding: 0 16px; }
  .header-inner { padding: 12px 16px; }
  .btn-connect { font-size: 11px; padding: 9px 12px; max-width: 150px; }
  .logo-text { font-size: 12px; }
  .logo-box { width: 38px; height: 38px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 24px; }
  .btn-mint-hero { font-size: 16px; padding: 17px 20px; }
  .panel { padding: 16px; }
  .mint-price { font-size: 36px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .whitelist-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   Kinetic layer — movement ported from the Robin Hood build
   ============================================================ */

::selection { background: var(--orange); color: #1c1005; }

/* code rain behind everything */
#code-rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* custom cursor — square pixel dot + trailing ring (desktop only) */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
#cursor-dot span {
  display: block;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--orange);
}
#cursor-ring span {
  display: block;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid var(--orange);
  transition: transform .35s cubic-bezier(.2, 1, .3, 1), background-color .35s;
}
#cursor-ring.is-hover span {
  transform: scale(1.7);
  background: rgba(240, 134, 42, .12);
}
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

/* marquee bands — full-bleed, edge to edge */
.mq {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  width: 100vw;
  margin: 8px 0 26px calc(50% - 50vw);
  background: rgba(19, 14, 8, .5);
  position: relative;
  z-index: 1;
}
.mq-track { display: inline-flex; will-change: transform; }
.mq-unit {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2vw, 24px);
  line-height: 1.3;
  color: transparent;
  -webkit-text-stroke: 1px var(--orange);
  padding-right: .6em;
}
.mq-unit .dot {
  color: var(--orange);
  -webkit-text-stroke: 0;
  padding: 0 .5em;
  font-size: .55em;
}
@supports not (-webkit-text-stroke: 1px #000) {
  .mq-unit { color: var(--orange-dim); }
}

/* mint button arrow slide */
.mint-arrow { transition: transform .3s cubic-bezier(.2, 1, .3, 1); }
.btn-mint-hero:hover .mint-arrow { transform: translateX(6px); }

/* scroll reveals */
.rv-el {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}
.rv-el.rv-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mq-track { transform: none !important; }
  .rv-el { opacity: 1; transform: none; transition: none; }
  #cursor-dot, #cursor-ring { display: none; }
  .nav-link::after, .mint-arrow { transition: none; }
}
