:root {
  --ink: #f2f5fa;
  --bg: #01113f;
  --bg-deep: #000a26;
  --surface: #071b52;
  --surface-2: #0c2361;
  --terminal: #050c22;
  --blue: #6fa2e0;
  --blue-bright: #9fc4f0;
  --muted: #8ea0c4;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.18);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 44px 44px;
}

h1, h2, h3 { font-family: var(--font-display); }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ============ ACCESSIBILITY ============ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; left: 12px;
  background: #ffffff; color: var(--bg);
  padding: 12px 20px; border-radius: 2px; font-weight: 600;
  text-decoration: none; z-index: 100; transition: top .15s ease;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}
::selection { background: var(--blue); color: #ffffff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 6px; }

/* ============ NAV ============ */
header {
  position: sticky; top: 0;
  background: #01113f;
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; max-width: 1120px; margin: 0 auto;
}
.brand-link { position: relative; z-index: 2; flex-shrink: 0; }
nav ul {
  list-style: none; display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 0.84rem; z-index: 1;
}
nav ul a {
  text-decoration: none; color: var(--muted); letter-spacing: 0.03em;
  padding: 8px 16px; border-radius: 2px; transition: color .15s, background .15s;
  position: relative;
}
nav ul a::before { content: "// "; opacity: 0; transition: opacity .15s; color: var(--blue-bright); }
nav ul a:hover { color: #ffffff; }
nav ul a:hover::before { opacity: 1; }
nav ul a.active { color: #ffffff; background: rgba(255,255,255,0.06); }
nav ul a.active::before { content: "// "; opacity: 1; }

.menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
}
.menu-toggle span { display: block; width: 100%; height: 2px; background: #ffffff; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 713px) {
  .menu-toggle { display: flex; }
  nav ul {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg-deep); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  nav ul.open { max-height: 300px; }
  nav ul li { width: 100%; }
  nav ul a { display: block; padding: 16px 28px; border-bottom: 1px solid var(--line); border-radius: 0; border-left: 2px solid transparent; }
  nav ul a.active { border-left-color: var(--blue-bright); background: rgba(255,255,255,0.04); }
  nav { position: relative; }
  .brand-link img { height: 42px !important; width: auto !important; }
}

/* ============ SECTION TAGS ============ */
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.05em; color: var(--blue-bright); margin-bottom: 18px;
}
.eyebrow::before { content: "[ "; color: var(--muted); }
.eyebrow::after { content: " ]"; color: var(--muted); }

/* ============ HERO / PAGE HEAD ============ */
.pagehead { padding: 76px 0 56px; border-bottom: 1px solid var(--line); }
.pagehead h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.4rem); font-weight: 500; line-height: 1.1;
  color: #ffffff; max-width: 17ch; letter-spacing: -0.01em;
}
.pagehead p.lede { margin-top: 20px; max-width: 56ch; font-size: 1.12rem; color: var(--muted); }

