/* ==========================================================================
   BlueSavant AI — bluesavant.ai
   Static stylesheet. Ported from the Claude Design system prototype
   (design system: tokens/*.css + components/*.jsx), with all inline React
   styles converted to real CSS.

   Stage 1 = desktop parity with the prototype. Responsive breakpoints are
   added in Stage 2; this file is intentionally structured so those are
   additive rather than a rewrite.
   ========================================================================== */

/* ---------- 1. TOKENS (ported verbatim from design-system tokens/) -------- */

:root {
  /* Brand blue — sampled from the logo: wordmark #3B5BEE, mark gradient #3B5BEE -> #87A0E8 */
  --bsai-blue-50:  #F2F5FF;
  --bsai-blue-100: #E1E8FE;
  --bsai-blue-200: #C6D3FC;
  --bsai-blue-300: #87A0E8;
  --bsai-blue-400: #6C92F5;
  --bsai-blue-500: #4E6EF2;
  --bsai-blue-600: #3B5BEE;   /* CORE BRAND BLUE */
  --bsai-blue-700: #2A45C9;
  --bsai-blue-800: #1F349B;
  --bsai-blue-900: #16246E;

  /* Ink — cool navy neutrals */
  --bsai-ink-950: #0B1230;
  --bsai-ink-900: #101B3D;
  --bsai-ink-800: #1B2650;
  --bsai-ink-700: #2B3557;
  --bsai-ink-600: #4A5170;
  --bsai-ink-500: #6B7391;
  --bsai-ink-400: #98A0BC;
  --bsai-ink-300: #C3C9DC;
  --bsai-ink-200: #DFE3EF;
  --bsai-ink-100: #EDF0F7;
  --bsai-ink-50:  #F5F6F8;
  --bsai-white:   #FFFFFF;

  /* Clinical sky — secondary */
  --bsai-sky-100: #D9EEFB;
  --bsai-sky-300: #7AC4F2;
  --bsai-sky-400: #4BAFEE;
  --bsai-sky-500: #1C9AEA;
  --bsai-sky-700: #1A6DAF;

  /* Data accents — charts, stat emphasis, diagram arrows only */
  --bsai-amber:  #FDCD12;
  --bsai-pink:   #F45EAC;
  --bsai-teal:   #25ABBE;
  --bsai-violet: #7C5CE0;

  --bsai-gradient-mark: linear-gradient(150deg, #3B5BEE 0%, #6C92F5 55%, #87A0E8 100%);
  --bsai-gradient-ink:  linear-gradient(180deg, #101B3D 0%, #0B1230 100%);
  --bsai-gradient-wash: linear-gradient(180deg, #F2F5FF 0%, #FFFFFF 100%);

  --bsai-blue-a10: rgba(59, 91, 238, .10);
  --bsai-blue-a20: rgba(59, 91, 238, .20);
  --bsai-ink-a08:  rgba(11, 18, 48, .08);
  --bsai-white-a12: rgba(255, 255, 255, .12);
  --bsai-white-a60: rgba(255, 255, 255, .60);

  /* Type */
  --font-display: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui:      "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Fluid scale. Each clamp() lands on the design system's fixed value at
     1280px and scales down from there, so desktop is pixel-identical to the
     CD prototype while phones get a readable, proportionate scale. */
  --fs-display-1: clamp(40px, 5.0vw, 64px);
  --fs-display-2: clamp(32px, 3.8vw, 48px);
  --fs-h1:        clamp(28px, 3.13vw, 40px);
  --fs-h2:        clamp(24px, 2.5vw, 32px);
  --fs-h3:        clamp(20px, 1.9vw, 24px);
  --fs-h4:        clamp(18px, 1.6vw, 20px);
  --fs-lead:      clamp(17px, 1.6vw, 20px);
  --fs-body: 16px;
  --fs-body-sm: 14px;
  --fs-caption: 13px;
  --fs-eyebrow: 12px;

  /* Stat numerals scale harder than body copy — they are the loudest element
     on the page and overflow first on narrow screens. */
  --fs-stat:    clamp(34px, 4.4vw, 48px);
  --fs-stat-sm: clamp(26px, 3.2vw, 32px);
  --fs-stat-lg: clamp(44px, 6.0vw, 64px);

  --lh-tight: 1.08;
  --lh-snug: 1.2;
  --lh-heading: 1.28;
  --lh-body: 1.65;
  --lh-loose: 1.8;

  --tracking-display: -.02em;
  --tracking-heading: -.01em;
  --tracking-body: 0;
  --tracking-eyebrow: .16em;
  --tracking-wordmark: .02em;

  /* Space — 4px grid */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  /* Section rhythm: 60px on phones, 96px on desktop — the cadence the design
     system documents. Gutter tightens on small screens to buy content width. */
  --section-y: clamp(56px, 7.5vw, 96px);
  --section-y-compact: clamp(40px, 5vw, 60px);
  --container-max: 1280px;
  --measure: 68ch;
  --gutter: clamp(20px, 2.5vw, 24px);

  /* Elevation */
  --radius-xs: 4px;  --radius-sm: 8px;  --radius-md: 12px;
  --radius-lg: 15px; --radius-xl: 24px; --radius-pill: 999px; --radius-circle: 50%;

  --shadow-xs: 0 1px 2px rgba(11,18,48,.06);
  --shadow-sm: 0 2px 25px rgba(11,18,48,.08);
  --shadow-md: 0 10px 30px rgba(11,18,48,.10);
  --shadow-lg: 0 15px 35px rgba(11,18,48,.15);
  --shadow-diffuse: 0 5px 90px rgba(11,18,48,.10);
  --shadow-focus: 0 0 0 3px rgba(59,91,238,.30);

  /* Motion */
  --dur-fast: 150ms; --dur-base: 300ms; --dur-slow: 500ms; --dur-reveal: 600ms;
  --ease-standard: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --lift-hover: -10px;

  /* Semantic aliases — author against these, not the raw ramps */
  --text-primary: var(--bsai-ink-900);
  --text-secondary: var(--bsai-ink-600);
  --text-muted: var(--bsai-ink-500);
  --text-inverse: var(--bsai-white);
  --text-brand: var(--bsai-blue-600);
  --text-on-brand: var(--bsai-white);
  --text-link: var(--bsai-blue-600);
  --text-link-hover: var(--bsai-blue-700);

  --surface-page: var(--bsai-white);
  --surface-subtle: var(--bsai-ink-50);
  --surface-card: var(--bsai-white);
  --surface-brand: var(--bsai-blue-600);
  --surface-brand-subtle: var(--bsai-blue-50);
  --surface-inverse: var(--bsai-ink-950);
  --surface-inverse-card: rgba(255,255,255,.04);

  --border-subtle: var(--bsai-ink-200);
  --border-strong: var(--bsai-ink-300);
  --border-brand: var(--bsai-blue-600);
  --border-inverse: rgba(255,255,255,.12);

  --accent: var(--bsai-blue-600);
  --accent-hover: var(--bsai-blue-700);
  --accent-pressed: var(--bsai-blue-800);
  --accent-soft: var(--bsai-blue-100);

  --state-positive: var(--bsai-teal);
  --state-attention: var(--bsai-amber);
  --state-critical: var(--bsai-pink);
}

/* Inverse scope — dark sections and the footer */
.bsai-inverse {
  --text-primary: var(--bsai-white);
  --text-secondary: rgba(255,255,255,.72);
  --text-muted: rgba(255,255,255,.52);
  --text-brand: var(--bsai-blue-300);
  --text-link: var(--bsai-blue-300);
  --text-link-hover: var(--bsai-white);
  --surface-page: var(--bsai-ink-950);
  --surface-subtle: var(--bsai-ink-900);
  --surface-card: rgba(255,255,255,.04);
  --border-subtle: rgba(255,255,255,.12);
  --border-strong: rgba(255,255,255,.24);
}

/* ---------- 2. RESET / BASE --------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

/* Icons.
   Previously the Bootstrap Icons webfont from jsDelivr (~276 KB, and a
   third-party request that disclosed every visitor's IP). Now a 9 KB
   same-origin SVG sprite containing only the 20 glyphs this site uses.
   Sized in em so an icon always matches the text it sits beside. */
.bi {
  width: 1em; height: 1em;
  fill: currentColor;
  vertical-align: -.125em;
  flex-shrink: 0;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }
img { border-style: none; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: pretty; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--bsai-blue-400); outline-offset: 2px; }

/* Skip link — keyboard and screen-reader users */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--bsai-white); color: var(--bsai-blue-700);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-ui); font-weight: var(--fw-semibold);
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- 3. LAYOUT PRIMITIVES ---------------------------------------- */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); background: var(--surface-page); }
.section--subtle { background: var(--surface-subtle); }
.section--ink { background: var(--bsai-ink-950); }

