/* Functional Health — design system
   A warm-clinical aesthetic: deep evergreen, warm clay, cream paper.
   Fraunces (display serif) + Inter (sans). */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  --cream: #faf7f0;
  --cream-2: #f3ede1;
  --paper: #ffffff;
  --evergreen: #0e5a4e;
  --evergreen-600: #0b4b41;
  --evergreen-700: #07332c;
  --moss: #2a8a78;
  --mint: #e9f3ef;
  --mint-2: #d6e8e1;
  --clay: #c2603a;
  --clay-600: #a64e2d;
  --amber: #e0a03c;
  --gold: #d9a441;
  --ink: #16231f;
  --slate: #3f524c;
  --muted: #6f817a;
  --line: #e6ddcd;
  --line-soft: rgba(14, 90, 78, 0.13);
  --danger: #b4472a;

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --pill: 999px;
  --shadow-sm: 0 1px 3px rgba(16,35,31,.05), 0 2px 8px rgba(16,35,31,.05);
  --shadow: 0 8px 30px rgba(16,35,31,.09), 0 2px 8px rgba(16,35,31,.05);
  --shadow-lg: 0 30px 70px rgba(7,51,44,.18);
  --ring: 0 0 0 3px rgba(42,138,120,.30);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--evergreen); text-decoration: none; }
a:hover { color: var(--clay); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; color: var(--ink); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1rem; color: var(--slate); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--slate); line-height: 1.55; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--moss); margin: 0 0 1rem; display: inline-block;
}
.eyebrow.on-dark { color: var(--amber); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; max-width: 640px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .95rem 1.5rem; border-radius: var(--pill); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--evergreen); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--evergreen-600); color: #fff; box-shadow: var(--shadow); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-600); color: #fff; }
.btn-outline { background: transparent; color: var(--evergreen); border-color: var(--line-soft); }
.btn-outline:hover { border-color: var(--evergreen); background: var(--mint); color: var(--evergreen); }
.btn-ghost { background: transparent; color: var(--ink); padding-left: .5rem; padding-right: .5rem; }
.btn-ghost:hover { color: var(--clay); }
.btn-lg { padding: 1.1rem 1.9rem; font-size: 1.08rem; }
.btn-light { background: #fff; color: var(--evergreen); }
.btn-light:hover { background: var(--cream); color: var(--evergreen-600); }
.btn-block { width: 100%; }

/* Pills / badges */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: var(--pill);
  font-size: .82rem; font-weight: 600; background: var(--mint); color: var(--evergreen-600); border: 1px solid var(--line-soft); }
.pill.warm { background: #faf0e3; color: var(--clay-600); border-color: rgba(194,96,58,.2); }
.badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--moss); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 3px rgba(42,138,120,.2); }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,240,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 1.25rem; height: 70px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 600;
  font-size: 1.3rem; line-height: 1; color: var(--ink); letter-spacing: -.02em; margin-right: .25rem; white-space: nowrap; flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(150deg, var(--moss), var(--evergreen-700));
  display: grid; place-items: center; color: #fff; font-size: 1rem; box-shadow: var(--shadow-sm); flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
/* Only the top-level section links get the slate text treatment — NOT the
   buttons nested in .nav-actions (which keep their own white/ink colors).
   line-height:1 so link text and the Sign-in button share a baseline. */
.nav-links > a { color: var(--slate); font-weight: 500; font-size: .95rem; line-height: 1; white-space: nowrap; }
.nav-links > a:hover { color: var(--evergreen); }
.nav-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
/* Compact Sign-in button, sized to sit in line with the nav links. */
.nav-actions .btn { padding: .5rem 1.15rem; font-size: .92rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem,6vw,5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--evergreen); }
.hero .lead { max-width: 32ch; }
.hero-aside { position: relative; }

/* Search / finder card */
.finder {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 1.6rem;
}
.finder h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; letter-spacing: .02em; }
.input, select.input {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream);
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
.input:focus, select.input:focus { outline: none; border-color: var(--moss); box-shadow: var(--ring); background: #fff; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236f817a' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }

/* Cards & grids */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--mint-2); }
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .98rem; margin-bottom: 0; }

/* Condition cards */
.cond-card { display: flex; flex-direction: column; gap: .6rem; }
.cond-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--mint); display: grid; place-items: center; font-size: 1.4rem; }
.cond-card .sym { font-size: .88rem; color: var(--muted); }
.cond-card .arrow { margin-top: auto; color: var(--evergreen); font-weight: 600; font-size: .92rem; }

/* Practitioner card */
.prac-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.prac-top { display: flex; gap: 1rem; padding: 1.4rem 1.4rem .9rem; }
.prac-avatar { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--mint-2); flex: none;
  display: grid; place-items: center; font-family: var(--display); font-size: 1.4rem; color: var(--evergreen); }
.prac-name { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0; }
.prac-cred { font-size: .85rem; color: var(--muted); margin: .1rem 0 0; }
.prac-meta { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.4rem .9rem; }
.prac-tag { font-size: .76rem; font-weight: 600; color: var(--evergreen-600); background: var(--mint); padding: .25rem .6rem; border-radius: var(--pill); }
.prac-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--cream); }
.prac-price { font-size: .9rem; color: var(--slate); }
.prac-price b { color: var(--ink); font-size: 1.05rem; }
.stars { color: var(--gold); font-size: .9rem; letter-spacing: 1px; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 1.1rem; }
.step .num { counter-increment: step; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--evergreen); color: #fff; display: grid; place-items: center; font-family: var(--display);
  font-weight: 600; font-size: 1.2rem; box-shadow: var(--shadow-sm); }
.step .num::before { content: counter(step); }

