/* Rooted Chiropractic and Rehab — restyle
   Palette: the site's original sage/olive/sand, reduced to one system.
   Type: Raleway (headings) + Inter (body), both from the original site. */

@font-face { font-family: "Raleway"; src: url("../fonts/Raleway-500-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("../fonts/Raleway-500-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-400-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-400-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-alt: #f6f4ee;        /* light sand */
  --sand: #eae1cf;          /* original "white" token */
  --ink: #2c331f;           /* logo olive */
  --text: #4b5141;
  --muted: #7b8170;
  --sage: #a4ac86;          /* original accent */
  --sage-soft: #dfe5cf;     /* pill buttons */
  --sage-deep: #5f6b45;     /* accent words, links */
  --line: #e7e4da;

  --font-head: "Raleway", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-lg: 28px;
  --radius: 18px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --shadow: 0 1px 2px rgb(44 51 31 / .04), 0 8px 30px rgb(44 51 31 / .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); font-weight: 500; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; line-height: 1.35; font-weight: 600; letter-spacing: 0; }
h1 em, h2 em { font-style: italic; color: var(--sage-deep); }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--text); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: calc(var(--section) * .6); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.center p { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--sage-deep); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 16px; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--sage-soft); color: var(--ink); }
.btn--primary:hover { background: var(--sage); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--sage-deep); color: #fff; }
.btn--ghost { border-color: rgb(255 255 255 / .5); color: #fff; }
.btn--ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }
.btn .arrow { font-size: 13px; }
.link-arrow { font-weight: 500; text-decoration: none; font-size: 15px; }
.link-arrow::after { content: " ↗"; font-size: .85em; }

