/* ============================================================
   New Era 4 Med — design tokens
   Palette: forest-pine clinic + herbal-green action + olive accent.
   Display pairing: Outfit (geometric, clinical precision) for
   all UI text; Sacramento (the founder's own handwriting) lives
   only inside the logo, as the one warm, human mark on the page.
   Signature: the biorresonance wave — the clinic's real
   instrument, redrawn as the site's recurring section divider.
   ============================================================ */
:root {
  --ink: #24382A;
  --deep: #3E6B3F;
  --mint: #6FAE55;
  --mint-deep: #57893F;
  --gold: #7A9C5E;
  --paper: #F4F7F0;
  --white: #FFFFFF;
  --body: #57604F;
  --line: #E2E8DA;

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;

  /* fluid type scale — clamp(min, preferred, max) */
  --step-1: clamp(0.8rem, 0.77rem + 0.15vw, 0.9rem);
  --step0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step2: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step3: clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step4: clamp(2.4rem, 1.9rem + 2.2vw, 3.6rem);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step0);
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step4); line-height: 1.05; font-weight: 500; }
h2 { font-size: var(--step3); line-height: 1.12; }
h3 { font-size: var(--step1); line-height: 1.3; }

p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--mint-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--dark { background: var(--ink); color: #D6E4CC; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #FFFFFF; }
.section--paper { background: var(--paper); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn-primary { background: var(--mint); color: var(--ink); }
.btn-primary:hover { background: var(--mint-deep); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(87,137,63,.35); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(36,56,42,.35);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.section--dark .btn-ghost { color: #EAF3E4; box-shadow: inset 0 0 0 1.5px rgba(234,243,228,.4); }
.section--dark .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #EAF3E4; }

/* logo — the clinic's real logo file, used as-is everywhere */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 38px; width: auto; display: block; }
/* the real logo is dark-green-on-transparent, so on dark sections
   (footer) it needs a light backdrop to stay legible */
.logo--dark { background: #fff; padding: 8px 16px; border-radius: 10px; }

/* wave divider — the clinic's own instrument, redrawn as signature */
.wave-divider { display: block; width: 100%; height: 40px; }

/* header / nav */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 20px; }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:not(.nav-cta):not(.lang-switch) { position: relative; }
.site-nav a:not(.nav-cta):not(.lang-switch)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1.5px;
  background: var(--mint-deep); transition: right .2s var(--ease);
}
.site-nav a:not(.nav-cta):not(.lang-switch):hover::after { right: 0; }
.lang-switch { font-weight: 700; letter-spacing: .05em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.nav-cta { padding: 10px 18px; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: flex-start; padding: 18px 24px 26px; gap: 16px;
    display: none; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(36,56,42,.08);
  }
  .site-nav.is-open { display: flex; }
  .nav-cta { order: 10; }
}

/* footer */
.site-footer { background: var(--ink); color: #D6E4CC; padding: 64px 0 24px; }
.site-footer a { color: #A9C99A; text-decoration: none; }
.site-footer a:hover { color: var(--mint); }

.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.site-footer__brand .logo { margin-bottom: 20px; }
.site-footer__brand p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; }
.site-footer__brand a { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.site-footer__heading { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #EAF3E4; margin: 0 0 18px; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer__col a { font-size: 13px; }

.site-footer__social a { display: inline-flex; align-items: center; gap: 9px; }
.site-footer__icon { display: inline-flex; flex-shrink: 0; }

.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; font-size: 12px; color: #93AC86; }
.site-footer__legal p { margin-bottom: 6px; }

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* floating WhatsApp button */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.28); text-decoration: none;
  transition: transform .18s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ============================================================
   Motion — scroll reveals, hero entrance, ambient wave signal
   Content is always visible without JS (see html.js gate below);
   the JS-detected html gets the animated version. Both paths are
   neutralized under prefers-reduced-motion by the rule near the
   top of this file.
   ============================================================ */
html.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

html.js .reveal-stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
html.js .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .02s; }
html.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .10s; }
html.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .18s; }
html.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }
html.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .34s; }
html.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .42s; }

