/* =========================================================================
   ACTIVE LIFESTYLE CLINIC · "Keeping you healthy, naturally."
   Phoenix integrated wellness — Dr. Todd Winton, ND + Dr. Jen Winton, DC
   Aesthetic "Desert Calm" — Phoenix desert sage + toasted sand + dusty rose
   Palette: deep sage #46553E · sage #8B9A78 · dusty rose #C0857F · sand #ECE3D3
   Type:    Fraunces (editorial display, SOFT axis) · Inter Tight (body) · JetBrains Mono (labels)
   Variable names retained from the template system; VALUES remapped to brand colors.
   ========================================================================= */

:root {
  /* ---- Brand colors (semantic) ---- */
  --slate:       #46553E;   /* deep sage — primary UI (nav, buttons) */
  --slate-deep:  #36422F;
  --cyan:        #C0857F;   /* dusty rose — accent + spine motif */
  --cyan-deep:   #9C5E58;   /* AA-safe rose for text on sand / hovers */
  --cyan-tint:   #EFE0DD;

  /* ---- Mapped tokens (Desert Calm re-skin) ---- */
  --bone:        #ECE3D3;   /* page background — warm toasted desert sand */
  --bone-soft:   #E2D6BF;   /* deeper sand panels */
  --sage:        #8B9A78;   /* accent line — desert sage green */
  --sage-deep:   #46553E;   /* dark bands / eyebrow text — deep sage */
  --sage-tint:   #D6DBC8;   /* image placeholders — soft sage */
  --terra:       #C0857F;   /* decorative accent (marks, underline) — dusty rose */
  --terra-deep:  #9C5E58;   /* heading-emphasis + hovers — deep rose */
  --terra-tint:  #E7CFCB;   /* light rose tint on dark bands */
  --ink:         #2A2521;   /* primary text + dark sections + footer (warm near-black) */
  --ink-mute:    #6B6055;   /* muted body text — AA on --bone */
  --rule:        #D2C4AB;   /* warm sand hairline borders */
  --white:       #FFFFFF;

  --f-display: "Fraunces", "Tiempos Headline", "Times New Roman", Georgia, serif;
  --f-body:    "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 9vw, 144px);

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-soft: 0 1px 2px rgba(28,37,49,.05), 0 18px 40px -28px rgba(28,37,49,.20);
  --shadow-card: 0 1px 1px rgba(28,37,49,.05), 0 36px 72px -42px rgba(28,37,49,.30);
  --shadow-cyan: 0 18px 44px -22px rgba(20,112,147,.55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ambient brand wash (subtle, cool) */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(139,154,120,.16), transparent 68%),
    radial-gradient(820px 560px at 92% 102%, rgba(192,133,127,.12), transparent 70%);
}

/* ---- TYPE ---------------------------------------------------------------- */

.f-display { font-family: var(--f-display); font-weight: 360; letter-spacing: -.012em; font-variation-settings: "SOFT" 70, "WONK" 0, "opsz" 144; }
.f-italic  { font-family: var(--f-display); font-style: italic; font-weight: 360; font-variation-settings: "SOFT" 100, "opsz" 144; }
.f-mono    { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 360; letter-spacing: -.018em; margin: 0; color: var(--ink); font-variation-settings: "SOFT" 70, "opsz" 144; }
h1 { font-size: clamp(42px, 6vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.06; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.18; }
h4 { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.3; }

p  { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 1.4vw, 20.5px); line-height: 1.55; color: var(--ink); }
.muted { color: var(--ink-mute); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--sage-deep);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--sage);
}
.kicker--terra { color: var(--terra-deep); }
.kicker--terra::before { background: var(--terra); }

/* ---- LAYOUT -------------------------------------------------------------- */

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.section { padding: var(--section-y) 0; position: relative; }
.section--bone { background: var(--bone); }
.section--bone-soft { background: var(--bone-soft); }
.section--ink { background: var(--ink); color: var(--bone); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--bone); }
.section--sage { background: var(--sage-deep); color: var(--bone); }
.section--sage h1, .section--sage h2, .section--sage h3, .section--sage h4 { color: var(--bone); }

