/* Total Body Rehab — design system
   Palette: deep purple / warm paper / brand purple accent (logo-matched)
   Type: Open Sans (matching the original site) */

:root {
  --ink: #332f3a;
  --ink-deep: #232029;
  --paper: #f7f3ec;
  --paper-warm: #efe8db;
  --white: #fffdf9;
  --accent: #6f5599;
  --accent-dark: #59457d;
  --sage: #9d8dc0;
  --text: #2b2734;
  --muted: #635d6e;
  --line: rgba(70, 55, 95, 0.14);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 35, 64, 0.10);
  --font-display: "Open Sans", Helvetica, Arial, sans-serif;
  --font-body: "Open Sans", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.18;
  font-weight: 700;
}

h1, h2 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.article-body h2, .post-card h2, .article-head h1 { text-transform: none; letter-spacing: 0; }

h1 em, h2 em {
  font-style: normal;
  color: inherit;
}

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- top bar + header ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--ink-deep); color: var(--paper);
  font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 0.45rem clamp(1rem, 4vw, 3rem);
}
.topbar p { opacity: 0.85; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar a:hover { color: var(--accent); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 50px; width: auto; transition: transform 0.25s ease; }
.brand:hover .brand-logo { transform: scale(1.04); }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 0.25rem; }
.site-nav > ul > li > a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.98rem;
}
.site-nav > ul > li > a:hover,
.site-nav a.active { background: var(--paper-warm); color: var(--ink); }

.caret {
  display: inline-block; margin-left: 0.4rem; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.has-sub { position: relative; }
.has-sub .sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  display: none; flex-direction: column; align-items: stretch; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0.5rem; z-index: 50;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex; }
.sub a {
  display: block; padding: 0.55rem 0.85rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.sub a:hover { background: var(--paper-warm); }

.nav-toggle { display: none; }
.nav-cta { margin-left: 0.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  font-family: var(--font-body);
}
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-outline-light { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- heroes ---------- */
.hero-home, .page-hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1rem, 4vw, 3rem);
  max-width: 1280px; margin: 0 auto;
}
.page-hero { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 0.9rem;
}

.hero-home h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 1.2rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 1.1rem; }

.lede { font-size: 1.18rem; color: var(--muted); max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; }

.hero-points {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem;
  margin-top: 1.8rem; font-size: 0.95rem; font-weight: 600; color: var(--muted);
}
.hero-points li::before { content: "✓ "; color: var(--sage); font-weight: 900; }

.hero-photo { position: relative; }
.hero-photo img {
  border-radius: calc(var(--radius) * 1.6);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%;
}
.hero-badge {
  position: absolute; bottom: -1.1rem; left: -1.1rem;
  background: var(--ink); color: var(--paper);
  padding: 0.85rem 1.2rem; border-radius: var(--radius);
  font-size: 0.88rem; line-height: 1.45; box-shadow: var(--shadow);
}
.hero-badge strong { font-family: var(--font-display); font-size: 1.05rem; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; background: var(--ink); color: var(--paper);
  padding: 0.75rem 0; border-block: 3px solid var(--accent);
}
.marquee-track {
  display: flex; gap: 1.6rem; width: max-content;
  animation: scroll 60s linear infinite;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.marquee-track span { white-space: nowrap; opacity: 0.9; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section-head { max-width: 720px; margin: 0 auto 2.6rem; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 0.8rem; }

.intro, .services-grid-wrap, .conditions, .facility, .prose,
.two-lists, .modality-grid, .contact-grid, .downloads, .split {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 4.2rem) clamp(1rem, 4vw, 3rem);
}

.intro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; max-width: 1050px; margin: 0 auto; }
.intro-cols p { color: var(--muted); }

/* ---------- service cards ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 1.4rem;
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card-body h3 { font-size: 1.32rem; }
.card-body p { font-size: 0.97rem; color: var(--muted); flex: 1; }
.card-link { font-weight: 700; color: var(--accent-dark); font-size: 0.95rem; }
.card:hover .card-link { color: var(--accent); }

/* ---------- conditions pills ---------- */
.conditions { background: var(--paper-warm); border-radius: calc(var(--radius) * 2); }
.pill-grid {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center;
  max-width: 1000px; margin: 0 auto;
}
.pill-grid li {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.42rem 1.05rem; font-size: 0.92rem; font-weight: 600; color: var(--ink);
}
.pill-grid.compact { justify-content: flex-start; margin-top: 1.2rem; }

/* ---------- facility gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; }
.gallery img {
  border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
  transition: transform 0.3s ease;
}
.gallery img:hover { transform: scale(1.02); }

/* ---------- prose / splits / lists ---------- */
.prose { max-width: 880px; }
.prose.narrow { max-width: 760px; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 2.2rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--text); }

.steps { margin: 1.2rem 0 1.4rem 1.3rem; display: grid; gap: 0.8rem; }
.steps li { padding-left: 0.4rem; }
.steps strong { color: var(--ink); }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-rev .split-copy { order: 2; }
.split-rev .split-photo { order: 1; }
.split-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
.split-copy p + p { margin-top: 1rem; }
.split-copy p { color: var(--muted); }
.split-photo img { border-radius: calc(var(--radius) * 1.6); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.check-list { list-style: none; margin-top: 1.2rem; display: grid; gap: 0.55rem; }
.check-list li { padding-left: 1.7rem; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 900;
}

.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; max-width: 1000px; }
.two-lists.three { grid-template-columns: 1fr 1fr 1fr; max-width: 1180px; }
.two-lists h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }

.modality-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.4rem; }
.modality-grid article {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.7rem;
}
.modality-grid h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.modality-grid p { font-size: 0.97rem; color: var(--muted); }

