/* ==========================================================================
   Biophic — stylesheet
   Deliberately plain and dependency-free. No web fonts, no CDN, no JS.
   Nothing here should be able to prevent the page text from rendering.
   ========================================================================== */

:root {
  --ink: #16202e;
  --ink-soft: #43526a;
  --ink-faint: #6b7a91;
  --rule: #dde3ec;
  --rule-soft: #eef1f6;
  --paper: #ffffff;
  --paper-alt: #f7f9fc;
  --accent: #1f4e79;
  --accent-soft: #e8f0f7;
  --warn-bg: #fdf7e8;
  --warn-rule: #e3d3a6;
  --measure: 68ch;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

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

main {
  padding: 56px 0 72px;
}

section + section {
  margin-top: 56px;
}

/* --- Typography --------------------------------------------------------- */

h1,
h2,
h3,
nav,
.eyebrow,
.btn,
label,
input,
select,
textarea,
th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  letter-spacing: -0.003em;
}

p {
  margin: 0 0 18px;
  max-width: var(--measure);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
  font-weight: 600;
}

.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.fine {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

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

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

/* --- Header ------------------------------------------------------------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 28px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}

.site-head nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.9rem;
}

.site-head nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-head nav a:hover,
.site-head nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding: 60px 0 8px;
  border-bottom: 1px solid var(--rule-soft);
}

/* --- Cards and grids ---------------------------------------------------- */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 22px 22px 6px;
  background: var(--paper-alt);
}

.card p {
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.facts {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--measure);
  font-size: 0.94rem;
}

.facts th,
.facts td {
  text-align: left;
  vertical-align: top;
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.facts th {
  width: 34%;
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-top: 13px;
}

/* --- Legal pages -------------------------------------------------------- */

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

.legal h2 {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
}

.legal h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal ul {
  max-width: var(--measure);
  padding-left: 22px;
}

.legal li {
  margin-bottom: 9px;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 18px 22px 4px;
  margin: 26px 0;
  border-radius: 0 3px 3px 0;
}

.callout p:last-child {
  margin-bottom: 18px;
}

.disclaimer {
  border: 1px solid var(--warn-rule);
  background: var(--warn-bg);
  padding: 18px 22px 4px;
  border-radius: 3px;
  margin: 30px 0;
}

.disclaimer p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Forms -------------------------------------------------------------- */

form {
  max-width: 620px;
  margin-top: 28px;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .hint {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 3px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c3cdda;
  border-radius: 3px;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.55;
}

/* The SMS consent block. This is the single most rule-dense element on the
   site — see the comments in contact.html before changing any of it. */
.consent {
  border: 1px solid var(--rule);
  background: var(--paper-alt);
  border-radius: 3px;
  padding: 20px 22px;
  margin: 30px 0 26px;
}

.consent-row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.consent-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent-row label {
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

.consent .optional-note {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 12px 26px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #17405f;
  color: #fff;
}

/* --- Footer ------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-alt);
  padding: 40px 0 48px;
  margin-top: 24px;
}

.foot-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.site-foot h2 {
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
  font-weight: 600;
}

.site-foot p,
.site-foot address {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-style: normal;
  margin: 0 0 10px;
  max-width: 40ch;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.site-foot li {
  margin-bottom: 8px;
}

.site-foot a {
  color: var(--ink-soft);
}

.site-foot a:hover {
  color: var(--ink);
}

.foot-legal {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.foot-legal p {
  font-size: 0.82rem;
  color: var(--ink-faint);
  max-width: 88ch;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 1.68rem;
  }
  .site-head .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-head nav {
    margin-left: 0;
    gap: 16px;
  }
  .facts th {
    width: auto;
    display: block;
    padding-bottom: 2px;
    border-bottom: 0;
  }
  .facts td {
    display: block;
    padding-top: 0;
  }
}