/* Header / nav */
.site-header { position: fixed; inset: 14px 0 auto; z-index: 50; padding-inline: var(--gutter); pointer-events: none; }
.nav {
  pointer-events: auto; max-width: var(--wrap); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: rgb(255 255 255 / .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 26px; height: auto; }
.brand span { font: 500 15px/1 var(--font-head); letter-spacing: .32em; }
.brand small { display: block; font: 400 8.5px/1 var(--font-body); letter-spacing: .26em; margin-top: 4px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button {
  display: block; padding: 9px 14px; border-radius: 999px; border: 0; background: none;
  font: 400 14px/1.2 var(--font-body); color: var(--ink); text-decoration: none; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover, .nav-links [aria-current="page"] { background: var(--bg-alt); }
.nav-links button::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 270px;
  list-style: none; margin: 0; padding: 8px; border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s;
}
.dropdown a { border-radius: 10px; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown, .has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-cta { padding: 12px 20px; font-size: 14px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--bg-alt); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: auto; position: relative; content: ""; transition: .2s; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 960px) {
  .nav { border-radius: 26px; flex-wrap: wrap; padding: 8px 8px 8px 16px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 4px 10px; }
  .nav.open .nav-links { display: flex; }
  .nav-links a, .nav-links button { padding: 12px 14px; font-size: 16px; width: 100%; text-align: left; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 12px; display: none; min-width: 0; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-links .mobile-cta { display: block; margin-top: 6px; }
  .nav-links .mobile-cta a { background: var(--ink); color: #fff; text-align: center; }
}
@media (min-width: 961px) { .mobile-cta { display: none; } }

/* Hero */
.hero { padding: 96px var(--gutter) 0; }
.hero-card {
  position: relative; max-width: var(--wrap); margin-inline: auto; overflow: hidden;
  border-radius: var(--radius-lg); min-height: min(78vh, 720px);
  display: flex; align-items: flex-end; color: #fff; isolation: isolate;
}
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(28 33 18 / .15) 0%, rgb(28 33 18 / .35) 45%, rgb(28 33 18 / .82) 100%); }
.hero-body { padding: clamp(28px, 5vw, 64px); max-width: 760px; }
.hero-card h1 { color: #fff; }
.hero-card h1 em { color: var(--sage-soft); }
.hero-card p { color: rgb(255 255 255 / .85); }
.hero-card .eyebrow { color: var(--sage-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Page header (inner pages) */
.page-head { padding: 140px 0 clamp(40px, 6vw, 72px); }
.page-head h1 { max-width: 16ch; }
.page-head--split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: end; }
.page-head--split .media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.page-head--split .media img { width: 100%; height: 100%; object-fit: cover; }

/* Layout helpers */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--top { align-items: start; }
.split .media { border-radius: var(--radius-lg); overflow: hidden; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .media.tall { aspect-ratio: 4/5; }
.split .media.wide { aspect-ratio: 4/3; }
.split.reverse .media { order: -1; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }

/* Cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .25s, box-shadow .25s;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card .media { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.card:hover .media img { transform: scale(1.04); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body p { font-size: 15px; color: var(--text); }
.card-body .link-arrow { margin-top: auto; }
.section--alt .card { border-color: transparent; }
/* Service rows (All Services page): image beside text */
.rows { display: grid; gap: 20px; }
.rows .card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.rows .card:nth-child(even) .media { order: 2; }
.rows .card .media { aspect-ratio: auto; min-height: 300px; position: relative; }
.rows .card .media img { position: absolute; inset: 0; }
.rows .card-body { padding: clamp(24px, 4vw, 48px); justify-content: center; }
.rows .card-body .link-arrow { margin-top: 8px; }
@media (max-width: 760px) { .rows .card { grid-template-columns: 1fr; } .rows .card:nth-child(even) .media { order: 0; } .rows .card .media { min-height: 0; aspect-ratio: 16/10; } .rows .card .media img { position: static; } }
/* Five service cards: first one spans two columns so rows fill evenly (2+1, 3) */
.cards--five { grid-template-columns: repeat(3, 1fr); }
.cards--five > :first-child { grid-column: span 2; }
.cards--five > :first-child .media { aspect-ratio: auto; height: 100%; max-height: 360px; min-height: 240px; }
@media (max-width: 900px) { .cards--five { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards--five { grid-template-columns: 1fr; } .cards--five > :first-child { grid-column: auto; } }

/* Team cards */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.team .card .media { aspect-ratio: 4/5; }
.role { font: 500 12px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); }

/* Lists */
.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.checklist.two { grid-template-columns: 1fr 1fr; column-gap: 28px; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft); }
.panel { background: var(--bg-alt); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.section--alt .panel { background: #fff; }
.panel h3, .panel h4 { margin-bottom: 16px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Technique blocks */
.technique + .technique { margin-top: clamp(56px, 8vw, 96px); }

/* Mission / vision */
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mv .panel h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* Logos */
.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.logos div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 22px; aspect-ratio: 16/9; }
.logos img { max-height: 64px; width: auto; object-fit: contain; }

/* CTA band */
.cta { position: relative; overflow: hidden; border-radius: var(--radius-lg); color: #fff; background: var(--ink); isolation: isolate; }
.cta > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .45; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(44 51 31 / .95) 0%, rgb(44 51 31 / .6) 100%); }
.cta-body { padding: clamp(36px, 6vw, 80px); max-width: 720px; }
.cta h2 { color: #fff; }
.cta p { color: rgb(255 255 255 / .85); }

/* Forms */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-size: 16px; color: var(--ink);
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); }
.form .btn { justify-self: start; }
.form-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.contact-lines { display: grid; gap: 6px; margin-top: 24px; }

/* Contact actions (replace forms: email / call / book / visit) */
.actions { display: grid; gap: 12px; }
.action {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px;
  background: var(--bg-alt); color: var(--ink); text-decoration: none;
  transition: background .2s, transform .2s;
}
.action:hover { background: var(--sage-soft); color: var(--ink); transform: translateY(-1px); }
.action .icon { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.action svg { width: 20px; height: 20px; fill: none; stroke: var(--sage-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action .text { min-width: 0; }
.action strong { display: block; font-weight: 600; font-size: 16px; }
.action small { display: block; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.action::after { content: "↗"; margin-left: auto; padding-left: 8px; color: var(--muted); }
.action--primary { background: var(--ink); color: #fff; }
.action--primary:hover { background: var(--sage-deep); color: #fff; }
.action--primary small, .action--primary::after { color: rgb(255 255 255 / .7); }
.action--primary .icon { background: var(--sage-soft); }
.contact-lines a { font-size: 1.1rem; text-decoration: none; color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: rgb(255 255 255 / .72); padding: 72px 0 32px; margin-top: var(--section); font-size: 15px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; font-weight: 500; }
.site-footer a { color: rgb(255 255 255 / .85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .btn--primary, .site-footer .btn--primary:hover { color: var(--ink); margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr 1.3fr; gap: 40px; }
.hours dd { white-space: nowrap; }
.footer-brand img { width: 150px; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 18px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.hours dt { color: #fff; }
.hours dd { margin: 0; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); display: grid; place-items: center; }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-base { border-top: 1px solid rgb(255 255 255 / .14); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; }
.footer-base nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer.flush { margin-top: 0; }

/* Responsive */
@media (max-width: 900px) {
  .split, .page-head--split, .mv { grid-template-columns: 1fr; }
  .split.reverse .media { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .checklist.two, .form .row, .footer-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 82vh; }
  .page-head { padding-top: 120px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
