/* Root Variables */
:root {
  --accent-teal: #00a896;
  --accent-blue: #0066cc;
  --accent-navy: #001a4d;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --border-gray: #e0e0e0;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
}

/* Skip to Content (a11y) */
.skip-to-content a {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-blue);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content a:focus {
  top: 0;
}

/* Announcement Bar */
.announcement {
  background: var(--accent-teal);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
}

.announcement a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
}

/* Navigation */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-gray);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu {
    display: inline-block;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.button.primary {
  background: var(--accent-blue);
  color: white;
}

.button.primary:hover {
  background: #0052a3;
}

.button.secondary {
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
}

.button.secondary:hover {
  background: var(--accent-blue);
  color: white;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sections */
.section {
  padding: 60px 0;
}

.section.white {
  background: var(--bg-light);
}

.section.navy {
  background: var(--accent-navy);
  color: white;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-blue);
  margin-bottom: 8px;
  display: block;
}

.section.white .eyebrow,
.section.navy .eyebrow {
  color: var(--accent-teal);
}

h1, h2, h3 {
  line-height: 1.3;
  margin-bottom: 16px;
}

h1 {
  font-size: 40px;
  font-weight: 700;
}

h2 {
  font-size: 32px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 12px;
}

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

a:hover {
  text-decoration: underline;
}

.section.navy a {
  color: var(--accent-teal);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 168, 150, 0.05) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-copy {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
}

/* Workflow Visual */
.workflow-visual {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 32px;
}

.visual-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-step {
  display: flex;
  gap: 16px;
  padding: 12px;
  background: white;
  border-radius: 4px;
  border-left: 4px solid var(--accent-blue);
}

.flow-num {
  font-weight: 700;
  color: var(--accent-blue);
  font-size: 20px;
  min-width: 30px;
}

.flow-name {
  font-weight: 600;
  font-size: 14px;
}

.flow-status {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.flow-step span {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-teal);
  white-space: nowrap;
  padding-top: 4px;
}

.visual-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-gray);
  font-size: 12px;
  color: var(--text-light);
}

/* Problem Section */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.problem-callout {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-navy);
  margin-bottom: 20px;
}

.problem-copy {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  display: inline-block;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  background: white;
  padding: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-gray);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card .number {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.card p {
  font-size: 14px;
  color: var(--text-light);
}

/* Boundary Section */
.boundary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.boundary-card {
  padding: 32px;
  border-radius: 8px;
  background: white;
}

.boundary-card.do {
  border-left: 6px solid var(--accent-teal);
}

.boundary-card.no {
  border-left: 6px solid #ff6b6b;
}

.boundary-card h3 {
  margin-bottom: 16px;
}

.boundary-card ul {
  list-style: none;
}

.boundary-card li {
  padding: 8px 0 8px 24px;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
}

.boundary-card li:before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.boundary-card.do li:before {
  color: var(--accent-teal);
}

.boundary-card.no li:before {
  color: #ff6b6b;
}

/* Roles Section */
.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.role {
  padding: 24px 0;
}

.role h3 {
  margin-bottom: 8px;
  color: var(--accent-navy);
}

.role p {
  font-size: 14px;
  color: var(--text-light);
}

/* Design Partner Grid */
.design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

.check:before {
  content: '✓';
  color: var(--accent-teal);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

/* Trust Section */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-item strong {
  color: var(--accent-navy);
  font-weight: 600;
  font-size: 15px;
}

.trust-item span {
  font-size: 14px;
  color: var(--text-light);
}

/* Final CTA Section */
.final-cta {
  text-align: center;
  max-width: 600px;
}

.final-cta h2 {
  color: white;
  font-size: 36px;
  margin-bottom: 20px;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin-bottom: 32px;
}

/* Form Styles */
.contact-form {
  background: white;
  padding: 32px;
  border-radius: 8px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form fieldset {
  border: none;
}

.contact-form legend {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-dark);
}

.consent-notice {
  background: var(--bg-light);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
}

.consent-notice p {
  margin: 0;
  color: var(--text-dark);
}

.consent-notice a {
  color: var(--accent-blue);
  font-weight: 500;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.cf-turnstile {
  margin: 20px 0;
}

#form-message {
  padding: 15px;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
}

#form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
  background: var(--accent-navy);
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-logo {
  font-weight: 700;
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
}

.footer a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .problem-grid,
  .design-grid,
  .boundary {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .section {
    padding: 40px 0;
  }

  .hero {
    padding: 60px 0 40px;
  }

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

  .workflow-visual {
    order: -1;
  }
}

/* ============================================================
   THEME: OrganoidBank — "scientific record"
   Warm paper, serif headings, ink-green. Reads like an institutional
   or journal publication, which is the audience: PIs, tox labs,
   research buyers. Restraint is the brand.
   ============================================================ */

:root {
  --paper: #faf7f1;
  --paper-raised: #fffdf8;
  --ink: #1b1d19;
  --ink-muted: #5a5f57;
  --rule: #ddd6c8;
  --green: #14532d;
  --green-soft: #2f6b45;
  --clay: #9a6b4f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.75;
}

.nav { background: var(--paper); border-bottom: 1px solid var(--rule); }
.logo { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0; color: var(--green); }
.nav-links a { color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--green); }

/* Editorial rhythm: rules rather than filled bands */
.section, .section.white, .section.navy {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 80px 0;
}
.section.white { background: var(--paper-raised); }
.hero { background: var(--paper); padding: 88px 0 64px; }

/* Serif headings — the strongest single differentiator */
h1, h2, h3, .visual-title, .flow-name {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
}
h1 { font-size: clamp(34px, 4.6vw, 50px); line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; }
h3 { font-size: 19px; }

.eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
}

