:root {
  --bg: #0c0a09;
  --bg-raised: #120e0b;
  --card: #1a1512;
  --card-hover: #211a15;
  --border: #2e2620;
  --border-soft: #221b16;
  --fire: #ff6b2b;
  --fire-soft: #ff8f5e;
  --text: #f5efe9;
  --muted: #a89a8c;
  --muted-dim: #756b60;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --mono: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 10, 9, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo .logo-mark {
  height: 30px;
  width: auto;
  display: block;
}
.logo .logo-text {
  font-family: "Cinzel", var(--sans);
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 1.05rem;
  background: linear-gradient(180deg, var(--text), var(--fire-soft) 160%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    padding: 6px 20px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .nav-links a:last-child { border-bottom: none; }
  .nav { position: sticky; }
  .nav-inner { position: relative; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--mono);
    cursor: pointer;
    font-size: 0.95rem;
  }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--fire), #e0501a);
  color: #140a05;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--fire); }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }

/* ── Section scaffolding ─────────────────────────────────────────────── */

section { padding: 84px 0; }
@media (max-width: 760px) { section { padding: 56px 0; } }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: "//"; opacity: 0.6; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.1rem; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1rem; }

.num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-dim);
  letter-spacing: 0.05em;
}

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

.hero { padding-top: 72px; padding-bottom: 64px; text-align: left; }
.hero { position: relative; overflow: hidden; z-index: 0; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 107, 43, 0.16), transparent 55%),
              radial-gradient(circle at 75% 60%, rgba(251, 191, 36, 0.12), transparent 60%);
  filter: blur(30px);
  z-index: -1;
  background-size: 140% 140%;
  animation: hero-texture-drift 18s ease-in-out infinite;
}
@keyframes hero-texture-drift {
  0%, 100% { background-position: 0% 0%, 100% 100%; }
  50% { background-position: 20% 30%, 70% 60%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.06;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--text), var(--fire-soft) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 720px;
}
.hero p.sub { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-bar .stat { background: var(--bg-raised); padding: 18px 20px; }
.stat-bar .stat .value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fire-soft);
  font-variant-numeric: tabular-nums;
}
.stat-bar .stat .label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .stat-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ── Product pillars ─────────────────────────────────────────────────── */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--border); background: var(--card-hover); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-icon { font-size: 1.6rem; }
.card h3 { margin-top: 2px; }
.card .tagline { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.card p.desc { color: var(--muted); font-size: 0.9rem; margin: 14px 0 18px; }

.badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--green);
  color: var(--green);
  white-space: nowrap;
}
.badge.soon { border-color: var(--amber); color: var(--amber); }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mini-stats div { text-align: left; }
.mini-stats .v { font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--text); }
.mini-stats .l { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.checklist { list-style: none; font-size: 0.84rem; color: var(--muted); display: grid; gap: 8px; }
.checklist li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.card-num {
  position: absolute;
  top: 22px;
  right: 24px;
}

/* ── Bento grid ──────────────────────────────────────────────────────── */

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .bento { grid-template-columns: 1fr; } }
.bento .tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.bento .tile .icon { font-size: 1.3rem; margin-bottom: 10px; }
.bento .tile h4 { font-size: 0.92rem; margin-bottom: 6px; }
.bento .tile p { font-size: 0.78rem; color: var(--muted); }

.card, .bento .tile {
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover, .card:focus-within,
.bento .tile:hover, .bento .tile:focus-within {
  box-shadow: 0 0 0 1px var(--fire), 0 8px 28px -8px rgba(255, 107, 43, 0.35);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .card, .bento .tile { transition: none; }
  .card:hover, .card:focus-within,
  .bento .tile:hover, .bento .tile:focus-within { transform: none; }
}

/* ── Architecture flow ───────────────────────────────────────────────── */

.arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 40px; }
@media (max-width: 760px) { .arch-grid { grid-template-columns: 1fr; } }

.flow { display: grid; gap: 14px; }
.flow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.flow-step .n {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--fire);
  color: var(--fire-soft);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
}
.flow-step h4 { font-size: 0.92rem; margin-bottom: 4px; }
.flow-step p { font-size: 0.82rem; color: var(--muted); }

/* ── Presale ─────────────────────────────────────────────────────────── */

.presale-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.bar { height: 12px; background: var(--border); border-radius: 6px; overflow: hidden; margin: 18px 0 8px; }
.bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--fire), var(--fire-soft));
  border-radius: 6px;
  transition: width 0.8s ease;
}
.bar-caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; margin-bottom: 26px; }
.presale-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
@media (max-width: 640px) { .presale-facts { grid-template-columns: 1fr; } }
.presale-facts .fact {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}
.presale-facts .fact b { color: var(--text); }

/* ── Terminal panel ──────────────────────────────────────────────────── */

.terminal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  font-family: var(--mono);
}
.terminal .prompt { color: var(--fire-soft); font-size: 0.82rem; margin-bottom: 16px; }
.terminal .prompt::before { content: "→ "; color: var(--muted-dim); }
.kv { display: grid; gap: 10px; margin-bottom: 6px; }
.kv-row { display: flex; gap: 14px; font-size: 0.85rem; }
.kv-row .k { color: var(--muted-dim); width: 90px; flex-shrink: 0; }
.kv-row .v { color: var(--text); }
.kv-row .v.copy-btn { color: var(--fire-soft); cursor: pointer; border: none; background: none; font-family: var(--mono); font-size: 0.85rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}
.term-actions { display: flex; gap: 16px; margin-top: 16px; font-size: 0.82rem; }
.term-actions a { color: var(--fire-soft); }

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

footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text); }

.error-banner {
  display: none;
  text-align: center;
  color: var(--red);
  font-size: 0.8rem;
  padding: 8px;
}

/* ── Phoenix wake-up intro ───────────────────────────────────────────── */

.phoenix-intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  animation: phoenix-intro-fadeout 0.6s ease forwards;
  animation-delay: 2.6s;
}
.phoenix-intro--done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  animation: none;
}

@keyframes phoenix-intro-fadeout {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

.phoenix-intro__glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fire) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.25;
  animation: phoenix-glow-breathe 1.8s ease-in-out infinite;
}
@keyframes phoenix-glow-breathe {
  0%, 100% { opacity: 0.18; transform: scale(0.92); }
  50% { opacity: 0.36; transform: scale(1.05); }
}
.phoenix-intro.stage-spread .phoenix-intro__glow,
.phoenix-intro.stage-flash .phoenix-intro__glow {
  animation: none;
  opacity: 0.55;
  transform: scale(1.2);
}

.phoenix-intro__mark {
  position: relative;
  width: 200px;
  height: 200px;
}
.phoenix-intro__mark path,
.phoenix-intro__mark circle {
  stroke: var(--fire-soft);
  stroke-width: 2.4;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.7s ease;
}
.phoenix-intro__mark .p-eye {
  fill: var(--fire-soft);
  stroke: none;
}
.phoenix-intro.stage-stir .p-head,
.phoenix-intro.stage-stir .p-beak,
.phoenix-intro.stage-stir .p-body {
  stroke-dashoffset: 40;
}
.phoenix-intro.stage-spread .p-head,
.phoenix-intro.stage-spread .p-beak,
.phoenix-intro.stage-spread .p-body,
.phoenix-intro.stage-spread .p-wing-left,
.phoenix-intro.stage-spread .p-wing-right,
.phoenix-intro.stage-spread .p-tail-1,
.phoenix-intro.stage-spread .p-tail-2,
.phoenix-intro.stage-spread .p-tail-3 {
  stroke-dashoffset: 0;
}

.phoenix-intro__flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--amber) 0%, var(--fire) 40%, transparent 75%);
  opacity: 0;
}
.phoenix-intro.stage-flash .phoenix-intro__flash {
  animation: phoenix-flash-burst 0.6s ease-out forwards;
}
@keyframes phoenix-flash-burst {
  0% { opacity: 0; transform: scale(0.6); }
  40% { opacity: 0.9; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1.8); }
}

.intro-skip {
  position: absolute;
  bottom: 28px;
  right: 28px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.intro-skip:hover, .intro-skip:focus-visible { border-color: var(--fire); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .phoenix-intro { display: none; }
}

/* ── Scroll reveal ───────────────────────────────────────────────────── */

body.js-reveal-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
body.js-reveal-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.js-reveal-enabled [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── Docs layout ─────────────────────────────────────────────────────── */

.docs-shell { display: grid; grid-template-columns: 240px 1fr; gap: 48px; max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 100px; }
@media (max-width: 900px) { .docs-shell { grid-template-columns: 1fr; } }

.docs-sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 8px;
}
@media (max-width: 900px) { .docs-sidebar { position: static; max-height: none; margin-bottom: 32px; } }

.docs-sidebar .grp { margin-bottom: 22px; }
.docs-sidebar .grp-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 10px;
}
.docs-sidebar a {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -13px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-sidebar a:hover { color: var(--text); }
.docs-sidebar a.active { color: var(--fire-soft); border-left-color: var(--fire); }

.doc-section { margin-bottom: 64px; scroll-margin-top: 84px; }
.doc-section h2 {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.doc-section h3 { margin: 28px 0 12px; color: var(--fire-soft); }
.doc-section p { color: var(--muted); margin-bottom: 14px; font-size: 0.94rem; }
.doc-section ul, .doc-section ol { margin: 0 0 16px 20px; color: var(--muted); font-size: 0.94rem; display: grid; gap: 8px; }
.doc-section li b { color: var(--text); }
.doc-section code {
  font-family: var(--mono);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.86em;
  color: var(--fire-soft);
}

table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 0.86rem; }
table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); color: var(--muted); }
table td:first-child, table th:first-child { color: var(--text); }
table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--fire);
  background: var(--card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 16px 0 24px;
}

.trade-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px 120px 100px 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #2e2620);
  font-size: 0.85rem;
}
.trade-row.head {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--fire);
}
.trade-side { font-weight: 700; text-transform: uppercase; font-size: 0.75rem; }
.trade-side.long { color: var(--green); }
.trade-side.short { color: var(--red); }
.trade-pnl.positive { color: var(--green); }
.trade-pnl.negative { color: var(--red); }
.trade-pnl.neutral { color: var(--muted); }
.placeholder-badge {
  display: inline-block;
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
}
/* .mini-stats is already defined as a 3-column grid elsewhere in this stylesheet; the revshare
   panel shows 4 figures (pot, paid out, holders, last distribution), so it needs its own column
   count rather than wrapping the 4th item onto an orphaned row. */
.mini-stats.cols-4 { grid-template-columns: repeat(4, 1fr); }
