/* ============================================================
 * TheBioHub Labs — site.css
 *
 * Bright theme, vanilla CSS, no preprocessor, no Tailwind.
 * Section-padding rhythm and page-header proportions are
 * borrowed structurally from the parent thebiohub site;
 * the colour palette and brand are Labs-specific.
 * ============================================================ */

:root {
  --ink:        #14171a;
  --ink-soft:   #4a5159;
  --ink-mute:   #7a838c;
  --line:       #e4e7eb;
  --line-soft:  #f0f2f5;
  --bg:         #ffffff;
  --bg-soft:    #f7f8fa;
  --bg-warm:    #fbfaf6;
  --bg-card:    #ffffff;
  --accent:        #1f6f5c;     /* forest green — Labs primary */
  --accent-soft:   #e8f1ee;
  --accent-ink:    #0e3a30;
  --warn:          #8a3b00;
  --warn-soft:     #fbeede;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow-sm:     0 1px 2px rgba(20, 23, 26, 0.04), 0 1px 1px rgba(20, 23, 26, 0.03);
  --shadow-md:     0 4px 16px rgba(20, 23, 26, 0.06);
  --font-sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:     ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

/* Parent layout standard (thebiohub.ca about/events/publications/legal):
 *   Outer container = 1280px (parent's max-w-7xl)
 *   Long-form prose body = 896px (parent's max-w-4xl)
 *   Page-header / hero lede = 768px (parent's max-w-3xl) */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 720px) { .wrap { padding: 0 1.25rem; } }

/* ============================================================ */
/* Site header — two-tone brand mark, sticky                    */
/* ============================================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.15rem;
}
.brand-mark { color: var(--ink); }
.brand-sub  { color: var(--accent); font-weight: 700; }
.brand:hover .brand-sub { color: var(--accent-ink); }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ============================================================ */
/* Main + sections — parent-style padding rhythm                */
/* ============================================================ */
.site-main { padding: 0; }
.site-main > section { padding: 5rem 0; }
.site-main > section + section { border-top: 0; }
.site-main > section.alt { background: var(--bg-warm); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 2.4rem; margin: 0 0 0.8rem; }
h2 { font-size: 1.75rem; margin: 0 0 0.9rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 1.4rem;
}

/* ============================================================ */
/* Hero — larger proportions borrowed from parent navheader     */
/* ============================================================ */
.hero {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  padding: 6rem 0 5rem !important;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 1.2rem;
}
.hero h1 .accent-tail { color: var(--ink-mute); }
.hero .lede { font-size: 1.2rem; max-width: 768px; }
.hero .cta {
  margin-top: 2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ============================================================ */
/* Buttons                                                       */
/* ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ============================================================ */
/* Sub-page header (intake / acknowledgement)                   */
/* ============================================================ */
.page-header {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  padding: 5rem 0 4rem !important;
}
.page-header.tight { padding: 3rem 0 2.5rem !important; }
.page-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.page-header h1 .accent-tail { color: var(--ink-mute); }
.page-header .lede { font-size: 1.1rem; max-width: 768px; }

/* ============================================================ */
/* Section header (eyebrow + h2)                                */
/* ============================================================ */
.section-header { margin-bottom: 2.5rem; }
.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 0.8rem;
}
.section-header .lede { max-width: 768px; }

/* ============================================================ */
/* Feature grid                                                  */
/* ============================================================ */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.feature h3 { color: var(--accent-ink); }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* ============================================================ */
/* Pillars (4-up grid — Lab Branding "What's covered")          */
/* ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 1024px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .pillars { grid-template-columns: 1fr; } }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.pillars .feature em { color: var(--accent-ink); font-style: italic; }

/* ============================================================ */
/* Steps (numbered timeline — Lab Branding "How it works")      */
/* ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (max-width: 1024px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .steps { grid-template-columns: 1fr; } }
.steps > li {
  counter-increment: step;
  padding: 1.3rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.steps > li h3 { color: var(--ink); }
.steps > li p  { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.steps > li a  { color: var(--accent-ink); }

/* ============================================================ */
/* Checklist (Lab Branding "Ready when you are")                */
/* ============================================================ */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 1.5rem;
  display: grid;
  gap: 0.5rem;
  max-width: 600px;
}
/* When a section-header introduces a checklist directly, kill the heavy
   section-header bottom margin so the lede + checklist read as one block. */