/* hero — plays once on load, not scroll-triggered */
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
html.js .hero__text > * { opacity: 0; animation: rise-in .8s var(--ease) forwards; }
html.js .hero .eyebrow { animation-delay: .05s; }
html.js .hero h1 { animation-delay: .16s; }
html.js .hero .lead { animation-delay: .30s; }
html.js .hero__actions { animation-delay: .42s; }
html.js .hero__badges { animation-delay: .54s; }
html.js .hero__media img { opacity: 0; animation: rise-in 1s var(--ease) .32s forwards; }

/* the wave is the clinic's own signal — give it a slow, quiet pulse */
@keyframes wave-breathe { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-3px) scaleY(1.1); } }
.wave-divider { transform-origin: center; animation: wave-breathe 6s var(--ease) infinite; }

/* header gains depth once the page scrolls under it */
.site-header { transition: box-shadow .25s var(--ease), background-color .25s var(--ease); }
.site-header.is-scrolled { background: rgba(255,255,255,.97); box-shadow: 0 10px 26px rgba(36,56,42,.07); }

/* symptom selector — 5 curated pillars, the site's real signature interaction */
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }

/* hero eyebrow carries the credibility line (specialty + city) — the
   first thing anyone reads, so the specialty outweighs the location */
.hero .eyebrow { color: var(--mint-deep); }
.hero .eyebrow__specialty { font-size: 14px; font-weight: 700; }
.hero .eyebrow__location { font-size: 10px; font-weight: 500; }
.lead { font-size: var(--step0); line-height: 1.7; max-width: 56ch; }

/* .chip links service pages back into the pillars above */
.symptom-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  display: inline-block; padding: 10px 17px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); color: var(--deep); font-size: 13px; text-decoration: none;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
}
.chip:hover { border-color: var(--mint); background: #EEF5E7; transform: translateY(-1px); }

.pillars { display: flex; flex-direction: column; gap: 14px; max-width: 820px; margin-top: 32px; }
.pillar {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  overflow: hidden; scroll-margin-top: 90px; transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pillar:hover { border-color: #D9E7CC; box-shadow: 0 10px 26px rgba(36,56,42,.06); }
.pillar summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 18px;
  padding: 22px 26px;
}
.pillar summary::-webkit-details-marker { display: none; }
.pillar__icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); color: var(--mint-deep);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.pillar[open] .pillar__icon { background: var(--ink); color: var(--mint); }
.pillar__head { flex: 1; min-width: 0; }
.pillar__title { display: block; font-weight: 600; color: var(--ink); font-size: 16px; }
.pillar__teaser { display: block; font-size: 13px; color: var(--body); margin-top: 3px; }
.pillar__chevron {
  flex-shrink: 0; width: 26px; height: 26px; position: relative;
  transition: transform .3s var(--ease);
}
.pillar__chevron::before, .pillar__chevron::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--mint-deep);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.pillar__chevron::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.pillar__chevron::after { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.pillar[open] .pillar__chevron::after { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }

/* collapsed by default in CSS; JS animates max-height, native <details>
   still opens/closes instantly without JS via the [open] fallback rule */
.pillar__body { max-height: 0; overflow: hidden; transition: max-height .38s var(--ease); }
.pillar[open] .pillar__body { max-height: none; }
.pillar__body-inner { padding: 0 26px 26px 90px; }
.pillar__body-inner p { max-width: 62ch; }

@media (max-width: 640px) {
  .pillar summary { padding: 18px; gap: 14px; }
  .pillar__icon { width: 38px; height: 38px; }
  .pillar__body-inner { padding: 0 20px 22px 20px; }
}

/* ============================================================
   Home page sections
   ============================================================ */
.hero { background: linear-gradient(165deg, #FFFFFF 0%, var(--paper) 62%); position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 64px 24px 44px; }
.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; inset: -18px -18px auto auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(111,174,85,.28) 0%, rgba(111,174,85,0) 70%);
  z-index: 0;
}
.hero__media img { position: relative; z-index: 1; width: 100%; border-radius: var(--radius); filter: drop-shadow(0 24px 40px rgba(36,56,42,.18)); background: transparent; }
.hero__actions { display: flex; gap: 12px; margin: 28px 0 24px; flex-wrap: wrap; }
.hero__badges { display: flex; gap: 24px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--deep); font-weight: 600; }
.hero__badges li { display: flex; align-items: center; gap: 7px; }
.hero__badges li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint-deep); flex-shrink: 0; }
.wave-divider path { stroke: var(--mint); }