.grid { display: grid; gap: var(--space-16); align-items: center; }
.grid--1-1    { grid-template-columns: 1fr 1fr; }
.grid--5-6    { grid-template-columns: 5fr 6fr; }
.grid--5-7    { grid-template-columns: 5fr 7fr; }
.grid--7-5    { grid-template-columns: 7fr 5fr; }
.grid--4-8    { grid-template-columns: 4fr 8fr; }
.grid--8-4    { grid-template-columns: 8fr 4fr; }
.grid--3col   { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); align-items: stretch; }
.grid--4col   { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); align-items: stretch; }
.grid--4col-wide { grid-template-columns: repeat(4, 1fr); gap: var(--space-8); align-items: start; }

.mt-12 { margin-top: var(--space-12); }

.media { display: block; width: 100%; }
.media--rounded { border-radius: var(--radius-lg); }
.media--shadow  { box-shadow: var(--shadow-lg); }

/* ---------- 4. TYPOGRAPHY ----------------------------------------------- */

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-brand);
}
.eyebrow--inverse { color: var(--bsai-blue-300); }
.eyebrow--muted   { color: var(--text-muted); }

.display-2 {
  font-family: var(--font-display);
  font-size: var(--fs-display-2);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
  color: var(--bsai-white);
}

.section-title { max-width: var(--measure); }
.section-title--center { text-align: center; max-width: 820px; margin-inline: auto; }