/* Pricing */
.price-card { display: flex; flex-direction: column; height: 100%; }
.price-card.featured { border-color: var(--evergreen); box-shadow: var(--shadow); position: relative; }
.price-card.featured::after { content: 'Most chosen'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--clay); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .8rem; border-radius: var(--pill); }
.price-amt { font-family: var(--display); font-size: 2.6rem; font-weight: 600; color: var(--ink); line-height: 1; }
.price-amt small { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--muted); }
.feat-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .6rem; }
.feat-list li { position: relative; padding-left: 1.6rem; font-size: .95rem; color: var(--slate); }
.feat-list li::before { content: '✓'; position: absolute; left: 0; color: var(--moss); font-weight: 700; }

/* Dark band */
.band-dark { background: linear-gradient(155deg, var(--evergreen-700), var(--evergreen)); color: #fff; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p, .band-dark .lead { color: rgba(255,255,255,.82); }
.band-mint { background: var(--mint); }
.band-cream2 { background: var(--cream-2); }

/* Stat row */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; text-align: center; }
.stat .n { font-family: var(--display); font-size: clamp(2rem,4vw,2.8rem); color: var(--evergreen); font-weight: 600; }
.band-dark .stat .n { color: var(--amber); }
.stat .l { font-size: .9rem; color: var(--muted); }
.band-dark .stat .l { color: rgba(255,255,255,.7); }

/* Testimonials */
.quote { font-family: var(--display); font-size: 1.15rem; line-height: 1.5; color: var(--ink); font-style: italic; }
.quote-by { font-family: var(--sans); font-style: normal; font-size: .88rem; color: var(--muted); margin-top: .8rem; }

/* Compare table */
.compare { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
/* Explicit cell color so cells don't inherit white text inside .band-dark. */
.compare th, .compare td { padding: 1rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--slate); }
.compare th { font-family: var(--sans); font-weight: 700; color: var(--ink); background: var(--cream); }
.compare td.hl { color: var(--evergreen); font-weight: 700; }

/* Footer */
.site-footer { background: var(--evergreen-700); color: rgba(255,255,255,.72); padding: 4rem 0 2rem; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.foot-grid h4 { color: #fff; font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot-grid .brand { color: #fff; }
.foot-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.disclaimer { font-size: .78rem; color: rgba(255,255,255,.5); max-width: 60ch; margin-top: 1rem; }

/* Chat widget */
#fh-chat-bubble {
  position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 60px; height: 60px; border-radius: 50%;
  background: var(--evergreen); color: #fff; border: 0; cursor: pointer; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; font-size: 1.5rem; transition: transform .15s, background .2s;
}
#fh-chat-bubble:hover { transform: scale(1.06); background: var(--evergreen-600); }
#fh-chat-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 200; width: min(380px, calc(100vw - 44px)); height: min(560px, calc(100vh - 130px));
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden;
}
#fh-chat-panel.open { display: flex; }
.fh-chat-head { background: linear-gradient(150deg, var(--evergreen), var(--evergreen-700)); color: #fff; padding: 1rem 1.2rem; }
.fh-chat-head .t { font-family: var(--display); font-size: 1.1rem; }
.fh-chat-head .s { font-size: .8rem; color: rgba(255,255,255,.75); }
.fh-chat-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--cream); }
.fh-msg { max-width: 85%; padding: .7rem .95rem; border-radius: 16px; font-size: .94rem; line-height: 1.45; }
.fh-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.fh-msg.me { background: var(--evergreen); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.fh-chat-foot { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); background: #fff; }
.fh-chat-foot input { flex: 1; border: 1.5px solid var(--line); border-radius: var(--pill); padding: .65rem 1rem; font-family: var(--sans); font-size: .95rem; }
.fh-chat-foot input:focus { outline: none; border-color: var(--moss); }
.fh-chat-foot button { background: var(--evergreen); color: #fff; border: 0; border-radius: 50%; width: 42px; height: 42px; cursor: pointer; flex: none; font-size: 1.1rem; }
.fh-typing { font-size: .85rem; color: var(--muted); font-style: italic; }

/* Directory map + list */
.dir-layout { display: grid; grid-template-columns: 440px 1fr; gap: 0; height: calc(100vh - 70px); }
.dir-list { overflow-y: auto; padding: 1.4rem; border-right: 1px solid var(--line); background: var(--cream); }
.dir-map { position: relative; background: var(--mint); }
#dir-map-el { position: absolute; inset: 0; }
.dir-map-fallback { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 2rem; color: var(--muted); }
.dir-filterbar { position: sticky; top: 0; z-index: 5; background: var(--cream); padding-bottom: 1rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.dir-card { cursor: pointer; scroll-margin-top: 90px; }
.dir-card.active { border-color: var(--evergreen); box-shadow: var(--shadow); }
.dir-count { font-size: .85rem; color: var(--muted); margin: .2rem 0 1rem; }
@media (max-width: 860px) {
  .dir-layout { grid-template-columns: 1fr; height: auto; }
  .dir-map { height: 340px; order: -1; }
  #dir-map-el { position: absolute; }
  .dir-list { border-right: 0; max-height: none; }
}

/* Utilities */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}.mb-2{margin-bottom:2rem}
.flex{display:flex}.items-center{align-items:center}.gap{gap:1rem}.gap-sm{gap:.5rem}.wrap-flex{flex-wrap:wrap}
.hide{display:none}

/* Responsive */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
/* Collapse the nav to a hamburger before it gets cramped. */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    background: var(--cream); padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line); gap: 1rem; align-items: flex-start; }
  .nav-links.open .nav-actions { flex-direction: column; align-items: flex-start; gap: .6rem; margin-top: .25rem; }
  .nav-toggle { display: block; margin-left: auto; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
