/* ================================================================
   BioBridge design system
   Shared by every page. Wrap a page's content in <div class="bb-page">
   and build it from the pieces below. Fonts are loaded in
   _includes/head/custom.html; theme tweaks (header, footer) live in
   assets/css/main.scss.
   ================================================================ */

:root {
  --bb-ink: #17211c;
  --bb-text: #39443f;
  --bb-muted: #5f6964;
  --bb-green: #2d5f3f;
  --bb-green-dark: #22492f;
  --bb-forest: #1f3d2c;
  --bb-cream: #f6f1e6;
  --bb-cream-line: #e4dccb;
  --bb-line: #dfe4de;
  --bb-lime: #d4e9a6;
  --bb-on-dark: #f6f1e6;
  --bb-on-dark-soft: rgba(246, 241, 230, 0.82);
  --bb-serif: 'Source Serif 4', Georgia, serif;
  --bb-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bb-radius: 10px;
}

/* ---------- Base type (overrides the theme's content defaults) ---------- */

.bb-page {
  font-family: var(--bb-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--bb-text);
}

.bb-page p {
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  max-width: none;
  text-wrap: pretty;
}

.bb-page li {
  max-width: none;
}

.bb-page h1,
.bb-page h2,
.bb-page h3 {
  font-family: var(--bb-serif);
  font-weight: 600;
  color: var(--bb-ink);
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  border: 0;
  text-wrap: balance;
}

.bb-page h1 {
  font-size: clamp(2.4rem, 1.5rem + 3vw, 3.6rem);
  line-height: 1.08;
}

