:root {
  --ink: #020f14;
  --ink-2: #071a22;
  --ink-3: #0c2630;
  --ink-4: #123240;
  --surface: #0a1e28;
  --line: rgba(45, 212, 191, 0.14);
  --line-strong: rgba(45, 212, 191, 0.28);
  --text: #e4f2f2;
  --muted: #7a9aa8;
  --muted-2: #5a7585;
  --teal: #0d9488;
  --teal-bright: #2dd4bf;
  --teal-glow: #5eead4;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --red: #e05d56;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--teal-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--teal-glow); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--ink-3);
  color: var(--text);
  padding: 10px 14px;
  z-index: 100;
  border-radius: 8px;
}

.wrap {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(2, 15, 20, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--ink-4), var(--ink-2));
  border: 1px solid var(--line-strong);
  color: var(--teal-bright);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 14px;
}

.brand-mark-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
}

.brand-name { font-size: 15px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(45, 212, 191, 0.08);
}

.nav-toggle { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--teal-bright);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-sm {
  padding: 8px 16px;
  background: var(--teal);
  color: var(--ink);
  font-size: 12px;
  flex-shrink: 0;
}
.btn-sm:hover {
  background: var(--teal-bright);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.25);
}

.btn-primary {
  padding: 14px 22px;
  background: var(--teal-bright);
  color: var(--ink);
  font-size: 14px;
}
.btn-primary:hover {
  background: var(--teal-glow);
  box-shadow: 0 0 32px rgba(45, 212, 191, 0.3);
}

.btn-outline {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line-strong);
  font-size: 14px;
}
.btn-outline:hover {
  border-color: var(--teal-bright);
  background: rgba(45, 212, 191, 0.08);
}

/* ── Hero — single viewport composition ── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 64px;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.hero-orb-a {
  width: min(560px, 70vw);
  height: min(560px, 70vw);
  background: radial-gradient(circle, rgba(13, 148, 136, 0.45), transparent 70%);
  top: -12%;
  right: -8%;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-orb-b {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
  bottom: 8%;
  left: -10%;
  animation: drift 11s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 32px) scale(1.06); }
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.hero-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(45, 212, 191, 0.03) 48%,
    rgba(45, 212, 191, 0.06) 50%,
    rgba(45, 212, 191, 0.03) 52%,
    transparent 100%
  );
  background-size: 100% 200%;
  animation: scan 8s linear infinite;
  opacity: 0.6;
}

@keyframes scan {
  from { background-position: 0 -100%; }
  to { background-position: 0 100%; }
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  opacity: 0.38;
  transform: scale(1.02);
  animation: breathe 10s ease-in-out infinite alternate;
}

@keyframes breathe {
  from { transform: scale(1.02); opacity: 0.34; }
  to { transform: scale(1.06); opacity: 0.42; }
}

.hero-visual-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(2, 15, 20, 0.72) 28%, rgba(2, 15, 20, 0.55) 55%, rgba(2, 15, 20, 0.88) 100%),
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(2, 15, 20, 0.3), rgba(2, 15, 20, 0.95) 80%);
}

.hero-stage {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
}

.hero-brand-text {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  background: linear-gradient(135deg, var(--text) 30%, var(--teal-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  margin: 0 auto;
  max-width: 16ch;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--text);
}

.hero-support {
  margin: 22px auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* ── Sections ── */

.band {
  padding: 96px 0;
  position: relative;
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.band-deep {
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(13, 148, 136, 0.08), transparent 55%),
    radial-gradient(700px 350px at 90% 100%, rgba(34, 211, 238, 0.06), transparent 50%),
    var(--ink-2);
}