.section-title__h {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--lh-heading);
  color: var(--text-primary);
}
.eyebrow + .section-title__h { margin-top: var(--space-3); }
.section-title--lg .section-title__h { font-size: var(--fs-h1); }
.section-title--sm .section-title__h { font-size: var(--fs-h3); }

.section-title__sub {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  margin-top: var(--space-3);
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  max-width: var(--measure);
}
.prose { line-height: var(--lh-body); color: var(--text-secondary); max-width: var(--measure); }
.prose strong { color: var(--text-primary); }

.footnote {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ---------- 5. BUTTONS --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: var(--fw-semibold); font-size: 14px;
  line-height: 1.2; padding: 12px 28px;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
.btn--lg { font-size: 16px; padding: 14px 34px; }
.btn--sm { font-size: 13px; padding: 8px 20px; }
.btn--full { width: 100%; }

.btn--primary { background: var(--accent); color: var(--text-on-brand); }
.btn--primary:hover { background: var(--accent-hover); color: var(--text-on-brand); }

.btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--secondary:hover { background: var(--accent); color: var(--text-on-brand); }

.btn--inverse { background: var(--bsai-white); color: var(--bsai-blue-700); }
.btn--inverse:hover { background: var(--bsai-blue-50); color: var(--bsai-blue-800); }

.btn--inverse-outline { background: transparent; color: var(--bsai-white); border-color: var(--bsai-white); }
.btn--inverse-outline:hover { background: var(--bsai-white); color: var(--bsai-blue-700); }

/* ---------- 6. CARDS ----------------------------------------------------- */

.card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  height: 100%;
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.card--interactive:hover { transform: translateY(var(--lift-hover)); box-shadow: var(--shadow-lg); }
.card--inverse { background: var(--surface-inverse-card); border: 1px solid var(--border-inverse); box-shadow: none; }
.card--pad-28 { padding: 28px; }

.service-card__icon { font-size: clamp(30px, 2.8vw, 36px); line-height: 1; display: block; margin-bottom: var(--space-4); color: var(--accent); }
.service-card__chip {
  width: 54px; height: 54px; border-radius: var(--radius-circle);
  background: var(--surface-card); color: var(--accent); box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: var(--space-5);
}
.service-card__title {
  font-size: var(--fs-h4); font-weight: var(--fw-semibold);
  line-height: var(--lh-heading); color: var(--text-primary);
}
.service-card__body {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--text-secondary); margin-top: 10px;
}
a.service-card__link { display: block; text-decoration: none; color: inherit; }