.section-header:has(+ .checklist) { margin-bottom: 0; }
.checklist > li {
  padding-left: 2rem;
  position: relative;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}
.checklist > li::before {
  content: "☐";
  position: absolute;
  left: 0.2rem;
  top: -0.15rem;
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1;
}
.checklist > li em {
  color: var(--ink-mute);
  font-style: italic;
  margin-right: 0.3rem;
}

/* ============================================================ */
/* Steps — vertical timeline (Lab Branding "How it works")      */
/* ============================================================ */
.steps-vertical {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 896px;
}
.steps-vertical > li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.4rem;
  align-items: start;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps-vertical .step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.25rem;
}
/* Post-launch step (08 maintenance) — visually distinct from the
   linear build sequence: muted number colour + extra top margin to
   signal "after the project is delivered". */
.steps-vertical > li.post-launch { margin-top: 0.8rem; }
.steps-vertical > li.post-launch .step-num { color: var(--ink-mute); }
.steps-vertical .step-body h3 {
  color: var(--ink);
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.steps-vertical .step-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
}
.steps-vertical .step-body p:last-child { margin-bottom: 0; }
.steps-vertical .step-body em {
  color: var(--ink);
  font-style: italic;
}
.steps-vertical .step-body a { color: var(--accent-ink); }
.steps-vertical .step-body a:hover { color: var(--accent); }
.step-note {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .steps-vertical > li {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ============================================================ */
/* FAQ (vertical list of <details>)                              */
/* ============================================================ */
.faq {
  max-width: 896px;
  border-top: 1px solid var(--line);
}
.faq > details {
  border-bottom: 1px solid var(--line);
  padding: 0.2rem 0;
}
.faq > details > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  font-size: 1rem;
}
.faq > details > summary::-webkit-details-marker { display: none; }
.faq > details > summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink-mute);
  transition: transform 0.15s ease;
  line-height: 1;
}
.faq > details[open] > summary::after { content: "−"; }
.faq > details > .faq-body {
  padding: 0 2rem 1rem 0;
  color: var(--ink-soft);
}
.faq > details > .faq-body p { margin: 0 0 0.6rem; }
.faq > details > .faq-body p:last-child { margin-bottom: 0.4rem; }

/* ============================================================ */
/* Demo gallery                                                  */
/* ============================================================ */
.demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 900px) { .demos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .demos { grid-template-columns: 1fr; } }
.demo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.demo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.demo-card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.demo-card .meta { padding: 0.9rem 1rem 1rem; }
.demo-card .meta h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.demo-card .meta p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* ============================================================ */
/* Pricing                                                       */
/* ============================================================ */
.pricing {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  max-width: 768px;
  overflow: hidden;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
}
.price-row:last-child { border-bottom: 0; }
.price-row .label { color: var(--ink); font-weight: 600; }
.price-row .value { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.pricing-note { color: var(--ink-mute); font-size: 0.85rem; margin-top: 1rem; max-width: 768px; }

/* ============================================================ */
/* Page scope: /lab-branding/ runs in a single 896px column.    */
/* This is the prose-tier width from the parent's layout        */
/* standard, applied to every section on the page so the body   */
/* rhythm is uniform (instead of stepping between grid + prose  */
/* widths).                                                     */
/* ============================================================ */
/* Scope the narrow column to the main content only — header nav + footer
   keep the default 1280px so the nav doesn't shift between pages. */
body.page-lab-branding .site-main .wrap,
body.page-about .site-main .wrap,
body.page-intake-form .site-main .wrap { max-width: 896px; }
body.page-lab-branding .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.page-lab-branding .pricing,
body.page-lab-branding .pricing-note { max-width: none; }
body.page-lab-branding .section-header .lede,
body.page-lab-branding .page-header .lede,
body.page-lab-branding .hero .lede,
body.page-about .section-header .lede,
body.page-about .page-header .lede,
body.page-about .hero .lede,
body.page-intake-form .section-header .lede,
body.page-intake-form .page-header .lede,
body.page-intake-form .hero .lede { max-width: none; }
/* Form container — bump to match the 896px column. */
body.page-intake-form .form-page { max-width: 896px; }

/* ============================================================ */
/* Acknowledgement logos (landing page bottom)                  */
/* ============================================================ */
.ack-section { padding: 5rem 0 5.5rem !important; }

.ack-eyebrow {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  color: var(--ink-mute);
  font-weight: 600;
  margin: 0 0 3rem;
}

.ack-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .ack-logos { grid-template-columns: 1fr; }
}