p, li { color: var(--ink-muted); }
.hero-text p, .section-head p { font-size: 18px; line-height: 1.75; max-width: 62ch; }

/* Flat, ruled cards — no drop shadows; this should feel printed */
.card, .role, .boundary-card, .trust-item, .problem-callout, .flow-step, .workflow-visual {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}
.boundary-card.do { border-left: 3px solid var(--green); }
.boundary-card.no { border-left: 3px solid var(--clay); }

.pill {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 13px;
}

.button { border-radius: 2px; font-weight: 600; }
.button.primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.button.primary:hover { background: var(--green-soft); }
.button.secondary { background: transparent; color: var(--green); border: 1px solid var(--green); }
.button.secondary:hover { background: rgba(20, 83, 45, 0.06); }

.contact-form { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 0; }
.form-group label { color: var(--ink); font-weight: 600; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
  background: #fff; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 2px rgba(20, 83, 45, 0.12);
}
.consent-notice {
  background: rgba(154, 107, 79, 0.06);
  border-left: 3px solid var(--clay);
  border-radius: 0;
  color: var(--ink-muted);
}
.consent-notice a { color: var(--green); }

.trust-strip { border-top: 1px solid var(--rule); }
.footer { background: var(--paper); border-top: 1px solid var(--rule); color: var(--ink-muted); }
.footer-logo { font-family: var(--serif); color: var(--green); }
.footer a { color: var(--ink-muted); }
.footer a:hover { color: var(--green); }
.announcement { background: var(--green); color: #f3f1ea; }
.announcement a { color: #fff; }

/* ------------------------------------------------------------
   Chassis fixes — brand-neutral, applies to all four sites.
   These are defects in the shared chassis, not theme choices.
   ------------------------------------------------------------ */

/* The mobile CTA is markup'd as `button secondary mobile-menu`, and the base
   `.button { display: inline-block }` rule wins over `.mobile-menu { display: none }`
   (same specificity, declared later). Result: a duplicate call-to-action sat in the
   desktop nav on every site. Raise specificity to settle it. */
.nav .mobile-menu { display: none; }
@media (max-width: 768px) {
  .nav .nav-links { display: none; }
  .nav .mobile-menu { display: inline-block; }
}

/* Multi-word wordmarks were breaking across lines in the nav. */
.nav .logo { white-space: nowrap; display: inline-block; }

/* Button labels were clipping when they wrapped to a second line. */
.button {
  line-height: 1.25;
  height: auto;
  white-space: normal;
  text-align: center;
}

/* Give the wordmark breathing room from the first nav item. */
.nav-inner { gap: 32px; }
.nav-links { flex-wrap: wrap; }

/* ------------------------------------------------------------
   FIX: inverted-section text (see BiofoundryOS note). The paper theme
   lightens `.section.navy`, so its inherited white text became invisible.
   ------------------------------------------------------------ */
.section.navy h1,
.section.navy h2,
.section.navy h3 { color: var(--ink); }
.section.navy p,
.section.navy li,
.section.navy .hero-note { color: var(--ink-muted); }
.section.navy .eyebrow { color: var(--clay); }
.footer, .footer p, .footer li, .footer-note { color: var(--ink-muted); }
.footer h1, .footer h2, .footer h3 { color: var(--ink); }

/* Higher-specificity pass: `.final-cta` and `.footer-grid` set white text
   directly, which outranked the `.section.navy h2` fix above. */
.section.navy .final-cta h1,
.section.navy .final-cta h2,
.section.navy .final-cta h3 { color: var(--ink); }
.section.navy .final-cta p,
.section.navy .final-cta li { color: var(--ink-muted); }
.footer .footer-grid p,
.footer .footer-grid li,
.footer .footer-grid div { color: var(--ink-muted); }
.footer .footer-grid h1,
.footer .footer-grid h2,
.footer .footer-grid h3,
.footer .footer-grid strong { color: var(--ink); }

/* ---- HERO REBUILD: purely typographic hero; method moved to its own section */
.hero .hero-grid { display: block; }
.hero .hero-text { max-width: 20ch; }
.hero .hero-copy { max-width: 54ch; }
.process-section .workflow-visual {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0;
}
.process-section .flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; }
.process-section .flow-step {
  background: transparent; border: 0; border-top: 2px solid var(--green);
  border-radius: 0; padding: 18px 24px 0 0; box-shadow: none;
}
.process-section .flow-num { font-family: var(--serif); font-size: 26px; color: var(--green); line-height: 1; }
.process-section .flow-name { font-family: var(--serif); font-size: 18px; margin: 8px 0 6px; }
.process-section .visual-title { display: none; }

/* ---- HERO MEASURE FIX -----------------------------------------------------
   The previous rule capped .hero-text in ch. Inside that container 'ch' resolves
   against the BODY font-size, so the cap computed to ~200px and squeezed both the
   display headline and the body copy into a narrow ribbon. Put the measure on the
   elements themselves, where 'ch' scales with each element's own font-size.
   -------------------------------------------------------------------------- */
.hero .hero-text { max-width: none; }
.hero h1 { max-width: 14ch; }
.hero .hero-copy { max-width: 56ch; }
.hero .hero-actions { max-width: 620px; }

/* ---- NAV FIX: one row, <=80px ---------------------------------------------
   The nav holds a wordmark, five links and a CTA. An earlier chassis fix set
   flex-wrap:wrap with a 32px gap, which let it break onto 3-5 rows and pushed the
   header past 120px. Keep it on a single row, let the link group shrink, and hand
   over to the mobile CTA before anything is forced to wrap.
   -------------------------------------------------------------------------- */
.nav .nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 24px; padding: 14px 20px; min-height: 0;
}
.nav .nav-links {
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: 18px; min-width: 0; margin-left: auto;
}
.nav .nav-links a { white-space: nowrap; font-size: 13px; }
.nav .nav-links a.button { padding: 9px 16px; font-size: 13px; white-space: nowrap; }
.nav .logo { flex: 0 0 auto; }

