:root {
  --bg: #05080f;
  --bg-2: #0a1120;
  --panel: rgba(13, 22, 40, 0.78);
  --panel-solid: #0c1526;
  --line: rgba(120, 170, 255, 0.14);
  --line-2: rgba(120, 170, 255, 0.26);
  --cyan: #3be8ff;
  --green: #4dff9a;
  --amber: #ffb84d;
  --text: #e8eefb;
  --muted: #8b9bb9;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: 96px;
  --node-x: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(59, 232, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(77, 255, 154, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* faint grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--cyan); color: #000; padding: 8px 12px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 0 var(--gutter);
  position: relative;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.brand-mark circle { fill: var(--cyan); stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 20px; letter-spacing: 0.08em; }
.brand-text small { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: 15px;
  padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav a.nav-cta { color: #021016; background: var(--cyan); font-weight: 600; }
.nav a.nav-cta:hover { background: #7ff0ff; }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 16px;
  text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #021016; box-shadow: 0 0 0 0 rgba(59,232,255,.0); }
.btn-primary:hover { box-shadow: 0 8px 30px -6px rgba(59,232,255,.55); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--cyan); }

/* ---------- wire ---------- */
#wire-wrap { position: relative; z-index: 1; }
#wire {
  position: absolute; top: 0; left: 0; width: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
}
#wire path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.w-track { stroke: rgba(120, 170, 255, 0.16); stroke-width: 2; stroke-dasharray: 2 7; }
.w-glow { stroke: rgba(59, 232, 255, 0.18); stroke-width: 10; }
.w-live { stroke: var(--cyan); stroke-width: 2.5; }
.w-packets circle { fill: #eaffff; }
.w-packets circle.halo { fill: rgba(59, 232, 255, 0.35); }
.w-head-dot { fill: #fff; }
.w-head-ring { fill: none; stroke: var(--cyan); stroke-width: 1.5; animation: ring 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.section, .hero { position: relative; z-index: 1; }

/* nodes on the wire */
.node {
  position: absolute; left: calc(var(--node-x) - var(--gutter) - 9px); top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2);
  transition: border-color .4s, box-shadow .4s, background .4s;
  z-index: 2;
}
.node::after {
  content: attr(data-label);
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted);
  transition: color .4s;
}
.node.live { border-color: var(--green); background: #0b2a1b; box-shadow: 0 0 0 5px rgba(77,255,154,.12), 0 0 22px rgba(77,255,154,.55); }
.node.live::after { color: var(--green); }
.node-sm { width: 14px; height: 14px; left: calc(var(--node-x) - var(--gutter) - 7px); top: 6px; }

/* ---------- hero ---------- */
.hero { min-height: 100vh; padding: 120px 0 90px; display: flex; flex-direction: column; justify-content: center; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-left: 24px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--green);
  border: 1px solid rgba(77,255,154,.3); background: rgba(77,255,154,.06);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 26px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(77,255,154,.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(77,255,154,.6); } 70% { box-shadow: 0 0 0 10px rgba(77,255,154,0); } 100% { box-shadow: 0 0 0 0 rgba(77,255,154,0); } }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: 22px; color: var(--muted); font-size: 19px; max-width: 34em; }

.terminal {
  position: relative;
  background: rgba(7, 12, 22, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(59,232,255,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #233150; }
.term-bar i:first-child { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.term-body {
  margin: 0; padding: 18px 18px 8px; min-height: 290px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #b9c7e3;
  white-space: pre-wrap; word-break: break-word;
}
.term-body .cmd { color: var(--text); }
.term-body .ok { color: var(--green); }
.term-body .warn { color: var(--amber); }
.term-body .done { color: var(--cyan); font-weight: 600; }
.term-body .cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-note { padding: 0 18px 14px; font-family: var(--mono); font-size: 11px; color: #56668a; }
.tx-port {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--cyan);
  background: var(--bg); border: 1px solid var(--cyan); border-radius: 6px; padding: 3px 8px;
  box-shadow: 0 0 16px rgba(59,232,255,.4);
}
.scroll-hint {
  margin: 70px auto 0; display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .08em;
}
.scroll-hint span { width: 18px; height: 28px; border: 1.5px solid var(--muted); border-radius: 10px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; background: var(--cyan); border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { from { transform: translateY(0); opacity: 1; } to { transform: translateY(9px); opacity: 0; } }

/* ---------- sections ---------- */
.section { padding: 110px 0; }
.sec-head { position: relative; max-width: 720px; margin-bottom: 48px; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: .06em; margin-bottom: 14px; }
h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; }
.sec-sub { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 28px 24px 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .4s, transform .25s, box-shadow .4s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card.on { border-color: rgba(59,232,255,.35); box-shadow: inset 0 0 0 1px rgba(59,232,255,.06), 0 18px 40px -24px rgba(59,232,255,.45); }
.card h3 { font-size: 20px; margin: 18px 0 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.ico { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: rgba(59,232,255,.08); border: 1px solid rgba(59,232,255,.2); fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card-scope { border-style: dashed; border-color: rgba(255,184,77,.35); background: rgba(40, 26, 8, 0.35); }
.card-scope .ico { stroke: var(--amber); background: rgba(255,184,77,.08); border-color: rgba(255,184,77,.25); }
.card-scope.on { border-color: rgba(255,184,77,.6); box-shadow: 0 18px 40px -24px rgba(255,184,77,.45); }
.card-scope strong { color: var(--amber); }

/* status LEDs */
.led { position: absolute; top: 18px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: #2a3654; transition: background .3s, box-shadow .3s; }
.led::before { content: "STBY"; position: absolute; right: 14px; top: -4px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: #4c5c80; transition: color .3s; }
.on .led { background: var(--green); box-shadow: 0 0 10px var(--green); }
.on .led::before { content: "ACTIVE"; color: var(--green); }
.on .led.led-amber { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.on .led.led-amber::before { content: "EXCLUDED"; color: var(--amber); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 760px; }
.step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 6px; align-items: start;
  padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .4s;
}
.step b { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 3px; transition: color .4s; }
.step h3 { font-size: 19px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15.5px; }
.step .node-sm { top: 24px; }
.step.done { border-color: rgba(77,255,154,.3); }
.step.done b { color: var(--green); }
.step.done b::after { content: " ✓"; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about-copy p { color: #c3cfe6; font-size: 18.5px; margin-bottom: 18px; }
.about-copy strong { color: var(--text); }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values li { position: relative; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: border-color .4s; }
.values li.on { border-color: rgba(77,255,154,.28); }
.values h3 { font-size: 18px; margin-bottom: 4px; }
.values p { color: var(--muted); font-size: 15px; }

/* contact */
.section-contact { padding-bottom: 130px; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.contact-card { padding: 28px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; }
.link-status { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.link-status .pulse { background: var(--amber); animation: none; }
.link-up .link-status { color: var(--green); }
.link-up .link-status .pulse { background: var(--green); animation: pulse 2s infinite; }
.contact-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.cl-label { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.cl-value { font-size: 19px; font-weight: 600; text-align: right; word-break: break-all; }
a.contact-line:hover .cl-value { color: var(--cyan); }
.brief { padding: 28px; border: 1px dashed var(--line-2); border-radius: 16px; }
.brief ul { margin: 0; padding: 0; list-style: none; }
.brief li { padding: 8px 0 8px 22px; position: relative; color: #c3cfe6; }
.brief li::before { content: "›"; position: absolute; left: 4px; color: var(--cyan); font-family: var(--mono); }

/* footer + HUD */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; }
.footer-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.muted { color: var(--muted); }
.hud {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em;
  background: rgba(5,8,15,.8); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 11px;
  backdrop-filter: blur(8px);
}
.hud-bars { display: flex; gap: 3px; align-items: flex-end; }
.hud-bars i { width: 4px; background: #253250; border-radius: 1px; transition: background .3s; }
.hud-bars i:nth-child(1) { height: 5px; } .hud-bars i:nth-child(2) { height: 8px; } .hud-bars i:nth-child(3) { height: 11px; } .hud-bars i:nth-child(4) { height: 14px; } .hud-bars i:nth-child(5) { height: 17px; }
.hud-bars i.on { background: var(--green); }
#hud-pct { color: var(--text); min-width: 3.2em; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 46px; --node-x: 20px; }
  body { font-size: 16px; }
  .wrap { padding-right: 16px; }
  .hero { padding-top: 100px; min-height: auto; }
  .hero-grid { padding-left: 0; }
  .lede { font-size: 17px; }
  .term-body { font-size: 11.5px; min-height: 250px; padding: 14px 14px 6px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .step { grid-template-columns: 40px 1fr; padding: 16px; }
  .node::after { display: none; }
  .cl-value { font-size: 16px; }
  .contact-card, .brief { padding: 20px; }
  .btn { flex: 1 1 auto; }
  .hud { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 42px; height: 42px; background: none; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; padding: 0 10px;
  }
  .nav-toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(5,8,15,.97); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 17px; }
  .topbar-in { padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse, .w-head-ring, .scroll-hint span::after, .term-body .cursor { animation: none; }
}
