/* ============================================================
   Bacterial Biosignals — design tokens
   ============================================================ */
:root {
  --abyss: #08141f;
  --navy: #0a1f38;
  --navy-soft: #11293f;
  --teal: #0d9488;
  --teal-bright: #5eead4;
  --sediment: #c9a227;
  --paper: #f4f7f8;
  --paper-warm: #eef3f2;
  --ink: #0a1f38;
  --ink-soft: #4a5b6e;
  --line: #d9e2e4;
  --line-dark: rgba(255, 255, 255, 0.12);

  --serif: "Source Serif 4", "Iowan Old Style", "Cambria", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --maxw: 1120px;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

/* ---------------- Skip link / focus ---------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-bright);
  color: var(--abyss);
  padding: 10px 16px;
  z-index: 1000;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}

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

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 20, 31, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-mark circle.signal {
  fill: var(--teal-bright);
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.primary a {
  text-decoration: none;
  color: rgba(244, 247, 248, 0.72);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

nav.primary a:hover { color: #fff; background: rgba(255,255,255,0.06); }
nav.primary a[aria-current="page"] {
  color: var(--teal-bright);
}

.nav-cta {
  margin-left: 8px;
  background: var(--teal);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 7px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: #0f7a70; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 760px) {
  nav.primary {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--abyss);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    transition: transform 0.25s ease, visibility 0.25s ease;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    z-index: 99;
  }
  nav.primary.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  nav.primary a { padding: 14px 16px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* ============================================================
   Depth gradient hero (signature element)
   ============================================================ */
.depth-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #0c2a44 0%,
    #0a3a52 24%,
    #0b4a58 44%,
    #0f5c52 60%,
    #2b2a1a 73%,
    #17150e 88%,
    #0b0a06 100%
  );
  color: #fff;
  min-height: 640px;
}

.hero-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.depth-hero-inner::before {
  content: "";
  position: absolute;
  inset: -40px -32px -130px -32px;
  background: linear-gradient(
    100deg,
    rgba(8,20,31,0.62) 0%,
    rgba(8,20,31,0.5) 42%,
    rgba(8,20,31,0.15) 64%,
    transparent 80%
  );
  z-index: -1;
  pointer-events: none;
}

.depth-scale-label {
  position: absolute;
  right: 60px;
  top: 80px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  z-index: 1;
}

.depth-scale {
  position: absolute;
  right: 60px;
  top: 110px;
  bottom: 64px;
  width: 1px;
  background: rgba(255,255,255,0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}
.depth-scale .tick {
  position: relative;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.62);
  white-space: nowrap;
  text-align: right;
  transform: translate(calc(-100% - 14px), -50%);
}
.depth-scale .tick::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(255,255,255,0.35);
}

@media (max-width: 760px) {
  .depth-scale, .depth-scale-label { display: none; }
}

.depth-hero-inner {
  position: relative;
  z-index: 2;
  padding: 100px 0 130px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(94,234,212,0.2);
}

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  max-width: 13ch;
  color: #fff;
}
.hero-title em {
  font-style: normal;
  color: var(--teal-bright);
}

.hero-sub {
  margin-top: 26px;
  font-size: 1.18rem;
  max-width: 46ch;
  color: rgba(244,247,248,0.82);
  font-weight: 400;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--teal-bright);
  color: var(--abyss);
}
.btn-primary:hover { background: #8ff3e0; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }

.btn-dark {
  background: var(--navy);
  color: #fff;
}
.btn-dark:hover { background: var(--navy-soft); }

/* ============================================================
   Sections
   ============================================================ */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }

@media (max-width: 640px) {
  section { padding: 60px 0; }
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  display: block;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--ink);
  max-width: 22ch;
}

.section-lede {
  margin-top: 18px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 62ch;
  line-height: 1.65;
}

