/* White Coat Sciences — static site
   Source Sans 3 and Source Serif 4 are self-hosted (SIL OFL). */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-600.woff2") format("woff2");
}

:root {
  --paper: #f4f1ea;
  --paper-2: #fbfaf6;
  --ink: #142033;
  --ink-soft: #3d4b5c;
  --navy: #101c2e;
  --line: #ddd6cb;
  --line-strong: #c9c0b2;
  --accent: #2a4a96;
  --status-bg: #f3ecdf;
  --status-ink: #5c3b16;
  --status-line: #c4ad90;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --header-h: 4.25rem;
  --wrap: 1120px;
  --measure: 68ch;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  color-scheme: light;
}

main {
  flex: 1;
  scroll-margin-top: var(--header-h);
}

main:focus {
  outline: none;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.35rem, 4.6vw, 4.15rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

p,
li,
dd {
  color: var(--ink);
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--navy);
}

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

::selection {
  background: #d9e1f5;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.measure {
  max-width: var(--measure);
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow .pill {
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--navy);
}

.header-inner {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  height: 46px;
  width: auto;
  display: block;
}

.brand-text {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.page-hero {
  padding: 3.5rem 0 2.5rem;
}

.page-hero h1 {
  max-width: 22ch;
}

.hero {
  padding: 3.75rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.75fr);
  gap: 2.5rem 3rem;
  align-items: start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--navy);
  border-radius: 2px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.button:hover {
  background: #1c304c;
  color: #fff;
  border-color: #1c304c;
}

.button.secondary {
  background: transparent;
  color: var(--navy);
}

.button.secondary:hover {
  background: var(--navy);
  color: #fff;
}

.notice,
.callout {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  padding: 1.2rem 1.25rem 1.15rem;
}

.callout {
  border-left: 3px solid var(--navy);
  margin: 1.5rem 0 1.75rem;
}

