:root {
  --bg: #000000;
  --panel: #050505;
  --line: #2a2a2a;
  --line-soft: #191919;
  --text: #f7f7f7;
  --muted: #8c8c8c;
  --dim: #575757;
  --accent: #af50ff;
  --accent-soft: rgba(175, 80, 255, 0.16);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 136px 1fr auto;
  height: 40px;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  border-right: 1px solid var(--line);
  padding: 0 24px;
  font-size: 13px;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.brand-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 50%, var(--text) 0 3px, transparent 4px);
}

.nav-fill {
  border-right: 1px solid var(--line);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px);
  opacity: 0.42;
}

.nav-links { display: flex; height: 40px; }
.nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  border-right: 1px solid var(--line);
  padding: 0 22px;
  color: #a0a0a0;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 160ms ease, color 160ms ease;
}
.nav-links a:hover, .nav-links a.nav-cta { background: #171717; color: var(--text); }

.hero-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 6vw 72px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-bg-aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 65% 40%, rgba(175,80,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(100,40,200,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 70%, rgba(80,20,160,0.08) 0%, transparent 60%);
}

.hero-panel > *:not(.hero-bg-aura) {
  position: relative;
  z-index: 3;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow span { display: none; }

.hero-panel h1 {
  max-width: 1120px;
  margin: 0 0 26px;
  font-size: clamp(56px, 7.8vw, 108px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.hero-panel p {
  max-width: 780px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 1px solid var(--line);
  padding: 0 26px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: var(--accent); background: rgba(175,80,255,0.15); color: var(--accent); }
.button-primary:hover { background: rgba(175,80,255,0.28); border-color: var(--accent); transform: translateY(-1px); }
.button-secondary { background: #050505; color: var(--text); }
.button-secondary:hover { border-color: var(--accent); }

.terminal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  border-bottom: 1px solid var(--line);
}
.terminal-main { border-right: 1px solid var(--line); }
.content-block { padding: 46px 6vw 48px 24px; border-bottom: 1px solid var(--line); }
.content-block h2, .docs-section h2, .cta-section h2 {
  margin: 0 0 26px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.feature-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.feature-list li { color: var(--muted); font-size: 14px; line-height: 1.65; }
.feature-list li::before { content: "+"; color: var(--accent); margin-right: 10px; }
.feature-list strong { color: var(--text); }

.layer-stack { display: grid; gap: 0; border-left: 2px solid var(--accent); }
.layer-stack article { padding: 0 0 24px 18px; }
.layer-stack h3 { margin: 0 0 8px; font-size: 15px; }
.layer-stack p { margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.layer-stack small { color: var(--dim); font-size: 12px; }

.flow-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); }
.flow-grid article { min-height: 174px; border-right: 1px solid var(--line); padding: 18px; }
.flow-grid article:last-child { border-right: 0; }
.flow-grid span { color: var(--accent); font-weight: 800; }
.flow-grid h3 { margin: 26px 0 10px; font-size: 16px; }
.flow-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.sdk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.sdk-cards article { padding: 20px; border-right: 1px solid var(--line); }
.sdk-cards article:last-child { border-right: 0; }
.sdk-cards h3 { margin: 0 0 12px; color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.sdk-cards p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.privacy-table { border: 1px solid var(--line); }
.privacy-table > div { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.privacy-table > div:last-child { border-bottom: 0; }
.privacy-table strong, .privacy-table span { padding: 15px; font-size: 12px; }
.privacy-table strong:nth-child(2), .privacy-table span:nth-child(2) { border-left: 1px solid var(--line); }
.privacy-table strong { color: var(--text); background: #080808; }
.privacy-table span { color: var(--muted); }

.proof-pass-panel {
  position: sticky;
  top: 40px;
  align-self: start;
  height: calc(100vh - 40px);
  overflow-y: auto;
  background: #040404;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.pass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.pass-label { font-size: 11px; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.pass-id { font-size: 11px; letter-spacing: 0.12em; color: var(--dim); }
.pass-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.pass-route-item { display: flex; flex-direction: column; gap: 4px; }
.pass-route-item strong { font-family: var(--mono); font-size: 40px; font-weight: 800; line-height: 1; color: var(--text); letter-spacing: 0.04em; }
.pass-route-item small { font-size: 11px; color: var(--muted); }
.pass-arrow { font-size: 20px; color: var(--accent); text-align: center; }
.pass-mono { font-size: 10px; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; display: block; margin-bottom: 4px; }
.pass-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.pass-meta > div { padding: 12px 16px; border-right: 1px solid var(--line); }
.pass-meta > div:last-child { border-right: none; }
.pass-meta strong { font-size: 13px; font-family: var(--sans); font-weight: 700; color: var(--text); }
.pass-code {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  color: #cfcfcf;
  background: #000;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.pass-steps {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  flex: 1;
}
.pass-step {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  opacity: 0.4;
}
.pass-step.done, .pass-step.active { opacity: 1; }
.ps-num { font-size: 10px; color: var(--dim); letter-spacing: 0.1em; }
.ps-info strong { display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--text); }
.ps-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ps-check { font-size: 13px; color: #4ade80; font-weight: 700; }
.ps-accent { color: var(--accent) !important; }
.pass-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 20px 20px;
  padding: 13px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(175,80,255,0.08);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 160ms;
}
.pass-cta:hover { background: rgba(175,80,255,0.18); }
/* Footer badges */
.footer-badges { display: flex; gap: 8px; }
.footer-badges span { padding: 2px 8px; border: 1px solid var(--line); font-size: 10px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; }

.docs-section { padding: 56px 6vw; border-bottom: 1px solid var(--line); }
.docs-section pre {
  margin: 0;
  max-width: 880px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #000;
  color: #cfcfcf;
  padding: 18px;
  font-size: 12px;
  line-height: 1.78;
}
.cta-section { padding: 72px 6vw; border-bottom: 1px solid var(--line); }
.cta-section p { color: var(--muted); margin: -8px 0 24px; }
.footer-bar { display: flex; gap: 20px; align-items: center; min-height: 48px; padding: 8px 24px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.footer-bar > span { color: var(--text); margin-right: auto; }
.footer-bar a:hover { color: var(--accent); }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 136px 1fr; }
  .nav-fill { display: none; }
  .nav-links { overflow-x: auto; }
  .nav-links a { min-width: max-content; }
  .terminal-layout { grid-template-columns: 1fr; }
  .terminal-main { border-right: 0; }
  .proof-pass-panel { position: relative; top: 0; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-grid article:last-child { border-bottom: 0; }
}

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; height: auto; }
  .brand { border-bottom: 1px solid var(--line); border-right: 0; }
  .nav-links { height: 40px; border-bottom: 1px solid var(--line); }
  .hero-panel { padding: 120px 24px 64px; }
  .hero-panel h1 { font-size: clamp(42px, 14vw, 66px); }
  .terminal-layout { display: block; }
  .content-block, .docs-section, .cta-section { padding: 42px 24px; }
  .flow-grid, .sdk-cards, .privacy-table > div { grid-template-columns: 1fr; }
  .sdk-cards article, .privacy-table strong:nth-child(2), .privacy-table span:nth-child(2) { border-left: 0; border-right: 0; border-top: 1px solid var(--line); }
  .code-window { margin: 0 16px 18px; }
}

.contract-link { color: var(--accent); transition: opacity 160ms; }
.contract-link:hover { opacity: 0.7; }

/* ── Hero entrance animation ─────────────────────────────────────────────── */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

.hero-rise {
  opacity: 0;
  animation: riseIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-rise-1 { animation-delay: 0.14s; }
.hero-rise-2 { animation-delay: 0.29s; }
.hero-rise-3 { animation-delay: 0.44s; }
.hero-rise-4 { animation-delay: 0.59s; }
.hero-rise-5 { animation-delay: 0.74s; }

/* ── Quick Start hatching ─────────────────────────────────────────────────── */
.docs-hatch {
  position: relative;
  background-color: var(--panel);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0 1px,
    transparent 1px 8px
  );
}
.docs-hatch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.55) 0%,
    transparent 30%,
    transparent 70%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
}
.docs-hatch > * { position: relative; z-index: 1; }

/* ── CTA Plasma ───────────────────────────────────────────────────────────── */
.cta-plasma {
  position: relative;
  overflow: hidden;
}
#plasma-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.cta-inner {
  position: relative;
  z-index: 2;
}