.section-dark {
  background: var(--navy);
  color: #f4f7f8;
}
.section-dark .section-title { color: #fff; }
.section-dark .section-lede { color: rgba(244,247,248,0.78); }
.section-dark .section-eyebrow { color: var(--teal-bright); }

/* ---------------- Card grids ---------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(10,31,56,0.04), 0 10px 26px rgba(10,31,56,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(10,31,56,0.05), 0 16px 36px rgba(10,31,56,0.08);
}
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 18px;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 {
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.card p { color: var(--ink-soft); font-size: 0.96rem; }

.card-dark {
  background: var(--navy-soft);
  border-color: rgba(255,255,255,0.08);
}
.card-dark h3 { color: #fff; }
.card-dark p { color: rgba(244,247,248,0.72); }

/* ---------------- Stat row ---------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line-dark);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat .num {
  font-family: var(--serif);
  font-size: 2.1rem;
  color: var(--teal-bright);
}
.stat .label {
  font-size: 0.88rem;
  color: rgba(244,247,248,0.65);
}
@media (max-width: 760px) {
  .stat-row {
    grid-template-columns: 1fr;
    gap: 28px;
    background: rgba(8,20,31,0.82);
    border-radius: 12px;
    padding: 28px 20px;
    margin-left: -20px;
    margin-right: -20px;
    border-top: none;
  }
}

/* ---------------- Analogy figure (team page, founder fit) ---------------- */
.analogy-figure {
  margin: 28px 0 0;
}
.analogy-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------------- Convergence timeline (science page, why now) ---------------- */
.converge-figure {
  margin: 28px 0 0;
}
.converge-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------------- System figure (homepage, payload/platform/prediction) ---------------- */
.system-figure {
  margin: 36px 0 0;
}
.system-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------------- Insight figure (SMTZ cross-section) ---------------- */
.insight-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin-top: 18px;
}
@media (max-width: 820px) {
  .insight-layout { grid-template-columns: 1fr; }
}

.smtz-figure {
  margin: 0;
}
.smtz-figure svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.smtz-figure figcaption {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.smtz-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  fill: rgba(255,255,255,0.7);
}
.smtz-label-bright { fill: var(--teal-bright); font-weight: 600; }
.smtz-label-dim { fill: rgba(255,255,255,0.55); }
.smtz-tag {
  font-family: var(--mono);
  font-size: 12px;
  fill: var(--teal-bright);
  font-weight: 600;
}

/* ---------------- Depth capability chart ---------------- */
.depth-chart {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}
.depth-chart-row {
  display: grid;
  grid-template-columns: 190px 1fr 64px;
  align-items: center;
  gap: 14px;
}
@media (max-width: 560px) {
  .depth-chart-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .depth-chart-value { text-align: left; }
}
.depth-chart-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.3;
}
.depth-chart-track {
  height: 10px;
  background: var(--paper-warm);
  border-radius: 6px;
  overflow: hidden;
}
.depth-chart-fill {
  height: 100%;
  border-radius: 6px;
}
.depth-chart-fill-proven { background: var(--teal); }
.depth-chart-fill-target { background: var(--sediment); }
.depth-chart-value {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  text-align: right;
}

/* ---------------- Process / depth strata list ---------------- */
.strata {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.strata-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.strata-depth {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--teal);
  padding-top: 3px;
}
.strata-body h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.strata-body p { color: var(--ink-soft); font-size: 0.96rem; max-width: 60ch; }

@media (max-width: 600px) {
  .strata-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------------- Quote / honesty callout ---------------- */
.callout {
  margin-top: 44px;
  background: var(--paper-warm);
  border-left: 3px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 24px 28px;
}
.callout p { color: var(--ink); font-size: 0.98rem; }
.callout .label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 10px;
}

.callout-dark {
  background: rgba(255,255,255,0.04);
  border-left-color: var(--teal-bright);
}
.callout-dark p { color: rgba(244,247,248,0.88); }