/* ---------- 7. STAT BLOCK ------------------------------------------------ */

.stat { display: block; }

.stat__value {
  font-family: var(--font-display); font-size: var(--fs-stat); font-weight: var(--fw-semibold);
  letter-spacing: -.03em; line-height: 1; color: var(--text-brand);
  text-wrap: balance;
}
.stat--sm .stat__value { font-size: var(--fs-stat-sm); }
.stat--lg .stat__value { font-size: var(--fs-stat-lg); }
.stat--center { text-align: center; }

.stat__label {
  font-family: var(--font-ui); font-size: 11px; font-weight: var(--fw-semibold);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 10px;
}
.stat__note {
  font-family: var(--font-body); font-size: var(--fs-body-sm); line-height: var(--lh-body);
  color: var(--text-secondary); margin-top: 8px; max-width: 32ch;
}
.stat--center .stat__note { margin-inline: auto; }

.stat-row { display: flex; gap: var(--space-16); }

/* Three-up stat band on the home page */
.stat-band {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12);
}
.stat-band .stat__note { margin-inline: auto; }

/* "See the benchmarks →" style link */
.arrow-link {
  font-family: var(--font-ui); font-size: 15px; font-weight: var(--fw-semibold);
  color: var(--text-link); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.arrow-link::after {
  content: "\2192"; transition: transform var(--dur-base) var(--ease-standard);
}
.arrow-link:hover { color: var(--text-link-hover); }
.arrow-link:hover::after { transform: translateX(4px); }

.faq-aside { display: grid; gap: var(--space-6); align-content: start; }

/* Contact page email — large enough to tap, obvious enough to copy */
.contact-email {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-soft);
  word-break: break-word;
}
.contact-email:hover { border-bottom-color: var(--accent); }

/* ---------- 8. METRIC BAR ------------------------------------------------ */

.metric { margin-bottom: 18px; }
.metric__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-ui); font-size: var(--fs-body-sm); font-weight: var(--fw-medium);
  color: var(--text-primary); margin-bottom: 8px;
}
.metric__value { font-family: var(--font-mono); color: var(--accent); }
.metric--muted .metric__value { color: var(--bsai-ink-300); }
.metric__track {
  height: 10px; border-radius: var(--radius-pill);
  background: var(--bsai-ink-100); overflow: hidden;
}
.metric__fill {
  height: 100%; background: var(--accent); border-radius: var(--radius-pill);
  transition: width var(--dur-slow) var(--ease-out);
}
.metric--muted .metric__fill { background: var(--bsai-ink-300); }

/* ---------- 9. POST CARD ------------------------------------------------- */

