/* draw.fun homepage — one page, one language: black ground, draw.fun gold. */

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

:root {
  --gold: #ffa629;
  --gold-hi: #ffc300;
  --gold-soft: #ffd27a;
  --ink: #fff7df;
  --muted: rgba(255, 247, 223, .58);
  --ground: #000;
  --panel: #131109;
  --panel-2: #1a1710;
  --line: rgba(255, 166, 41, .26);
  --line-soft: rgba(255, 166, 41, .14);
}

html { background: var(--ground); }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: Roboto, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  /* Feature-wall tiles may paint past the band edges; never let that scroll the page. */
  overflow-x: clip;
}

a { color: inherit; }
img { max-width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, .11); }
.btn.primary { background: var(--gold); border-color: var(--gold-hi); color: #000; }
.btn.primary:hover { background: var(--gold-hi); }
.btn.big { min-height: 48px; padding: 0 22px; font-size: 15px; }

/* ── Header ─────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 clamp(14px, 3vw, 34px);
  height: 62px;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--gold);
  text-decoration: none;
}

.top-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.top-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.top-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }

/* ── Hero ───────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 7vh, 78px) 22px clamp(30px, 5vh, 56px);
}

.hero-pitch h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.025em;
  color: var(--gold);
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-how {
  list-style: none;
  margin-bottom: 26px;
  max-width: 470px;
}
.hero-how li {
  position: relative;
  padding: 5px 0 5px 24px;
  color: var(--muted);
  font-size: 15px;
}
.hero-how li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 13px;
  width: 8px;
  height: 8px;
  background: var(--gold);
}
.hero-how b { color: var(--ink); font-weight: 700; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-fee {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.hero-fee b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }

/* Showcase: the newest posts, cycling. Real art is the hero image. */

.hero-show { min-width: 0; }

.show-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.show-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  background: #000;
  opacity: 0;
  transition: opacity .5s ease;
}
.show-frame img.on { opacity: 1; }

.show-live {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .12em;
}
.show-live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.2s steps(1, end) infinite;
}
@keyframes pulse { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }

.show-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  max-width: 460px;
  margin: 12px auto 0;
}
.show-title {
  font-weight: 900;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.show-title:hover { color: var(--gold-soft); }
.show-sub {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.show-sub b { color: var(--gold-soft); font-weight: 900; }

/* Prompt strip: the running competition, right under the hero */

.prompt-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1136px;
  margin: 0 auto 18px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 166, 41, .12), rgba(255, 166, 41, .03));
}
.prompt-label {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.prompt-text {
  flex: 1;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  min-width: 0;
}
.prompt-btn { min-height: 36px; padding: 0 14px; font-size: 13px; }

@media (max-width: 640px) {
  .prompt-strip { flex-wrap: wrap; margin-left: 14px; margin-right: 14px; }
}

/* ── Bands ──────────────────────────────────────────── */

.band {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 8px;
  border-top: 1px solid var(--line-soft);
}

.band-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.band-hdr h2 {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--gold);
}
.band-link {
  color: var(--gold-soft);
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.band-link:hover { color: var(--gold-hi); text-decoration: underline; }

/* Timeline grid */

.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  padding-bottom: 26px;
}

.tl-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.tl-card:hover { transform: translateY(-2px); border-color: rgba(255, 195, 0, .6); }
.tl-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000;
  image-rendering: pixelated;
}
.tl-card .meta { padding: 9px 11px 10px; }
.tl-card .cap {
  color: var(--ink);
  font-weight: 800;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-card .sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.tl-card .sub b { color: var(--gold-soft); font-weight: 900; }

/* Marketplace row */

.mk-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 26px;
  scrollbar-width: thin;
}

