/* ============================================================
   Weigh to Wellness — shared chrome & base
   Editorial minimal (b&w + teal). Single accent: --teal.
   ============================================================ */

:root {
  /* Brand palette: primary #37A6CE, secondary #71D5EB, tertiary #78787B, surface #F7F7F7.
     The bright primary fails WCAG AA as text/buttons on white (~2.8:1), so the functional
     accent (--teal) is a darkened same-hue blue (~5.6:1). --brand stays bright for decorative
     fills only (ambient glow, etc.). --teal kept as the token name for back-compat. */
  --teal: #176f93; --teal-dk: #11586f;
  --brand: #37A6CE; --brand-light: #71D5EB; --brand-gray: #78787B;
  --brand-title: #2A8FB8; /* vivid blue for large heading accents (~3.67:1 = large-text AA) */
  --ink: #161616; --ink-soft: #5e5e5e; --line: #e7e7e7;
  --bg: #ffffff; --bg-alt: #F7F7F7;
  --font-h: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-b: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --sp: clamp(64px, 9vw, 128px);
  --wrap: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-b); color: var(--ink); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; font-kerning: normal; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 28px; }
.wrap-sm { max-width: 760px; margin-inline: auto; padding-inline: 28px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.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; }

/* ── Typography helpers ── */
.h2 { font-family: var(--font-h); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.14; letter-spacing: -.01em; color: var(--ink); }
/* Colored accent word inside a heading (large text only -> AA-safe vivid blue) */
.h2 em { font-style: italic; font-weight: 500; color: var(--brand-title); }
.cta h2 em { color: var(--ink); } /* on the brand band, keep accents dark */
.lead { color: var(--ink-soft); font-size: 1rem; max-width: 54ch; }

/* ── Buttons / links ── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-b); font-weight: 600; font-size: .9rem; border-radius: 50px; padding: 13px 28px; border: 1px solid transparent; cursor: pointer; transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .12s var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dk); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 20px; font-size: .82rem; }
.btn-lg { padding: 16px 34px; font-size: 1rem; }
.link-arrow { color: var(--teal); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s var(--ease-out), color .2s var(--ease-out); }
.link-arrow:hover { color: var(--teal-dk); gap: 10px; }
@media (prefers-reduced-motion: reduce) { .link-arrow { transition: color .2s; } .link-arrow:hover { gap: 6px; } }

/* ── Reveal on scroll ── */
/* Progressive enhancement: content is visible by default (no-JS / headless / pre-observer
   renderers see it). Only when JS confirms support do we hide-then-reveal on scroll. */
.rv { opacity: 1; transform: none; }
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .rv.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rv { opacity: 1; transform: none; transition: none; } }

/* ── Ambient background (drifting teal glow on white sections) ── */
/* radial-gradient (not filter:blur) + transform-only animation = cheap + smooth.
   Uses the bright brand teal here (decorative background, not text, so contrast
   rules don't apply). Two soft blobs per section, drifting on opposite cadences. */
.ambient { position: relative; isolation: isolate; overflow: hidden; }
.ambient > * { position: relative; z-index: 1; }
.ambient::before, .ambient::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  will-change: transform;
}
.ambient::before {
  width: 62vw; height: 62vw; max-width: 760px; max-height: 760px;
  top: -18%; left: -12%;
  background: radial-gradient(circle, rgba(55,166,206,.20), rgba(55,166,206,0) 70%);
  animation: ambientDriftA 26s ease-in-out infinite alternate;
}
.ambient::after {
  width: 48vw; height: 48vw; max-width: 600px; max-height: 600px;
  bottom: -20%; right: -12%;
  background: radial-gradient(circle, rgba(55,166,206,.14), rgba(55,166,206,0) 70%);
  animation: ambientDriftB 32s ease-in-out infinite alternate;
}
/* .alt flips the stronger blob to the opposite side so adjacent sections differ */
.ambient.alt::before { left: auto; right: -12%; }
.ambient.alt::after  { right: auto; left: -12%; }
@keyframes ambientDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(9%, 6%, 0) scale(1.18); }
}
@keyframes ambientDriftB {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to   { transform: translate3d(-8%, -5%, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient::before, .ambient::after { animation: none; }
}

/* ════ NAVBAR ════ */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .25s var(--ease-out); }
.nav.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 16px; }
.logo img { height: 30px; width: auto; }
.logo .fallback { font-family: var(--font-h); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { font-size: .85rem; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s; }
.nav-links a:not(.btn):hover, .nav-links a.act { color: var(--ink); }
.nav-links a.act::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--brand); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════ Shared FAQ / accordion ════ */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; background: none; border: none; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; font-family: var(--font-b); font-size: .95rem; font-weight: 600; color: var(--ink); transition: color .2s; }
.faq-q:hover { color: var(--teal); }
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--teal); transition: transform .3s; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { font-size: .88rem; color: var(--ink-soft); line-height: 1.75; display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s var(--ease-out), visibility .3s; }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; visibility: visible; }
.faq-item.open .faq-a > div { padding-bottom: 22px; }
@media (prefers-reduced-motion: reduce) { .faq-a { transition: none; } }

/* ════ Shared CTA block — brand-color band (#37A6CE) with dark ink content ════ */
/* white-on-brand fails AA, but ink-on-brand is ~6.2:1, so all CTA text is dark ink */
.cta { padding: var(--sp) 0; text-align: center; background: var(--brand); }
.cta h2 { font-family: var(--font-h); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 18px; color: var(--ink); }
.cta p { color: var(--ink); max-width: 48ch; margin: 0 auto 32px; }
.cta .btn-primary { background: var(--ink); color: #fff; }
.cta .btn-primary:hover { background: #000; }
.cta .btn-ghost { border-color: var(--ink); color: var(--ink); }
.cta .btn-ghost:hover { background: var(--ink); color: #fff; }
.cta .link-arrow { color: var(--ink); }
.cta .cta-tel { color: var(--ink); }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ════ FOOTER ════ */
.footer { padding: var(--sp) 0 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-logo img { height: 34px; margin-bottom: 18px; }
.footer address { font-style: normal; font-size: .86rem; line-height: 1.9; color: var(--ink-soft); }
.footer address a:hover { color: var(--teal); }
.footer-col h4 { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 16px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: .88rem; color: var(--ink-soft); transition: color .2s; }
.footer-col a:hover { color: var(--teal); }
.footer-social { display: flex; gap: 10px; margin-bottom: 18px; }
.footer-social a { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: border-color .2s, color .2s; }
.footer-social a:hover { border-color: var(--teal); color: var(--teal); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); }

/* ════ Shared responsive (chrome) ════ */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links { position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0; display: none; max-height: calc(100vh - 74px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 28px; }
  .nav-links a.act::after { display: none; }
  .nav-links .btn { margin: 12px 28px; justify-content: center; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}
