/* Layout concept: a research-institute letterhead. Bone page, obsidian bands for product proof,
   hairline rules, an editorial serif for statements and a clean sans for everything operational. */
:root {
  --bg: #F8FAFC;          /* bone */
  --surface: #FFFFFF;
  --ink: #0B0F19;         /* obsidian */
  --muted: #64748B;       /* slate */
  --rule: #E2E5EA;
  --band: #0B0F19;        /* obsidian band */
  --band-ink: #E8ECF2;
  --band-muted: #8E99AB;
  --band-rule: #232A38;
  --accent: #0A5C50;      /* brand teal from the logo, used sparingly */
  --accent-soft: #E3EFEC;
  --ok: #2F6B4F;
  --pending: #8A5A12;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F19; --surface: #121826; --ink: #E8ECF2; --muted: #94A0B4; --rule: #232A38;
    --band: #060910; --band-ink: #E8ECF2; --band-muted: #8E99AB; --band-rule: #1C2230;
    --accent: #5FBFAE; --accent-soft: #10241F; --ok: #6FBF96; --pending: #D9A75A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F19; --surface: #121826; --ink: #E8ECF2; --muted: #94A0B4; --rule: #232A38;
  --band: #060910; --band-ink: #E8ECF2; --band-muted: #8E99AB; --band-rule: #1C2230;
  --accent: #5FBFAE; --accent-soft: #10241F; --ok: #6FBF96; --pending: #D9A75A; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.12; }
h3 { font-size: 1.4rem; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.prose { max-width: 65ch; display: grid; gap: 1rem; }
.prose p { color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark em { font-style: normal; color: var(--accent); }
.brand-llc { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 0.93rem; color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 0.93rem/1 var(--body); padding: 13px 20px; border-radius: 3px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink); transition: opacity .15s, transform .15s;
}
.btn:hover { opacity: .88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }
.textlink { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.textlink:hover { color: var(--accent); }
.menu-toggle { display: none; }
.menu-btn { display: none; cursor: pointer; font: 600 0.9rem var(--body); padding: 10px 12px; border: 1px solid var(--rule); border-radius: 3px; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .nav .btn { display: none; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 16px; }
  .nav-links a { padding: 8px 0; font-size: 1rem; }
  .menu-toggle:checked ~ .nav-links { display: flex; }
  .nav-links .btn { display: inline-flex; margin-top: 8px; color: var(--bg); }
}
@media (min-width: 861px) { .nav-links .btn-mobile { display: none; } }

/* ---------- sections ---------- */
section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { display: grid; gap: 14px; margin-bottom: 48px; max-width: 760px; }
.rule-top { border-top: 1px solid var(--rule); }

.hero { padding-block: clamp(72px, 11vw, 136px) clamp(56px, 8vw, 96px); }
.hero .stack { display: grid; gap: 26px; max-width: 880px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 8px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em;
}

/* ---------- product portfolio ---------- */
.portfolio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.product { padding: 32px 28px 32px 0; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; min-width: 0; }
.product + .product { padding-left: 28px; border-left: 1px solid var(--rule); }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-domain { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.product h3 { font-size: 1.9rem; }
.product p { color: var(--muted); }
.product ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.92rem; }
.product li { padding-left: 16px; position: relative; }
.product li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--accent); }
.product .actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-top: 10px; }
@media (max-width: 900px) {
  .portfolio { grid-template-columns: 1fr; }
  .product { padding: 28px 0; }
  .product + .product { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

.status {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--rule); border-radius: 2px; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status.live::before { background: var(--ok); }
.status.early::before { background: var(--accent); }
.status.dev::before { background: transparent; border: 1px solid var(--muted); }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principle { display: grid; gap: 12px; align-content: start; min-width: 0; }
.principle h3 { font-size: 1.3rem; }
.principle p { color: var(--muted); }
.principle .glyph { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.08em; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- obsidian band ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .lede, .band .muted { color: var(--band-muted); }
.band .eyebrow { color: #5FBFAE; }
.band .btn { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.band .btn-ghost { background: transparent; color: var(--band-ink); border-color: var(--band-rule); }
.band .textlink { color: var(--band-ink); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- framework matrix mock ---------- */
.viewport {
  border: 1px solid var(--band-rule); border-radius: 8px; overflow: hidden; background: #0F1420;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.viewport-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--band-rule); }
.viewport-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2A3242; display: block; }
.viewport-bar span { margin-left: 10px; font-family: var(--mono); font-size: 0.72rem; color: var(--band-muted); }
.matrix-scroll { overflow-x: auto; }
table.matrix { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.8rem; color: #D5DBE5; }
.matrix th, .matrix td { border-bottom: 1px solid #1E2533; border-right: 1px solid #1E2533; padding: 10px 12px; text-align: left; vertical-align: top; }
.matrix thead th { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8E99AB; background: #121826; }
.matrix tbody th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; color: #5FBFAE; white-space: nowrap; background: #121826; }
.matrix td { line-height: 1.45; transition: background .15s; }
.matrix td:hover { background: #161D2B; }
.q { display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.66rem; color: #8E99AB; }
.cell-empty { color: #5B6578; font-style: italic; }
.viewport-foot { padding: 10px 14px; font-family: var(--mono); font-size: 0.68rem; color: var(--band-muted); border-top: 1px solid var(--band-rule); }

.callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 56px; border-top: 1px solid var(--band-rule); }
.callout { padding: 26px 24px 0 0; display: grid; gap: 8px; min-width: 0; }
.callout + .callout { padding-left: 24px; border-left: 1px solid var(--band-rule); }
.callout h3 { font-size: 1.2rem; }
.callout p { color: var(--band-muted); font-size: 0.95rem; }
@media (max-width: 860px) {
  .callouts { grid-template-columns: 1fr; }
  .callout, .callout + .callout { padding: 22px 0; border-left: 0; }
  .callout + .callout { border-top: 1px solid var(--band-rule); }
}

/* ---------- seven stages ---------- */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: st; }
.stage { counter-increment: st; padding: 18px 14px 0 0; border-top: 2px solid var(--rule); transition: border-color .2s; min-width: 0; cursor: default; }
.stage::before { content: counter(st); display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--muted); margin-bottom: 12px; transition: color .2s; }
.stage strong { display: block; font-size: 0.95rem; }
.stage span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.stages:hover .stage { border-top-color: var(--rule); }
.stage.on, .stages .stage:hover, .stage:focus-within { border-top-color: var(--accent); }
.stage.on::before, .stage:hover::before { color: var(--accent); }
@media (max-width: 900px) {
  .stages { grid-template-columns: 1fr; }
  .stage { display: grid; grid-template-columns: 52px minmax(0, 1fr); padding: 16px 0; border-top-width: 1px; }
  .stage::before { grid-row: span 2; font-size: 1.8rem; margin: 0; }
}

/* ---------- audiences ---------- */
.audiences { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; }
.audiences .aud:first-child { grid-row: span 2; }
.aud { background: var(--surface); border: 1px solid var(--rule); padding: 30px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.aud p { color: var(--muted); }
@media (max-width: 860px) { .audiences { grid-template-columns: 1fr; } .audiences .aud:first-child { grid-row: auto; } }

/* ---------- ledger ---------- */
.ledger { border-top: 1px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ledger-row strong { font-weight: 600; }
.ledger-row p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 700px) { .ledger-row { grid-template-columns: 1fr; gap: 6px; } }
.status.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.status.done::before { background: var(--ok); }
.status.todo { color: var(--pending); border-color: color-mix(in srgb, var(--pending) 35%, transparent); }
.status.todo::before { background: transparent; border: 1px solid var(--pending); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); }
.check input { margin-top: 5px; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-done { border-left: 2px solid var(--ok); padding: 6px 0 6px 14px; }
.hp { position: absolute; left: -9999px; }

/* ---------- advisory ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.service { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 12px; align-content: start; min-width: 0; }
.service:nth-child(even) { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--rule); }
.service p { color: var(--muted); }
.service ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.94rem; display: grid; gap: 4px; }
@media (max-width: 800px) { .services { grid-template-columns: 1fr; } .service, .service:nth-child(even) { padding: 28px 0; border-left: 0; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: sp; }
.steps li { counter-increment: sp; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li::before { content: "Step " counter(sp); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.steps p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.founder-card { border: 1px solid var(--rule); background: var(--surface); padding: 28px; display: grid; gap: 14px; }
.founder-card dl { margin: 0; display: grid; gap: 12px; }
.founder-card dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.founder-card dd { margin: 2px 0 0; font-size: 0.95rem; }
@media (max-width: 860px) { .founder { grid-template-columns: 1fr; } }

.cta-band { text-align: left; }
.cta-band .stack { display: grid; gap: 20px; max-width: 720px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 56px 40px; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-grid h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--ink); }
.foot-grid a:hover { color: var(--accent); }
.foot-about { display: grid; gap: 12px; max-width: 42ch; color: var(--muted); }
.foot-legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 0.82rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-about { grid-column: 1 / -1; } }

/* ---------- logo mark ---------- */
.brand { align-items: center; }
.brand-logo { width: 30px; height: 30px; flex: none; color: var(--ink); }
.brand-logo .node { fill: var(--accent); }
/* ---------- legal + simple pages ---------- */
.legal { max-width: 70ch; }
.legal h2 { font-size: 1.5rem; margin-top: 1.4rem; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--accent); }
.form-error a { color: inherit; }
.ledger-row .status { justify-self: start; }