/* ---------------- Table ---------------- */
.tablewrap { overflow-x: auto; margin-top: 44px; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
table.compare th, table.compare td {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
table.compare thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
table.compare thead th:first-child { border-radius: 8px 0 0 0; }
table.compare thead th:last-child { border-radius: 0 8px 0 0; }
table.compare td.us { color: var(--teal); font-weight: 600; }
table.compare tbody tr:nth-child(even) { background: var(--paper-warm); }

/* Dark-section variant: section-dark provides a navy backdrop, so the table
   needs its own light surface to stay readable rather than inheriting dark text */
.section-dark table.compare {
  background: var(--navy-soft);
  border-radius: 10px;
  overflow: hidden;
}
.section-dark table.compare th,
.section-dark table.compare td {
  color: rgba(244,247,248,0.88);
  border-bottom-color: rgba(255,255,255,0.1);
}
.section-dark table.compare thead th {
  background: var(--abyss);
  color: #fff;
}
.section-dark table.compare td.us { color: var(--teal-bright); }
.section-dark table.compare tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.04);
}

/* ---------------- Team ---------------- */
.person {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: start;
}
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-bright);
}
.avatar svg { width: 52px; height: 52px; }

@media (max-width: 560px) {
  .person { grid-template-columns: 1fr; }
  .avatar { width: 84px; height: 84px; }
  .avatar svg { width: 38px; height: 38px; }
}

.role-list {
  margin-top: 44px;
  display: grid;
  gap: 16px;
}
.role-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.role-badge {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.role-badge svg { width: 17px; height: 17px; }
.role-item h4 { font-size: 0.98rem; color: var(--ink); margin-bottom: 4px; font-family: var(--sans); font-weight: 600; }
.role-item p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------------- Role figure (team depth-axis illustration) ---------------- */
.role-figure {
  margin: 44px 0 0;
}
.role-figure svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.role-fig-label {
  font-family: var(--sans);
  font-size: 13px;
  fill: rgba(244,247,248,0.68);
}
.role-fig-bright {
  fill: #fff;
  font-weight: 600;
  font-size: 14px;
}
.role-fig-tick {
  font-family: var(--mono);
  font-size: 11px;
  fill: rgba(244,247,248,0.45);
}

/* ---------------- Forms ---------------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
  margin-top: 40px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.96rem;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 14px; }

.form-status {
  margin-top: 18px;
  font-size: 0.92rem;
  padding: 12px 16px;
  border-radius: 8px;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { background: #e9f9f3; color: #0d7a5f; }
.form-status.err { background: #fdecec; color: #b3261e; }

/* ---------------- Contact info blocks ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-line:last-child { border-bottom: none; }
.contact-line .ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--paper-warm);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-line .ico svg { width: 17px; height: 17px; }
.contact-line a { text-decoration: none; color: var(--ink); font-weight: 500; }
.contact-line a:hover { color: var(--teal); }
.contact-line .meta { font-size: 0.82rem; color: var(--ink-soft); }

/* ============================================================
   Footer
   ============================================================ */
footer.site-footer {
  background: var(--abyss);
  color: rgba(244,247,248,0.55);
  padding: 48px 0 32px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer.site-footer .foot-brand {
  font-family: var(--serif);
  color: rgba(244,247,248,0.85);
  font-size: 0.98rem;
}
footer.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site-footer nav a { margin-right: 4px; }
footer.site-footer nav a:last-child { margin-right: 0; }
footer.site-footer nav a {
  color: rgba(244,247,248,0.55);
  text-decoration: none;
  font-size: 0.88rem;
}
footer.site-footer nav a:hover { color: var(--teal-bright); }
.foot-legal {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: rgba(244,247,248,0.4);
}

/* ============================================================
   Page hero (non-home pages)
   ============================================================ */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 70px 0 56px;
  border-bottom: 1px solid var(--line-dark);
}
.page-hero .section-eyebrow { color: var(--teal-bright); }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #fff;
  max-width: 18ch;
}
.page-hero .hero-sub { color: rgba(244,247,248,0.78); }

.page-hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.page-hero-text { flex: 1 1 auto; min-width: 0; }
.page-hero-signal {
  flex: 0 0 140px;
  width: 140px;
  height: 140px;
}
@media (max-width: 760px) {
  .page-hero-signal { display: none; }
}

/* ---------------- Misc utility ---------------- */
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.fade-up {
  opacity: 1;
  transform: translateY(0);
}
.js-anim .fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-anim .fade-up.in { opacity: 1; transform: translateY(0); }
