:root {
  --bg: #05070a;
  --panel: #0c1117;
  --line: #1a222c;
  --text: #e8edf2;
  --dim: #9aa5b2;
  --muted: #7d8896;
  --green: #00f0a8;
  --cyan: #00c8ff;
  --amber: #ffb84d;
  --red: #ff4d6d;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav { position: sticky; top: 0; z-index: 10; background: rgba(5,7,10,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 17px; }
nav .brand img { width: 28px; height: 28px; border-radius: 7px; }
nav .links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
nav .links a { color: var(--dim); }
nav .links a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.btn.primary { background: linear-gradient(135deg, var(--green), var(--cyan)); color: #02140e; box-shadow: 0 6px 24px rgba(0,240,168,.25); }
.btn.ghost { border: 1px solid var(--line); color: var(--text); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }

/* Hero */
.hero { padding: 88px 0 56px; text-align: center; }
.hero img.icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 18px 60px rgba(0,240,168,.18); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; margin: 26px 0 16px; letter-spacing: -0.02em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--dim); max-width: 640px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Terminal mock */
.term { margin: 56px auto 0; max-width: 860px; background: #0a0e13; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.term .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #0d1218; }
.term .bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a323c; display: inline-block; }
.term .tabs { display: flex; gap: 6px; margin-left: 14px; font-size: 12px; }
.term .tabs span { padding: 3px 10px; border-radius: 6px; color: var(--muted); }
.term .tabs span.on { background: rgba(255,255,255,.06); color: var(--text); }
.term .bcast { background: linear-gradient(90deg, var(--amber), #ff9a3d); color: #1a1000; font: 600 12px/1 -apple-system, sans-serif; padding: 8px 14px; letter-spacing: .02em; }
.term pre { margin: 0; padding: 18px 20px; font: 13px/1.55 var(--mono); color: #cfd8e1; white-space: pre-wrap; }
.term .p { color: var(--green); }
.term .alert { background: #b3132f; color: #fff; }
.term .dim { color: var(--muted); }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 32px; margin: 0 0 10px; letter-spacing: -0.01em; }
section p.sub { color: var(--dim); margin: 0 0 36px; max-width: 680px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.card p { margin: 0; color: var(--dim); font-size: 14.5px; }
.card.big { grid-column: span 2; }
@media (max-width: 640px) { .card.big { grid-column: span 1; } nav .links a.hide-s { display: none; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 640px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.plan.featured { border-color: rgba(0,240,168,.5); box-shadow: 0 0 0 1px rgba(0,240,168,.2), 0 18px 50px rgba(0,240,168,.08); }
.plan .tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--green); background: rgba(0,240,168,.12); padding: 3px 8px; border-radius: 999px; margin-bottom: 10px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 4px 0; }
.plan .price small { font-size: 15px; color: var(--dim); font-weight: 500; }
.plan ul { padding-left: 18px; color: var(--dim); font-size: 14px; margin: 12px 0 0; }

/* Doc pages */
.doc { max-width: 760px; padding: 56px 24px 80px; margin: 0 auto; }
.doc h1 { font-size: 38px; margin: 0 0 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.doc h2 { font-size: 21px; margin: 38px 0 10px; }
.doc p, .doc li { color: #c9d2db; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 10px 0; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { color: var(--dim); font-weight: 600; }
.doc code { font: 13.5px var(--mono); background: var(--panel); padding: 1px 6px; border-radius: 5px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--dim); }
footer .right { margin-left: auto; }

p.sub.small { margin-top: 18px; font-size: 13px; }

/* ---- 3D hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 110px; min-height: min(86vh, 860px); display: flex; align-items: center; }
.hero canvas#net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hero-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 55% 50% at 50% 42%, rgba(5,7,10,.9) 0%, rgba(5,7,10,.6) 50%, rgba(5,7,10,0) 78%),
              linear-gradient(to bottom, rgba(5,7,10,0) 70%, var(--bg) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; }

/* ---- Live demo terminal */
.term.demo { margin-top: 8px; }
.term .tabs button { font: inherit; font-size: 12px; background: none; border: 0; color: var(--muted); padding: 4px 11px; border-radius: 6px; cursor: pointer; }
.term .tabs button:hover { color: var(--text); }
.term .tabs button.on { background: rgba(255,255,255,.07); color: var(--text); }
.term.demo pre { height: 330px; overflow: hidden; }
.term .ln { display: block; min-height: 1.55em; }
.term .ln.ok { color: var(--green); }
.term .ln.warn { color: var(--amber); }
.term .ln.dim { color: var(--muted); }
.term .ln.alert { background: #b3132f; color: #fff; }
.term .cur { color: var(--green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- Stats */
.stats { padding: 44px 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; text-align: center; }
.stat b { display: block; font-size: 46px; line-height: 1.1; background: linear-gradient(90deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--dim); font-size: 14px; }

/* ---- Vendors */
.vendors { padding: 48px 0; text-align: center; }
.vendors p { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; margin: 0 0 18px; }
.vendor-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.vendor-row span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--dim); background: var(--panel); transition: color .2s, border-color .2s; }
.vendor-row span:hover { color: var(--text); border-color: rgba(0,240,168,.45); }

/* ---- Cards: subtle hover lift */
.card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(0,240,168,.35); box-shadow: 0 14px 40px rgba(0,240,168,.07); }

/* ---- Final CTA */
.final { text-align: center; padding: 90px 0; background: radial-gradient(ellipse 50% 70% at 50% 100%, rgba(0,240,168,.10), transparent 70%); }
.final .sub { margin-left: auto; margin-right: auto; }

/* ---- Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(3n+2) { transition-delay: .08s; }
.grid .reveal:nth-child(3n) { transition-delay: .16s; }

/* ---- Screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; display: block; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.shots figcaption { color: var(--dim); font-size: 13.5px; margin-top: 8px; }
#lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
  .term .cur { animation: none; }
}

/* ---- Port Finder rack section */
.finder-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .finder-row { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; color: var(--dim); font-size: 15px; }
.checks li { padding-left: 26px; position: relative; margin: 10px 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.rack-wrap { position: relative; height: 420px; }
.rack-wrap canvas { width: 100%; height: 100%; display: block; }
#rack-label { position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap;
  margin: -54px 0 0 -12px; padding: 7px 12px; border-radius: 8px; font: 12.5px var(--mono);
  background: rgba(12,17,23,.92); border: 1px solid rgba(255,184,77,.6); color: var(--text);
  box-shadow: 0 8px 30px rgba(255,184,77,.18); opacity: 0; transition: opacity .35s ease; }
#rack-label b { color: var(--amber); margin-right: 6px; }
#rack-label.show { opacity: 1; }
#rack-label::after { content: ""; position: absolute; left: 10px; bottom: -7px; width: 12px; height: 12px;
  background: rgba(12,17,23,.92); border-right: 1px solid rgba(255,184,77,.6); border-bottom: 1px solid rgba(255,184,77,.6); transform: rotate(45deg); }

/* ---- Audience */
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.who-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font: 700 16px var(--mono); color: #02140e; background: linear-gradient(135deg, var(--green), var(--cyan)); margin-bottom: 14px; }
.card.who h3 { font-size: 18px; }
