:root {
  --bg: #0e0f11;
  --bg-alt: #17181b;
  --card: #1d1f23;
  --border: #2b2d30;
  --text: #f2f1ee;
  --text-dim: #a6a9ad;
  --accent: #ff8a3d;
  --accent-2: #ffdd66;
  --green: #58d68d;
  --red: #ff6b6b;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 50% 0%, #1b1c1f 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: "Segoe UI", Arial, sans-serif; margin: 0 0 .5em; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  background: rgba(14,15,17,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; }
.brand-icon { font-size: 1.4rem; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--text); }

.buy-btn {
  background: linear-gradient(135deg, var(--accent), #ff5e3a);
  color: #1a1000;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(255,138,61,0.35);
  transition: transform .15s ease;
}
.buy-btn:hover { transform: translateY(-2px); }
.buy-btn.large { font-size: 1.05rem; padding: 14px 28px; }
.ghost-btn {
  border: 1px solid var(--border);
  padding: 13px 24px;
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 600;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--text); }

/* HERO */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1 { font-size: 2.6rem; line-height: 1.15; }
.accent { color: var(--accent); }
.subtitle { color: var(--text-dim); font-size: 1.05rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

.scene-wrap { display: flex; flex-direction: column; align-items: center; }
.scene {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, #1a1b1e, #0f1011);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px;
  overflow: hidden;
}
.scene-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 5;
  transition: color .2s, border-color .2s;
}
.scene-badge.burning { color: var(--accent-2); border-color: var(--accent); }
.scene-badge.vacuuming { color: #bcd8ff; border-color: #6e93c2; }

#ashtraySvg { width: 100%; height: auto; display: block; }

/* The scene is driven frame-by-frame from script.js — no CSS transitions or
   keyframes on animated SVG nodes, or they fight the render loop. */
#ashtraySvg { shape-rendering: geometricPrecision; }

.burn-toast {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255,138,61,0.15);
  border: 1px solid var(--accent);
  color: var(--accent-2);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.burn-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stat-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
  max-width: 560px;
}
.stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label { font-size: .7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.15rem; font-weight: 800; }
.stat-value.burned { color: var(--accent); }
.stat-value.up { color: var(--green); }
.stat-value.down { color: var(--red); }

.mock-note { color: var(--text-dim); font-size: .75rem; max-width: 560px; margin-top: 10px; }
.mock-note code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; }

/* HOW IT WORKS */
.how {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 24px;
}
.how h2, .tokenomics h2, .burns h2 { text-align: center; font-size: 1.8rem; margin-bottom: 30px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.how-icon { font-size: 1.8rem; margin-bottom: 10px; }
.how-card p { color: var(--text-dim); font-size: .92rem; }

/* THE ASH CHRONICLES */
.chronicles { max-width: 820px; margin: 80px auto; padding: 0 24px; }
.chronicles h2 { text-align: center; font-size: 1.8rem; margin-bottom: 14px; }
.chronicles-intro {
  text-align: center;
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 auto 40px;
  font-size: .95rem;
}

.chronicle-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* the spine running down the timeline */
.chronicle-list::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 70%);
  opacity: .35;
}

.chapter {
  position: relative;
  margin-left: 52px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.chapter::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
}
.chapter.is-unlocked::before { background: var(--accent); box-shadow: 0 0 12px rgba(255,138,61,.7); }
.chapter.is-locked { border-style: dashed; opacity: .78; }

.ch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ch-num {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ch-unlocked {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 9px;
}
.ch-lock { font-size: .72rem; color: var(--text-dim); white-space: nowrap; }
.ch-title { font-size: 1.35rem; margin: 0 0 10px; }
.ch-teaser { color: var(--text-dim); font-style: italic; margin: 0 0 16px; }

/* each beat is one tweet — stacked so the thread shape is obvious */
.ch-beats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.beat {
  margin: 0;
  padding: 12px 16px;
  background: rgba(255,255,255,.035);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: .95rem;
  line-height: 1.55;
}

.ch-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ch-copy {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ch-copy:hover { background: var(--accent); color: #1a1000; }
.ch-link { font-size: .82rem; font-weight: 700; color: var(--text-dim); }
.ch-link:hover { color: var(--accent); }

.ch-progress {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 7px;
}
.ch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7a4520, var(--accent));
  border-radius: 999px;
  transition: width .6s ease;
}
.ch-progress-label { font-size: .72rem; color: var(--text-dim); }

@media (max-width: 600px) {
  .chapter { margin-left: 36px; padding: 18px; }
  .chronicle-list::before { left: 10px; }
  .chapter::before { left: -32px; }
  .ch-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* TOKENOMICS */
.tokenomics { max-width: 1100px; margin: 60px auto; padding: 0 24px; }
.token-split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}
.split-visual { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pie { width: 180px; height: 180px; }
.split-labels { font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.orange { background: var(--accent); }
.dot.gray { background: var(--border); }
.split-text p { color: var(--text-dim); }
.split-text strong { color: var(--text); }

/* BURN LOG */
.burns { max-width: 1100px; margin: 60px auto 100px; padding: 0 24px; }
.burn-log {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.empty-state { color: var(--text-dim); text-align: center; margin: 0; }
.burn-entry {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.burn-entry:last-child { border-bottom: none; }
.burn-entry .amt { color: var(--accent); font-weight: 700; }
.burn-entry .time { color: var(--text-dim); }

footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: .8rem;
}
footer .ca { margin-top: 8px; font-family: monospace; }
footer .ca .copyable { cursor: pointer; color: var(--accent); }
footer .ca .copyable:hover { text-decoration: underline; }

.socials { display: flex; justify-content: center; gap: 18px; margin-bottom: 18px; }
.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.buy-btn.is-disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}
.buy-btn.is-disabled:hover { transform: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }   /* brand + buy button only; the links crowd the bar */
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .token-split { grid-template-columns: 1fr; text-align: center; }
  .split-visual { margin: 0 auto; }
}