/* Hand over to the compact CTA before the link row is forced to wrap. */
@media (max-width: 1080px) {
  .nav .nav-links { display: none; }
  .nav .mobile-menu { display: inline-block; }
}

/* .nav supplies its own vertical padding on top of .nav-inner's, stacking to
   ~101px. The inner element owns the spacing; zero the outer. */
.nav { padding-top: 0; padding-bottom: 0; }
.nav .logo { line-height: 1.25; }

/* ---- HERO PLATE -----------------------------------------------------------
   The hero was rebuilt as purely typographic (display:block above), which left
   the second grid cell unused. Restore two columns to seat the specimen plate.
   The measure caps live on h1/.hero-copy themselves, so re-gridding the parent
   does not re-introduce the 'ch'-against-body-font-size ribbon bug.

   The artwork is dark navy on a warm paper page. Rather than fight that, frame
   it the way this theme frames everything else: a flat, ruled, zero-radius plate
   with a caption underneath, so it reads as a printed figure rather than a clash.
   -------------------------------------------------------------------------- */
.hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 64px;
  align-items: center;
}

.hero-plate { margin: 0; min-width: 0; }

.hero-plate picture { display: block; }

.hero-plate img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  background: #0a1930;   /* matches the plate's own field; no white flash while decoding */
}

/* Single column below the hero's two-column comfort point. Headline leads;
   the plate follows the CTAs rather than pushing them below the fold. */
@media (max-width: 900px) {
  .hero .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-plate { max-width: 420px; }
}
