/* 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: BiofoundryOS — "operating system"
   Light, dense, structured. Indigo primary with an amber status
   signal; left-accent rules on cards so the page reads like a
   record system rather than a brochure. Audience: COOs and
   facility directors who live in operational software.
   ============================================================ */

:root {
  --ink: #14161f;
  --ink-muted: #565d70;
  --canvas: #f5f6f9;
  --surface: #ffffff;
  --line: #dfe3ec;
  --indigo: #3730a3;
  --indigo-bright: #4f46e5;
  --amber: #b45309;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

.nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; letter-spacing: -0.03em; color: var(--indigo); font-size: 19px; }
.nav-links a { color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--indigo-bright); }

.section, .section.white, .section.navy { background: var(--canvas); padding: 76px 0; }
.section.white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 84px 0 64px; }

/* Numeric/system labelling */
.eyebrow, .flow-num, .flow-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo-bright);
  font-weight: 600;
}

h1 { font-size: clamp(33px, 4.6vw, 50px); font-weight: 750; letter-spacing: -0.032em; line-height: 1.1; }
h2 { font-size: clamp(24px, 2.9vw, 33px); font-weight: 700; letter-spacing: -0.024em; }
h3 { font-size: 17px; font-weight: 650; }
p, li { color: var(--ink-muted); }
.hero-text p, .section-head p { font-size: 17px; }

/* Left-accent record rows */
.card, .role, .trust-item, .problem-callout, .flow-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(20, 22, 31, 0.04);
}
.card:hover, .role:hover { border-left-color: var(--indigo-bright); }
.workflow-visual { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.boundary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.boundary-card.do { border-left: 3px solid var(--indigo); }
.boundary-card.no { border-left: 3px solid var(--amber); }

.pill {
  background: #eef0f7;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--indigo);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.button { border-radius: 3px; font-weight: 650; }
.button.primary { background: var(--indigo); color: #fff; border: 1px solid var(--indigo); }
.button.primary:hover { background: var(--indigo-bright); }
.button.secondary { background: var(--surface); color: var(--indigo); border: 1px solid var(--line); }
.button.secondary:hover { border-color: var(--indigo); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.form-group label { color: var(--ink); font-weight: 650; font-size: 13px; }
.form-group input, .form-group select, .form-group textarea {
  background: #fcfcfe; border: 1px solid var(--line); border-radius: 3px; color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--indigo-bright); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.14);
}
.consent-notice {
  background: #eef0f7;
  border-left: 3px solid var(--indigo);
  border-radius: 3px;
  color: var(--ink-muted);
}
.consent-notice a { color: var(--indigo); }

.trust-strip { border-top: 1px solid var(--line); }
.footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-muted); }
.footer-logo { color: var(--indigo); font-weight: 700; letter-spacing: -0.03em; }
.footer a { color: var(--ink-muted); }
.footer a:hover { color: var(--indigo); }
.announcement { background: var(--indigo); color: #eef0ff; }
.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. The chassis ships `.section.navy` as a
   dark band with white text. This theme repaints that band light, which
   left white text on a light background - invisible copy on a live page,
   including the final CTA headline and the footer tagline.
   Re-colour the contents to the light-theme ink.
   ------------------------------------------------------------ */
.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(--indigo-bright); }
.footer, .footer p, .footer li, .footer-note { color: var(--ink-muted); }
.footer h1, .footer h2, .footer h3, .footer-logo { color: var(--ink); }

/* ---- HERO REBUILD: single column + horizontal process rail ---------------- */
.hero .hero-grid { display: block; max-width: 900px; }
.hero .hero-text { max-width: 42ch; }
.workflow-visual.as-rail {
  margin-top: 56px; background: transparent; border: 0; border-top: 1px solid var(--line);
  padding: 32px 0 0; border-radius: 0; box-shadow: none; max-width: none;
}
.workflow-visual.as-rail .visual-title { margin-bottom: 20px; }
.workflow-visual.as-rail .flow {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
}
.workflow-visual.as-rail .flow-step {
  display: block; background: transparent; border: 0; border-left: 1px solid var(--line);
  border-radius: 0; padding: 4px 18px 0; box-shadow: none;
}
.workflow-visual.as-rail .flow-step:first-child { border-left: 0; padding-left: 0; }
.workflow-visual.as-rail .flow-num {
  font-family: var(--mono); font-size: 11px; color: var(--indigo-bright);
  letter-spacing: .12em; margin-bottom: 6px;
}
.workflow-visual.as-rail .flow-name { font-weight: 650; font-size: 14px; margin-bottom: 4px; }
.workflow-visual.as-rail span { font-size: 12px; color: var(--ink-muted); }
@media (max-width: 900px) {
  .workflow-visual.as-rail .flow { grid-template-columns: 1fr 1fr; }
  .workflow-visual.as-rail .flow-step { border-left: 0; padding-left: 0; margin-bottom: 18px; }
}

/* ---- 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: 15ch; }
.hero .hero-copy { max-width: 58ch; }
.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; }

/* The rail is a direct child of <section class="hero">, not of .container, so it
   inherited no max-width or side padding and spanned the full viewport. Give it
   the container geometry and align it with the hero text above. */
.hero .hero-grid { max-width: 1200px; }
.hero > .workflow-visual.as-rail {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 32px 20px 0;
}
