/* Vaporwave showroom — hand-written, no build step. */

:root {
  --bg: #12081f;
  --panel: #1c1032;
  --fg: #f4ecff;
  --muted: #9a8fc0;
  --pink: #ff71ce;
  --cyan: #01cdfe;
  --purple: #b967ff;
  --line: #3a2a5e;
  --sans: "Inter", -apple-system, sans-serif;
}

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

body {
  background:
    radial-gradient(ellipse 60% 40% at 80% -5%, rgba(185, 103, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 30% at 15% 10%, rgba(1, 205, 254, 0.08), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

a { color: var(--fg); }

/* Hero */
.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero h1 {
  font-family: "Monoton", var(--sans);
  font-weight: 400;
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--cyan) 10%, var(--pink) 55%, var(--purple) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 113, 206, 0.4));
}
.hero h1 em { font-style: normal; }
.tagline { color: var(--muted); max-width: 40rem; margin: 0.8rem auto 0; }
.stats { margin-top: 0.8rem; font-size: 0.95rem; color: var(--muted); }
.stats strong { color: var(--cyan); }

/* Goal progress — a div meter; <progress> can't be styled this far */
.meter {
  width: min(100%, 30rem); height: 18px; margin: 0.9rem auto 0;
  padding: 3px;
  background: linear-gradient(180deg, #150b28, var(--panel));
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), 0 0 18px rgba(185, 103, 255, 0.15);
}
.meter-fill {
  height: 100%;
  width: min(var(--pct, 0%), 100%);
  min-width: 12px;  /* $0 still shows a spark of neon */
  border-radius: 999px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 14px),
    linear-gradient(90deg, var(--cyan), var(--pink) 65%, var(--purple));
  background-size: 28px 100%, 100% 100%;
  box-shadow: 0 0 14px rgba(255, 113, 206, 0.55), 0 0 5px rgba(1, 205, 254, 0.6);
  animation: meter-stripes 1.1s linear infinite;
}
@keyframes meter-stripes { to { background-position: 28px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .meter-fill { animation: none; } }

/* Live visitors badge under the title */
.live {
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-top: 0.5rem; padding: 0.4rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted); font-size: 0.85rem;
  text-decoration: none;
}
.live:hover { border-color: var(--cyan); }
.live strong { color: var(--cyan); font-weight: 600; }
.live i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: 0.4; } }

/* The 3D stage — click a panel on the car to buy */
#stage {
  position: relative;  /* anchors the corner buy form */
  margin: 1rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(185, 103, 255, 0.12), inset 0 0 80px rgba(255, 113, 206, 0.05);
  background:
    radial-gradient(ellipse 85% 45% at 50% 80%, rgba(255, 113, 206, 0.25), transparent 65%),
    linear-gradient(180deg, #170a2c 0%, #2b1055 60%, #4b1a72 100%);
  overflow: hidden;
}
#car { width: 100%; height: min(56vh, 500px); display: block; cursor: grab;
       touch-action: none; }

/* Click a panel on the car → its row pulses */
.panel.flash { animation: flash 1.6s ease-out; }
@keyframes flash {
  0%, 45% { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 113, 206, 0.4),
            0 0 24px rgba(255, 113, 206, 0.35); }
  100% { border-color: var(--line); box-shadow: none; }
}

/* Placement list — one panel per row: name and price left, slots right */
.panels { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.panel {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(160deg, var(--panel), #170d2b);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel h3 { flex: 0 0 10rem; font-size: 1.05rem; margin: 0; }
.panel h3 span { display: block; color: var(--muted); font-weight: 400;
                 font-size: 0.85rem; margin-top: 0.2rem; }
.board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(72px, 130px));
  grid-template-rows: repeat(var(--rows), 64px);
  gap: 6px;
}
@media (max-width: 640px) {
  .panel { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .panel h3 { flex: none; display: flex; justify-content: space-between;
              align-items: baseline; }
  .board { grid-template-columns: repeat(var(--cols), 1fr); }
}
.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; padding: 0.4rem;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--fg);
  font: inherit; font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}
.cell strong { font-size: 1rem; color: var(--cyan); }
.cell span { color: var(--muted); }
.cell:hover { border-color: var(--pink); box-shadow: 0 0 12px rgba(255, 113, 206, 0.35); }
.cell.sold { border: 1px solid var(--line); background: #fff; }
.cell.sold img { max-width: 92%; max-height: 92%; object-fit: contain; }

.pitch { max-width: 44rem; margin: 0 auto 2rem; text-align: center; }
.pitch h2 { margin-bottom: 0.5rem; color: var(--purple); }
.pitch p { color: var(--muted); }

/* Buy dialog — modal from the boards, docked top-right when opened from the car */
dialog.pane {
  background: linear-gradient(165deg, #221340, #150b28);
  color: var(--fg);
  border: 1px solid var(--purple); border-radius: 14px;
  padding: 1.5rem; width: min(92vw, 26rem);
  box-shadow: 0 0 32px rgba(185, 103, 255, 0.35);
}
dialog.pane::backdrop { background: rgba(10, 4, 20, 0.7); }
dialog.pane h2 { margin-bottom: 1rem; font-size: 1.3rem; }
dialog.pane label { display: block; margin-bottom: 0.9rem; font-size: 0.9rem; color: var(--muted); }
dialog.pane input, dialog.pane select {
  width: 100%; margin-top: 0.25rem; padding: 0.55rem 0.7rem;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
/* Opened from the 3D car (non-modal): dock in the stage's top-right corner */
dialog.pane:not(:modal) {
  position: absolute; top: 0.8rem; right: 0.8rem; left: auto; margin: 0;
  width: min(88vw, 21rem); z-index: 5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 113, 206, 0.25);
}
dialog.pane .row { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }
dialog.pane button {
  font: inherit; font-weight: 600; padding: 0.55rem 1rem;
  border-radius: 8px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 113, 206, 0.35);
}
dialog.pane button.ghost { background: transparent; color: var(--muted); box-shadow: none; }
/* Sponsor popover content */
#who-logo { display: block; max-width: 100%; max-height: 90px; object-fit: contain;
            background: #fff; border-radius: 10px; padding: 8px; margin-bottom: 0.8rem; }
#who h2 { margin-bottom: 0.2rem; }
#who h2 a { text-decoration: none; color: var(--cyan); }
#who h2 a:hover { text-shadow: 0 0 12px rgba(1, 205, 254, 0.6); }
#who .where { color: var(--muted); font-size: 0.9rem; }

/* Messages */
.msg { padding: 0.7rem 1rem; border-radius: 10px; margin-bottom: 1rem;
       background: var(--panel); border: 1px solid var(--line); }
.msg.success { border-color: var(--cyan); }
.msg.warning, .msg.error { border-color: var(--pink); }

/* Terms prose */
.prose { max-width: 44rem; margin: 0 auto; padding: 1rem 0; }
.prose h1 { font-size: 2rem; margin: 0.5rem 0 0.2rem; }
.prose h2 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; color: var(--purple); }
.prose p, .prose ul { margin-bottom: 0.8rem; color: #cdc2e6; }
.prose .updated, .prose .overline { color: var(--muted); font-size: 0.9rem; }
.prose code { background: var(--panel); padding: 0.1rem 0.4rem; border-radius: 6px; }

footer.site {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: center;
  margin-top: 3rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem;
}
footer.site a { color: var(--muted); }
