/* ─────────────────────────────────────────────────────────────────────────────
   Essence — public marketing site.

   ⛔ ZERO THIRD-PARTY REQUESTS, DELIBERATELY. No webfont host, no analytics, no
   embedded map, no CDN. Two reasons, and the second is the one that matters:
     1. The site is static and must work from any object store or Pages host.
     2. Every third-party asset an EU visitor's browser fetches is a disclosure the
        privacy policy then has to make. A page with no third-party requests can
        say "this site sets no cookies and loads nothing from anyone else" and have
        it be TRUE. That sentence is worth more than a webfont.
   System font stacks echo the app's Fraunces/Inter Tight pairing without a network
   call: a serif for headings, the platform UI sans for body.
   ⚠ www/check.mjs asserts body's computed background is EXACTLY --paper. A dark
   SECTION is fine; changing the body ground reddens that check.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --gold:   #A78554;   /* primary — matches the app's --primary */
  --gold-d: #8A6C42;   /* gold that clears 4.5:1 on --paper for small text */
  --rose:   #B47568;   /* accent */
  --sage:   #8B9D83;   /* positive / growth */
  --blue:   #7B9BC4;   /* clients */
  --ink:    #2A2724;
  --muted:  #6E675F;
  --line:   #E4DDD3;
  --paper:  #FBF9F6;
  --card:   #FFFFFF;
  --sand:   #F4EFE7;   /* quiet band, one step darker than paper */
  --serif:  Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap:   1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-d); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 249, 246, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 10;
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 18px; padding-bottom: 18px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 25px; letter-spacing: 0.01em; color: var(--ink);
}
.wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--gold); }
nav.site { display: flex; gap: 26px; flex-wrap: wrap; }
nav.site a {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
nav.site a:hover { color: var(--ink); text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 104px 0 84px; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-d); margin: 0 0 20px;
}
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 7vw, 76px); line-height: 1.04;
  margin: 0 0 28px; letter-spacing: -0.018em; max-width: 15ch;
}
h1 em { font-style: normal; color: var(--gold); }
.lede { font-size: 21px; color: var(--muted); max-width: 62ch; margin: 0 0 18px; }
.lede:last-child { margin-bottom: 0; }
.lede strong { color: var(--ink); font-weight: 600; }

/* The strip of things Essence stands in for. Categories, not brand names — the
   page must not imply a relationship with, or a benchmark against, any product. */
.replaces {
  margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center;
}
.replaces .cap {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-right: 6px;
}
.replaces .item {
  font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 5px 14px;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding: 76px 0; border-top: 1px solid var(--line); }
