/* Mortal Healthcare — v1
   Tokens: porcelain ground, green-black ink, pine accent.
   Type: Libre Franklin (display + body), IBM Plex Mono (registry labels). */

:root {
  --paper: #f6f7f5;
  --ink: #1b2420;
  --pine: #1e5741;
  --pine-dark: #17452f;
  --slate: #5c6a64;
  --rule: #d9dfda;
  --basement: #141b18;
  --max: 62rem;
}

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

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

body {
  font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  position: relative;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.14 0 0 0 0 0.12 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header.site, footer.site { position: relative; z-index: 1; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--pine); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

header.site { border-bottom: 1px solid var(--rule); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}
.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--pine); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--pine); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

.btn {
  display: inline-block;
  background: var(--pine);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 3px;
  border: 1px solid var(--pine);
}
.btn:hover { background: var(--pine-dark); border-color: var(--pine-dark); }
.btn.ghost { background: transparent; color: var(--pine); }
.btn.ghost:hover { background: rgba(30, 87, 65, 0.07); }

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

.hero { padding: 5.5rem 0 3.5rem; border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/img-14-caustics-texture.webp") center / cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 3.5rem; align-items: center; }
.hero-fig { margin: 0; }
.hero-fig img {
  display: block;
  width: min(400px, 100%);
  height: auto;
  border: 1px solid var(--rule);
}

/* section split: content + side figure */
.split { display: grid; grid-template-columns: 1fr minmax(300px, 430px); gap: 3rem; align-items: center; }
.split .ledger-row { grid-template-columns: 4.5rem 1fr; }
.split .ledger-row p { grid-column: 2; margin-top: 0.35rem; }
.side-fig { margin: 0; }
.side-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.hero .eyebrow { color: var(--pine); font-weight: 500; }
.hero h1 {
  font-size: clamp(2.7rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0.9rem 0 1.3rem;
}
.hero .sub {
  max-width: 40rem;
  font-size: 1.13rem;
  line-height: 1.65;
  color: var(--ink);
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 2.6rem; }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.5rem;
  color: var(--slate);
  list-style: none;
}
.trust-row li { display: flex; align-items: baseline; gap: 0.5rem; }
.trust-row li::before { content: "·"; color: var(--pine); font-weight: 700; }
.trust-row li:first-child::before { content: ""; }

/* ---------- sections ---------- */

section { padding: 3.8rem 0; border-bottom: 1px solid var(--rule); }
.section-head { margin-bottom: 2.2rem; }
.section-head .eyebrow { color: var(--pine); }
.section-head h2 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

/* how it works */
.steps { list-style: none; counter-reset: step; max-width: 42rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 2.6rem 1fr;
  gap: 1.1rem;
  align-items: start;
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
}
.step-ic { width: 26px; height: 26px; stroke: var(--pine); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 0.15rem; }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before {
  content: "0" counter(step);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--pine);
  padding-top: 0.3rem;
}

/* programs ledger */
.ledger { border-top: 1px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: 4.5rem 13rem 1fr;
  gap: 1.2rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-row .tag { color: var(--pine); padding-top: 0.35rem; }
.ledger-row h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.ledger-row h3 small { display: block; font-weight: 400; color: var(--slate); font-size: 0.85rem; margin-top: 0.15rem; }
.ledger-row p { color: var(--ink); font-size: 0.97rem; max-width: 34rem; }

/* who does what */
.record { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.5rem; max-width: 52rem; }
.record div { border-top: 2px solid var(--pine); padding-top: 0.8rem; }
.record .mono { color: var(--slate); }
.record p { margin-top: 0.4rem; font-size: 0.99rem; }

/* states section */
.states { position: relative; overflow: hidden; }
.states::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/img-08-contour-dense-texture.webp") center / cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
}
.states .wrap { position: relative; }

/* states grid */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 4px;
  margin: 1.8rem 0 0.9rem;
}
.states-grid span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.55rem 0;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
}
.states-note { color: var(--slate); font-size: 0.85rem; }

/* faq */
.faq { max-width: 44rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.3rem;
  top: 0.9rem;
  color: var(--pine);
  font-weight: 400;
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1.2rem; color: var(--ink); font-size: 0.97rem; max-width: 40rem; }

/* cta band */
.cta-band { text-align: left; }
.cta-band h2 { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.cta-band p { color: var(--slate); margin-bottom: 1.5rem; }

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

footer.site { background: var(--basement); color: rgba(255, 255, 255, 0.85); overflow: hidden; }
footer.site::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/img-03-dark-weave-texture.webp") center / cover no-repeat;
  opacity: 0.2;
  pointer-events: none;
}
footer.site .wrap { position: relative; }
footer.site .wrap { padding-top: 3rem; padding-bottom: 2.2rem; }
.foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.foot-top .wordmark { color: #fff; }
.foot-top .wordmark span { color: #7fbfa2; }
.foot-top .program-of { color: rgba(255, 255, 255, 0.55); font-size: 0.85rem; margin-top: 0.5rem; }
.foot-links { list-style: none; display: flex; gap: 1.6rem; }
.foot-links a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover { color: #fff; }
.foot-contact { font-size: 0.9rem; line-height: 1.9; }
.foot-contact a { color: rgba(255, 255, 255, 0.75); }
.basement {
  padding-top: 1.8rem;
  font-size: 0.8rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.5);
  max-width: 52rem;
}
.basement p + p { margin-top: 0.8rem; }

/* legal pages */
.legal { padding: 4rem 0 5rem; max-width: 42rem; }
.legal h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.legal .updated { color: var(--slate); font-size: 0.85rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.6rem; }
.legal p, .legal li { font-size: 0.97rem; margin-bottom: 0.8rem; }
.legal ul { padding-left: 1.3rem; }
.legal .back { display: inline-block; margin-top: 2.5rem; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-fig img { width: min(320px, 100%); }
  .split { grid-template-columns: 1fr; }
  .side-fig { max-width: 430px; }
}

@media (max-width: 720px) {
  .nav-links li:not(.nav-cta) { display: none; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .ledger-row { grid-template-columns: 3.2rem 1fr; }
  .ledger-row p { grid-column: 2; }
  .record { grid-template-columns: 1fr; }
}