.bb-page h2 {
  font-size: clamp(1.85rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1.15;
}

.bb-page h3 {
  font-size: 1.45rem;
  line-height: 1.25;
}

.bb-page h4 {
  font-family: var(--bb-sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bb-ink);
  margin: 0;
  padding: 0;
  border: 0;
}

.bb-page h1 em,
.bb-page h2 em {
  font-style: italic;
  color: var(--bb-green);
}

.bb-page strong {
  font-weight: 600;
  color: var(--bb-ink);
}

.bb-page a {
  color: var(--bb-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.bb-page a:hover {
  color: var(--bb-green-dark);
}

.bb-page img {
  max-width: 100%;
  height: auto;
}

/* ---------- Layout ---------- */

.bb-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.bb-wrap--narrow {
  max-width: 760px;
}

.bb-section {
  padding: 3.5rem 0;
}

.bb-section--tight {
  padding: 2.5rem 0;
}

/* Full-bleed color band. The border image paints past the sides of
   the box without adding to page width, so there's no sideways scroll. */
.bb-band {
  background: var(--bb-band);
  border-image-source: conic-gradient(var(--bb-band) 0 0);
  border-image-slice: 0 fill;
  border-image-outset: 0 100vmax;
}

.bb-band--cream { --bb-band: var(--bb-cream); }

.bb-band--forest {
  --bb-band: var(--bb-forest);
  color: var(--bb-on-dark-soft);
}

.bb-band--forest h1,
.bb-band--forest h2,
.bb-band--forest h3,
.bb-band--forest h4,
.bb-band--forest strong {
  color: var(--bb-on-dark);
}

.bb-band--forest a {
  color: var(--bb-lime);
}

.bb-band--forest a:hover {
  color: #fff;
}

/* A section's heading plus an optional intro paragraph */
.bb-section-head {
  max-width: 42em;
  margin-bottom: 2.25rem;
}

.bb-page .bb-section-head > p:not(.bb-kicker) {
  margin-top: 0.75rem;
  font-size: 1.15rem;
}

/* ---------- Small type pieces ---------- */

.bb-page .bb-kicker {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--bb-green);
  margin-bottom: 0.6rem;
}

.bb-band--forest .bb-kicker {
  color: var(--bb-lime);
}

.bb-page .bb-lede {
  font-size: 1.2rem;
  line-height: 1.55;
  max-width: 34em;
  margin-top: 1.25rem;
}

.bb-page .bb-muted {
  color: var(--bb-muted);
}

/* ---------- Page header (top of every inner page) ---------- */

.bb-pagehead {
  padding: 2.75rem 0 3rem;
}

.bb-pagehead h1 {
  max-width: 14em;
}

/* ---------- Buttons and links ---------- */

.bb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
}

.bb-page .bb-button,
.bb-page .bb-button:visited {
  display: inline-block;
  background: var(--bb-green);
  color: #fff;
  font-family: var(--bb-sans);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  padding: 1rem 1.5rem;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.bb-page .bb-button:hover,
.bb-page a.bb-button:hover {
  background: var(--bb-green-dark);
  color: #fff;
  text-decoration: none;
}

.bb-page .bb-button:focus-visible {
  outline: 2px solid var(--bb-green);
  outline-offset: 3px;
}

.bb-band--forest .bb-button:focus-visible {
  outline-color: var(--bb-lime);
}

/* For use on the forest band */
.bb-page .bb-button--light,
.bb-page .bb-button--light:visited {
  background: var(--bb-cream);
  color: var(--bb-forest);
}

.bb-page .bb-button--light:hover,
.bb-page a.bb-button--light:hover {
  background: #fff;
  color: var(--bb-forest);
}

.bb-page .bb-textlink {
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Index: a grid of linked titles with a line of text each ---------- */

.bb-page .bb-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2.5rem;
}

.bb-page .bb-index li {
  margin: 0;
  border-top: 2px solid var(--bb-green);
}

.bb-page .bb-index li > a,
.bb-page .bb-index li > div {
  display: block;
  padding: 1.1rem 0 2rem;
  color: inherit;
  text-decoration: none;
}

.bb-index-title {
  display: block;
  font-family: var(--bb-serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--bb-ink);
  margin-bottom: 0.4rem;
}

.bb-index-text {
  display: block;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bb-text);
  text-wrap: pretty;
}

.bb-page .bb-index li > a:hover {
  text-decoration: none;
}

.bb-page .bb-index li > a:hover .bb-index-title {
  color: var(--bb-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* ---------- Cards ---------- */

.bb-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.bb-card {
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  padding: 1.5rem;
}

.bb-band--cream .bb-card {
  border-color: var(--bb-cream-line);
}

.bb-band--forest .bb-card {
  color: var(--bb-text);
  border-color: transparent;
}

.bb-band--forest .bb-card h3,
.bb-band--forest .bb-card h4,
.bb-band--forest .bb-card strong {
  color: var(--bb-ink);
}

.bb-band--forest .bb-card a {
  color: var(--bb-green);
}

.bb-page .bb-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.bb-page .bb-card p {
  font-size: 1.05rem;
  line-height: 1.55;
}

.bb-page a.bb-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.bb-page a.bb-card:hover {
  border-color: var(--bb-green);
  text-decoration: none;
}

.bb-page a.bb-card:hover h3 {
  color: var(--bb-green);
}

/* ---------- Long-form text ---------- */

.bb-prose {
  max-width: 40em;
}

.bb-page .bb-prose p,
.bb-page .bb-prose ul,
.bb-page .bb-prose ol {
  margin: 0 0 1.1em;
}

.bb-page .bb-prose ul,
.bb-page .bb-prose ol {
  padding-left: 1.25em;
}

.bb-page .bb-prose li {
  margin-bottom: 0.4em;
}

.bb-page .bb-prose li::marker {
  color: var(--bb-green);
}

.bb-page .bb-prose h2 {
  margin: 2.75rem 0 1rem;
}

.bb-page .bb-prose h3 {
  margin: 2rem 0 0.75rem;
}

.bb-page .bb-prose > :first-child {
  margin-top: 0;
}

.bb-page .bb-prose > :last-child {
  margin-bottom: 0;
}

/* ---------- Note: a quiet box for a definition or aside ---------- */

.bb-note {
  background: var(--bb-cream);
  border-radius: var(--bb-radius);
  padding: 1.25rem 1.5rem;
}

.bb-band--cream .bb-note {
  background: #fff;
}

.bb-band--forest .bb-note {
  background: rgba(246, 241, 230, 0.08);
}

/* ---------- Facts: label and value pairs ---------- */

.bb-page .bb-facts {
  display: grid;
  gap: 1.1rem;
  margin: 0;
}

.bb-page .bb-facts dt {
  font-weight: 600;
  color: var(--bb-ink);
  margin: 0;
}

/* The theme shrinks every <dd> to 0.75em; keep values at body size */
.bb-page .bb-facts dd {
  margin: 0.15rem 0 0;
  font-size: inherit;
}

/* ---------- Tags: small labels such as company names ---------- */

.bb-page .bb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bb-page .bb-tags li {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  padding: 0.3rem 0.7rem;
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  color: var(--bb-text);
}

.bb-band--cream .bb-tags li {
  border-color: var(--bb-cream-line);
}

/* ---------- Jump links to sections further down the page ---------- */

.bb-page .bb-jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.bb-page .bb-jumpnav li {
  margin: 0;
}

/* Leave room for the sticky header when jumping to a section */
.bb-page [id] {
  scroll-margin-top: 90px;
}

/* ---------- Questions and answers (native <details>) ---------- */

.bb-page .bb-faq {
  border-top: 1px solid var(--bb-line);
}

.bb-page .bb-faq details {
  border-bottom: 1px solid var(--bb-line);
}

.bb-page .bb-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-family: var(--bb-serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--bb-ink);
  text-wrap: pretty;
}

.bb-page .bb-faq summary::-webkit-details-marker {
  display: none;
}

.bb-page .bb-faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--bb-sans);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--bb-green);
}