.post-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease-standard);
}
.post-card:hover { transform: translateY(-4px); }
.post-card__media { height: 220px; overflow: hidden; flex-shrink: 0; }
.post-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--dur-base) var(--ease-standard);
}
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 24px; flex: 1; }
.post-card__date {
  font-family: var(--font-ui); font-size: 12px; font-weight: var(--fw-medium);
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.post-card__title {
  font-size: 22px; font-weight: var(--fw-semibold);
  line-height: var(--lh-heading); color: var(--text-primary); margin-top: 10px;
}
.post-card__excerpt {
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
  color: var(--text-secondary); margin-top: 8px;
}
.post-card__more {
  font-family: var(--font-ui); font-size: 13px; font-weight: var(--fw-semibold);
  color: var(--text-link); display: inline-block; margin-top: 14px;
}

.post-card--horizontal { flex-direction: row; }
.post-card--horizontal .post-card__media { flex: 0 0 34%; height: auto; }
.post-card--horizontal .post-card__title { font-size: 17px; }

.news-split { display: grid; grid-template-columns: 7fr 5fr; gap: var(--space-6); align-items: stretch; }
.news-split__stack { display: grid; gap: var(--space-4); }

/* ---------- 10. ACCORDION ------------------------------------------------ */

.accordion { display: flex; flex-direction: column; gap: var(--space-4); }

.accordion__item {
  background: var(--surface-card); border-radius: var(--radius-xs);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.accordion__trigger {
  all: unset; box-sizing: border-box; display: flex; align-items: flex-start; gap: 10px;
  width: 100%; padding: 20px; cursor: pointer;
  font-family: var(--font-display); font-size: var(--fs-h4); font-weight: var(--fw-medium);
  line-height: var(--lh-heading); color: var(--text-primary);
  transition: color var(--dur-base) var(--ease-standard);
}
.accordion__trigger:hover { color: var(--text-brand); }
.accordion__trigger[aria-expanded="true"] { color: var(--text-brand); }
.accordion__num { color: var(--text-brand); font-weight: var(--fw-semibold); }
.accordion__q { flex: 1; }
.accordion__chevron {
  flex-shrink: 0; font-size: 16px; color: var(--text-brand); margin-top: 4px;
  transition: transform var(--dur-base) var(--ease-standard);
}
.accordion__trigger[aria-expanded="true"] .accordion__chevron { transform: rotate(90deg); }

.accordion__panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows var(--dur-base) ease-in-out, opacity var(--dur-base) ease-in-out;
}
.accordion__item[data-open="true"] .accordion__panel { grid-template-rows: 1fr; opacity: 1; }
.accordion__panel > div { overflow: hidden; }
.accordion__a {
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
  color: var(--text-secondary); padding: 0 20px 20px;
}

/* ---------- 11. HEADER --------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 997; padding-block: 15px;
  background: var(--accent);
  transition: box-shadow var(--dur-base) var(--ease-standard);
}
.site-header.is-scrolled { box-shadow: 0 2px 18px rgba(11, 18, 48, .18); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-8); }

.site-header__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.site-header__brand img { height: 34px; width: auto; }
.site-header__wordmark {
  font-family: var(--font-display); font-size: 22px; font-weight: var(--fw-medium);
  letter-spacing: .05em; text-transform: uppercase; color: var(--bsai-white);
}

.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a {
  font-family: var(--font-ui); font-size: 15px; font-weight: var(--fw-regular);
  text-decoration: none; padding-bottom: 3px; color: var(--bsai-white); opacity: .78;
  border-bottom: 2px solid transparent;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.site-nav a:hover { opacity: 1; color: var(--bsai-white); }
.site-nav a[aria-current="page"],
.site-nav a.is-active { opacity: 1; border-bottom-color: var(--bsai-white); }

/* Header CTA sits outside the nav so it stays put when the nav collapses
   to a drawer at Stage 2. */
.site-header__cta { flex-shrink: 0; white-space: nowrap; }

/* Hamburger — hidden until the Stage 2 breakpoints introduce the drawer. */
.nav-toggle {
  display: none;
  background: none; border: none; padding: 6px; margin-left: auto;
  color: var(--bsai-white); font-size: 26px; line-height: 1; cursor: pointer;
}

/* ---------- 12. HERO ----------------------------------------------------- */

.hero-band { position: relative; background: var(--bsai-blue-600); }
.hero { padding: 80px 0 96px; }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.hero__lead {
  font-size: var(--fs-lead); line-height: var(--lh-body);
  color: rgba(255,255,255,.86); margin: var(--space-5) 0 var(--space-8); max-width: 46ch;
}
.hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* Inner-page title band */
.page-band { background: var(--bsai-blue-600); }
.page-band__inner { padding: 56px var(--gutter) 72px; max-width: var(--container-max); margin-inline: auto; }
.page-band__h {
  font-size: var(--fs-h1); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-heading); line-height: var(--lh-heading);
  color: var(--bsai-white); margin-top: var(--space-3); max-width: 24ch;
}
.page-band__intro {
  font-size: var(--fs-lead); line-height: var(--lh-body);
  color: rgba(255,255,255,.80); margin-top: 14px; max-width: 58ch;
}

