/* ImmuneStrata — clinical-stage contact allergy diagnostics
   Palette derives from the test itself: cold instrument blues for the platform,
   one warm erythema red reserved exclusively for a positive reaction. */

:root {
  --void:      #0a1428;
  --deep:      #102142;
  --panel:     #16294d;
  --mid:       #1b4f86;
  --bright:    #39b7d0;
  --ice:       #cfe8f8;
  --white:     #ffffff;
  --erythema:  #e8566b;
  --plate:     #f6f5f2;   /* the logo's own ground — it is drawn for light */
  --sage:      #9fc8a0;   /* the mark's central form */
  --erythema-d:#b8324a;
  --rule:      rgba(207, 232, 248, 0.16);
  --rule-soft: rgba(207, 232, 248, 0.08);

  --gutter: clamp(20px, 5vw, 96px);
  --measure: 62ch;
  --pad-section: clamp(72px, 11vw, 152px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ice);
  font-family: Barlow, "Helvetica Neue", Helvetica, sans-serif;
  font-size: clamp(17px, 1.25vw, 20px);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--bright); text-decoration: none; }
a:hover { color: var(--white); }

:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--white); color: var(--void);
  padding: 12px 20px; z-index: 100;
}
.skip:focus { left: var(--gutter); top: 12px; }

/* Anchor targets clear the sticky masthead. */
section[id], [id="top"] { scroll-margin-top: 92px; }

/* ---------- shared rhythm ---------- */

.band { padding: var(--pad-section) var(--gutter); }
.band--panel { background: var(--deep); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bright);
  margin-bottom: 26px;
}

.statement {
  font-size: clamp(1.9rem, 4.1vw, 3.1rem);
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--white);
  max-width: 19ch;
}
.statement--wide { max-width: 26ch; }

.lede {
  margin-top: 30px;
  max-width: var(--measure);
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.65;
}

.more {
  display: inline-block;
  margin-top: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mid);
  padding-bottom: 5px;
}
.more:hover { border-bottom-color: var(--bright); }

/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  background: rgba(10, 20, 40, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--white);
  font-size: 1.05rem;
  letter-spacing: 0.11em; text-transform: uppercase;
  white-space: nowrap;
}
/* The mark's darkest strata sit at 1.65:1 on the navy — it is drawn for a light
   ground, so it keeps one rather than being recolored. */
.wordmark .plate {
  display: grid; place-items: center;
  background: var(--plate);
  border-radius: 7px;
  padding: 4px 6px;
  flex: none;
}
.wordmark .plate img { height: 30px; width: auto; }
.wordmark b  { font-weight: 600; }
.wordmark em { font-style: normal; font-weight: 300; }
.foot .wordmark .plate img { height: 34px; }
.foot .wordmark { font-size: 1.1rem; }

.sitenav { display: flex; align-items: center; gap: clamp(14px, 2vw, 34px); }
.sitenav a {
  color: var(--ice);
  font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.sitenav a:hover { color: var(--white); }

/* Below this width the inline links overflow the masthead and become
   unreachable. This is a single scrolling page and the footer carries the same
   nav, so the links stand down and the one action stays. */
@media (max-width: 880px) {
  .sitenav a:not(.pill) { display: none; }
  .masthead { padding-top: 12px; padding-bottom: 12px; }
}

/* Narrower still, the set name collides with the pill. The mark carries the
   brand on its own; the link keeps its name via aria-label. */
@media (max-width: 560px) {
  .wordmark .name { display: none; }
}

.pill {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 24px;
  border: 1px solid var(--mid);
  border-radius: 999px;
  background: var(--bright);
  color: var(--void) !important;
  font-weight: 500;
  white-space: nowrap;
}
.pill:hover { background: var(--white); border-color: var(--white); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 6vw, 80px);
  align-items: center;
  padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(64px, 9vw, 120px);
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(27, 79, 134, 0.5) 0%, transparent 62%),
    linear-gradient(178deg, var(--deep) 0%, var(--void) 74%);
}
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.15rem);
  font-weight: 300;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--white);
  max-width: 15ch;
}
.hero .lede { font-size: clamp(1.06rem, 1.5vw, 1.32rem); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center;
  min-height: 52px; padding: 0 32px;
  border-radius: 999px;
  font-size: 0.84rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.btn--solid { background: var(--bright); color: var(--void); }
.btn--solid:hover { background: var(--white); color: var(--void); }
.btn--ghost { border: 1px solid var(--mid); color: var(--ice); }
.btn--ghost:hover { border-color: var(--bright); color: var(--white); }

/* ---------- the read: hero figure ---------- */

.read {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(168deg, rgba(22, 41, 77, 0.92), rgba(10, 20, 40, 0.92));
  padding: clamp(20px, 3vw, 32px);
}

.read-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: baseline; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 1px solid var(--rule-soft);
}
.read-title {
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ice);
}
.read-phase { font-size: 0.74rem; letter-spacing: 0.1em; color: var(--bright); }

