/* Katelin Hubbard, PhD: shared site styles
   Palette mirrors the gftp Quarto/Typst report template (_extensions/gftp/typst-template.typ)
   so the website and the PDF reports read as one brand. Change a token once, it updates everywhere.
   Header/footer classes start with "kh-" so they never collide with the inline styles inside the
   intake and screener forms. */

:root {
  --cream:      #FAF8F5;   /* page background (typst: cream) */
  --paper:      #FFFFFF;   /* cards */
  --sage-pale:  #D9E4D4;   /* soft sage: fills, bars (typst: sagepale) */
  --sage-faint: #EEF2EA;   /* lighter tint for hovers */
  --sage:       #6E8B74;   /* primary green: bands, buttons (typst: sage) */
  --sage-dk:    #4F6B57;   /* deep green: headings (typst: sagedk) */
  --terra:      #C9754A;   /* terracotta: highlights, prices (typst: terra) */
  --terra-dk:   #A85C36;   /* text-safe terracotta on white */
  --rust:       #8A3B2A;   /* significant / strong emphasis */
  --tan:        #3E3020;   /* eyebrow labels (typst: tan) */
  --matters:    #F5EDE1;   /* "why it matters" callout fill */
  --step:       #F7E9E0;   /* "practical step" callout fill */
  --ink:        #131110;   /* body text (typst: ink) */
  --ink-soft:   #5A5750;   /* secondary text */
  --hair:       #E4DED4;   /* hairline rules (typst: hair) */
  --radius: 12px;
  --max: 1080px;
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Base (site pages only; forms keep their own inline styles) ---------- */
body.kh-page {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
.kh-page *, .kh-page *::before, .kh-page *::after { box-sizing: border-box; }
.kh-page img { max-width: 100%; height: auto; }
.kh-page h1, .kh-page h2, .kh-page h3 {
  font-family: var(--font-display);
  color: var(--sage-dk);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 .5em;
}
.kh-page h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.kh-page h2 { font-size: clamp(1.45rem, 3.6vw, 1.9rem); margin-top: 1.6em; }
.kh-page h3 { font-size: 1.2rem; }
.kh-page p { margin: 0 0 1em; }
.kh-page a { color: var(--sage-dk); text-underline-offset: 3px; }
.kh-page a:hover { color: var(--terra-dk); }
.kh-page ul, .kh-page ol { padding-left: 1.3em; }
.kh-page li { margin-bottom: .35em; }

.kh-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.kh-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.kh-section { padding: 56px 0; }
.kh-section.alt { background: var(--paper); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.kh-eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tan); font-weight: 700; margin-bottom: .6em;
}
.kh-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; }
.kh-rule { border: 0; border-top: 1px solid var(--hair); margin: 32px 0; }
.kh-muted { color: var(--ink-soft); }
.kh-small { font-size: .92rem; }

/* Buttons */
.kh-btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px;
  background: var(--sage-dk); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: 1rem; line-height: 1.2; border: 2px solid var(--sage-dk);
  min-height: 48px; cursor: pointer; font-family: var(--font-body);
}
.kh-btn:hover { background: var(--sage); border-color: var(--sage); }
.kh-btn.ghost { background: transparent; color: var(--sage-dk) !important; }
.kh-btn.ghost:hover { background: var(--sage-pale); }
.kh-btn.terra { background: var(--terra); border-color: var(--terra); }
.kh-btn.terra:hover { background: var(--terra-dk); border-color: var(--terra-dk); }
.kh-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2em; }

/* Hero */
.kh-hero { padding: 64px 0 48px; }
.kh-hero h1 { max-width: 16em; }
.kh-tagline { font-family: var(--font-display); font-style: italic; color: var(--terra-dk); font-size: 1.15rem; }
.kh-brandline { font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: var(--sage-dk); font-weight: 700; margin-bottom: 14px; }

/* Leaf motif (same shape as the report cover emblem) */
.kh-leaf { display: inline-block; width: 14px; height: 14px; vertical-align: -1px; margin-right: 8px; }

/* Cards / grids */
.kh-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kh-card {
  background: var(--paper); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 22px 22px 20px; display: flex; flex-direction: column;
}
.kh-card h3 { margin-bottom: .35em; }
.kh-card p { font-size: .98rem; color: var(--ink-soft); flex: 1; }
.kh-card .kh-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.kh-price { color: var(--terra-dk); font-weight: 700; }
.kh-card.feature { border-left: 4px solid var(--terra); }

