/* ═══════════════════════════════════════════════════════════
   METRONOME — Clefairy Moon Theme
   Deep navy sky, moon tan, warm brown, Clefairy pink
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg: #0d1018;
  --bg-surface: #151a24;
  --surface: #1c2230;
  --surface-glow: #2a3040;
  --border: #2D2D2D;
  --border-pink: #E8A8B5;
  --text: #EDE8E2;
  --text-dim: #9A8E82;
  --pink: #F4C7CE;
  --pink-dark: #E8A8B5;
  --pink-deep: #D48A9A;
  --brown: #8B6B42;
  --brown-light: #C4B8A0;
  --brown-dark: #5C4530;
  --tan: #D4C8B0;

  --font-display: "Lilita One", cursive;
  --font-body: "Nunito", -apple-system, sans-serif;
  --font-mono: "Space Mono", monospace;

  --radius: 16px;
  --radius-lg: 24px;
  --border-w: 3px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pink); }

/* ── Background Scene ─────────────────────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: url('bg-clefairy.png') center top / cover no-repeat;
  opacity: 0.15;
}

/* ── Header ───────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 16, 24, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-w) solid var(--surface-glow);
}

nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon { display: none; }

.nav-links { display: flex; gap: 8px; }

.nav-links a {
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 2px solid transparent;
  transition: all 0.2s;
  color: var(--text-dim);
}
.nav-links a:hover {
  background: var(--surface-glow);
  border-color: var(--pink-dark);
  color: var(--pink);
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 24px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-metronome {
  width: 240px;
  margin: 16px auto 10px;
  filter:
    drop-shadow(0 0 0 #000)
    drop-shadow(1px 0 0 #000)
    drop-shadow(-1px 0 0 #000)
    drop-shadow(0 1px 0 #000)
    drop-shadow(0 -1px 0 #000)
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-metronome img {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 64px;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 var(--brown-dark);
}

.tagline {
  font-weight: 600;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 32px;
}

/* ── Mint Card ────────────────────────────────────────── */
.mint-card {
  background: var(--surface);
  border: var(--border-w) solid var(--pink-dark);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  box-shadow: 6px 6px 0 rgba(200,90,114,0.2);
}

.mint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mint-box {
  background: var(--bg-surface);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.mint-conversion {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 4px;
}

.amount-in { color: var(--text-dim); }
.arrow { color: var(--pink); margin: 0 10px; }
.amount-out { color: var(--tan); }

.mint-via {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.wallet-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 14px;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: var(--border-w) solid var(--pink-dark);
  transition: all 0.15s;
  font-family: var(--font-body);
  text-align: center;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none !important;
}

.btn-connect {
  background: var(--surface-glow);
  color: var(--pink);
  box-shadow: 3px 3px 0 rgba(200,90,114,0.2);
}
.btn-connect:hover { background: var(--pink-deep); color: white; }
.btn-connect.connected { background: var(--surface-glow); color: var(--tan); border-color: var(--tan); }

.btn-view {
  background: transparent;
  border-color: var(--surface-glow);
  color: var(--text-dim);
  font-size: 13px;
  box-shadow: none;
}
.btn-view:hover { border-color: var(--pink-dark); color: var(--pink); }

.btn-mint {
  background: var(--pink-deep);
  color: white;
  width: 100%;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 3px;
  padding: 16px;
  box-shadow: 4px 4px 0 rgba(200,90,114,0.3);
  border-radius: var(--radius);
  border-color: var(--pink);
}
.btn-mint:hover:not(:disabled) {
  background: var(--pink-dark);
  box-shadow: 4px 4px 0 rgba(200,90,114,0.4);
}
.btn-mint:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Stats Grid ───────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--surface-glow);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.stat {
  background: var(--bg-surface);
  padding: 14px 8px;
  text-align: center;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text);
}

/* ── Progress Bar ─────────────────────────────────────── */
.progress-section { display: flex; align-items: center; gap: 12px; }

.progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 14px;
  background: var(--bg-surface);
  border: 2px solid var(--surface-glow);
  border-radius: 100px;
  overflow: hidden;
  padding: 2px;
}

.progress-fill {
  height: 100%;
  background: var(--pink-dark);
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-pct {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--pink);
}

/* ── Section Titles ───────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text);
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  background: var(--pink-dark);
  border-radius: 2px;
  margin-top: 4px;
}

/* ── Info Section ─────────────────────────────────────── */
.info-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px 40px;
  position: relative;
  z-index: 1;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--surface-glow);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(200,90,114,0.1);
}

.info-item {
  background: var(--surface);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.info-value { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text); }

/* ── Live Mints ───────────────────────────────────────── */
.live-mints {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px 40px;
  position: relative;
  z-index: 1;
}

.mint-feed {
  background: var(--surface);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 4px 4px 0 rgba(200,90,114,0.1);
}

.mint-feed .waiting {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.mint-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 2px dashed var(--surface-glow);
  font-size: 13px;
}
.mint-entry:last-child { border-bottom: none; }
.mint-entry .addr { font-family: var(--font-mono); color: var(--text-dim); font-size: 12px; }
.mint-entry .tokens { font-family: var(--font-display); color: var(--tan); font-size: 14px; }

/* ── How It Works ─────────────────────────────────────── */
.how-it-works {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px 50px;
  position: relative;
  z-index: 1;
}

.how-desc { color: var(--text-dim); font-size: 15px; font-weight: 600; margin-bottom: 28px; line-height: 1.7; }

.steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 3px 3px 0 rgba(200,90,114,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.step:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(200,90,114,0.2);
}

.step:nth-child(1) { border-left: 6px solid var(--brown); }
.step:nth-child(2) { border-left: 6px solid var(--tan); }
.step:nth-child(3) { border-left: 6px solid var(--pink); }

.step-num {
  width: 38px; height: 38px; min-width: 38px;
  background: var(--pink-dark);
  color: white;
  border: var(--border-w) solid var(--pink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  box-shadow: 2px 2px 0 rgba(200,90,114,0.2);
}

.step-content h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 2px; }
.step-content p { font-size: 14px; font-weight: 600; color: var(--text-dim); }

.fdv-note {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg-surface);
  border: 2px dashed var(--surface-glow);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: center;
}

/* ── FAQ ──────────────────────────────────────────────── */
.faq-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

.faq-list { display: flex; flex-direction: column; gap: 10px; }

details {
  background: var(--surface);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(200,90,114,0.1);
  transition: all 0.15s;
}
details:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(200,90,114,0.2);
}
details[open] {
  border-color: var(--pink-dark);
  box-shadow: 4px 4px 0 rgba(200,90,114,0.2);
}

summary {
  font-family: var(--font-display);
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::after { content: "+"; font-family: var(--font-display); font-size: 22px; color: var(--pink); }
details[open] summary::after { content: "-"; }

details p { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--text-dim); line-height: 1.6; }

/* ── Footer ───────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  border-top: var(--border-w) solid var(--surface-glow);
  background: var(--bg-surface);
  position: relative;
  z-index: 1;
}
.footer-icon { display: none; }
footer p { font-size: 13px; font-weight: 700; color: var(--text-dim); }

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface);
  border: var(--border-w) solid var(--surface-glow);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px; font-weight: 700;
  z-index: 1000;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 340px;
  box-shadow: 4px 4px 0 rgba(200,90,114,0.15);
  color: var(--text);
}
.toast.success { border-color: var(--tan); box-shadow: 4px 4px 0 rgba(196,184,160,0.2); }
.toast.error { border-color: var(--pink-deep); box-shadow: 4px 4px 0 rgba(196,90,114,0.2); }

@keyframes popIn {
  from { transform: translateY(20px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 46px; }
  .hero-metronome { width: 180px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .mint-conversion { font-size: 18px; }
  .progress-section { flex-direction: column; align-items: stretch; gap: 8px; }
  .progress-text, .progress-pct { text-align: center; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
}