.mission { text-align: center; }
.mission .container { max-width: 760px; }
.mission .lead { max-width: none; margin: 0 auto; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.pillar-card { background: #fff; border-radius: var(--radius); padding: 24px 22px; border: 1px solid var(--line); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.pillar-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(36,56,42,.08); }
.pillar-card h3 { font-size: 15px; margin-bottom: 8px; }
.pillar-card p { font-size: 13px; margin: 0; }

.service-card { display: block; text-decoration: none; color: inherit; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(36,56,42,.1); }
.service-card img {
  width: 100%; aspect-ratio: 4/3; box-sizing: border-box;
  object-fit: contain; background: var(--paper); padding: 14px;
}
.service-card h3 { font-size: 15px; padding: 16px 18px 4px; }
.service-card__link { display: block; padding: 0 18px 18px; font-size: 12px; color: var(--mint-deep); font-weight: 600; }

.patricia__inner, .supplements__inner, .ebook-teaser__inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.patricia__photo { width: 100%; border-radius: var(--radius); }
.patricia__author a { color: var(--mint); font-weight: 500; }
.patricia__author a:hover { text-decoration: none; }

.supplements__inner img { width: 100%; max-width: 420px; border-radius: var(--radius); }

.ebook-teaser { background: linear-gradient(140deg, var(--deep), var(--ink)); color: #EAF3E4; }
.ebook-teaser h2, .ebook-teaser p { color: #EAF3E4; }
.ebook-teaser__inner img { width: 100%; max-width: 220px; border-radius: var(--radius-sm); box-shadow: 0 20px 40px rgba(0,0,0,.3); }

.region__schedule { color: var(--ink); margin-top: 14px; }
.region__map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.region__map iframe { display: block; }

.final-cta { text-align: center; }
.final-cta .container { max-width: 640px; }
.final-cta .lead { margin: 0 auto; }
.final-cta .btn { margin-top: 22px; }

@media (max-width: 900px) {
  .hero__inner, .grid-4, .patricia__inner, .supplements__inner, .ebook-teaser__inner { grid-template-columns: 1fr; }
  .hero__inner { padding-top: 44px; }
  .patricia__inner > img, .patricia__inner > div { order: unset; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Service pages
   ============================================================ */
.service-hero { background: linear-gradient(165deg, #FFFFFF 0%, var(--paper) 100%); padding-bottom: 56px; }
.service-hero .lead { margin-bottom: 26px; }

.service-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: center; }
.service-grid img {
  border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 2; box-sizing: border-box;
  object-fit: contain; background: var(--paper); padding: 20px;
}
.service-grid p { max-width: 62ch; }

.steps { padding-left: 0; max-width: 62ch; counter-reset: step; list-style: none; }
.steps li { margin-bottom: 14px; position: relative; counter-increment: step; padding-left: 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--mint);
  color: var(--ink); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 22px; }
.faq-item summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--mint-deep); font-size: 18px; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 20px; margin: 0; }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   eBook page
   ============================================================ */
.ebook-hero { background: linear-gradient(165deg, #FFFFFF 0%, var(--paper) 100%); }
.ebook-hero__inner { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 48px; align-items: center; }
.ebook-hero__inner img { width: 100%; border-radius: var(--radius-sm); box-shadow: 0 24px 48px rgba(36,56,42,.2); }
.ebook-hero__actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.ebook-bullets { columns: 2; column-gap: 32px; padding-left: 20px; max-width: 820px; margin: 0; }
.ebook-bullets li { break-inside: avoid; margin-bottom: 12px; padding-left: 4px; }

@media (max-width: 900px) {
  .ebook-hero__inner { grid-template-columns: 1fr; }
  .ebook-hero__inner img { max-width: 260px; }
  .ebook-bullets { columns: 1; }
}
