:root {
  --ground: #f3f7fa;
  --panel: #ffffff;
  --ink: #021e4c;          /* logo navy */
  --ink-2: #25344a;
  --muted: #3a4a5e;
  --muted-2: #4b5b70;
  --line: #d3dde6;
  --line-strong: #b8c6d6;
  --field: #7a8ca3;
  --accent: #0b6e99;       /* readable blue on light backgrounds */
  --accent-bright: #19e3f8; /* logo cyan, for dark backgrounds */
  --dark-text: #c3d0e4;
  --dark-text-2: #9fb0cc;
  --band: #e6eef5;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
a:hover { opacity: 0.85; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: max(32px, env(safe-area-inset-left)); }
.section { padding-block: 88px; }
.stack { display: flex; flex-direction: column; }

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h2 { font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-weight: 600; font-size: 23px; line-height: 1.2; }
.lede { margin: 0; font-size: 18px; color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin-bottom: 40px; }

/* header */
.header-bar { background: #fff; border-bottom: 1px solid var(--line); }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); }
.brand img { height: 44px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a.btn { color: #fff; }

.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border-radius: 8px; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; border: 0;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.nav .btn { min-height: 44px; padding: 0 20px; }

/* hero */
.hero {
  background-color: var(--ground);
  background-image: linear-gradient(#e3eaf1 1px, transparent 1px), linear-gradient(90deg, #e3eaf1 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 72px 96px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-weight: 700; font-size: clamp(2.5rem, 5.4vw, 4.25rem); line-height: 1.04; letter-spacing: -0.02em; }
.hero p.lede { max-width: 540px; font-size: 19px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tools-line { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); }

.terminal {
  flex: 1 1 400px; min-width: 0; background: var(--ink); color: #e8eef8; border-radius: 12px;
  padding: 24px 28px 28px; font-family: var(--font-mono); font-size: 14px; line-height: 1.5;
}
.terminal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #22345c; color: var(--dark-text-2); font-size: 13px; }
.terminal ul { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.terminal li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.terminal li > span:first-child { display: inline-flex; align-items: center; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-bright); flex: none; }
.dot.run { width: 9px; height: 9px; background: transparent; border: 2px solid var(--accent-bright); }
.ok { color: var(--accent-bright); }
.terminal-foot { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #22345c; color: var(--dark-text-2); font-size: 13px; }

/* services */
.grid-cards { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card { flex: 1 1 340px; min-width: 0; background: var(--panel); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.card p { margin: 0; color: var(--muted); }
.card .tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }

/* approach */
.band-dark { background: var(--ink); color: #e8eef8; }
.band-dark h2, .band-dark h3 { color: var(--ground); }
.band-dark .eyebrow { color: var(--accent-bright); }
.band-dark .lede { color: var(--dark-text); }
.steps { display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--accent-bright); padding-top: 20px; }
.step h3 { font-size: 24px; }
.step p { margin: 0; color: var(--dark-text); }
.step .stage { font-family: var(--font-mono); font-size: 13px; color: var(--accent-bright); }
.step .out { font-family: var(--font-mono); font-size: 12.5px; color: var(--dark-text-2); }

/* tools */
.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 20px; border-top: 1px solid var(--line); }
.tool-row:last-child { border-bottom: 1px solid var(--line); }
.tool-label { flex: 0 0 200px; margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); }
.chips { flex: 1 1 320px; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); font-family: var(--font-mono); font-size: 13px; }

/* engagement */
.band-soft { background: var(--band); }
.models { display: flex; flex-wrap: wrap; gap: 24px; }
.model { flex: 1 1 300px; min-width: 0; background: var(--panel); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.model p { margin: 0; color: var(--muted); }

/* contact */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-copy .mono { font-family: var(--font-mono); font-size: 15px; color: var(--ink-2); }
.form { flex: 1 1 400px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; }
.form .btn { align-self: flex-start; padding: 0 28px; }
.form-status { margin: 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.site-footer { background: var(--ink); color: var(--dark-text); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 40px; font-size: 14px; }
.footer-inner .brand-name { font-family: var(--font-mono); color: var(--ground); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a { text-decoration: none; }

/* text pages */
.prose { max-width: 760px; padding-block: 56px 96px; }
.prose h1 { font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 8px; }
.prose h2 { font-size: 1.5rem; margin-top: 40px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--muted); }
.prose .updated { font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); }

@media (max-width: 560px) {
  .section { padding-block: 64px; }
  .card, .model, .form { padding: 24px; }
  .tool-label { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
