/* BII v2 — single-page editorial scroll
   Newsreader + IBM Plex Sans + JetBrains Mono. Numbered sections, prose-as-design.
   Brand: BII Blue #004AAD (per identity.md). */

@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --paper:    #ffffff;
  --light:    #F4F6F9;
  --ink:      #1A1A1A;
  --ink-soft: #2a2f3a;
  --grey:     #5a606e;            /* darkened from #666 for AA contrast */
  --brand:    #004AAD;            /* BII Blue */
  --deep:     #003478;            /* BII Deep */
  --rule:     rgba(26,26,26,.10);

  --serif: "Newsreader", "Times New Roman", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --col:   minmax(0, 720px);
  --gutter: clamp(24px, 5vw, 80px);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--brand); }

/* ───────── Sticky nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { width: 24px; height: 24px; display: block; }
.nav-brand .name {
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  letter-spacing: -.012em; color: var(--ink); line-height: 1;
}
.nav-links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 500; }
.nav-links a { color: var(--ink-soft); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover { color: var(--brand); border-bottom-color: var(--brand); }
@media (max-width: 720px) { .nav-links a:not(.cta) { display: none; } }
.nav-links .cta { color: var(--brand); border-bottom: 1px solid var(--brand); }

/* ───────── Section shell ─────────
   Sections span full viewport width; .wrap holds the 1200px content
   container with horizontal gutter padding — same container the nav
   and footer use, so left/right edges line up the entire page. */
section {
  padding: clamp(96px, 16vh, 200px) 0;
}
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Mobile: tighten vertical breathing room so the page doesn't feel
   like an empty scrolling tunnel. 16vh per section across 7 sections
   accumulates ~1900px of padding alone on an 844px viewport, and the
   last section's bottom-padding reads as 'empty scrolling footer'. */
@media (max-width: 760px) {
  section { padding: clamp(48px, 7vh, 80px) 0; }
  .hero {
    padding-top: clamp(56px, 9vh, 96px);
    padding-bottom: clamp(48px, 7vh, 80px);
  }
  footer { padding: 32px var(--gutter) 28px; }
  .foot-inner { gap: 24px; }
  .foot-rule { margin-top: 20px; padding-top: 14px; }
}

.section-num {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 28px;
  display: flex; gap: 14px; align-items: baseline;
}
.section-num .label { color: var(--ink-soft); }

h1, h2 { font-family: var(--serif); font-optical-sizing: auto; }