.chambers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(9px, 1.5vw, 15px);
}

.chamber {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(27, 79, 134, 0.14);
  transition: background 420ms ease, border-color 420ms ease, box-shadow 420ms ease;
}
.chamber .pos {
  position: absolute; top: 5px; left: 0; right: 0;
  text-align: center;
  font-size: 0.56rem; letter-spacing: 0.06em;
  color: rgba(207, 232, 248, 0.62);
}
.chamber .code {
  font-size: clamp(0.82rem, 1.5vw, 1.06rem);
  font-weight: 500; line-height: 1;
  color: var(--ice);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 380ms ease, transform 380ms ease;
}
.chamber[data-shown="1"] .code { opacity: 1; transform: scale(1); }

.chamber[data-level="pos"] {
  background: rgba(232, 86, 107, 0.17);
  border-color: rgba(232, 86, 107, 0.62);
  box-shadow: 0 0 0 3px rgba(232, 86, 107, 0.09);
}
.chamber[data-level="pos"] .code { color: var(--erythema); }
.chamber[data-level="strong"] {
  background: rgba(232, 86, 107, 0.29);
  border-color: var(--erythema);
  box-shadow: 0 0 22px rgba(232, 86, 107, 0.34);
}
.chamber[data-level="strong"] .code { color: #ffd9de; }
.chamber[data-late="1"][data-shown="1"]::after {
  content: "";
  position: absolute; inset: -6px;
  border: 1px solid rgba(232, 86, 107, 0.42);
  border-radius: 50%;
}

.timeline {
  display: flex; gap: 8px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
}
.phase {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--ice);
  font-family: inherit;
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.phase:hover { border-color: var(--bright); color: var(--white); }
.phase[aria-pressed="true"] {
  background: var(--bright); border-color: var(--bright); color: var(--void);
}

.read-note {
  margin-top: 18px;
  font-size: 0.83rem; line-height: 1.55;
  color: rgba(207, 232, 248, 0.72);
}
.read-note b { color: var(--erythema); font-weight: 500; }

/* ---------- regulatory notice ---------- */

.notice {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px var(--gutter);
  background: var(--panel);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.85rem; line-height: 1.55;
}
.notice svg { flex: none; margin-top: 2px; }
.notice b { color: var(--white); font-weight: 500; }

/* ---------- split rows ---------- */

.split { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.facts { display: grid; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.fact { background: var(--void); padding: clamp(22px, 3vw, 34px); }
.band--panel .fact { background: var(--deep); }
.fact dt {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 200; line-height: 1;
  color: var(--white);
}
.fact dd { margin-top: 12px; font-size: 0.95rem; line-height: 1.55; }
.fact .src { display: block; margin-top: 12px; font-size: 0.72rem; color: rgba(207, 232, 248, 0.5); }

/* ---------- pipeline ---------- */

.grid-table { width: 100%; border-collapse: collapse; text-align: left; margin-top: 52px; }
.grid-table caption { caption-side: bottom; padding-top: 22px; font-size: 0.8rem; color: rgba(207,232,248,0.6); text-align: left; }
.grid-table th, .grid-table td { padding: 20px 16px 20px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.grid-table thead th {
  padding-bottom: 12px;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(207, 232, 248, 0.6);
  border-bottom: 1px solid var(--rule);
}
.prog { color: var(--white); font-size: 1.05rem; font-weight: 400; }
.prog span { display: block; margin-top: 5px; font-size: 0.86rem; font-weight: 300; color: rgba(207,232,248,0.72); }
.track { display: block; height: 6px; border-radius: 3px; background: rgba(207, 232, 248, 0.11); }
.track[data-state="done"] { background: var(--bright); }
.track[data-state="active"] { background: repeating-linear-gradient(115deg, var(--bright) 0 7px, rgba(57,183,208,.28) 7px 14px); }
.legend { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; font-size: 0.8rem; color: rgba(207,232,248,0.72); }
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend i { width: 22px; height: 6px; border-radius: 3px; display: inline-block; }

/* ---------- team ---------- */

.people { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
@media (min-width: 820px) { .people { grid-template-columns: 1fr 1fr; } }
.person { display: flex; gap: 24px; padding: 28px; border: 1px solid var(--rule-soft); border-radius: 12px; background: var(--deep); }
.band--panel .person { background: var(--panel); }
.portrait { flex: none; width: 112px; height: 138px; border-radius: 8px; background: var(--panel); overflow: hidden; display: grid; place-items: center; font-size: 0.66rem; letter-spacing: 0.1em; color: rgba(207,232,248,0.45); text-align: center; }
/* Both headshots are wider than this slot's 112:138, so cover scales them to the
   slot's height and crops horizontally only — the full head and shoulders stay,
   and a vertical object-position would do nothing. Measured head centers sit at
   48-50% of frame width, so centered is the correct crop for both. */
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.band--panel .portrait { background: var(--void); }
.person h3 { font-size: 1.28rem; font-weight: 400; color: var(--white); }
.person .role { margin-top: 5px; font-size: 0.73rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--bright); }
.person p { margin-top: 13px; font-size: 0.93rem; line-height: 1.6; }

/* ---------- contact ---------- */

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 9px; }
.field label { font-size: 0.85rem; font-weight: 400; color: var(--white); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid rgba(207, 232, 248, 0.42);
  border-radius: 8px;
  background: var(--void);
  color: var(--white);
  font-family: inherit; font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--bright); }
.pair { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 620px) { .pair { grid-template-columns: 1fr 1fr; } }
.form-foot { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.form-foot p { font-size: 0.8rem; color: rgba(207,232,248,0.66); max-width: 44ch; }
button.btn { border: 0; font-family: inherit; cursor: pointer; }

/* ---------- footer ---------- */

.foot { padding: clamp(48px, 6vw, 76px) var(--gutter) 40px; border-top: 1px solid var(--rule-soft); }
.foot-top { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 26px; }
.foot nav a { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ice); }
.legal { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--rule-soft); font-size: 0.79rem; line-height: 1.65; color: rgba(207,232,248,0.6); max-width: 92ch; }
.legal p + p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- section rhythm ----------
   Every section below the hero used the same two-column split. These give two
   alternatives so the cadence varies: a full-measure lead, and a mirrored
   split that puts the supporting text first. */

.lead { display: flex; flex-direction: column; }
.lead .statement {
  max-width: 17ch;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.02;
}
.lead-body { margin-top: clamp(30px, 4vw, 52px); max-width: 58ch; }
@media (min-width: 940px) {
  .lead-body { margin-left: 44%; }
}

@media (min-width: 900px) {
  .split--mirror > *:first-child { order: 2; }
  .split--mirror > *:last-child  { order: 1; }
}

/* Team: the cards are the content, so the heading spans instead of splitting. */
.team-head { display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 28px); }
.team-head .statement { max-width: 24ch; }
.team-head .lede { max-width: 56ch; margin-top: 0; }

