/* =========================================================
   COMPASS REHAB AND BRACING — SHARED STYLESHEET
   One file, linked from every page. Fixes the old build's
   biggest bug (duplicated inline CSS diverging per page).
   ========================================================= */

:root {
  /* Brand colors — from the official Compass brand toolkit */
  --teal: #2c8da2;
  --teal-dark: #1f6a7a;
  --teal-deep: #164e5a;
  --teal-tint: #eaf3f4;
  --teal-tint-2: #dcedef;
  --charcoal: #414042;
  --ink: #182226;
  --muted: #58686d;
  --muted-soft: #7c8b8f;
  --line: #e1e6e7;
  --line-soft: #edf0f1;
  --paper: #f4f4f4;
  --warm: #faf8f4;
  --white: #ffffff;

  --shadow-sm: 0 4px 16px rgba(24, 34, 38, 0.06);
  --shadow-md: 0 18px 45px rgba(24, 34, 38, 0.12);
  --shadow-lg: 0 30px 70px rgba(24, 34, 38, 0.18);

  --max: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}
h1 { font-size: clamp(38px, 5.6vw, 68px); font-weight: 480; letter-spacing: -0.015em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); max-width: 720px; }
h3 { font-size: 20px; font-weight: 600; font-family: "Inter", sans-serif; letter-spacing: -0.01em; }
p { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--teal);
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
  font-weight: 650;
  border-bottom: 1.5px solid var(--teal-tint-2);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease), gap 0.2s var(--ease);
}
.text-link:hover { border-color: var(--teal); gap: 10px; }
.text-link svg { width: 16px; height: 16px; }

/* ---------- Layout ---------- */
.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}
.section { padding: 100px 0; }
.section.tight { padding: 64px 0; }
.section.soft { background: var(--paper); }
.section.warm { background: var(--warm); }
.section.deep { background: var(--ink); color: rgba(255,255,255,0.92); }

@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .section.tight { padding: 48px 0; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 13px 24px;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.button:hover { background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-1px); }

.button.secondary {
  background: transparent;
  border-color: rgba(24, 34, 38, 0.22);
  color: var(--ink);
}
.button.secondary:hover { border-color: var(--ink); background: rgba(24,34,38,0.04); }

.button.on-dark {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
  background: transparent;
}
.button.on-dark:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.85); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  min-height: 132px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 76px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.nav-links a.active { color: var(--teal-dark); background: var(--teal-tint); }
.nav-links .button { margin-left: 10px; min-height: 42px; padding: 10px 20px; font-size: 14px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .nav { min-height: 100px; }
  .brand img { height: 54px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 100px 0 0 0;
    height: calc(100vh - 100px);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.28s var(--ease);
  }
  .nav-links a { padding: 15px 16px; font-size: 16px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav-links .button { margin: 10px 4px 0; justify-content: center; }
  body.nav-open .nav-links { transform: translateX(0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 132px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(15, 30, 34, 0.55) 8%, rgba(15, 30, 34, 0.35) 46%, rgba(15, 30, 34, 0.12) 76%),
    linear-gradient(0deg, rgba(10, 22, 26, 0.55), rgba(10, 22, 26, 0.05) 45%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 88px;
}
.hero h1 { max-width: 780px; color: var(--white); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.4); }
.hero h1 em { font-style: normal; }
.hero .lead { margin-top: 22px; max-width: 640px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

@media (max-width: 620px) {
  .hero { min-height: 92vh; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 76px 0 60px;
  background: linear-gradient(180deg, var(--teal-tint) 0%, var(--white) 100%);
}
.page-hero h1 { max-width: 760px; }
.page-hero .sub-line {
  margin-top: 10px;
  max-width: 640px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 2.1vw, 24px);
  letter-spacing: -0.005em;
  color: var(--teal-dark);
}
.page-hero .lead { margin-top: 18px; }

/* ---------- Intro grid ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 60px;
  align-items: end;
}

/* ---------- Service / pillar / cred cards ---------- */
.service-grid, .pillar-grid, .cred-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.service, .pillar, .cred {
  background: var(--white);
  padding: 36px 28px;
  transition: background 0.2s var(--ease);
}
.service:hover { background: var(--teal-tint); }
.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.service:hover .icon-badge { background: var(--teal-dark); transform: scale(1.06); }
.service-icon { width: 26px; height: 26px; }
.service h3, .pillar h3, .cred h3 { margin-bottom: 10px; }
.service p, .pillar p, .cred p, .info-box p, .copy p, li { color: var(--muted); }

.pillar { text-align: left; }
.pillar-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  font-family: "Fraunces", serif;
}

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .service-grid, .pillar-grid, .cred-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .service-grid, .pillar-grid, .cred-grid { grid-template-columns: 1fr; }
}

/* ---------- Split feature sections ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 64px;
  align-items: center;
}
.feature-reverse .copy { order: 2; }
.feature-reverse .photo-panel { order: 1; }

.copy { display: grid; gap: 18px; }
.copy.wide { max-width: 820px; }

.photo-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}
.photo-panel img { width: 100%; height: 100%; object-fit: cover; }

.list { display: grid; gap: 12px; margin-top: 6px; }
.list li {
  position: relative;
  padding-left: 26px;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 12px; height: 12px;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .feature-reverse .copy, .feature-reverse .photo-panel { order: initial; }
  .photo-panel { aspect-ratio: 16 / 10; }
}

/* ---------- Quote / pull line ---------- */
.quote-line {
  margin-top: 4px;
  padding-left: 26px;
  border-left: 3px solid var(--teal);
  font-family: "Fraunces", serif;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 480;
  line-height: 1.32;
}

/* ---------- Two column / info boxes ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.stack { display: grid; gap: 24px; }

.info-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 32px;
}
.info-box.split { align-items: start; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
}
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 600; font-size: 14.5px; }
input, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s var(--ease);
}
input:focus, textarea:focus { outline: none; border-color: var(--teal); }
textarea { min-height: 150px; resize: vertical; }
.notice { margin-top: 16px; color: var(--muted-soft); font-size: 13.5px; }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand img { height: 32px; margin-bottom: 14px; }
.footer p, .footer a { color: rgba(255, 255, 255, 0.62); font-size: 14.5px; line-height: 1.7; }
.footer a:hover { color: var(--white); }
.footer h3 { color: var(--white); margin-bottom: 14px; font-size: 14.5px; font-weight: 650; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Where I work strip ---------- */
.locations-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
@media (max-width: 900px) {
  .locations-strip { grid-template-columns: 1fr; text-align: left; }
}