/* ---------- 13. ACCELERATOR STRIP --------------------------------------- */

.strip { background: var(--surface-subtle); padding-block: var(--space-5); text-align: center; }
.strip img { width: 170px; display: block; margin: 0 auto 12px; }
.strip p { font-size: var(--fs-body-sm); color: var(--text-secondary); }

/* ---------- 14. SCIENCE COLLAGE ----------------------------------------- */

.collage { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.collage__stack { display: grid; gap: 12px; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); display: block; }

/* ---------- 15. CTA BAND ------------------------------------------------- */

.cta-band {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bsai-ink-950);
}
.cta-band__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .18;
}
.cta-band__inner { position: relative; padding: 80px 40px; text-align: center; }
.cta-band__h {
  font-size: var(--fs-h1); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-heading); color: var(--bsai-white);
  margin: 14px auto 0; max-width: 22ch;
}
.cta-band__p {
  font-size: var(--fs-lead); line-height: var(--lh-body);
  color: rgba(255,255,255,.76); margin: var(--space-4) auto var(--space-8); max-width: 52ch;
}

/* ---------- 16. ICON LIST ------------------------------------------------ */

.icon-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: var(--space-6); }
.icon-list li {
  display: flex; gap: 12px; font-size: var(--fs-body);
  line-height: var(--lh-body); color: var(--text-secondary);
}
.icon-list .bi { color: var(--bsai-teal); font-size: 18px; margin-top: 4px; flex-shrink: 0; }

.delay-stat { text-align: center; }
.delay-stat > .bi { font-size: clamp(28px, 2.5vw, 32px); color: var(--accent); }
.delay-stat__block { margin-top: 14px; }

/* ---------- 17. FORM ----------------------------------------------------- */