.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--rule); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  margin: 0 0 24px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.grid { display: grid; gap: clamp(20px, 2.4vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- NAV ----------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,248,250,.82); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: padding .3s ease, box-shadow .3s ease, background .3s ease;
}
.nav.is-scrolled { box-shadow: 0 10px 30px -22px rgba(28,37,49,.5); background: rgba(245,248,250,.94); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 24px; transition: padding .3s ease; }
.nav.is-scrolled .nav__inner { padding: 9px 0; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo { height: 40px; width: auto; transition: height .3s ease; }
.nav.is-scrolled .nav__logo { height: 34px; }
/* legacy text-mark fallback (unused once logo image is in place) */
.nav__mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--slate); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: .04em;
}
.nav__name { font-family: var(--f-display); font-size: 17px; line-height: 1.1; }
.nav__name small { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-mute); margin-top: 2px; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { font-size: 14.5px; color: var(--ink); position: relative; padding: 8px 0; font-weight: 450; }
.nav__links a:hover { color: var(--cyan-deep); }
.nav__links a.is-active { color: var(--cyan-deep); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--cyan); border-radius: 2px; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--slate); color: #fff;
  padding: 11px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nav__cta:hover { background: var(--cyan-deep); transform: translateY(-1px); box-shadow: var(--shadow-cyan); }
.nav__toggle { display: none; background: none; border: 0; padding: 0; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.nav__toggle svg { width: 24px; height: 24px; pointer-events: none; }

@media (max-width: 880px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bone); padding: 24px var(--gutter); border-bottom: 1px solid var(--rule);
  }
  .nav.is-open .nav__cta { display: inline-flex; margin-top: 12px; align-self: flex-start; }
}

/* ---- BUTTONS ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 500; letter-spacing: .005em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--slate); color: #fff; box-shadow: 0 12px 30px -16px rgba(56,66,79,.7); }
.btn--primary:hover { background: var(--cyan-deep); transform: translateY(-2px); box-shadow: var(--shadow-cyan); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--cyan-deep); }
.btn--cyan { background: var(--cyan); color: #07313f; font-weight: 600; }
.btn--cyan:hover { background: #45b9df; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--bone { background: #fff; color: var(--ink); }
.btn--bone:hover { background: var(--cyan-tint); }

/* ---- HERO ---------------------------------------------------------------- */

.hero { position: relative; padding: clamp(28px, 4vw, 56px) 0 0; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
.hero__copy { padding-bottom: clamp(40px, 6vw, 96px); }
.hero__eyebrow { margin-bottom: 22px; }
.hero__title {
  font-size: clamp(46px, 6.4vw, 92px);
  line-height: .98;
  letter-spacing: -.022em;
}
.hero__title em { font-style: italic; color: var(--terra-deep); font-variation-settings: "SOFT" 100, "opsz" 144; }
.hero__lede {
  margin-top: 28px; max-width: 50ch; font-size: clamp(16.5px, 1.3vw, 19px); line-height: 1.55; color: var(--ink-mute);
}
.hero__ctas { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__phone {
  font-family: var(--f-display); font-size: 22px; color: var(--ink); margin-left: 4px;
}
.hero__phone small { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }

.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--sage-tint);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(31,27,22,.35));
}
.hero__caption {
  position: absolute; left: 20px; bottom: 18px; z-index: 2;
  color: var(--bone); font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.hero__seal {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 104px; height: 104px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center; text-align: center;
  font-family: var(--f-display); line-height: 1.05; font-size: 12px;
  border: 2px solid var(--cyan);
  box-shadow: 0 14px 34px -16px rgba(20,112,147,.6);
}
.hero__seal span { display: grid; place-items: center; }
.hero__seal strong { display: block; font-size: 30px; font-weight: 400; color: var(--cyan-deep); letter-spacing: -.01em; }
.hero__seal small  { display: block; font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-top: 3px; }
.hero__seal .seal-top { font-family: var(--f-mono); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px; }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 8px; }
  .hero__media { aspect-ratio: 4 / 5; max-height: 70vh; }
}

/* ---- TRUST BAR ----------------------------------------------------------- */