.cta-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; text-decoration: none;
  font-weight: 600; font-size: 0.96rem; font-family: var(--font-mono);
  border-radius: 2px; letter-spacing: 0.01em;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-primary { background: #ffffff; color: var(--bg); }
.btn-primary:hover { background: var(--blue-bright); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border: 1.5px solid var(--line-strong); color: #ffffff; }
.btn-ghost:hover { border-color: var(--blue-bright); background: rgba(255,255,255,0.04); }

/* ============ TERMINAL ANALYZER ============ */
.scan-tool { margin-top: 44px; max-width: 620px; }
.terminal {
  background: var(--terminal); border: 1px solid var(--line-strong);
  border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,3,15,0.5);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  background: #0a1230; border-bottom: 1px solid var(--line);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.term-title {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  margin-left: 8px; letter-spacing: 0.02em;
}
.terminal-body { padding: 20px 20px 22px; font-family: var(--font-mono); }
.scan-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scan-form::before { content: "$"; color: #6fdc9e; font-weight: 600; font-size: 1rem; }
.scan-input {
  flex: 1; min-width: 180px; padding: 10px 4px; border: none; background: transparent;
  color: var(--ink); font-family: var(--font-mono); font-size: 0.96rem;
}
.scan-input::placeholder { color: var(--muted); opacity: 0.7; }
.scan-input:focus { outline: none; }
.scan-form .btn { padding: 9px 18px; font-size: 0.86rem; }
.scan-hint { margin-top: 14px; font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono); opacity: 0.8; }

.scan-loading {
  margin-top: 16px; color: var(--muted); font-size: 0.9rem; font-family: var(--font-mono);
  display: flex; align-items: center; gap: 10px;
}
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: #6fdc9e;
  display: inline-block; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.scan-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 0.88rem;
}
.scan-label { color: var(--muted); }
.scan-label::before { content: "> "; color: var(--muted); }
.scan-status { font-weight: 600; font-size: 0.85rem; }
.scan-status::before { content: "● "; font-size: 0.7rem; }
.status-bad { color: #f0a05c; }
.status-good { color: #6fdc9e; }

.scan-error {
  margin-top: 16px; padding: 12px 16px; border-radius: 4px;
  background: rgba(240,160,92,0.1); border: 1px solid rgba(240,160,92,0.3);
  color: #f0a05c; font-size: 0.86rem; font-family: var(--font-mono);
}

section { padding: 76px 0; }
.section-head { max-width: 50ch; margin-bottom: 46px; }
.section-head h2 { font-size: 1.9rem; font-weight: 500; color: #ffffff; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ============ NUMBERED SERVICES LIST ============ */
.services {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  counter-reset: servicenum;
}
.service {
  counter-increment: servicenum;
  display: grid; grid-template-columns: 88px 1fr; column-gap: 28px;
  padding: 36px 4px; border-bottom: 1px solid var(--line);
  position: relative;
}
.service::before {
  content: counter(servicenum, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / -1;
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 500;
  color: rgba(255,255,255,0.14); line-height: 1; transition: color .2s ease;
}
.service:hover::before { color: var(--blue-bright); }
.service h3 { grid-column: 2; font-size: 1.2rem; font-weight: 600; color: #ffffff; margin-bottom: 10px; }
.service p { grid-column: 2; color: var(--muted); font-size: 0.98rem; }
.service ul { grid-column: 2; margin-top: 14px; padding-left: 0; list-style: none; color: var(--muted); font-size: 0.94rem; }
.service ul li { margin-bottom: 6px; padding-left: 20px; position: relative; }
.service ul li::before { content: "→"; position: absolute; left: 0; color: var(--blue-bright); }
@media (max-width: 640px) {
  .service { grid-template-columns: 1fr; row-gap: 8px; }
  .service::before { grid-column: 1; grid-row: 1; font-size: 1.6rem; }
  .service h3, .service p, .service ul { grid-column: 1; }
}

/* ============ PROCESS ============ */
.process-list { border-top: 1px solid var(--line); }
.process-item { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.process-item .tag { font-family: var(--font-mono); font-size: 0.9rem; color: var(--blue-bright); font-weight: 600; padding-top: 3px; }
.process-item h3 { font-size: 1.1rem; color: #ffffff; margin-bottom: 6px; font-weight: 600; }
.process-item p { color: var(--muted); font-size: 0.97rem; max-width: 60ch; }

/* ============ PROOF BOX ============ */
.proof-box {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 42px;
  display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
}
.proof-box h3 { font-size: 1.3rem; font-weight: 500; max-width: 32ch; color: #ffffff; }
.proof-box p { color: var(--muted); margin-top: 8px; max-width: 40ch; font-size: 0.95rem; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px; }
.contact-card div.field { margin-bottom: 18px; font-size: 0.98rem; color: #ffffff; }
.contact-card .k { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-bright); margin-bottom: 5px; }

footer {
  padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 0.82rem; font-family: var(--font-mono);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