.subscribe {
  background: var(--surface-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 40px;
  display: flex; flex-direction: column; gap: var(--space-4);
}
.subscribe__title {
  font-family: var(--font-display); font-size: var(--fs-h3);
  font-weight: var(--fw-semibold); color: var(--text-primary);
}
.subscribe__note {
  font-size: var(--fs-caption); line-height: 1.5; color: var(--text-muted);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-family: var(--font-ui); font-size: 13px;
  font-weight: var(--fw-medium); color: var(--text-primary);
}
.field__input, .field__select {
  font-family: var(--font-body); font-size: var(--fs-body-sm); color: var(--text-primary);
  background: var(--surface-page); padding: 11px 14px;
  border-radius: var(--radius-xs); border: 1px solid var(--border-subtle);
  outline: none; width: 100%;
  transition: border-color var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
.field__input:focus, .field__select:focus {
  border-color: var(--border-brand); box-shadow: var(--shadow-focus);
}
.field__hint { font-size: var(--fs-caption); color: var(--text-muted); }

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236B7391'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Honeypot — hidden from humans, visible to naive bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}

/* Consent checkbox */
.consent {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  font-family: var(--font-body); font-size: var(--fs-body-sm);
  line-height: var(--lh-body); color: var(--text-secondary);
}
.consent input[type="checkbox"] {
  flex-shrink: 0; width: 18px; height: 18px; margin: 3px 0 0;
  accent-color: var(--accent); cursor: pointer;
}
.consent a { text-decoration: underline; }

/* Per-field validation message */
.field__error {
  font-family: var(--font-body); font-size: var(--fs-caption);
  color: var(--bsai-pink); margin-top: 2px;
}
.field__input[aria-invalid="true"],
.field__select[aria-invalid="true"] { border-color: var(--bsai-pink); }

/* Form-level banner */
.form-status {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: var(--fs-body-sm);
  line-height: var(--lh-body); margin-bottom: var(--space-4);
}
.form-status--error {
  background: rgba(244, 94, 172, .10);
  border: 1px solid rgba(244, 94, 172, .35);
  color: #a12468;
}
.form-status .bi { flex-shrink: 0; margin-top: 2px; font-size: 16px; }

/* Success panel — replaces the form in place after an async submit */
.form-success {
  background: var(--surface-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 40px; text-align: center;
}
.form-success .bi { font-size: 36px; color: var(--bsai-teal); }
.form-success__h {
  font-family: var(--font-display); font-size: var(--fs-h3);
  font-weight: var(--fw-semibold); color: var(--text-primary); margin-top: 14px;
}
.form-success__p {
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
  color: var(--text-secondary); margin-top: 8px;
}

/* Submitting state */
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---------- Thank-you page ---------------------------------------------- */

.thanks { max-width: 640px; margin-inline: auto; text-align: center; }
.thanks__icon { font-size: 48px; color: var(--bsai-teal); display: block; margin-bottom: var(--space-5); }
.thanks .lead { margin-inline: auto; }
.thanks__actions {
  display: flex; gap: var(--space-4); justify-content: center;
  flex-wrap: wrap; margin-top: var(--space-10);
}

/* ---------- Long-form document pages (privacy) --------------------------- */

.prose-page { max-width: 78ch; }
.prose-page h2 {
  font-size: var(--fs-h3); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-heading); line-height: var(--lh-heading);
  color: var(--text-primary); margin-top: var(--space-10);
}
.prose-page p,
.prose-page li {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--text-secondary); margin-top: var(--space-4);
}
.prose-page ul { padding-left: var(--space-6); margin-top: var(--space-2); }
.prose-page li { margin-top: var(--space-2); list-style: disc; }
.prose-page a { text-decoration: underline; }
.prose-page__updated {
  font-family: var(--font-mono); font-size: var(--fs-caption);
  color: var(--text-muted); margin-top: 0;
}

.notice {
  padding: 16px 20px; border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
  margin-bottom: var(--space-8);
}
.notice--draft {
  background: rgba(253, 205, 18, .14);
  border: 1px solid rgba(253, 205, 18, .45);
  color: #6b5300;
}
.notice strong { color: #4a3900; }

/* ---------- 18. FOOTER --------------------------------------------------- */

.site-footer {
  background: var(--bsai-ink-950);
  padding: 64px var(--gutter) 40px;
  text-align: center;
}
.site-footer img.site-footer__mark { height: 40px; width: auto; }
.site-footer__name {
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-medium);
  letter-spacing: .05em; text-transform: uppercase; color: var(--bsai-white); margin-top: 14px;
}
.site-footer__tagline {
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
  color: rgba(255,255,255,.72); max-width: 52ch; margin: 10px auto 0;
}
.site-footer__social { display: flex; justify-content: center; gap: 10px; margin-top: var(--space-6); }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-circle); border: none; text-decoration: none;
  background: var(--bsai-white-a12); color: var(--bsai-white); font-size: 16px;
  transition: background var(--dur-base) var(--ease-standard);
}
.icon-btn:hover { background: rgba(255,255,255,.24); color: var(--bsai-white); }

.site-footer__legal {
  border-top: 1px solid var(--border-inverse); margin-top: var(--space-8); padding-top: var(--space-6);
  font-size: var(--fs-caption); color: rgba(255,255,255,.52);
}
.site-footer__legal strong { color: var(--bsai-white); font-weight: var(--fw-semibold); }
.site-footer__legal a { color: rgba(255,255,255,.72); text-decoration: underline; }
.site-footer__legal a:hover { color: var(--bsai-white); }
.site-footer__nav { margin-top: 10px; display: flex; justify-content: center; gap: var(--space-5); flex-wrap: wrap; }
.site-footer__nav a { color: rgba(255,255,255,.62); text-decoration: none; }
.site-footer__nav a:hover { color: var(--bsai-white); }


/* ==========================================================================
   19. RESPONSIVE
   Desktop-first. Everything above is the 1280px design; these blocks reflow
   it downward. Breakpoints are content-driven, not device-driven:

     1080px — 4-up card grids get too narrow to read
      900px — two-column splits stop working; nav collapses to a drawer
      640px — phone: single column throughout
      420px — small phone: buttons go full width
   ========================================================================== */

/* Never allow a stray wide element to introduce horizontal scroll. */
html, body { overflow-x: hidden; }

/* ---------- <= 1080px ---------------------------------------------------- */
@media (max-width: 1080px) {
  .grid { gap: var(--space-12); }

  /* 4-up card rows become 2x2 before they become unreadable */
  .grid--4col,
  .grid--4col-wide { grid-template-columns: repeat(2, 1fr); }

  .cta-band__inner { padding: 64px 32px; }
}

