:root {
  /* --- Palette: edge-routing console, teal = live signal --- */
  --bg:         #0a0e13;
  --panel:      #111720;
  --panel-2:    #161d27;
  --border:     #232d3a;
  --text:       #e8eef4;
  --muted:      #8497a8;
  --accent:     #43d9c8;
  --accent-dim: #1f4f4a;
  --amber:      #f2b84e;
  --danger:     #e2554a;

  --font-display: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1040px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(67, 217, 200, 0.06), transparent 45%),
    radial-gradient(circle at 100% 20%, rgba(67, 217, 200, 0.04), transparent 40%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--font-display);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.85em;
}

p { line-height: 1.65; }
.muted { color: var(--muted); }

/* ---------- header ---------- */

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--accent); }

.brand-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  flex: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.85rem;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 24px 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow, .section-eyebrow {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.1rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-sample {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.hero-sample .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.6s infinite ease-in-out;
  flex: none;
}
.hero-sample .arrow { color: var(--muted); }
.hero-sample .accent-text { color: var(--accent); }
.hero-sample .muted-code { color: var(--muted); }

@keyframes blink { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.hero-diagram svg { width: 100%; height: auto; display: block; }

.node-label {
  font-family: var(--font-display);
  font-size: 12px;
  fill: var(--muted);
}
.node-label.small { font-size: 11px; }

.route-path {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.pulse { fill: var(--accent); opacity: 0; }

/* motion-path animation is progressive enhancement — only enable where supported,
   so the dot doesn't sit stranded at 0,0 in browsers without offset-path */
@supports (offset-path: path("M0,0 L1,1")) {
  .pulse { offset-distance: 0%; }
  .pulse-1 { offset-path: path("M70,160 C140,160 140,60 220,60"); animation: travel 3.2s infinite ease-in-out; }
  .pulse-2 { offset-path: path("M70,160 C140,160 140,160 220,160"); animation: travel 3.2s infinite ease-in-out 1.05s; }
  .pulse-3 { offset-path: path("M70,160 C140,160 140,260 220,260"); animation: travel 3.2s infinite ease-in-out 2.1s; }

  @keyframes travel {
    0%   { offset-distance: 0%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
  }
}

/* ---------- how it works ---------- */

.how {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 72px;
  border-top: 1px solid var(--border);
}

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.steps li { padding: 0; }

.step-index {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- features ---------- */

.features {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.feature h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 60px;
  border-top: 1px solid var(--border);
}

.footer-top { margin-bottom: 20px; }
.footer-top p { margin: 8px 0 0; font-size: 0.88rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

.copyright {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

/* ---------- simple content pages (legal) ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal .eyebrow { margin-bottom: 10px; }

.legal h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.legal .updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 40px;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 40px 0 12px;
}

.legal p, .legal li {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal ul { padding-left: 20px; }

.legal .note {
  margin-top: 48px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  font-size: 0.85rem;
}

.legal .back {
  display: inline-block;
  margin-top: 40px;
  font-size: 0.88rem;
}

/* ---------- 404 / redirect page ---------- */

.redirect-box { text-align: center; }
.redirect-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1s infinite ease-in-out;
  margin-bottom: 10px;
}

/* ---------- landing (legacy hook, kept minimal) ---------- */

.landing {
  max-width: 640px;
  margin: 18vh auto 0;
  padding: 0 24px;
}
.landing h1 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-size: 2.2rem;
  margin-bottom: 4px;
}

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero h1 { font-size: 2.3rem; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .features { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .hero-diagram { order: -1; max-width: 280px; margin: 0 auto; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-sample .dot,
  .redirect-dot,
  .pulse {
    animation: none !important;
  }
  .pulse { opacity: 0.8; }
}
