/* ═══════════════════════════════════════════════════════════════════════════
   Rooted Within Health — Global Stylesheet
   Mobile-first. Accessible (WCAG 2.1 AA). Self-hosted fonts only.
   Brand: deep forest green, warm gold, warm cream. Spa meets aesthetic fitness.
   Authoring order: font-face → :root tokens → reset/base → layout → components → utilities.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Self-hosted fonts ───────────────────────────────────────────────────── */
/* Fraunces — variable (optical size + weight). Headers. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/fraunces/fraunces-latin-var.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/fraunces/fraunces-latin-var-italic.woff2') format('woff2-variations');
}
/* Inter — body. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
             src: url('/assets/fonts/inter/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
             src: url('/assets/fonts/inter/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
             src: url('/assets/fonts/inter/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
             src: url('/assets/fonts/inter/inter-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
             src: url('/assets/fonts/inter/inter-latin-800.woff2') format('woff2'); }

/* ─── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  /* Brand (CLAUDE.md §6) */
  --forest:        #1B3A1F;   /* logo, headers, nav */
  --forest-dark:   #12280F;
  --forest-soft:   #E7EEE7;
  --forest-deep:   #0E1F10;   /* darkest section backgrounds */

  --gold:          #D4A017;   /* buttons, icons, callouts */
  --gold-dark:     #B4860F;
  --gold-soft:     #F6EBCB;

  --cream:         #FAF7F0;   /* page background */
  --cream-2:       #F2ECE0;   /* alt section background */
  --charcoal:      #2B2B2B;   /* body text */
  --charcoal-soft: #4A4A46;
  --muted:         #6E6C64;
  --line:          #E3DDD0;   /* hairlines on cream */

  /* Semantic surface tokens */
  --color-bg:        var(--cream);
  --color-bg-alt:    var(--cream-2);
  --color-bg-dark:   var(--forest);
  --color-ink:       var(--charcoal);
  --color-ink-soft:  var(--charcoal-soft);
  --color-heading:   var(--forest);
  --color-accent:    var(--gold);
  --on-dark:         #F6F2E8;   /* text on forest */
  --on-dark-soft:    rgba(246,242,232,.82);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Shadows (warm-tinted) */
  --shadow-1: 0 2px 10px rgba(27, 58, 31, 0.06);
  --shadow-2: 0 10px 24px rgba(27, 58, 31, 0.10);
  --shadow-3: 0 28px 56px rgba(27, 58, 31, 0.16);

  /* Layout */
  --container: 1180px;
  --container-narrow: 780px;
  --header-h: 78px;
}

/* ─── Reset / base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  /* Fraunces (the only variable font here) has ornate, high-contrast display
     glyphs (g, &, Q, y, j) that read as "melting" at large sizes. Pin a low
     optical size + no soft/wonk quirks for streamlined, conventional letterforms.
     Inter is loaded as static weights, so it ignores this and is unaffected.
     Inherited by all Fraunces text (headings, wordmark, blockquote, intro). */
  font-variation-settings: "opsz" 12, "SOFT" 0, "WONK" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
