/* ==========================================================
   Morpho Health — shared styles for legal pages
   privacy.html · terms.html · medical-disclaimer.html
   ========================================================== */

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

:root {
  --bg: #f5efe6;
  --bg-2: #ede4d3;
  --bg-3: #e3d7c0;
  --bg-dark: #2c1e12;
  --ink: #2c1e12;
  --ink-muted: #5a4738;
  --ink-soft: #7a6b5c;
  --copper: #b87333;
  --copper-2: #d89560;
  --copper-dk: #95602a;
  --violet: #5a4b8a;
  --border: rgba(184,115,51,0.25);
  --border-2: rgba(44,30,18,0.08);
  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a.inline { color: var(--copper); border-bottom: 1px solid rgba(184,115,51,0.3); transition: color var(--t), border-color var(--t); }
a.inline:hover { color: var(--copper-dk); border-color: var(--copper); }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* -------- Header -------- */
.site-header {
  background: rgba(245,239,230,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-2);
  position: sticky; top: 0; z-index: 50;
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  max-width: 1160px; margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand__mark { width: 36px; height: 28px; flex-shrink: 0; }
.brand__word {
  font-size: 19px; font-weight: 500; letter-spacing: 0.18em;
  background: linear-gradient(135deg, #e8834a 0%, var(--copper) 45%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.back { font-size: 13px; color: var(--ink-muted); transition: color var(--t); display: inline-flex; align-items: center; gap: 0.4rem; }
.back:hover { color: var(--copper); }

/* -------- Page head -------- */
.page-head {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: center;
  border-bottom: 1px solid var(--border-2);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(184,115,51,0.06) 0%, transparent 70%);
}
.crumbs { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--copper); margin-bottom: 1rem; }
.crumbs a { color: var(--copper); transition: color var(--t); }
.crumbs a:hover { color: var(--copper-dk); }
.crumbs span { color: var(--ink-soft); margin: 0 0.5rem; }

.page-head h1 {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 58px);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0.25rem 0 1rem;
}
.page-head h1 em { font-style: italic; color: var(--copper); font-weight: 400; }
.page-head__lede {
  font-family: var(--f-serif);
  font-size: clamp(18px, 2vw, 22px);
  font-style: italic;
  color: var(--ink-muted);
  max-width: 58ch;
  margin: 0 auto 1.25rem;
  line-height: 1.45;
}
.page-head__meta { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); }

/* -------- Article body -------- */
.article { padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(4rem, 7vw, 6rem); }

.article h2 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
  margin: 2.5rem 0 0.9rem;
  color: var(--ink);
  letter-spacing: -0.005em;
  scroll-margin-top: 90px;
}
.article h2:first-child { margin-top: 0; }
.article h2 .num {
  display: inline-block;
  font-size: 0.55em;
  color: var(--copper);
  font-style: italic;
  margin-right: 0.6rem;
  vertical-align: baseline;
  letter-spacing: 0.02em;
}

.article h3 {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 2rem 0 0.6rem;
}

.article p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 68ch;
}
.article p.muted { color: var(--ink-muted); }

.article ul, .article ol {
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
  max-width: 68ch;
}
.article li { font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 0.5rem; }
.article li::marker { color: var(--copper); }

.article dl { margin-bottom: 1.5rem; max-width: 68ch; }
.article dt { font-weight: 500; margin-top: 0.8rem; color: var(--ink); font-size: 15px; }
.article dd { color: var(--ink-muted); font-size: 14.5px; margin-left: 0; line-height: 1.7; }

.article strong { font-weight: 500; color: var(--ink); }
.article em { font-style: italic; }

/* Callout */
.callout {
  border-left: 3px solid var(--copper);
  background: rgba(184,115,51,0.06);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin: 1.75rem 0;
  max-width: 72ch;
}
.callout h3 { margin-top: 0; }
.callout p { font-size: 14.5px; color: var(--ink-muted); max-width: none; margin-bottom: 0.6rem; }
.callout p:last-child { margin-bottom: 0; }

/* Warning callout (darker, for medical) */
.warn {
  border-left: 3px solid #b84a2e;
  background: rgba(184,74,46,0.06);
}
.warn h3 { color: #b84a2e; }

/* TOC */
.toc {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  max-width: 72ch;
}
.toc h4 {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.9rem;
}
.toc ol {
  padding-left: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 2rem;
}
.toc li {
  counter-increment: toc;
  font-size: 14px;
  margin-bottom: 0.35rem;
  break-inside: avoid;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--copper);
  margin-right: 0.6rem;
  font-family: var(--f-serif);
  font-style: italic;
}
.toc a { color: var(--ink); transition: color var(--t); }
.toc a:hover { color: var(--copper); }

/* -------- Footer -------- */
.site-footer {
  border-top: 1px solid var(--border-2);
  background: var(--bg);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.site-footer .container { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.site-footer .brand { justify-content: center; }
.site-footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; font-size: 12.5px; letter-spacing: 0.05em; }
.site-footer__links a { color: var(--ink-muted); transition: color var(--t); }
.site-footer__links a:hover { color: var(--copper); }
.site-footer__fineprint { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.04em; }

/* Responsive */
@media (max-width: 640px) {
  .toc ol { columns: 1; }
  .page-head h1 { font-size: 34px; }
  .article h2 { font-size: 24px; margin-top: 2rem; }
}