section.band { background: var(--sand); }
section.dark {
  background: var(--ink); color: #EFEAE2; border-top-color: var(--ink);
}
section.dark h2, section.dark h3 { color: #FBF9F6; }
section.dark .section-lede, section.dark p { color: #BDB4A8; }
section.dark .eyebrow { color: #D6B87F; }
section.dark a { color: #D6B87F; }

h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4vw, 42px); line-height: 1.14;
  margin: 0 0 16px; letter-spacing: -0.01em; max-width: 22ch;
}
h3 {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 10px;
}
.section-lede { color: var(--muted); max-width: 66ch; margin: 0 0 44px; font-size: 18px; }

/* ── The stack a clinic juggles vs. the one system underneath ────────────── */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.pane {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 3px; padding: 26px 28px;
}
.pane.now { background: transparent; border-style: dashed; }
.pane h3 { color: var(--muted); margin-bottom: 16px; }
.pane.next { border-top: 3px solid var(--gold); }
.pane.next h3 { color: var(--gold-d); }
.pane ul { margin: 0; padding: 0; list-style: none; }
.pane li {
  padding: 9px 0 9px 22px; position: relative;
  color: var(--muted); font-size: 15.5px; border-bottom: 1px solid var(--line);
}
.pane li:last-child { border-bottom: 0; }
.pane.now li::before {
  content: "×"; position: absolute; left: 3px; top: 8px;
  color: #B7AC9C; font-size: 16px; line-height: 1.4;
}
.pane.next li::before {
  content: ""; position: absolute; left: 4px; top: 18px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.pane.next li { color: var(--ink); }

/* ── The loop ───────────────────────────────────────────────────────────── */
.loop { margin: 0; padding: 0; list-style: none; counter-reset: loop; }
.loop > li {
  counter-increment: loop;
  display: grid; grid-template-columns: 52px 1fr; gap: 0 28px;
  padding: 0 0 36px; position: relative;
}
.loop > li::before {
  content: counter(loop, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / span 3;
  font-family: var(--serif); font-size: 21px; color: var(--gold);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
/* The rail. It is what makes six stages read as one continuous circuit rather
   than six unrelated tiles — which was the "grouped in small KPIs" problem. */
.loop > li::after {
  content: ""; position: absolute; left: 26px; top: 52px; bottom: 0;
  width: 1px; background: var(--line);
}
.loop > li:last-child::after { display: none; }
.loop h3 { grid-column: 2; color: var(--gold-d); font-size: 12px; margin-bottom: 8px; padding-top: 14px; }
.loop .stage {
  grid-column: 2; font-family: var(--serif); font-weight: 400;
  font-size: 25px; line-height: 1.28; margin: 0 0 12px; color: var(--ink);
}
.loop p { grid-column: 2; margin: 0; color: var(--muted); max-width: 68ch; font-size: 16.5px; }
.loop .named { color: var(--ink); font-weight: 600; }
.loop-close {
  margin: 4px 0 0; padding: 0 0 0 80px;
  color: var(--gold-d); font-size: 17px; font-style: italic;
}

/* ── Intelligence rows (dark band) ──────────────────────────────────────── */
.ai-list { list-style: none; margin: 0; padding: 0; }
.ai-list li {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 30px;
  padding: 20px 0; border-top: 1px solid #423C36; align-items: baseline;
}
.ai-list li:last-child { border-bottom: 1px solid #423C36; }
.ai-list .who {
  font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #D6B87F; font-weight: 600;
}
.ai-list .what { color: #CFC7BB; font-size: 16.5px; margin: 0; }
.chip {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid #6B6259; color: #BDB4A8;
  border-radius: 100px; padding: 2px 9px; font-weight: 600;
}
.ai-note {
  margin: 36px 0 0; padding: 24px 28px;
  border: 1px solid #443E37; border-radius: 3px; background: #322E2A;
  color: #DCD5CB; font-size: 16.5px;
}
.ai-note strong { color: #FFFFFF; }

/* ── Spotlight trio ─────────────────────────────────────────────────────── */
.spotlight { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.spot {
  background: var(--card); border: 1px solid var(--line);
  border-top: 2px solid var(--tint, var(--gold));
  border-radius: 3px; padding: 28px;
}
.spot .kicker {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tint, var(--gold)); margin: 0 0 10px; font-weight: 600;
}
.spot h3 {
  font-family: var(--serif); font-size: 25px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0 0 14px;
}
.spot p { color: var(--muted); margin: 0 0 14px; font-size: 16px; }
.spot ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.spot li { margin-bottom: 5px; }

/* ── Full index of what is inside ───────────────────────────────────────── */
.index { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 26px; }
.index .col h3 {
  color: var(--tint, var(--gold));
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px;
}
.index ul { margin: 0; padding: 0; list-style: none; }
.index li { color: var(--muted); font-size: 15px; padding: 4px 0; }
.tint-today   { --tint: #A78554; }
.tint-clients { --tint: #6C8FBD; }
.tint-ops     { --tint: #B47568; }
.tint-growth  { --tint: #7C8F74; }

/* ── Plain two-column prose ─────────────────────────────────────────────── */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.cols h3 { color: var(--ink); }
.cols p { color: var(--muted); margin: 0 0 14px; }

/* ── Facts list (billing, security) ─────────────────────────────────────── */
ul.facts { list-style: none; margin: 0; padding: 0; }
ul.facts li {
  padding: 15px 0 15px 26px; border-bottom: 1px solid var(--line);
  color: var(--muted); position: relative; font-size: 16.5px;
}
ul.facts li:last-child { border-bottom: 0; }
ul.facts li::before {
  content: ""; position: absolute; left: 4px; top: 25px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
ul.facts li strong { color: var(--ink); font-weight: 600; }

/* ── Callout ────────────────────────────────────────────────────────────── */
.note {
  background: var(--card); border: 1px solid var(--line);
  padding: 22px 26px; margin: 30px 0 0; border-radius: 3px;
  color: var(--muted); font-size: 15.5px;
}
.note strong { color: var(--ink); }

/* ── Contact ────────────────────────────────────────────────────────────── */
.contact-row { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 8px; }
.contact-row div { min-width: 200px; }
.contact-row .label {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}
.contact-row .value { font-size: 17px; margin: 0; }
.mail-lg { font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line); padding: 40px 0 56px;
  color: var(--muted); font-size: 14px;
}
footer.site .row {
  display: flex; flex-wrap: wrap; gap: 20px 28px;
  align-items: center; justify-content: space-between;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--gold-d); }
footer.site nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ── Legal documents ────────────────────────────────────────────────────── */
.legal { padding: 56px 0 24px; }
.legal .updated {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 34px;
}
.legal h2 {
  font-family: var(--sans); font-size: 19px; font-weight: 600;
  letter-spacing: 0; text-transform: none; max-width: none;
  margin: 42px 0 12px; padding-top: 22px; border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal h3 {
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  letter-spacing: 0; text-transform: none; margin: 24px 0 8px; color: var(--ink);
}
.legal p, .legal li { color: #4A443E; max-width: 78ch; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 7px; }
.legal .toc {
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  padding: 20px 24px; margin-bottom: 36px;
}
.legal .toc ol { margin: 0; columns: 2; column-gap: 34px; }
.legal .toc li { margin-bottom: 5px; font-size: 15px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 48px; }
  h1 { max-width: none; }
  section { padding: 52px 0; }
  .legal .toc ol { columns: 1; }

  .loop > li { grid-template-columns: 40px 1fr; gap: 0 18px; }
  .loop > li::before { width: 40px; height: 40px; font-size: 16px; }
  .loop > li::after { left: 20px; top: 40px; }
  .loop h3 { padding-top: 9px; }
  .loop .stage { font-size: 21px; }
  .loop-close { padding-left: 58px; }
  .ai-list li { grid-template-columns: 1fr; gap: 4px; }

  /* A sticky header that wraps to three lines is a header that eats the phone.
     Below this width it scrolls away with the page and the links sit on one row. */
  header.site { position: static; backdrop-filter: none; }
  header.site .bar {
    flex-direction: column; align-items: flex-start; gap: 12px;
    padding-top: 16px; padding-bottom: 14px;
  }
  nav.site { gap: 14px 18px; }
  nav.site a { font-size: 11.5px; letter-spacing: 0.08em; }
}

/* ── The growth band ────────────────────────────────────────────────────── */
/* Six moments the software acts on by itself. Deliberately NOT cards in a
   grid of equal weight: a lead statement carries the argument, and the moments
   are evidence underneath it. */
.claim {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px); line-height: 1.2;
  margin: 0 0 20px; max-width: 24ch; color: var(--ink);
}
.claim em { font-style: normal; color: var(--gold); }
.gains { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 2px; margin-top: 40px; }
.gain {
  background: var(--card); border: 1px solid var(--line);
  padding: 22px 24px; margin: -1px 0 0 -1px;
}
.gain .when {
  display: block; font-size: 11.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--gold-d); font-weight: 600; margin-bottom: 9px;
}
.gain p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.gain strong { color: var(--ink); font-weight: 600; }
.gains-close {
  margin: 30px 0 0; font-size: 17px; color: var(--ink); max-width: 62ch;
}

/* ── What we believe ────────────────────────────────────────────────────── */
/* The origin story. Set on the dark ground so it reads as a change of voice
   rather than one more feature block, and given a wider measure than the
   feature copy because it is meant to be read, not scanned. */
#believe .said {
  list-style: none; margin: 34px 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); gap: 18px 30px;
}
#believe .said li {
  font-family: var(--serif); font-size: 20px; line-height: 1.45;
  color: #EFEAE2; padding-left: 22px; position: relative;
}
#believe .said li::before {
  content: "\201C"; position: absolute; left: 0; top: 6px;
  font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--gold);
}
#believe .prose p { font-size: 18px; line-height: 1.7; max-width: 68ch; margin: 0 0 18px; }
#believe .prose p:last-child { margin-bottom: 0; }
#believe .prose strong { color: #FBF9F6; font-weight: 600; }
#believe .closing {
  margin-top: 36px; padding-top: 30px; border-top: 1px solid #423C36;
}
#believe .closing p {
  font-family: var(--serif); font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.42; color: #FBF9F6; max-width: 30ch; margin: 0;
}
