:root {
  --ink: #08090a;
  --ink-2: #0d0f11;
  --ink-3: #131619;
  --paper: #f2efe6;
  --muted: #9b9d94;
  --line: rgba(242, 239, 230, 0.12);
  --line-strong: rgba(242, 239, 230, 0.22);
  --acid: #c8f751;
  --acid-ink: #0a0b0c;
  --danger: #ff8a75;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--acid); color: var(--acid-ink); }

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

code, pre, .eyebrow, .index, .chip, .line-label, .near-label, .near-badge, .step-num, .feature-index {
  font-family: var(--mono);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--acid); color: var(--acid-ink);
  border-radius: 9px;
  font-weight: 700;
  font-size: 1rem;
}
.brand-word { letter-spacing: 0.18em; font-weight: 600; font-size: 0.95rem; }

.nav nav { display: flex; gap: 1.5rem; }
.nav nav a { color: var(--muted); font-size: 0.92rem; transition: color 160ms ease; }
.nav nav a:hover { color: var(--paper); }

.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper);
  transition: border-color 160ms ease, color 160ms ease;
}
.nav-cta:hover { border-color: var(--acid); color: var(--acid); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) 2rem 4rem;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--acid);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8.2vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 600;
  max-width: 15ch;
}
h1 .accent {
  color: var(--acid);
  position: relative;
  white-space: nowrap;
}

.lede {
  max-width: 62ch;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); }
.button.primary:hover { background: #d6ff6a; }
.button.ghost:hover { border-color: var(--acid); color: var(--acid); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.6rem; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.call {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  max-width: 760px;
}
.node { display: flex; flex-direction: column; gap: 0.1rem; min-width: 110px; }
.node-label { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.15rem; }
.node strong { font-size: 0.95rem; letter-spacing: -0.01em; }
.node small { color: var(--muted); font-family: var(--mono); font-size: 0.65rem; }
.node-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(200, 247, 81, 0.12);
  margin-bottom: 0.35rem;
}
.line {
  flex: 1;
  position: relative;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}
.line-label {
  position: absolute;
  left: 50%;
  top: -1.55rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.06em;
}
.line-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  animation: pulse 2.6s ease-in-out infinite alternate;
}
@keyframes pulse {
  from { left: 0; }
  to { left: calc(100% - 6px); }
}
@keyframes pulseY {
  from { top: 0; }
  to { top: calc(100% - 6px); }
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 2rem;
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.index {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 22ch;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.steps li {
  background: var(--ink-2);
  padding: 1.5rem 1.35rem 1.6rem;
  min-height: 220px;
}
.step-num {
  display: block;
  font-size: 0.75rem;
  color: var(--acid);
  letter-spacing: 0.08em;
  margin-bottom: 2.2rem;
}
.steps h3 { margin: 0 0 0.55rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.steps code {
  font-size: 0.82em;
  color: var(--paper);
  background: var(--ink-3);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.feature {
  background: var(--ink-2);
  padding: 1.6rem 1.4rem;
  min-height: 210px;
  transition: background 180ms ease;
}
.feature:hover { background: var(--ink-3); }
.feature-index { color: var(--acid); font-size: 0.72rem; letter-spacing: 0.1em; }
.feature h3 { margin: 2.2rem 0 0.55rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.architecture .diagram {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.diagram-node {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 150px;
  justify-content: center;
}
.diagram-node strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.diagram-node small { color: var(--muted); font-size: 0.8rem; }
.diagram-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.6rem;
}
.relay-node { border-color: var(--acid); background: rgba(200, 247, 81, 0.04); }
.diagram-link {
  flex: 0 0 70px;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.diagram-link::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px dashed var(--line-strong);
}
.diagram-link span { position: relative; background: var(--ink); padding: 0 0.4rem; }
.diagram-note { margin: 1.1rem 0 0; color: var(--muted); font-size: 0.88rem; max-width: 62ch; }

.privacy {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.privacy h2 { margin: 0 0 1.25rem; }
.privacy-copy p { color: var(--muted); margin: 0 0 0.9rem; max-width: 58ch; }
.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.privacy-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.privacy-list span { color: var(--muted); font-size: 0.9rem; }
.privacy-list strong { font-family: var(--mono); font-size: 0.78rem; color: var(--acid); font-weight: 500; }

.terminal {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #050607;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.terminal-bar em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.08em;
}
.terminal pre {
  margin: 0;
  padding: 1.35rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: #d7d4c9;
}
.prompt { color: var(--acid); }
.comment { color: var(--muted); }
.start-links { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.near {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.near h2 { margin: 0 0 1rem; }
.near-copy p { color: var(--muted); margin: 0; max-width: 60ch; }
.near-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgba(200, 247, 81, 0.08), transparent 60%), var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.near-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.near-card strong { font-size: 1.8rem; letter-spacing: -0.03em; }
.near-sub { color: var(--muted); font-size: 0.82rem; }
.near-badge {
  align-self: flex-start;
  margin-top: 1rem;
  border: 1px solid rgba(200, 247, 81, 0.4);
  color: var(--acid);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 2rem 3.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
footer p { margin: 0.35rem 0 0; font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.25rem; align-items: center; font-family: var(--mono); font-size: 0.75rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--acid); }
.muted { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy, .near { grid-template-columns: 1fr; }
  .diagram { flex-direction: column; }
  .diagram-link { flex: 0 0 46px; }
  .diagram-link::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px dashed var(--line-strong); }
  .diagram-link span { background: var(--ink); }
}

@media (max-width: 680px) {
  .nav { flex-wrap: wrap; padding: 1rem 1.1rem; }
  .nav nav { order: 3; width: 100%; gap: 1rem; overflow-x: auto; }
  .hero, .section, footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  h1 { font-size: clamp(2.6rem, 13vw, 4.2rem); }
  h1 .accent { white-space: normal; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .steps li, .feature { min-height: auto; }
  .call { flex-direction: column; align-items: stretch; }
  .line { height: 26px; background: none; }
  .line::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px dashed var(--line-strong); }
  .line-label { top: -1.2rem; }
  .line-pulse { top: 0; left: 50%; margin-top: 0; margin-left: -3px; animation-name: pulseY; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line-pulse { animation: none; left: 50%; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .button:hover { transform: none; }
}