strong { font-weight: 600; color: var(--color-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* Responsive gutter: scales up on mid-size windows so content isn't slammed
     to the edge between mobile and the max-width cap; 22px floor on phones. */
  padding: 0 clamp(22px, 4vw, 44px);
}
.container-narrow { max-width: var(--container-narrow); }
section { padding: 80px 0; }
section.tight { padding: 52px 0; }
.bg-alt   { background: var(--color-bg-alt); }
.bg-dark  { background: var(--forest); color: var(--on-dark); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--on-dark); }
.bg-dark p, .bg-dark li { color: var(--on-dark-soft); }
.bg-deep  { background: var(--forest-deep); color: var(--on-dark); }
.text-center { text-align: center; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ─── Eyebrow / section heading ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: .6rem;
}
.bg-dark .eyebrow, .bg-deep .eyebrow { color: var(--gold); }
.section-heading { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-heading p { color: var(--color-ink-soft); font-size: 1.08rem; }
.bg-dark .section-heading p { color: var(--on-dark-soft); }

/* ─── Skip link ─────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 10000;
  padding: 12px 18px; background: var(--forest); color: var(--on-dark);
  border-radius: var(--radius-md); font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font: 600 .98rem/1 var(--font-body);
  letter-spacing: .01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--forest-dark); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--on-dark); }
.btn-light { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.btn-light:hover { background: #fff; color: var(--forest-dark); }
.bg-dark .btn-outline, .bg-deep .btn-outline, .hero .btn-outline { color: var(--on-dark); border-color: rgba(246,242,232,.85); }
.bg-dark .btn-outline:hover, .bg-deep .btn-outline:hover, .hero .btn-outline:hover { background: var(--on-dark); color: var(--forest); border-color: var(--on-dark); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

.link-more { font-weight: 600; color: var(--gold-dark); }
.link-more:hover { color: var(--forest); }

/* ─── Site header / nav ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.logo-link { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.logo-link:hover { text-decoration: none; }
.logo-link svg { height: 40px; width: auto; }
.logo-wordmark { font-family: var(--font-heading); font-weight: 600; font-size: 1.3rem; color: var(--forest); letter-spacing: -0.01em; }

.nav-desktop { display: none; }
.nav-list { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-link { font-weight: 500; color: var(--charcoal); font-size: .98rem; padding: 6px 0; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--forest); }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.has-menu { position: relative; }
.nav-caret { width: 12px; height: 12px; display: inline-block; vertical-align: middle; margin-left: 3px; }
.nav-submenu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 280px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-2);
  padding: 10px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease;
}
.has-menu:hover .nav-submenu, .has-menu:focus-within .nav-submenu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(6px);
}
.nav-submenu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--charcoal); font-size: .94rem; }
.nav-submenu a:hover { background: var(--forest-soft); color: var(--forest); }

.lang-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.lang-toggle .is-active { color: var(--forest); }
.lang-toggle-sep { color: var(--line); }
.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; margin-left: auto; padding: 0;
  background: transparent; border: 0; cursor: pointer;
}
.hamburger-line { display: block; width: 24px; height: 2px; background: var(--forest); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

.nav-mobile { border-top: 1px solid var(--line); background: var(--cream); }
.nav-mobile[hidden] { display: none; }
.mobile-nav-list { list-style: none; margin: 0; padding: 12px 24px 24px; }
.mobile-nav-link { display: block; padding: 12px 0; font-weight: 500; color: var(--charcoal); border-bottom: 1px solid var(--line); }
.mobile-nav-link:hover { color: var(--forest); }
.mobile-nav-group { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 18px 0 4px; }
.mobile-cta-btn { margin-top: 16px; text-align: center; background: var(--gold); color: var(--forest-dark); border-radius: var(--radius-pill); border-bottom: 0; font-weight: 600; }

/* Full desktop nav needs ~1060px of content width; below the gutter'd cap it
   won't fit, so keep the hamburger until there's room for nav + gutter. */
@media (min-width: 1160px) {
  .nav-desktop { display: block; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .nav-mobile { display: none; }
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--on-dark);
  padding: clamp(64px, 10vw, 120px) 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(212,160,23,.16), transparent 46%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-text { max-width: 640px; }
.hero h1 { color: var(--on-dark); margin-bottom: .3em; }
.hero p { color: var(--on-dark-soft); font-size: 1.2rem; max-width: 560px; margin-bottom: 2rem; }
.hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Homepage split hero: headline + logo animation. Scoped to .hero-split so
   interior-page heroes (eyebrow + h1 only) keep their normal stacked layout.
   The animation sits in a light panel so the forest-green linework stays
   legible against the forest hero. */
.hero-split {
  max-width: none;
  display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
.hero-media { justify-self: center; width: 100%; max-width: 380px; }
.hero-logo-video {
  width: 100%; height: auto; display: block;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  border: 1px solid rgba(212, 160, 23, 0.28);
}
@media (min-width: 900px) {
  .hero-split { grid-template-columns: 1.15fr 0.85fr; }
  .hero-split .hero-text { max-width: none; }
  .hero-media { max-width: 420px; }
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow-1); transition: transform .16s ease, box-shadow .16s ease;
}
.feature-card { display: block; color: inherit; height: 100%; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); text-decoration: none; }
.card h3 { color: var(--forest); margin-bottom: .4em; }
.card p { color: var(--color-ink-soft); }
.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--forest-soft); color: var(--forest);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }

/* Price list inside service cards */
.price-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row .price { font-weight: 700; color: var(--forest); white-space: nowrap; }
.price-note { font-size: .88rem; color: var(--muted); margin-top: 10px; }

/* ─── Protocol chips ────────────────────────────────────────────────────────── */
.protocol-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 620px) { .protocol-list { grid-template-columns: 1fr; } }
.protocol-chip {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); color: var(--charcoal); font-weight: 500;
}
.protocol-chip:hover { border-color: var(--gold); color: var(--forest); text-decoration: none; transform: translateX(2px); transition: transform .12s ease; }
.protocol-chip .num { font-family: var(--font-heading); color: var(--gold-dark); font-weight: 600; }

/* ─── Philosophy strip ──────────────────────────────────────────────────────── */
.philosophy { text-align: center; }
.philosophy blockquote {
  font-family: var(--font-heading); font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-style: italic; font-weight: 400; line-height: 1.25;
  color: var(--on-dark); max-width: 820px; margin: 0 auto 1.2em; border: 0; padding: 0;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer-cta-band { background: var(--gold); color: var(--forest-dark); }
/* Eyebrow defaults to gold, which vanishes on the gold band — force dark. */
.footer-cta-band .eyebrow { color: var(--forest-dark); }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 52px 0; flex-wrap: wrap; }
.footer-cta-text h2 { color: var(--forest-dark); margin-bottom: .3em; }
.footer-cta-text p { color: rgba(18,40,15,.82); max-width: 520px; }
.footer-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-cta-band .btn-primary { background: var(--forest); border-color: var(--forest); color: var(--on-dark); }
.footer-cta-band .btn-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); }

.site-footer { background: var(--forest-deep); color: var(--on-dark-soft); }
.footer-main { padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 { color: var(--on-dark); font-size: 1rem; margin-bottom: 1em; font-family: var(--font-body); font-weight: 600; letter-spacing: .02em; }
.footer-brand .logo-wordmark { color: var(--on-dark); font-size: 1.4rem; }
.footer-tagline { margin-top: 12px; max-width: 320px; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: var(--on-dark-soft); font-size: .95rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-contact a { color: var(--on-dark-soft); }
.footer-contact a:hover { color: var(--gold); }
.footer-hours-row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding: 3px 0; }
.footer-hours-row .day { color: var(--on-dark-soft); }
.footer-hours-row .hrs { color: var(--on-dark); }
.footer-hours-row.is-closed .hrs { color: var(--muted); }

.footer-bottom { border-top: 1px solid rgba(246,242,232,.12); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; flex-wrap: wrap; }
.footer-copyright { font-size: .86rem; margin: 0; }
.footer-legal { font-size: .86rem; margin: 0; }
.footer-legal a { color: var(--on-dark-soft); }
.footer-legal a:hover { color: var(--gold); }
.footer-disclaimer { font-size: .8rem; color: var(--muted); max-width: 900px; margin: 14px auto 0; padding-bottom: 28px; text-align: center; }

/* ─── Reveal-on-scroll ──────────────────────────────────────────────────────── */
/* Only hide when JS is present (html.js). With JS off, content stays visible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Embed placeholders (forms / booking) ──────────────────────────────────── */
.embed-frame { width: 100%; min-height: 620px; border: 0; border-radius: var(--radius-md); background: #fff; }
.embed-placeholder {
  border: 2px dashed var(--gold); border-radius: var(--radius-md);
  background: var(--gold-soft); color: var(--forest-dark);
  padding: 40px; text-align: center; font-weight: 500;
}

/* ─── Legal body ────────────────────────────────────────────────────────────── */
.legal-body h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--color-ink-soft); }

/* ─── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--forest); }
.breadcrumb-sep { color: var(--line); }
