/* SZS BioAdvisors
   Palette taken from an H&E-stained slide: hematoxylin violet, eosin pink, glass. */
:root {
  --glass: #F4F2F6;        /* slide glass, page background */
  --ink: #221C33;          /* hematoxylin, darkest */
  --ink-soft: #5E566F;     /* secondary text */
  --hema: #54479A;         /* hematoxylin violet, lines and links */
  --eosin: #E07A97;        /* eosin pink, vesicle fill */
  --rule: #DDD8E3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass: #16121F;
    --ink: #EEEAF4;
    --ink-soft: #A69EB6;
    --hema: #A99BF0;
    --eosin: #E98AA6;
    --rule: #2C2639;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--glass);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--hema);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px clamp(16px, 5vw, 64px);
  position: relative;
  z-index: 2;
}
.wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark span { color: var(--hema); }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); border-color: var(--hema); }

/* Main split: words left, living membrane right */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 0 clamp(16px, 5vw, 64px);
}

.copy { max-width: 34rem; padding: 24px 0 48px; }

h1 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.lead {
  color: var(--ink-soft);
  max-width: 30rem;
  margin-bottom: 2.5rem;
}

.facts { display: grid; gap: 1.1rem; margin-bottom: 2.75rem; }
.facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.facts dt {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  color: var(--ink-soft);
}
.facts dd { font-size: 0.98rem; }
.facts ul { list-style: none; }

.cta {
  display: inline-block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--hema);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .2s;
}
.cta:hover { color: var(--ink); }

/* The figure */
figure.cell {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
figure.cell canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}
figcaption {
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 8px 0 24px;
  text-align: right;
}
figcaption em {
  font-family: "Newsreader", Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink);
  margin-right: .5em;
}

/* Contact page */
.email {
  display: inline-block;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--hema);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  margin-bottom: 1.25rem;
  word-break: break-all;
}
.email:hover { color: var(--ink); }
.copy-btn {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.copy-btn:hover { border-color: var(--hema); color: var(--ink); }
.where { margin-top: 2.75rem; color: var(--ink-soft); }

/* Footer */
.site-footer {
  padding: 20px clamp(16px, 5vw, 64px) 28px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* One orchestrated entrance, text only */
@media (prefers-reduced-motion: no-preference) {
  .copy > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .copy > *:nth-child(2) { animation-delay: .08s; }
  .copy > *:nth-child(3) { animation-delay: .16s; }
  .copy > *:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; gap: 0; }
  figure.cell { order: -1; min-height: 0; height: 78vw; max-height: 420px; }
  figcaption { display: none; }
  .copy { padding-top: 8px; }
  .facts div { grid-template-columns: 1fr; gap: .2rem; }
}