.notice p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.notice .eyebrow,
.callout .eyebrow {
  margin-bottom: 0.55rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts li {
  padding: 1.15rem 1rem 1.2rem;
  margin: 0;
}

.facts li + li {
  border-left: 1px solid var(--line);
}

.facts span {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section {
  padding: 4rem 0;
}

.section + .section,
.band {
  border-top: 1px solid var(--line);
}

.section-next {
  padding-top: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.split h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 44rem;
}

.table-wrap {
  border-top: 1px solid var(--line-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--status-line);
  background: var(--status-bg);
  color: var(--status-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.people {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.people li {
  margin: 0;
  padding: 1.25rem 1.3rem 1.15rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.role {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: principle;
}

.principles > li {
  counter-increment: principle;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.principles > li:last-child {
  border-bottom: 1px solid var(--line);
}

.principles h3::before {
  content: counter(principle, decimal-leading-zero);
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.facts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--line);
}

.facts-list li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.facts-list strong {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.prose h2 {
  margin-top: 2.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  max-width: var(--measure);
}

.prose li + li {
  margin-top: 0.35rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.contact-side {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}

.contact-side h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}

.contact-side address {
  font-style: normal;
  margin-bottom: 1.5rem;
}

.form-index {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-index a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.form-index a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.form-block {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  padding: 1.75rem 0 0.5rem;
  border-top: 1px solid var(--line);
}

.form-block h2 {
  font-size: 1.7rem;
}

.form-block > p {
  max-width: 42rem;
}

form {
  position: relative;
  max-width: 40rem;
  margin-top: 1.25rem;
}

.field {
  margin: 0 0 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.req {
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  appearance: none;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
}

textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.5;
}

input:user-invalid,
textarea:user-invalid {
  border-color: #8a3d2f;
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0.25rem 0 1rem;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.25rem;
  flex: none;
  accent-color: var(--navy);
}

.check label {
  font-weight: 400;
}

.form-note {
  margin: -0.35rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.band {
  padding: 3.5rem 0 4rem;
}

.site-footer {
  background: var(--navy);
  color: #e7e1d6;
  padding: 2.5rem 0 2rem;
}

.footer-inner {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 1.5rem 2rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.footer-brand p {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.site-footer address {
  font-style: normal;
  color: #e7e1d6;
}

.site-footer a {
  color: #fff;
}

.site-footer a:focus-visible {
  outline-color: #f4f1ea;
}

.footer-legal {
  display: flex;
  gap: 1rem;
}

.footer-legal a {
  font-weight: 600;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-disclaimer,
.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: #c9c3b8;
  font-size: 0.95rem;
  max-width: 48rem;
}

.copyright {
  color: #b7b1a6;
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .people,
  .contact-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .facts li:nth-child(odd) {
    border-left: 0;
  }

  .facts li:nth-child(1),
  .facts li:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .contact-side {
    position: static;
  }

  .footer-legal {
    order: 0;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.35rem 1.25rem 0.85rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    min-height: 48px;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
  }
}

@media (max-width: 640px) {
  .wrap,
  .header-inner,
  .footer-inner {
    width: min(var(--wrap), calc(100% - 1.5rem));
  }

  .hero,
  .page-hero {
    padding-top: 2.4rem;
  }

  .section {
    padding: 2.75rem 0;
  }

  .facts-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .brand img {
    height: 38px;
  }

  .brand-text {
    font-size: 1.02rem;
  }

  thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    border-bottom: 0;
    padding: 0.2rem 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  .table-wrap {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .skip-link,
  .actions,
  .form-index {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-footer {
    background: #fff;
    color: #000;
  }

  .site-footer a,
  .footer-brand p,
  .site-footer address,
  .footer-disclaimer,
  .copyright {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}

/* Capabilities grid (home, science) */
.pillars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: pillar;
}

.pillars > li {
  counter-increment: pillar;
  margin: 0;
  padding: 1.5rem 1.4rem 1.35rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
}

.pillars h3::before {
  content: counter(pillar, decimal-leading-zero);
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.pillars p:last-child {
  margin-bottom: 0;
}

.pill.pill-release {
  border-color: #9fb1d8;
  background: #e8edf8;
  color: #1f3a78;
}

@media (max-width: 900px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

.people .headshot {
  display: block;
  width: 9rem;
  height: auto;
  aspect-ratio: 360 / 368;
  object-fit: cover;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  background: #fff;
}

/* Contact dropdown (nav) */
.site-nav .has-sub { position: relative; }
.nav-item { display: flex; align-items: center; }
.sub-toggle { background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; min-width: 28px; min-height: 44px; padding: 0 0.2rem; }
.sub-toggle span { display: inline-block; transition: transform .15s; }
.sub-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.site-nav .sub-menu { display: none; position: absolute; right: 0; top: 100%; z-index: 50; min-width: 15rem; flex-direction: column; align-items: stretch; gap: 0; padding: 0.35rem 0; background: var(--paper-2); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(16,28,46,.12); }
.site-nav .sub-menu a { display: flex; min-height: 40px; padding: 0 1rem; font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a:focus { background: var(--paper); color: var(--navy); }
@media (min-width: 861px) {
  .has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu, .has-sub.is-open > .sub-menu { display: flex; }
}
@media (max-width: 860px) {
  .nav-item { justify-content: space-between; }
  .sub-toggle { min-width: 48px; min-height: 48px; }
  .site-nav .sub-menu { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--line); margin: 0 0 0.4rem 0.5rem; padding: 0; background: transparent; min-width: 0; }
  .has-sub.is-open > .sub-menu { display: flex; }
  .site-nav .sub-menu a { padding-left: 0.85rem; }
}
/* Contact picker */
.contact-picker { margin: 0 0 1rem; }
.contact-picker label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.contact-picker select { width: 100%; min-height: 44px; padding: 0.45rem 0.6rem; font: inherit; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line-strong); }
.form-block:target { animation: wcs-target 2.4s ease-out; }
@keyframes wcs-target { 0% { background: rgba(16,28,46,.07); box-shadow: inset 3px 0 0 var(--navy); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .form-block:target { animation: none; box-shadow: inset 3px 0 0 var(--navy); } }
/* Picker needs JS; plain links are the no-JS fallback */
.contact-picker { display: none; }
.js .contact-picker { display: block; }
.js .form-index { display: none; }
/* Contact chooser bar above the forms */
.contact-chooser { max-width: 40rem; margin: 0 0 1.75rem; padding: 1rem 1.1rem; background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--navy); }
.contact-chooser .contact-picker { margin: 0; }
.contact-chooser .contact-picker label { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.contact-chooser select { background: #fff; font-weight: 600; }
.contact-chooser .form-index { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.js .contact-chooser .form-index { display: none; }