.mk-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.mk-card:hover { transform: translateY(-2px); border-color: rgba(255, 195, 0, .6); }
.mk-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000;
  image-rendering: pixelated;
}
.mk-card .meta { padding: 9px 11px 10px; }
.mk-card .tag {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-card .price {
  margin-top: 2px;
  color: var(--gold-soft);
  font-weight: 900;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* Pulse: numbers + activity */

.pulse-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(20px, 4vw, 56px);
  padding-bottom: 30px;
}

.pulse-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.pulse-stat {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
}
.pulse-stat .val {
  color: var(--gold);
  font-weight: 900;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.pulse-stat .lbl {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pulse-acts h3 {
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 8px;
}
.act-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  text-decoration: none;
}
.act-row:hover .act-tag { color: var(--gold-soft); }
.act-row .act-kind {
  flex-shrink: 0;
  width: 64px;
  color: var(--muted);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.act-row .act-kind.trade { color: var(--gold); }
.act-row .act-tag {
  color: var(--ink);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-row .act-price {
  margin-left: auto;
  color: var(--gold-soft);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.act-row .act-time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pulse-acts .band-link { display: inline-block; margin-top: 10px; }

/* ── Footer ─────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line-soft);
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 46px;
}
.foot p {
  max-width: 640px;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a {
  color: var(--gold-soft);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.foot nav a:hover { color: var(--gold-hi); text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 26px;
    text-align: center;
  }
  .hero-pitch h1 { margin-bottom: 16px; }
  .hero-how { margin: 0 auto 20px; text-align: left; }
  .hero-cta { justify-content: center; }
  .hero-show { order: -1; }
  .show-frame { max-width: min(78vw, 340px); }
  .show-meta { max-width: min(78vw, 340px); }
  .pulse-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .top {
    flex-wrap: wrap;
    height: auto;
    gap: 6px 12px;
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .brand { order: 1; }
  .top-draw { order: 2; margin-left: auto; min-height: 36px; padding: 0 13px; font-size: 13px; }
  .top-nav { order: 3; width: 100%; margin-right: 0; gap: 0; }
  .top-nav a { padding: 6px 10px 8px 0; font-size: 13px; }
  .top-nav a:hover { background: none; }
  .tl-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .mk-row { grid-auto-columns: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .show-live .dot { animation: none; }
  .tl-card, .mk-card, .show-frame img { transition: none; }
}


/* ── Feature wall (ported from the old shell; tiles pop out in 3D) ── */

.band-wall { padding-bottom: 0; }

.fw-stage {
  position: relative;
  z-index: 5;
  min-height: 460px;
  background: #000;
  clip-path: inset(-320px -420px -60px -420px);
  margin-bottom: 8px;
}

@media (max-width: 1100px) {
  .fw-stage { min-height: 420px; }
}

@media (max-width: 900px) {
  .fw-stage { min-height: 300px; overflow: hidden; clip-path: none; }
}

.fw-scene {
  position: absolute;
  inset: 0;
  overflow: visible;
  z-index: 130;
}

.fw-cluster {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 820px;
  height: 400px;
  margin-left: -410px;
  margin-top: -200px;
  overflow: visible;
  pointer-events: auto;
}

.fw-tile {
  position: absolute;
  overflow: visible;
  z-index: var(--zi, 100);
  pointer-events: none;
}

.fw-tile.is-hovered {
  z-index: 9999;
}

.fw-tower {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.fw-tower-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.fw-back-square {
  position: absolute;
  left: var(--base-x);
  top: var(--base-y);
  width: var(--base-s);
  height: var(--base-s);
  z-index: 1;
  background: #000;
  border: none;
  opacity: 0;
  box-shadow: none;
  pointer-events: none;
}

.fw-tile.is-hovered .fw-back-square {
  opacity: 0;
}

.fw-wall {
  stroke: rgba(255,255,255,.032);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: opacity 0.16s ease-out;
  pointer-events: none;
}

.fw-wall-top {
  fill: rgba(18,18,18,.96);
}

.fw-wall-right {
  fill: rgba(4,4,4,.985);
}

.fw-wall-bottom {
  fill: rgba(1,1,1,.995);
}

.fw-wall-left {
  fill: rgba(9,9,9,.98);
}

.fw-wall-rest {
  opacity: 0;
}

.fw-wall-hover {
  opacity: 0;
}

.fw-tile.is-hovered .fw-wall-rest {
  opacity: 0;
}

.fw-tile.is-hovered .fw-wall-hover {
  opacity: 1;
}

.fw-front {
  position: absolute;
  left: var(--rest-x);
  top: var(--rest-y);
  width: var(--rest-s);
  height: var(--rest-s);
  z-index: 4;
  background: #000;
  border: 1px solid rgba(255,255,255,.16);
  overflow: hidden;
  cursor: pointer;
  pointer-events: none;
  transition:
    left 0.34s cubic-bezier(.14,.96,.16,1),
    top 0.34s cubic-bezier(.14,.96,.16,1),
    width 0.34s cubic-bezier(.14,.96,.16,1),
    height 0.34s cubic-bezier(.14,.96,.16,1),
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    filter 0.16s ease-out;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 6px 18px rgba(0,0,0,.50),
    0 12px 30px rgba(0,0,0,.26);
}

.fw-tile.is-hovered .fw-front {
  left: var(--hover-x);
  top: var(--hover-y);
  width: var(--hover-s);
  height: var(--hover-s);
  border-color: rgba(255,166,41,.9);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 0 0 1px rgba(255,166,41,.24),
    0 0 34px rgba(255,166,41,.40),
    0 22px 50px rgba(0,0,0,.68),
    0 42px 88px rgba(0,0,0,.52);
}

.fw-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  display: block;
}

.fw-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    inset 0 -14px 28px rgba(0,0,0,.08);
}

.fw-tile.is-hovered .fw-front::after {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 -18px 34px rgba(0,0,0,.11);
}

.fw-tile-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 9px;
  font-weight: 700;
  color: #252525;
  background: #050505;
}

@media (max-width: 1100px) {
.fw-cluster {
    width: 680px;
    height: 380px;
    margin-left: -340px;
    margin-top: -190px;
  }
}

@media (max-width: 900px) {
.fw-cluster {
    width: 460px;
    height: 260px;
    margin-left: -230px;
    margin-top: -130px;
    transform: rotateX(1deg);
  }
}

.fw-tile.is-scalar-test .fw-wall-rest {
  opacity: .86;
}

.fw-tile.is-scalar-test.is-hovered .fw-wall-rest {
  opacity: 0;
}

.fw-tile.is-scalar-test .fw-back-square {
  opacity: 0;
}

.fw-tile {
  overflow: visible !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) {
  z-index: var(--zi, 100) !important;
}

.fw-tile.is-hovered {
  z-index: 999999 !important;
  isolation: isolate;
}

.fw-tile.is-idle-extended .fw-tower,
.fw-tile.is-idle-extended .fw-tower-svg,
.fw-tile.is-hovered .fw-tower,
.fw-tile.is-hovered .fw-tower-svg {
  overflow: visible !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) .fw-wall-rest {
  opacity: .68 !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) .fw-wall-hover {
  opacity: 0 !important;
}

.fw-tile.is-hovered .fw-wall-rest,
.fw-tile.is-hovered .fw-wall-hover {
  opacity: 1 !important;
}

.fw-tile.is-idle-extended .fw-front,
.fw-tile.is-hovered .fw-front {
  z-index: 30 !important;
}

.fw-tile.is-idle-extended .fw-back-square,
.fw-tile.is-hovered .fw-back-square {
  opacity: 0 !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) {
  z-index: var(--zi, 100) !important;
}

.fw-tile.is-hovered {
  z-index: 999999 !important;
}

.fw-tile {
  overflow: visible !important;
}

.fw-tower {
  position: absolute;
  inset: 0;
  overflow: visible !important;
  z-index: 1 !important;
}

.fw-back-square {
  z-index: 0 !important;
  opacity: 0 !important;
}

.fw-tower-svg {
  position: absolute;
  inset: 0;
  overflow: visible !important;
  z-index: 1 !important;
  pointer-events: none;
}

.fw-wall-rest {
  opacity: .34 !important;
}

.fw-wall-hover {
  opacity: 0 !important;
}

.fw-front {
  position: absolute;
  z-index: 30 !important;
}

.fw-tile.is-hovered {
  z-index: 999999 !important;
}

.fw-tile.is-hovered .fw-tower {
  z-index: 1 !important;
}

.fw-tile.is-hovered .fw-tower-svg {
  z-index: 1 !important;
}

.fw-tile.is-hovered .fw-front {
  z-index: 40 !important;
}

.fw-tile.is-hovered .fw-wall-rest,
.fw-tile.is-hovered .fw-wall-hover {
  opacity: 1 !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) .fw-wall-rest {
  opacity: .34 !important;
}

.fw-tile.is-idle-extended:not(.is-hovered) .fw-wall-hover {
  opacity: 0 !important;
}

.fw-tile.is-idle-extended .fw-front {
  z-index: 30 !important;
}

.fw-tile,
.fw-tower,
.fw-tower-svg {
  overflow: visible !important;
}

.fw-tile:hover,
.fw-tile.is-hovered {
  z-index: auto !important;
  isolation: auto !important;
}

.fw-tile:hover .fw-tower,
.fw-tile.is-hovered .fw-tower,
.fw-tile:hover .fw-tower-svg,
.fw-tile.is-hovered .fw-tower-svg {
  z-index: auto !important;
}

.fw-front {
  position: absolute;
  z-index: var(--face-layer, 200) !important;
}

.fw-back-square,
.fw-wall-rest,
.fw-wall-hover {
  z-index: var(--wall-layer, 100) !important;
  pointer-events: none;
}

.fw-tile:hover .fw-front,
.fw-tile.is-hovered .fw-front {
  z-index: 60000 !important;
}

.fw-tile:hover .fw-back-square,
.fw-tile:hover .fw-wall-rest,
.fw-tile:hover .fw-wall-hover,
.fw-tile.is-hovered .fw-back-square,
.fw-tile.is-hovered .fw-wall-rest,
.fw-tile.is-hovered .fw-wall-hover {
  z-index: var(--wall-layer, 100) !important;
}

.fw-tile:hover .fw-tower-svg,
.fw-tile.is-hovered .fw-tower-svg {
  z-index: var(--wall-layer, 100) !important;
  pointer-events: none;
}

.fw-front {
  will-change: left, top, width, height, border-color, box-shadow, filter;
  transition:
    left 0.40s cubic-bezier(.16,.86,.20,1),
    top 0.40s cubic-bezier(.16,.86,.20,1),
    width 0.40s cubic-bezier(.16,.86,.20,1),
    height 0.40s cubic-bezier(.16,.86,.20,1),
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    filter 0.16s ease-out !important;
}

.fw-wall,
.fw-wall-rest,
.fw-wall-hover {
  transition:
    opacity 0.20s ease-out !important;
}

.fw-tile-face {
  transition:
    transform 0.40s cubic-bezier(.16,.86,.20,1),
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out !important;
}

.fw-hit-layer,
.fw-hit-zone {
  display: none !important;
  pointer-events: none !important;
}

.fw-tower,
.fw-tower-svg,
.fw-wall,
.fw-wall-rest,
.fw-wall-hover,
.fw-back-square {
  pointer-events: none !important;
}

.fw-front,
.fw-front *,
.fw-tile-face,
.fw-tile-face * {
  pointer-events: auto !important;
}
