/* ============================================================================
   ROOT + REVIVE HEALTH CO. — SHARED STYLESHEET
   ----------------------------------------------------------------------------
   This ONE file styles every page of the site. To change the look in one
   place, edit the variables in the :root block directly below.

   HOW THIS FILE IS ORGANIZED:
     1. BRAND VARIABLES ........ colors, fonts, spacing (EDIT these to rebrand)
     2. RESET & BASE ........... sensible defaults
     3. TYPOGRAPHY ............. headings, body text, eyebrows
     4. LAYOUT ................. container, sections, grids
     5. BRAND MOTIFS ........... gold "root line" divider, logo mark
     6. HEADER / NAV ........... top bar + mobile menu
     7. BUTTONS & LINKS
     8. COMPONENTS ............. cards, pricing, testimonials, steps, FAQ
     9. FOOTER
    10. RESPONSIVE ............. mobile / tablet adjustments
    11. ACCESSIBILITY ......... focus styles, reduced motion
   ========================================================================== */


/* ============================================================================
   1. BRAND VARIABLES  —  ★ EDIT COLORS & FONTS HERE ★
   ========================================================================== */
:root {
  /* --- Brand colors (change a value here and it updates site-wide) --- */
  --pine:       #1f3a2e;   /* primary dark green */
  --deep-pine:  #16271f;   /* darkest green (footer, deep sections) */
  --moss:       #5e7d61;   /* mid green */
  --sage:       #8aa888;   /* soft green accent */
  --brass:      #b78d3f;   /* gold / brass accent (buttons, root line) */
  --brass-dark: #8f6c2c;   /* darker gold for hover */
  --parchment:  #f3efe4;   /* warm off-white background */
  --cream:      #f8f4ea;   /* lightest cream background */
  --ink:        #20271f;   /* near-black body text */

  /* --- Derived / utility colors --- */
  --ink-soft:   #46514494; /* muted text */
  --line:       #e3ddcb;   /* hairline borders on light backgrounds */
  --card-bg:    #ffffff;   /* card surface */
  --shadow:     0 14px 40px -22px rgba(22, 39, 31, .45);

  /* --- Typography --- */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* --- Spacing & sizing --- */
  --maxw: 1140px;          /* max content width */
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(56px, 9vw, 110px);
  --radius: 18px;
  --radius-sm: 12px;
}


/* ============================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 13px, 18px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pine); text-decoration-color: var(--sage); text-underline-offset: 3px; }
a:hover { color: var(--brass-dark); }


/* ============================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 560;
  line-height: 1.1;
  color: var(--pine);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* Small uppercase label that sits above headings */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brass);
  margin: 0 0 .9rem;
  display: inline-block;
}

.lead { font-size: 1.15rem; color: #3c463a; }
.muted { color: #5b6457; }
.center { text-align: center; }
.measure { max-width: 62ch; }
.measure-narrow { max-width: 46ch; }


/* ============================================================================
   4. LAYOUT
   ========================================================================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section--cream     { background: var(--cream); }
.section--parchment { background: var(--parchment); }
.section--pine      { background: var(--pine);      color: #eaf0e8; }
.section--deep      { background: var(--deep-pine);  color: #e6ede5; }

/* On dark sections, headings go light */
.section--pine h1, .section--pine h2, .section--pine h3,
.section--deep h1, .section--deep h2, .section--deep h3 { color: #f4efe0; }
.section--pine .eyebrow, .section--deep .eyebrow { color: var(--sage); }

/* Simple responsive grids */
.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Two-column "media + text" split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--narrow-media { grid-template-columns: 0.85fr 1.15fr; }

.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }


/* ============================================================================
   5. BRAND MOTIFS  —  gold "root line" divider + caduceus-root mark
   ----------------------------------------------------------------------------
   .root-divider  : a thin gold line with a small root/branch flourish.
                    Drop <div class="root-divider" aria-hidden="true"></div>
                    between sections. The graphic is an inline SVG background,
                    so it lives here in ONE place.
   ========================================================================== */
.root-divider {
  height: 26px;
  margin-block: clamp(10px, 3vw, 26px);
  background: center / 220px 26px no-repeat
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='220' height='26' viewBox='0 0 220 26'>\
<g fill='none' stroke='%23b78d3f' stroke-width='1.4' stroke-linecap='round'>\
<line x1='0' y1='13' x2='86' y2='13'/>\
<line x1='134' y1='13' x2='220' y2='13'/>\
<path d='M110 4 V22'/>\
<path d='M110 9 C104 9 101 6 98 3'/>\
<path d='M110 9 C116 9 119 6 122 3'/>\
<path d='M110 15 C104 15 100 18 96 22'/>\
<path d='M110 15 C116 15 120 18 124 22'/>\
</g>\
<circle cx='110' cy='13' r='2.3' fill='%23b78d3f'/>\
</svg>");
}
/* lighter version for dark backgrounds */
.section--pine .root-divider, .section--deep .root-divider { opacity: .9; }

/* The small caduceus-root logo mark (inline SVG in the markup uses these) */
.logo-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.logo-mark path, .logo-mark line, .logo-mark circle { vector-effect: non-scaling-stroke; }


/* ============================================================================
   6. HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 244, 234, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 70px;
}
/* Brand lockup (logo image + name) */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 42px; width: auto; border-radius: 6px; }
.brand .brand-name {
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  color: var(--pine); line-height: 1.05; letter-spacing: -.01em;
}
.brand .brand-name small { display: block; font-family: var(--font-body); font-weight: 600;
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }

/* Nav links */
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 12px; border-radius: 10px;
  font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none;
}
.nav-links a:hover { background: rgba(94,125,97,.12); color: var(--pine); }
.nav-links a.is-active { color: var(--pine); background: rgba(94,125,97,.16); }