.bb-page .bb-faq details[open] summary::after {
  content: "\2212";
}

.bb-page .bb-faq summary:hover {
  color: var(--bb-green);
}

.bb-page .bb-faq-body {
  max-width: 36em;
  padding: 0 0 1.5rem;
}

.bb-page .bb-faq-body p + p,
.bb-page .bb-faq-body p + ul,
.bb-page .bb-faq-body ul + p {
  margin-top: 1em;
}

/* ---------- Form fields ---------- */

/* The theme draws forms as gray padded boxes */
.bb-page form {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

.bb-page label {
  display: block;
  font-weight: 600;
  color: var(--bb-ink);
  margin-bottom: 0.4rem;
}

.bb-page input[type="text"],
.bb-page input[type="email"],
.bb-page textarea {
  width: 100%;
  font-family: var(--bb-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bb-ink);
  background: #fff;
  border: 1px solid #8a948d; /* 3:1 against white, so the field edge is visible */
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  margin: 0;
  box-shadow: none;
}

.bb-page input[type="text"]:focus,
.bb-page input[type="email"]:focus,
.bb-page textarea:focus {
  outline: 2px solid var(--bb-green);
  outline-offset: 1px;
  border-color: var(--bb-green);
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .bb-page .bb-index,
  .bb-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 700px) {
  .bb-page .bb-facts > div {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1.5rem;
  }

  .bb-page .bb-facts dd {
    margin: 0;
  }
}

@media (min-width: 900px) {
  .bb-section {
    padding: 5rem 0;
  }

  .bb-section--tight {
    padding: 3.5rem 0;
  }

  .bb-pagehead {
    padding: 4.5rem 0;
  }

  .bb-page .bb-lede {
    font-size: 1.3rem;
  }
}

@media (min-width: 1000px) {
  .bb-page .bb-index,
  .bb-cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Photo placeholder ----------
   Marks where a real photo goes. To swap in the photo, replace the
   whole element with <img class="bb-photo" src="..." alt="..."> and
   keep any size class (bb-photo--wide, bb-photo--portrait). */

.bb-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--bb-radius);
}

.bb-photo--wide { aspect-ratio: 21 / 9; }
.bb-photo--portrait { aspect-ratio: 4 / 5; }

.bb-photo-placeholder {
  display: flex;
  align-items: flex-end;
  padding: 1.1rem 1.25rem;
  background: #e8e3d6;
  color: var(--bb-muted);
  font-family: var(--bb-sans);
  font-size: 0.95rem;
  line-height: 1.4;
}

.bb-band--cream .bb-photo-placeholder { background: #e4ddcc; }

.bb-band--forest .bb-photo-placeholder {
  background: rgba(246, 241, 230, 0.1);
  color: var(--bb-on-dark-soft);
}

@media (max-width: 639px) {
  .bb-photo--wide { aspect-ratio: 4 / 3; }
}
