:root {
  --bg: #161320;
  --bg-soft: #21192a;
  --ink: #fff7ef;
  --muted: #e1cbc0;
  --line: rgba(255, 186, 154, 0.16);
  --line-strong: rgba(255, 186, 154, 0.3);
  --accent: #ffa777;
  --accent-2: #5fdbc8;
  --radius: 12px;
  --content-width: 1060px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sora', sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 8% -20%, rgba(255, 167, 119, 0.1), transparent 65%),
    radial-gradient(1200px 600px at 95% -10%, rgba(95, 219, 200, 0.08), transparent 60%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 55%, #112534 100%);
  line-height: 1.65;
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.site-bg {
  display: none;
}

/* ── Layout ─────────────────────────────────────────────── */

.section {
  width: min(var(--content-width), 90vw);
  margin: 0 auto;
}

/* ── Topbar ─────────────────────────────────────────────── */

.topbar {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(22, 19, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(var(--content-width), 90vw);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img {
  border-radius: 7px;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 180ms ease;
}

nav a:hover {
  color: var(--ink);
}

.nav-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  color: #ffd3bc;
}

/* ── Sections ───────────────────────────────────────────── */

.section + .section {
  margin-top: 7rem;
}

.hero {
  margin-top: 4rem;
  padding-top: 1rem;
}

.section-title {
  margin: 0 0 2rem;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

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

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.hero-copy {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 54ch;
  line-height: 1.7;
}

.hero-copy code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.hero-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

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

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(136deg, var(--accent), #ffc87b);
  color: #2b1609;
  box-shadow: 0 2px 16px rgba(255, 167, 119, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 4px 24px rgba(255, 167, 119, 0.25);
}

.btn-soft {
  border-color: rgba(95, 219, 200, 0.35);
  background: rgba(95, 219, 200, 0.08);
  color: var(--ink);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(18, 10, 20, 0.32);
}

/* ── Hero preview aside ──────────────────────────────────── */

.hero-preview {
  align-self: center;
  max-width: 26rem;
  margin-left: auto;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(22, 19, 32, 0.5);
}

.hero-preview h2 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.hero-preview ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.hero-preview li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-preview li span {
  color: var(--ink);
  display: inline-block;
  min-width: 6.2rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.preview-foot {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* ── Mesh network illustration ────────────────────────────── */

.mesh-vis {
  margin: 3.5rem 0 0;
  border: 1px solid rgba(255, 167, 119, 0.08);
  border-radius: var(--radius);
  background: radial-gradient(
    ellipse 80% 70% at 50% 45%,
    rgba(255, 167, 119, 0.03) 0%,
    rgba(22, 14, 28, 0.6) 60%,
    rgba(16, 10, 22, 0.9) 100%
  );
  overflow: hidden;
  position: relative;
}

.mesh-vis::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% 0%,
    rgba(255, 167, 119, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.mesh-vis canvas {
  display: block;
  width: 100%;
  height: 440px;
  position: relative;
}

@media (max-width: 760px) {
  .mesh-vis {
    margin-top: 2.5rem;
  }
  .mesh-vis canvas {
    height: 300px;
  }
}

/* ── Stat strip ──────────────────────────────────────────── */

.stat-strip {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 0;
}

.stat-strip article {
  padding: 0.2rem 0;
}

.stat-strip h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.stat-strip p {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Trust row ───────────────────────────────────────────── */

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0;
  margin-top: 4rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-row p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.trust-row p:not(:last-child)::after {
  content: '\2022';
  margin: 0 0.85rem;
  color: rgba(255, 186, 154, 0.35);
}

/* ── Feature cards ───────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
  row-gap: 0;
}

.card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── CLI split ───────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.split p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 0.6rem;
}

pre {
  margin: 0;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(25, 14, 24, 0.5);
  overflow: auto;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #ffd8bf;
}

/* ── Architecture model grid ─────────────────────────────── */

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
}

.model-card {
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.model-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.model-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.model-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--accent);
  opacity: 0.7;
  margin-top: 0.7rem;
}

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

footer {
  margin-top: 7rem;
  padding: 2.5rem 0 4.5rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-layout,
  .split,
  .model-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    max-width: none;
    margin: 0;
  }

  .model-grid {
    gap: 1.5rem;
  }

  .card-grid {
    row-gap: 0;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: auto;
    padding: 0.8rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .section + .section {
    margin-top: 5rem;
  }

  .hero {
    margin-top: 2.5rem;
  }

  .stat-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .trust-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .trust-row p:not(:last-child)::after {
    content: '';
    margin: 0;
  }

  footer {
    margin-top: 5rem;
  }
}