.nav-cta { display: inline-flex; align-items: center; gap: 14px; }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--pine); }


/* ============================================================================
   7. BUTTONS & LINKS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: .98rem;
  padding: 13px 24px; border-radius: 999px; cursor: pointer;
  text-decoration: none; border: 1.5px solid transparent; transition: transform .12s ease, background .2s, color .2s;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

/* Primary = brass/gold */
.btn-primary { background: var(--brass); color: #fff; border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }

/* Secondary = pine outline */
.btn-secondary { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-secondary:hover { background: var(--pine); color: #fff; }

/* On dark sections */
.section--pine .btn-secondary, .section--deep .btn-secondary { color: #eef3ec; border-color: #cdd8c9; }
.section--pine .btn-secondary:hover, .section--deep .btn-secondary:hover { background: #eef3ec; color: var(--pine); }

/* Small "header" portal button */
.btn-sm { padding: 9px 16px; font-size: .9rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row.center { justify-content: center; }

/* Plain text link with arrow */
.link-arrow { font-weight: 700; text-decoration: none; color: var(--brass-dark); display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { gap: 10px; color: var(--brass-dark); }


/* ============================================================================
   8. COMPONENTS
   ========================================================================== */

/* ---- Hero ---- */
.hero { padding-block: clamp(48px, 8vw, 96px); }
.hero h1 { margin-bottom: .35em; }
.hero .lead { max-width: 56ch; }
.hero-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- Generic card ---- */
.card {
  background: var(--card-bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card--soft { background: var(--parchment); box-shadow: none; }
.card img { border-radius: var(--radius-sm); margin-bottom: 18px; }

/* Tag/eyebrow inside cards */
.tag { display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color: var(--moss); margin-bottom:.5rem; }

/* ---- Checklist (✓ bullets) ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .15em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brass);
  -webkit-mask: center/12px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
          mask: center/12px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
}
.section--pine .checklist li::before, .section--deep .checklist li::before { background: var(--sage); }

/* "X" list for the what-we-don't-do column */
.xlist { list-style: none; margin: 0; padding: 0; }
.xlist li { position: relative; padding-left: 30px; margin-bottom: .6rem; }
.xlist li::before {
  content: "\00d7"; position: absolute; left: 4px; top: -1px;
  color: #b25b4a; font-weight: 800; font-size: 1.2rem;
}

/* ---- Pricing cards ---- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 30px); }
.price-card { display: flex; flex-direction: column; }
.price-card .price {
  font-family: var(--font-head); color: var(--pine); font-weight: 600;
  font-size: 1.9rem; margin: .2rem 0 .1rem;
}
.price-card .price small { font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: #5b6457; }
.price-card .price-lines { margin: .4rem 0 1rem; }
.price-card .price-lines div { display:flex; justify-content:space-between; gap:12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .98rem; }
.price-card .price-lines div span:last-child { font-weight: 700; color: var(--pine); white-space: nowrap; }
.price-card .btn { margin-top: auto; }
.price-card.is-featured { outline: 2px solid var(--brass); outline-offset: -2px; }
.price-badge { align-self:flex-start; background: var(--brass); color:#fff; font-size:.72rem;
  font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:4px 12px; border-radius:999px; margin-bottom:10px; }

/* ---- Steps (How it works) ---- */
.step { position: relative; }
.step .step-num {
  display:inline-flex; align-items:center; justify-content:center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pine); color: var(--cream); font-family: var(--font-head);
  font-weight: 600; font-size: 1.2rem; margin-bottom: 14px;
}

/* ---- Testimonials ---- */
.quote-card { background: var(--card-bg); border:1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px,3vw,30px); box-shadow: var(--shadow); }
.quote-card blockquote { margin: 0 0 1rem; font-size: 1.05rem; color: #2c352a; font-style: italic; }
.quote-card .cite { font-weight: 700; color: var(--pine); font-style: normal; }
.quote-card .cite::before { content: "— "; color: var(--brass); }
.stars { color: var(--brass); letter-spacing: 2px; margin-bottom: .6rem; }

/* ---- FAQ (native <details>, no JavaScript needed) ---- */
.faq-group { max-width: 820px; margin-inline: auto; }
.faq-group h2 { text-align: center; }
.faq {
  background: var(--card-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden;
}
.faq > summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; position: relative;
  font-weight: 700; color: var(--pine); font-size: 1.02rem;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brass); font-weight: 400; line-height: 1;
}
.faq[open] > summary::after { content: "\2013"; } /* en-dash when open */
.faq > summary:hover { background: rgba(94,125,97,.06); }
.faq .faq-body { padding: 0 22px 20px; color: #3c463a; }
.faq .faq-body :first-child { margin-top: 0; }

/* ---- Info / callout box ---- */
.note {
  border-left: 3px solid var(--brass); background: var(--parchment);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #3c463a;
}
.section--pine .note, .section--deep .note { background: rgba(255,255,255,.06); color: #dde6db; }

/* ---- Legal / long-form text (policies, terms) ---- */
.legal { max-width: 800px; margin-inline: auto; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.12rem; margin-top: 1.6rem; }
.legal p, .legal li { color: #384235; }
.legal ul { padding-left: 1.2rem; }
.legal .updated { color: #6a7265; font-size: .9rem; }

/* Contact detail rows */
.contact-list { list-style:none; margin:0; padding:0; }
.contact-list li { display:flex; gap:14px; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--line); }
.contact-list .ico { color: var(--brass); flex:0 0 auto; margin-top:2px; }
.contact-list a { font-weight:600; }


/* ============================================================================
   9. FOOTER
   ========================================================================== */
.site-footer { background: var(--deep-pine); color: #cdd6c8; padding-block: clamp(48px, 7vw, 80px); }
.site-footer a { color: #dbe4d6; text-decoration: none; }
.site-footer a:hover { color: var(--brass); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand-name { color: #f4efe0; }
.footer-brand p { color: #aab6a4; max-width: 32ch; margin-top: 14px; }
.footer-col h4 { color: #f4efe0; font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.social { display: flex; gap: 12px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3a5042;
  display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--brass); border-color: var(--brass); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { border-top: 1px solid #2c4133; margin-top: 40px; padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  font-size: .85rem; color: #93a18c; }
.footer-bottom a { color: #93a18c; }
.footer-disclaimer { font-size: .8rem; color: #7e8c78; margin-top: 14px; max-width: 70ch; }


/* ============================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  /* Mobile nav: hide inline links, show hamburger. The menu is toggled by
     the small script at the bottom of each page (adds .open to .nav-links). */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter); box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 1.05rem; }
  .nav .btn-portal-desktop { display: none; } /* portal lives inside the open menu on mobile */
  .nav-links .portal-in-menu { display: block; }
}
@media (min-width: 821px) { .nav-links .portal-in-menu { display: none; } }

@media (max-width: 760px) {
  .split, .split--narrow-media { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr; }
  .split .order-first-mobile { order: -1; }
  .brand .brand-name { font-size: .98rem; }
}
@media (max-width: 420px) {
  .brand .brand-name small { display:none; }
}


/* ============================================================================
   11. ACCESSIBILITY
   ========================================================================== */
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--pine); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}


/* ============================================================================
   12. BLOG / Q&A HUB  (blog.html)
   ----------------------------------------------------------------------------
   Each question is a .qa block: an <h3> question + an .answer with the reply.
   Designed so Google's AI and search engines can easily read the Q and the A.
   ========================================================================== */
.qa-author {                      /* author / "medically reviewed" byline */
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--parchment); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 18px;
}
.qa-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.qa-author .who { font-weight: 700; color: var(--pine); }
.qa-author .who small { display: block; font-weight: 600; color: #5b6457; font-size: .85rem; }

.qa-cat { max-width: 820px; margin-inline: auto; }
.qa-cat > h2 { scroll-margin-top: 90px; }     /* so jump-links don't hide under header */

.qa {                              /* one question + answer */
  background: var(--card-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 22px 24px; margin-bottom: 14px;
}
.qa h3 { margin: 0 0 .5rem; color: var(--pine); font-size: 1.18rem; }
.qa .answer { color: #38422f; }
.qa .answer :first-child { margin-top: 0; }
.qa .answer :last-child { margin-bottom: 0; }

/* Visible "answer not written yet" placeholder. Replace the whole .answer
   contents with real paragraphs when the question is answered. */
.answer-pending {
  color: #7a8473; font-style: italic; border-left: 3px solid var(--sage);
  padding-left: 14px; margin: 0;
}

/* Quick-jump category chips at the top of the page */
.qa-jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.qa-jump a {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--pine);
  font-weight: 700; font-size: .92rem; text-decoration: none;
}
.qa-jump a:hover { background: var(--pine); color: #fff; border-color: var(--pine); }