/* ---------- contact + forms ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-info { display: grid; gap: 1.6rem; }
.info-block h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.info-block .muted { color: var(--muted); font-size: 0.95rem; }
.hrow { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.97rem; padding: 0.2rem 0; }
.hrow span:first-child { font-weight: 700; }

.form {
  background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4);
  padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow);
}
.form h2 { font-size: 1.7rem; margin-bottom: 1.4rem; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-weight: 700; font-size: 0.92rem; color: var(--ink); margin-bottom: 1rem; }
.form input, .form select, .form textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 1rem;
  background: var(--paper); color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 1.1rem; }
.form-status { margin-top: 0.9rem; font-weight: 700; color: var(--ink); }

/* ---------- downloads ---------- */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 980px; }
.download-card {
  display: flex; gap: 1.1rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; text-decoration: none; color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.download-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.download-card strong { font-family: var(--font-display); font-size: 1.18rem; color: var(--ink); }
.dl-icon {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.5rem; font-weight: 900;
}

/* ---------- CTA band + footer ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-deep) 100%);
  color: var(--paper); text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}
.cta-band h2 { color: var(--paper); font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 0.7rem; }
.cta-band p { opacity: 0.85; max-width: 52ch; margin: 0 auto; }
.cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }

.site-footer { background: var(--ink-deep); color: rgba(247, 243, 236, 0.82); padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) 1.5rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 0.8fr; gap: 2.5rem;
  max-width: 1280px; margin: 0 auto 2.5rem;
}
.footer-brand { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--paper); margin-bottom: 0.6rem; }
.footer-tag { font-size: 0.95rem; opacity: 0.75; max-width: 34ch; }
.site-footer h3 {
  color: var(--paper); font-family: var(--font-body); font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase; margin: 1.1rem 0 0.4rem;
}
.site-footer h3:first-child { margin-top: 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; display: grid; gap: 0.4rem; }
.footer-links a { text-decoration: none; font-size: 0.97rem; }
.footer-note {
  max-width: 1280px; margin: 0 auto; padding-top: 1.4rem;
  border-top: 1px solid rgba(247, 243, 236, 0.15);
  font-size: 0.85rem; opacity: 0.6;
}

/* ---------- SEO pages: conditions, locations, blog ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-dark); text-decoration: underline; }
.crumbs span { color: var(--ink); font-weight: 600; }

.prose.wide { max-width: 1050px; }
.prose h3 { font-size: 1.25rem; margin: 1.6rem 0 0.7rem; }
.prose ul.check-list, .prose ul.pill-grid { margin-bottom: 1.2rem; }
.pill-grid a { text-decoration: none; color: var(--ink); }
.pill-grid a:hover { color: var(--accent-dark); }
.pill-grid li:has(a):hover { border-color: var(--accent); }

.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; margin-bottom: 0.7rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; color: var(--ink);
  list-style: none; position: relative; padding-right: 2.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 1.5rem; color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.2rem 1.1rem; color: var(--muted); }

.related { margin-top: 2rem; }
.med-note {
  margin-top: 2.2rem; padding: 1rem 1.2rem; border-left: 3px solid var(--sage);
  background: var(--paper-warm); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem; color: var(--muted);
}

.cond-group { margin-bottom: 2.2rem; }
.cond-group h2 { font-size: 1.5rem; margin-bottom: 0.8rem; }

/* blog */
.post-grid-wrap { max-width: 1280px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; }
.post-card {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.7rem 1.8rem; text-decoration: none; color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card h2 { font-size: 1.4rem; }
.post-card p { font-size: 0.97rem; color: var(--muted); flex: 1; }
.post-meta { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-dark); }

.article { max-width: 780px; margin: 0 auto; padding: clamp(2.2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem); }
.article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.9rem; }
.byline { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.5rem; }
.article-body { padding: 1.5rem 0 0; }
.article-body h2 { font-size: 1.55rem; margin: 2rem 0 0.8rem; }
.article-body p + p { margin-top: 1rem; }
.article-body ul { margin: 0.8rem 0 1rem 1.4rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-foot { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.article-foot h2 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.post-links { list-style: none; display: grid; gap: 0.5rem; }
.post-links a { font-weight: 600; }

.footer-areas {
  max-width: 1280px; margin: 0 auto 1.2rem; font-size: 0.88rem; opacity: 0.8; line-height: 2;
}
.footer-areas a { text-decoration: none; }

/* ---------- reveal animation (only hidden when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  * { transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-home, .page-hero, .split { grid-template-columns: 1fr; }
  .split-rev .split-copy { order: 1; }
  .split-rev .split-photo { order: 2; }
  .hero-photo { order: 2; }
  .intro-cols, .two-lists, .two-lists.three, .contact-grid, .downloads { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle {
    display: block; background: var(--ink); color: var(--paper);
    border: 0; border-radius: 10px; padding: 0.6rem 1.1rem;
    font: inherit; font-weight: 700; cursor: pointer;
  }
  .site-nav ul#nav-menu {
    display: none; position: absolute; top: 100%; right: clamp(1rem, 4vw, 3rem); left: clamp(1rem, 4vw, 3rem);
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 0.7rem; z-index: 90;
  }
  .site-nav.open ul#nav-menu { display: flex; }
  .has-sub .sub { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 1rem; background: transparent; }
  .nav-cta { margin: 0.4rem 0 0; }
  .nav-cta .btn { display: block; text-align: center; }
}

@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .topbar p { display: none; }
  .topbar { justify-content: center; }
  .frow { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-badge { left: 0.8rem; bottom: 0.8rem; }
  .brand-logo { height: 42px; }
}