.band-invest {
  background:
    radial-gradient(1000px 500px at 50% 0%, rgba(45, 212, 191, 0.1), transparent 60%),
    linear-gradient(180deg, var(--ink-2), var(--ink));
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 14px;
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  max-width: 22ch;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.lede {
  margin: 20px 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.lede em { color: var(--text); font-style: normal; font-weight: 600; }
.lede code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
  color: var(--teal-glow);
  background: rgba(45, 212, 191, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.problem-loop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 36px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: rgba(224, 93, 86, 0.06);
  border: 1px solid rgba(224, 93, 86, 0.2);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.problem-loop span:not(.loop-arrow):not(.loop-still) {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.loop-arrow { color: var(--muted-2); font-weight: 400; }
.loop-return { color: var(--red); animation: spin-slow 6s linear infinite; }

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loop-still {
  color: #f0a0a0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(224, 93, 86, 0.12);
  border: 1px solid rgba(224, 93, 86, 0.28);
}

.figure {
  margin: 40px 0 0;
}
.figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.figure figcaption {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 13px;
}

/* ── PAVO ── */

.pavo-honest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.pavo-honest article {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.pavo-honest h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.pavo-honest p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.pavo-honest code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  color: var(--teal-glow);
}

.route-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.route-step {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.route-step:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.route-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 8px;
}

.route-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.route-step-hi {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.32);
}

.route-step-stop {
  background: rgba(224, 93, 86, 0.1);
  border-color: rgba(224, 93, 86, 0.28);
}
.route-step-stop .route-tag { color: #f0a0a0; }

.cite {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--muted-2);
}

/* ── Proof gate ── */

.proof-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid var(--line-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.proof-term {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--teal-glow);
}

.proof-op { color: var(--muted-2); }
.proof-arrow { color: var(--muted); }
.proof-result {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--ink);
  font-weight: 600;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.compare-col {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.compare-col h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.compare-col ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.compare-bad {
  background: rgba(224, 93, 86, 0.06);
  border-color: rgba(224, 93, 86, 0.22);
}

.compare-good {
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.28);
}

/* ── Product surfaces ── */

.surface-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.surface {
  grid-column: span 2;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease;
}
.surface:hover { border-color: var(--line-strong); }

.surface:nth-child(4),
.surface:nth-child(5) {
  grid-column: span 3;
}

.surface h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--teal-bright);
}

.surface p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.surface code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  color: var(--teal-glow);
}

/* ── Architecture facts ── */

.arch-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.arch-facts > div {
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.arch-facts strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

.arch-facts p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.arch-facts code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  color: var(--teal-glow);
}

/* ── Demo ── */

.demo-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: start;
}

.terminal {
  margin: 24px 0 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: #041018;
  border: 1px solid var(--line-strong);
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(45, 212, 191, 0.08);
}

.terminal code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #b8f5ea;
  white-space: pre;
}

.demo-hint {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.demo-hint em { color: var(--teal-bright); font-style: normal; }

.demo-links {
  display: grid;
  gap: 10px;
}

.demo-links a {
  text-decoration: none;
  color: var(--text);
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.demo-links a:hover {
  border-color: var(--teal-bright);
  background: rgba(45, 212, 191, 0.08);
  color: var(--text);
}

/* ── Invest ── */

.invest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.invest-grid article {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.invest-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--teal-bright);
}

.invest-grid p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.invest-grid code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  color: var(--teal-glow);
}

.invest-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* ── Footer ── */

.site-foot {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--ink);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.foot-inner p { margin: 0; }
.foot-inner strong { color: var(--text); }
.foot-inner a { text-decoration: none; }
.foot-inner a:hover { text-decoration: underline; }

/* ── Responsive ── */

@media (max-width: 980px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 20px;
    background: rgba(2, 15, 20, 0.96);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle:checked + .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked + .nav-burger span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked + .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .pavo-honest,
  .route-ladder,
  .compare,
  .arch-facts,
  .demo-layout,
  .invest-grid {
    grid-template-columns: 1fr;
  }

  .surface-grid {
    grid-template-columns: 1fr;
  }

  .surface,
  .surface:nth-child(4),
  .surface:nth-child(5) {
    grid-column: span 1;
  }

  .hero {
    padding-bottom: 48px;
  }

  .hero-visual img {
    object-position: center 60%;
    opacity: 0.28;
  }

  .nav-inner > .btn-sm {
    display: none;
  }
}

@media (max-width: 640px) {
  .band { padding: 72px 0; }

  .cta-row .btn {
    width: 100%;
  }

  .proof-equation {
    font-size: 11px;
    padding: 16px;
  }

  .hero-brand {
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