/* Numbered steps */
.kh-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.kh-steps li { counter-increment: s; position: relative; padding-left: 52px; }
.kh-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--sage-pale); color: var(--sage-dk);
  font-weight: 700; display: grid; place-items: center; font-family: var(--font-display);
}
.kh-steps strong { font-family: var(--font-display); color: var(--sage-dk); }

/* Callouts, mirroring the report callout boxes */
.kh-note {
  background: var(--sage-faint); border-left: 4px solid var(--sage); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; font-size: .97rem; color: var(--ink); margin: 1em 0;
}
.kh-note.matters { background: var(--matters); border-left-color: var(--tan); }
.kh-note.step { background: var(--step); border-left-color: var(--terra); }
.kh-note .kh-label { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--sage-dk); margin-bottom: 4px; }
.kh-note.matters .kh-label { color: var(--tan); }
.kh-note.step .kh-label { color: var(--terra-dk); }

/* Doors (home page) */
.kh-doors { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; padding: 8px 10px; }
.kh-doors a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 16px; border-bottom: 1px solid var(--sage-pale); text-decoration: none; }
.kh-doors a:last-child { border-bottom: 0; }
.kh-doors strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--sage-dk); }
.kh-doors span span { color: var(--ink-soft); font-size: .95rem; }
.kh-doors .kh-arrow { color: var(--terra); font-size: 1.4rem; }
.kh-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.kh-split > .kh-split-main { flex: 1 1 400px; }
.kh-split > .kh-doors { flex: 1 1 340px; }

/* List rows (packages, services, screeners) */
.kh-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.kh-rows li { margin: 0; }
.kh-rows a, .kh-rows .kh-row { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding: 16px 4px; border-top: 1px solid var(--sage-pale); text-decoration: none; color: var(--ink); }
.kh-rows li:last-child a, .kh-rows li:last-child .kh-row { border-bottom: 1px solid var(--sage-pale); }
.kh-rows a:hover { background: var(--sage-faint); }
.kh-rows .kh-row-name { flex: 1 1 260px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--sage-dk); }
.kh-rows .kh-row-desc { flex: 2 1 300px; color: var(--ink-soft); font-size: 1rem; }
.kh-rows .kh-row-price { font-weight: 700; color: var(--terra-dk); white-space: nowrap; }
.kh-rows .kh-row-go { color: var(--terra); font-weight: 700; }

/* Package cards */
.kh-packages { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1em; }
.kh-pkg { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; }
.kh-pkg h3 { margin: 0 0 2px; }
.kh-pkg .kh-for { font-size: .9rem; color: var(--ink-soft); font-style: italic; margin-bottom: 10px; font-family: var(--font-display); }
.kh-pkg .kh-price { font-size: 1.5rem; font-family: var(--font-display); margin: 0 0 10px; }
.kh-pkg ul { padding-left: 1.1em; margin: 0 0 12px; font-size: .95rem; color: var(--ink); flex: 1; }
.kh-pkg li { margin-bottom: .3em; }
.kh-pkg.feature { border-top: 4px solid var(--terra); }