/* ───────── Hero ───────── */
.hero {
  padding-top: clamp(80px, 14vh, 160px);
  padding-bottom: clamp(80px, 14vh, 160px);
}
.hero .wrap { position: relative; }
.hero-row { display: contents; }
.hero-mark { display: none; }
@media (min-width: 980px) {
  .hero-row {
    margin-top: clamp(28px, 4vh, 48px);
    display: flex;
    align-items: flex-start;
    gap: clamp(32px, 5vw, 72px);
  }
  .hero-row h1 { flex: 1 1 auto; margin: 0; min-width: 0; }
  .hero-row h1 em { white-space: nowrap; }
  .hero-mark {
    display: block;
    flex: 0 0 auto;
    /* exactly 2 lines of h1 (line-height 1.0 × font-size) */
    height: calc(2 * clamp(44px, 7.2vw, 96px));
    width: calc(2 * clamp(44px, 7.2vw, 96px));
    object-fit: contain;
    opacity: .92;
  }
}
.hero h1 {
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 96px);
  line-height: 1.0;
  letter-spacing: -.024em;
  color: var(--ink);
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--brand); }
.hero .sub {
  margin-top: clamp(40px, 8vh, 96px);
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5; color: var(--ink-soft);
  max-width: 52ch; text-wrap: pretty;
}
.hero .sub em { font-style: italic; color: var(--brand); }
.hero .cta-row { margin-top: 32px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.hero .cta-row a {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  color: var(--brand); border-bottom: 1px solid var(--brand);
  padding-bottom: 2px; transition: color .2s, border-color .2s;
}
.hero .cta-row a:hover { color: var(--deep); border-color: var(--deep); }
.hero .cta-row .quiet { color: var(--ink-soft); border-color: var(--rule); }
.hero .cta-row .quiet:hover { color: var(--brand); border-color: var(--brand); }

/* ───────── Prose sections ───────── */
.section-h2 {
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -.018em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: clamp(28px, 4vh, 48px);
}
.section-h2 em { font-style: italic; font-weight: 400; color: var(--brand); }

.prose {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: var(--brand); }
.prose a { color: var(--brand); border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* ───────── 02 — The gap (audit numbers as inline figures) ───────── */
.gap-figures {
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px 40px;
  max-width: 720px;
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 4vh, 40px);
}
.fig .n {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1; letter-spacing: -.014em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.fig .l {
  margin-top: 8px;
  font-family: var(--sans); font-size: 13px; line-height: 1.4;
  color: var(--grey);
}

/* ───────── 03 — PHYLO layers ───────── */
.layers {
  margin-top: clamp(36px, 5vh, 56px);
  display: grid; gap: 0;
  border-top: 1px solid var(--rule);
}
.layer {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(20px, 3vh, 28px) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.layer .lnum {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .12em; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.layer .ltitle {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -.012em; color: var(--ink);
  margin-bottom: 6px;
}
.layer .ldesc {
  font-family: var(--serif); font-size: 17px; line-height: 1.55;
  color: var(--ink-soft); max-width: 56ch;
}
@media (min-width: 760px) {
  .layer { grid-template-columns: 80px 220px 1fr; }
}

/* ───────── 04 — Where we are (date stamp + prose) ───────── */
.datestamp {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 18px;
}

/* ───────── 05 — Founder ───────── */
.founder-grid {
  margin-top: clamp(28px, 4vh, 40px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vh, 56px);
}
.founder-portrait {
  display: block;
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 22px;
  background: var(--light);
}
@media (min-width: 760px) { .founder-grid { grid-template-columns: 280px 1fr; } }
.cv {
  border-top: 1px solid var(--rule);
}
.cv-row {
  display: grid; grid-template-columns: 92px 1fr;
  gap: 16px; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.cv-row .lbl {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: var(--grey); letter-spacing: .02em;
}
.cv-row .val { font-family: var(--sans); font-size: 14px; color: var(--ink); }
.cv-row .val em { font-style: italic; color: var(--brand); }

/* ───────── 06 — Contact ───────── */
.contact-line {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6; color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}
.contact-line em { font-style: italic; color: var(--brand); }
.contact-line a {
  color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--brand); padding-bottom: 1px;
  white-space: nowrap; transition: color .2s;
}
.contact-line a:hover { color: var(--brand); }

/* ───────── Footer ───────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 40px var(--gutter) 56px;
  background: var(--paper);
}
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .foot-inner { grid-template-columns: 1.4fr 1fr 1.2fr; align-items: start; } }
.foot-brand .name {
  font-family: var(--serif); font-weight: 500; font-size: 17px;
  letter-spacing: -.012em; color: var(--ink); line-height: 1.2;
}
.foot-brand .addr {
  font-size: 13px; color: var(--grey); line-height: 1.6; margin-top: 8px;
}
.foot-brand .addr a { color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.foot-brand .addr a:hover { border-bottom-color: var(--brand); color: var(--brand); }
.foot-nav { display: flex; flex-direction: column; gap: 8px; }
.foot-nav .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--grey); margin-bottom: 4px;
}
.foot-nav a { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); align-self: flex-start; }
.foot-nav a:hover { color: var(--brand); }
.credibility {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.credibility a { display: inline-flex; align-items: center; }
.credibility a > img { height: 44px; width: auto; display: block; }
.credibility .aws-link > img { height: 28px; }
.credibility a:hover { opacity: .75; transition: opacity .2s; }
.foot-rule {
  max-width: 1200px; margin: 28px auto 0; padding: 16px var(--gutter) 0;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 760px) { .foot-rule { flex-direction: row; justify-content: space-between; align-items: center; } }
.foot-rule .copy {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--grey);
}
.foot-rule .legal { font-size: 12px; color: var(--grey); line-height: 1.5; }
.foot-rule .legal a { color: var(--ink-soft); border-bottom: 1px solid var(--rule); }

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