.trust {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bone-soft);
}
.trust__grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.trust__cell {
  padding: 28px 28px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px;
}
.trust__cell:last-child { border-right: 0; }
.trust__cell strong {
  font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 360; line-height: 1.05;
}
.trust__cell span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 880px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__cell { border-right: 0; border-bottom: 1px solid var(--rule); padding: 22px 18px; }
  .trust__cell:nth-child(2n) { border-right: 0; }
  .trust__cell:nth-child(odd) { border-right: 1px solid var(--rule); }
  .trust__cell:last-child { border-bottom: 0; }
}

/* ---- FOOTER -------------------------------------------------------------- */

.footer {
  background: var(--ink); color: var(--bone-soft);
  padding: 72px 0 28px;
}
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
}
.footer h4 { color: var(--bone); margin-bottom: 14px; font-size: 15px; }
.footer a { color: var(--bone-soft); opacity: .82; font-size: 14px; line-height: 1.7; }
.footer a:hover { color: var(--terra-tint); opacity: 1; }
.footer__wordmark { display: inline-flex; align-items: center; gap: 12px; }
.footer__spine { width: 22px; height: 38px; flex: 0 0 auto; }
.footer__wordmark span { font-family: var(--f-display); font-size: 18px; line-height: 1.1; color: #fff; }
.footer__wordmark small { display: block; font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin-top: 3px; opacity: .9; }
.footer__brand p { margin: 16px 0 0; color: var(--bone-soft); opacity: .7; font-size: 14px; max-width: 38ch; }
.footer__sub {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(244,237,223,.16);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,237,223,.5);
}
.footer__sub a { color: rgba(244,237,223,.7); }
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__sub { flex-direction: column; align-items: flex-start; }
}

/* ---- REVEALS (fail-open) ----------------------------------------------- */

.reveal { transform: translateY(14px); opacity: 1; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s ease; }
.reveal--hidden { transform: translateY(28px); opacity: 0; }
.reveal--in { transform: translateY(0); opacity: 1; }

/* accessibility */
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* common — global media queries */
@media (max-width: 880px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   SIGNATURE BRAND MOTIF — the spine ("Aligning Spines Since '89")
   ========================================================================= */

/* horizontal spine divider between sections */
.spine-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: clamp(28px, 5vw, 56px) 0; position: relative; z-index: 2;
}
.spine-divider svg { width: min(560px, 80%); height: 40px; overflow: visible; }
.spine-divider .spine-path { stroke: var(--cyan); stroke-width: 2; fill: none; opacity: .55; }
.spine-divider .vertebra { fill: var(--cyan); opacity: .9; }
.spine-divider .spine-cap { fill: var(--slate); }

/* large faint spine watermark inside dark bands */
.spine-watermark {
  position: absolute; right: clamp(-40px, -2vw, 0px); top: 50%; transform: translateY(-50%);
  height: 118%; width: auto; opacity: .07; pointer-events: none; z-index: 0;
  color: #fff;
}
.spine-watermark svg { height: 100%; width: auto; }

/* eyebrow upgrade — cyan tick + slate label is already set via vars; add a dot variant */
.eyebrow--dot::before { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }

/* big stat number (count-up) */
.statnum { font-family: var(--f-display); font-weight: 380; line-height: .95; letter-spacing: -.02em; color: var(--ink); font-variation-settings: "SOFT" 60, "opsz" 144; }

/* GSAP reveal targets — start visible (fail-open); GSAP sets initial state only if it loads */
[data-anim] { will-change: transform, opacity; }

/* image hover-zoom wrapper */
.zoom { overflow: hidden; }
.zoom img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.zoom:hover img { transform: scale(1.05); }

/* selection + scrollbar polish */
::selection { background: var(--cyan); color: #3a201d; }
@supports (scrollbar-color: auto) { html { scrollbar-color: var(--cyan) var(--bone-soft); } }

/* pill badge */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cyan-tint); color: var(--cyan-deep);
  padding: 7px 14px; border-radius: var(--r-pill);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
}
.badge svg { width: 13px; height: 13px; }

/* reduce-motion: disable the spine draw + parallax cleanly */
@media (prefers-reduced-motion: reduce) {
  .spine-divider .spine-path { stroke-dashoffset: 0 !important; }
}