/* ---------- figures ----------
   Wide diagrams that carry an argument the prose is making. Sized in viewBox
   units so they scale cleanly; every label is real text, not paths. */
.figure-wide { margin: clamp(48px, 6vw, 80px) 0 0; }
.figure-wide svg { width: 100%; height: auto; display: block; }
.figure-wide figcaption {
  margin-top: 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(207, 232, 248, 0.72);
  max-width: 68ch;
}
.figure-wide figcaption b { color: var(--erythema); font-weight: 500; }
.fig-label { font-family: Barlow, sans-serif; font-size: 15px; fill: #cfe8f8; }
.fig-sub   { font-family: Barlow, sans-serif; font-size: 13px; fill: rgba(207,232,248,.6); }
.fig-key   { font-family: Barlow, sans-serif; font-size: 12px; letter-spacing: 1.4px; fill: #39b7d0; text-transform: uppercase; }

/* ---------- 3D cell ---------- */
.cell-block {
  margin: clamp(48px, 6vw, 80px) 0 0;
  display: grid; gap: clamp(28px, 4vw, 56px); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 940px) { .cell-block { grid-template-columns: 1.05fr 0.95fr; } }
#cell-stage {
  position: relative;
  width: 100%; height: clamp(300px, 38vw, 440px);
  border-radius: 14px;
  background: radial-gradient(70% 70% at 45% 40%, rgba(27,79,134,.42) 0%, rgba(10,20,40,0) 70%);
}
#cell-stage canvas { display: block; width: 100% !important; height: 100% !important; }
/* If WebGL is unavailable the stage stays an empty tinted panel rather than a broken box. */
#cell-stage[data-failed] { background: var(--panel); }
.cell-copy .fig-heading {
  font-family: var(--font-display, Barlow), sans-serif;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 400;
  line-height: 1.2; color: var(--white); margin: 0 0 16px;
}
.cell-copy p { font-size: .98rem; line-height: 1.65; color: var(--ice); margin: 0 0 14px; }
.cell-copy .note { font-size: .84rem; color: rgba(207,232,248,.66); }
@media (prefers-reduced-motion: reduce) { #cell-stage { }
}

/* Honeypot: present in the DOM for bots, invisible and unreachable for people. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
