/* ============================================================
   FONT SCALE — change these to restyle all text
   ============================================================ */
:root {
  --fs-hero: clamp(3rem, 6.5vw, 5rem);
  --fs-xl:   clamp(2rem, 3vw, 2.75rem);
  --fs-lg:   1.25rem;      /* 20px */
  --fs-md:   1.0625rem;    /* 17px — base body */
  --fs-sm:   0.9375rem;    /* 15px */

  --bg:        #0a0f0d;
  --bg-alt:    #0f1613;
  --bg-card:   #141e19;
  --text:      #f1f5f2;    /* near-white */
  --text-2:    #f1f5f2;    /* same as --text — unify body copy brightness */
  --text-3:    #c8d1cb;    /* only slightly dimmer, for footnotes/funding/legend */
  --accent:    #3daa6f;
  --accent-hi: #4ec882;
  --border:    #1e2e26;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; max-width: 100%; border-radius: 4px; border: 1px solid var(--border); }

sup a { text-decoration: none; font-weight: 600; padding: 0 0.1em; }
sup a:hover { text-decoration: underline; }

/* ============================================================
   UNIFIED BODY PARAGRAPH SIZING
   Every body paragraph across every section inherits the same size
   ============================================================ */
.prose,
.two-col p,
.section-header p,
.card p,
.pipeline-table td,
.subsection .prose {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--text-2);
}

/* Hero paragraphs slightly larger — single exception, for emphasis */
.hero p {
  font-size: 1.1875rem;   /* 19px */
  line-height: 1.7;
}

/* Small utility paragraph (used in compact cards) */
.card-p-sm {
  font-size: var(--fs-sm) !important;
  line-height: 1.55 !important;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 100ch;
  margin: 0 auto;
  padding: 0 2rem;
}

section      { padding: 5rem 0; }
.bg-alt      { background: var(--bg-alt); }
.text-center { text-align: center; }

.prose { margin-bottom: 1rem; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(10,15,13,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem; font-weight: 700;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }
.nav-logo:hover { text-decoration: none; }

nav ul { display: flex; gap: 2rem; list-style: none; }
nav ul a { color: var(--text-2); font-weight: 500; text-decoration: none; font-size: var(--fs-md); }
nav ul a:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 7rem 2rem 5rem;
  text-align: center;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 auto 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--accent-hi); }

.hero p {
  color: var(--text);
  max-width: 68ch;
  margin: 0 auto 1.25rem;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.25rem;
  background: var(--accent); color: #fff;
  font-size: var(--fs-md); font-weight: 600;
  padding: 0.85rem 2.1rem; border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--accent-hi); transform: translateY(-1px); text-decoration: none; }
.btn svg { width: 1rem; height: 1rem; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-label {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.section-header { margin-bottom: 3rem; }
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-xl); font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.section-header p { max-width: 62ch; }
.section-header.text-center p { margin: 0 auto; }

/* ============================================================
   CARD GRID
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: #2a3d32; }
.card > svg { width: 2rem; height: 2rem; color: var(--accent); margin-bottom: 1rem; }
.card h3 { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 0.5rem; }

.card-emoji { font-size: 1.4rem; margin-bottom: 0.5rem; }
.card-h3-sm { font-size: var(--fs-md) !important; }

/* ============================================================
   TWO-COLUMN
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.two-col h3 {
  font-size: var(--fs-xl); font-weight: 600; margin-bottom: 1rem;
  font-family: 'Playfair Display', serif; letter-spacing: -0.01em;
}
.two-col p { margin-bottom: 1rem; }

.founder-img {
  border-radius: 4px;
  max-width: 20rem;
  margin: 0 auto;
}
.founder-links { display: flex; gap: 1.5rem; margin-top: 0.5rem; }

/* ============================================================
   PIPELINE NOTE
   ============================================================ */
.pipeline-note {
  margin-top: 2rem;
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-style: italic;
  text-align: center;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-h2 {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-xl);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.contact-sub {
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.7;
  max-width: 65ch;
  margin: 0 auto;
}
.contact-sdds {
  color: var(--text);
  margin-top: 1.25rem;
  padding: 0.9rem 1.25rem;
  display: inline-block;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  font-size: var(--fs-md);
}
.contact-sdds strong { color: var(--text); }

.contact-links {
  display: flex; gap: 1rem; justify-content: center;
  flex-wrap: wrap; margin-top: 1.5rem;
}
.contact-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border); border-radius: 3px;
  color: var(--text); font-weight: 500; font-size: var(--fs-md);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.contact-link:hover { border-color: var(--accent); background: rgba(61,170,111,0.05); text-decoration: none; }
.contact-link svg { width: 1rem; height: 1rem; color: var(--accent); }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band {
  padding: 2.75rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.75rem;
  text-align: center;
  max-width: 68rem;
  margin: 0 auto;
}
.stat { padding: 0.25rem; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--accent-hi);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ============================================================
   PIPELINE TABLE
   ============================================================ */
.pipeline-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
}
.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}
.pipeline-table thead {
  background: rgba(61, 170, 111, 0.08);
}
.pipeline-table th {
  text-align: left;
  padding: 0.95rem 1.25rem;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.pipeline-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.5;
}
.pipeline-table tbody tr:last-child td { border-bottom: none; }
.pipeline-table tbody tr:hover { background: rgba(61, 170, 111, 0.03); }
.pipeline-table td:first-child {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stage {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.3;
}
.stage::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.stage-struct::before { background: var(--accent-hi); box-shadow: 0 0 0 3px rgba(78, 200, 130, 0.15); }
.stage-lead::before   { background: var(--accent);    box-shadow: 0 0 0 3px rgba(61, 170, 111, 0.15); }
.stage-screen::before { background: var(--text-3); }

.pipeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
}
.dot-struct { background: var(--accent-hi); }
.dot-lead   { background: var(--accent); }
.dot-screen { background: var(--text-3); }

/* ============================================================
   PIPELINE SUBSECTION (EQM-1)
   ============================================================ */
.subsection {
  margin-top: 3.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.subsection-h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.subsection .prose { margin-bottom: 0; }

/* ============================================================
   LAB GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.2s;
}
.gallery-item:hover img {
  transform: scale(1.01);
  border-color: #2a3d32;
}
.gallery-item figcaption {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: 1.55;
  padding: 0 0.25rem;
}

@media (max-width: 56rem) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item img { aspect-ratio: 16 / 10; }
}

/* ============================================================
   FUNDING + FOOTNOTES + FOOTER
   ============================================================ */
.funding {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.funding p {
  font-size: var(--fs-sm);
  color: var(--text-3);
  max-width: 70ch;
  margin: 0 auto 0.4rem;
  line-height: 1.55;
}
.funding-disclaimer {
  color: var(--text-3) !important;
  font-size: 0.82rem !important;
  margin-top: 0.5rem !important;
  opacity: 0.85;
}
.footnotes {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-3);
  max-width: none;      /* was 70ch — remove the width cap */
  margin: 0 auto;
  overflow-x: auto;     /* scroll on mobile instead of breaking layout */
}
.footnotes p {
  margin-bottom: 0.35rem;
  line-height: 1.55;
  white-space: nowrap;  /* force single line */
}
footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 48rem) {
  nav ul { display: none; }
  .two-col { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
  .hero { padding: 5rem 1.5rem 3rem; }
  .container { padding: 0 1.5rem; }
  .founder-img { max-width: 14rem; }
  .pipeline-table th, .pipeline-table td { padding: 0.75rem 0.9rem; }
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (min-width: 48rem) {
  .footnotes { max-width: none; }
  .footnotes p { white-space: nowrap; }
}