/* Band (dark call-out strip) */
.kh-band { background: var(--sage-dk); color: #EEF2EA; border-radius: 18px; padding: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.kh-band h2 { color: #fff !important; margin: 0 0 8px !important; }
.kh-band p { margin: 0; }
.kh-band.terra { background: var(--terra); color: #fff; }
.kh-band.pale { background: var(--sage-pale); color: var(--ink); }
.kh-band.pale h2 { color: var(--sage-dk) !important; }
.kh-btn.light { background: #fff; color: var(--sage-dk) !important; border-color: #fff; }
.kh-btn.light:hover { background: var(--sage-pale); }
.kh-btn.outline-light { background: transparent; border-color: #fff; }
.kh-btn.outline-light:hover { background: rgba(255,255,255,.12); }
@media (max-width: 600px) { .kh-band { padding: 26px 22px; } }

/* FAQ */
.kh-faq details { border-top: 1px solid var(--sage-pale); padding: 10px 0; }
.kh-faq details:last-child { border-bottom: 1px solid var(--sage-pale); }
.kh-faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; color: var(--sage-dk); font-size: 1.08rem; padding: 6px 0; }
.kh-faq p { margin: 8px 0 6px; color: var(--ink-soft); }

/* Tables */
.kh-table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.kh-table th { text-align: left; background: var(--sage); color: #fff; padding: 10px 12px; font-weight: 600; }
.kh-table td { padding: 10px 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.kh-table tr:nth-child(even) td { background: #F3F4EF; }
.kh-table-wrap { overflow-x: auto; }

/* ---------- Header (used on every page, including forms) ---------- */
.kh-header {
  background: var(--paper); border-bottom: 1px solid var(--hair);
  font-family: var(--font-body); position: relative; z-index: 50;
}
.kh-header .kh-bar {
  max-width: var(--max); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.kh-logo { display: inline-flex; align-items: center; line-height: 0; }
.kh-logo img { height: 52px; width: auto; display: block; }
.kh-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.kh-nav li { margin: 0; }
.kh-nav a {
  display: block; padding: 10px 11px; border-radius: 8px; color: var(--sage-dk);
  text-decoration: none; font-size: 15.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.kh-nav a:hover, .kh-nav a[aria-current="page"] { background: var(--sage-pale); color: var(--sage-dk); }
.kh-nav a.kh-ext { color: var(--terra-dk); }
.kh-nav a.kh-cta { background: var(--sage-dk); color: #fff; margin-left: 6px; border-radius: 999px; padding: 10px 18px; }
.kh-nav a.kh-cta:hover { background: var(--sage); }
.kh-menu-btn {
  display: none; background: none; border: 1px solid var(--hair); border-radius: 8px;
  padding: 10px 14px; font: 600 16px var(--font-body); color: var(--sage-dk); cursor: pointer;
  min-height: 44px; margin: 0;
}
@media (max-width: 900px) {
  .kh-menu-btn { display: inline-block; }
  .kh-logo img { height: 44px; }
  .js .kh-nav { display: none; }
  .js .kh-nav.open { display: block; }
  .kh-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--hair); box-shadow: 0 10px 20px rgba(0,0,0,.06); }
  .kh-nav ul { flex-direction: column; align-items: stretch; padding: 8px 12px 14px; gap: 2px; }
  .kh-nav a { padding: 14px 12px; font-size: 17px; }
  .kh-nav a.kh-cta { margin: 8px 0 0; text-align: center; }
}

/* Cross-site strip: "Looking for DNA reports?" */
.kh-strip { background: var(--sage-pale); color: var(--ink); font-family: var(--font-body); font-size: .95rem; }
.kh-strip .kh-wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: center; padding: 8px 20px; text-align: center; }
.kh-strip a { color: var(--sage-dk); font-weight: 700; }
.kh-strip a:hover { color: var(--terra-dk); }

/* ---------- Footer ---------- */
.kh-footer {
  background: var(--sage-dk); color: #DCE5D9; font-family: var(--font-body);
  font-size: 15px; line-height: 1.6; margin-top: 0;
}
.kh-footer .kh-cols {
  max-width: var(--max); margin: 0 auto; padding: 40px 20px 24px;
  display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr;
}
.kh-footer img { height: 54px; width: auto; display: block; margin-bottom: 10px; }
.kh-footer h4 { color: #fff; font: 700 13px var(--font-body); letter-spacing: .1em; text-transform: uppercase; margin: 4px 0 10px; }
.kh-footer ul { list-style: none; margin: 0; padding: 0; }
.kh-footer li { margin: 0 0 6px; }
.kh-footer a { color: #fff; text-decoration: none; }
.kh-footer a:hover { text-decoration: underline; }
.kh-footer .kh-tag { font-family: var(--font-display); font-style: italic; color: #F0D9C9; margin: 0 0 8px; }
.kh-footer .kh-fine {
  max-width: var(--max); margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid rgba(255,255,255,.15);
  font-size: 13px; color: #C7D3C4;
}
.kh-footer p { margin: 0 0 8px; }
@media (max-width: 760px) { .kh-footer .kh-cols { grid-template-columns: 1fr; } }

/* Small screens: general spacing */
@media (max-width: 600px) {
  body.kh-page { font-size: 17px; }
  .kh-section { padding: 40px 0; }
  .kh-hero { padding: 40px 0 32px; }
  .kh-btn-row .kh-btn { flex: 1 1 100%; text-align: center; }
}