/* ---------- <= 900px : tablet portrait ----------------------------------- */
@media (max-width: 900px) {

  /* --- every two-column split becomes one column --- */
  .grid--1-1,
  .grid--5-6,
  .grid--5-7,
  .grid--7-5,
  .grid--4-8,
  .grid--8-4,
  .hero__inner,
  .news-split {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  /* Text before decorative imagery once stacked. A <picture> that is already
     last in source order is unaffected. */
  .grid > picture { order: 2; }

  .grid--3col { grid-template-columns: repeat(2, 1fr); }

  .stat-band { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }

  /* --- header: collapse the nav into a drawer --- */
  .site-header__inner { flex-wrap: wrap; gap: var(--space-3); }
  .site-header__brand { margin-right: auto; }
  .nav-toggle { display: block; order: 2; }
  .site-header__cta { order: 1; }

  .site-nav {
    order: 3;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding-top: var(--space-2);
  }
  .site-header.is-open .site-nav { display: flex; }

  .site-nav a {
    opacity: 1;
    padding: 14px 2px;            /* >= 44px touch target */
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    border-top: none;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a[aria-current="page"],
  .site-nav a.is-active {
    border-bottom-color: rgba(255, 255, 255, .16);
    font-weight: var(--fw-semibold);
  }

  .hero { padding: 48px 0 64px; }
  .page-band__inner { padding: 40px var(--gutter) 56px; }

  /* The science collage: keep the 2-up relationship but cap its height */
  .collage { grid-template-columns: 1fr 1fr; }

  .subscribe { padding: 32px; }
}

/* ---------- <= 640px : phone --------------------------------------------- */
@media (max-width: 640px) {

  .grid--3col,
  .grid--4col,
  .grid--4col-wide,
  .stat-band {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .grid { gap: var(--space-8); }

  /* Horizontal news cards stack like the vertical ones */
  .post-card--horizontal { flex-direction: column; }
  .post-card--horizontal .post-card__media { flex: none; height: 200px; }
  .post-card--horizontal .post-card__title { font-size: 20px; }
  .post-card__media { height: 200px; }

  /* Collage reads better as a simple stack than a cramped mosaic */
  .collage { grid-template-columns: 1fr; }
  .collage__stack { grid-template-columns: 1fr 1fr; display: grid; }

  .stat-row { flex-wrap: wrap; gap: var(--space-8); }

  .cta-band__inner { padding: 48px 22px; }
  .cta-band__h { max-width: none; }

  .card { padding: 24px; }
  .card--pad-28 { padding: 24px; }
  .subscribe { padding: 24px; }

  .accordion__trigger { padding: 16px; font-size: 17px; }
  .accordion__a { padding: 0 16px 16px; }

  .site-footer { padding: 48px var(--gutter) 32px; }
  .site-footer__nav { gap: var(--space-4); font-size: var(--fs-body-sm); }

  /* Bigger touch targets for the social buttons */
  .icon-btn { width: 44px; height: 44px; font-size: 18px; }

  .strip { padding-block: var(--space-4); }
  .strip img { width: 140px; }

  .section-title--center { text-align: left; }
  .stat--center { text-align: center; }
}

/* ---------- <= 420px : small phone --------------------------------------- */
@media (max-width: 420px) {

  /* Side-by-side CTAs no longer fit; stack and fill. */
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .btn--lg { padding: 13px 24px; font-size: 15px; }

  .site-header__wordmark { font-size: 18px; }
  .site-header__brand img { height: 28px; }

  .collage__stack { grid-template-columns: 1fr; }
}

/* ---------- pointer-coarse ----------------------------------------------- */
/* Touch devices get no hover lift — it fires on tap and looks like a glitch. */
@media (hover: none) {
  .card--interactive:hover { transform: none; box-shadow: var(--shadow-md); }
  .post-card:hover { transform: none; }
  .post-card:hover .post-card__media img { transform: none; }
  .arrow-link:hover::after { transform: none; }
}