.ack-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 1.5rem;
}
@media (max-width: 720px) {
  .ack-cell { padding: 1.5rem; }
}

.ack-cell img {
  max-height: 64px;
  max-width: 100%;
  width: auto;
}

/* ============================================================ */
/* Footer                                                        */
/* ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-warm);
}
.site-footer .wrap {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer .wrap p { margin: 0; }
.site-footer .footer-attr { color: var(--ink-mute); }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--accent); }

/* ============================================================ */
/* Prose pages (acknowledgement etc.)                           */
/* ============================================================ */
.prose { max-width: 896px; }
.prose p { color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); padding-left: 1.2rem; }
.prose li + li { margin-top: 0.3rem; }
.prose h2 {
  margin-top: 2.6rem;
  font-size: 1.4rem;
  color: var(--ink);
}
.prose code, code {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* ============================================================ */
/* Intake form                                                  */
/* ============================================================ */

.form-page { max-width: 820px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 720px) { .form-page { padding: 0 1.25rem; } }

.form-callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--accent-ink);
}
.form-callout ul { margin: 0.4rem 0 0 0; padding-left: 1.2rem; }
.form-callout li { margin: 0.1rem 0; }

fieldset.section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem 1.4rem;
  margin: 0 0 1.6rem;
  background: var(--bg-card);
}
fieldset.section > legend {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 0 0.4rem;
}
fieldset.section .section-hint {
  color: var(--ink-mute);
  font-size: 0.88rem;
  margin: -0.2rem 0 1rem;
}

details.advanced {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--bg-soft);
  margin: 2rem 0 1.6rem;
}
details.advanced > summary {
  cursor: pointer;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}
details.advanced > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
  color: var(--ink-mute);
}
details.advanced[open] > summary::before { transform: rotate(90deg); }
details.advanced > .advanced-body { padding: 0 1.2rem 1.2rem; }
details.advanced > .advanced-body > fieldset.section { background: var(--bg); }

label.field { display: block; margin: 0.7rem 0; }
/* The HTML `hidden` attribute is overridden by label.field { display:block }
   because of specificity. Win the fight back so [hidden] works. */
label.field[hidden],
[hidden] { display: none !important; }
label.field > .label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
label.field > .label .req { color: var(--warn); margin-left: 0.25rem; }
label.field > .hint {
  display: block;
  color: var(--ink-mute);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

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

.repeat-list { display: flex; flex-direction: column; gap: 1rem; margin: 0.4rem 0 0; }
.repeat-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 0.6rem;
  background: var(--bg-soft);
  position: relative;
}
.repeat-item .repeat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.repeat-controls { display: flex; gap: 0.5rem; margin-top: 0.6rem; }

.btn-mini {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
}
.btn-mini:hover { background: var(--bg-soft); color: var(--ink); }
.btn-mini.remove { color: var(--warn); border-color: #e5cdb8; }
.btn-mini.remove:hover { background: var(--warn-soft); }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding: 1.4rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.form-actions .status { color: var(--ink-mute); font-size: 0.9rem; }
.form-actions .status.error { color: var(--warn); font-weight: 600; }
.form-actions .status.ok    { color: var(--accent-ink); font-weight: 600; }
