/* ============================================================
   The Rehab Group — abronxchiropractor.com
   Design system: "Established Institution" editorial
   Fraunces (display) + Archivo (body)
   ============================================================ */

:root {
  --paper: #f7f3ec;
  --paper-deep: #efe9dd;
  --white: #fffdf9;
  --ink: #182b2a;
  --ink-soft: #3d5250;
  --pine: #15564d;
  --pine-deep: #0e3f39;
  --amber: #c8862e;
  --amber-soft: #e8c98f;
  --rust: #b1532f;
  --line: #d8cfbe;
  --shadow: 0 18px 40px -18px rgba(24, 43, 42, 0.25);
  --radius: 14px;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--pine); text-decoration: none; }
main { position: relative; z-index: 1; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--pine-deep);
  color: #e9efe9;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  position: relative; z-index: 60;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; gap: 16px;
}
.topbar a { color: var(--amber-soft); font-weight: 600; }
.topbar .tb-note { opacity: 0.85; }
@media (max-width: 720px) { .topbar .tb-note { display: none; } }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 20px;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand .name {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; color: var(--ink);
}
.brand .tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--pine); font-weight: 600; margin-top: 3px;
}
nav.primary { display: flex; gap: 20px; align-items: center; }
nav.primary a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0; white-space: nowrap;
}
header.site .btn { padding: 10px 20px; font-size: 14px; }
@media (max-width: 1080px) { nav.primary { gap: 15px; } nav.primary a { font-size: 13.5px; } }
nav.primary a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--amber);
  transition: width 0.25s ease;
}
nav.primary a:hover::after, nav.primary a[aria-current="page"]::after { width: 100%; }
nav.primary a[aria-current="page"] { color: var(--ink); }

.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  white-space: nowrap;
  padding: 13px 26px; border-radius: 999px;
  border: 1.5px solid var(--pine);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer; text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-solid { background: var(--pine); color: var(--white); }
.btn-solid:hover { background: var(--pine-deep); }
.btn-ghost { background: transparent; color: var(--pine); }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--white); }
.btn-amber:hover { background: #b2761f; }

/* mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block; width: 26px; height: 2.5px; background: var(--ink);
  margin: 5px 0; transition: 0.3s; border-radius: 2px;
}
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  nav.primary {
    position: fixed; inset: 0; top: 0;
    background: var(--paper);
    flex-direction: column; justify-content: center;
    gap: 30px; font-size: 20px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }
  nav.primary.open { transform: translateX(0); }
  nav.primary a { font-size: 22px; }
  .nav-toggle { position: relative; z-index: 100; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  header .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -180px; top: -120px;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(21,86,77,0.10), transparent 65%);
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 56px 0 48px; } }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--rust); margin-bottom: 22px;
}
.kicker::before { content: ""; width: 34px; height: 1.5px; background: var(--rust); }

.hero h1 { font-size: clamp(42px, 6vw, 78px); margin-bottom: 22px; letter-spacing: -0.02em; line-height: 1.05; }
.hero h1 em { font-style: italic; color: var(--pine); }
.hero p.lede { font-size: 19px; color: var(--ink-soft); max-width: 54ch; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 32px;
  box-shadow: var(--shadow); position: relative;
}
.hero-card::before {
  content: ""; position: absolute; top: -8px; left: 28px; right: 28px;
  height: 8px; border-radius: 8px 8px 0 0; background: var(--amber);
}
.hero-card h3 { font-size: 21px; margin-bottom: 14px; }
.hero-card ul { list-style: none; }
.hero-card li {
  padding: 11px 0 11px 30px; border-bottom: 1px dashed var(--line);
  position: relative; font-size: 15.5px; color: var(--ink-soft);
}
.hero-card li:last-child { border-bottom: none; }
.hero-card li::before {
  content: "✓"; position: absolute; left: 0; top: 10px;
  color: var(--pine); font-weight: 700;
}

/* ---------- Hero media (spine video) ---------- */
.hero-media {
  position: relative; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: #0b1f2a;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(21,86,77,0.18), transparent 55%);
  pointer-events: none;
}
.hero-media video { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 4/4.4; }
.hero-media .media-tag {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  background: rgba(247,243,236,0.92); color: var(--ink);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 999px;
}

/* photo cards — offset color frame for editorial depth */
.photo-frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 16px 16px 0 var(--amber-soft);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.photo-frame:hover img { transform: scale(1.03); }
.hero-media { box-shadow: -16px 16px 0 rgba(21,86,77,0.18); }
.photo-cap { font-size: 13.5px; color: var(--ink-soft); margin-top: 12px; letter-spacing: 0.04em; }

/* detail rows with thumbnails */
.detail.has-img { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: center; padding: 20px 28px 20px 20px; }
.detail.has-img img { width: 250px; height: 165px; object-fit: cover; border-radius: 9px; }
@media (max-width: 620px) {
  .detail.has-img { grid-template-columns: 1fr; }
  .detail.has-img img { width: 100%; height: 160px; }
}

/* card thumbnails */
.card .thumb { width: calc(100% + 56px); margin: -30px -28px 20px; height: 210px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }

/* parallax */
.plx { will-change: transform; }

/* editorial ticker band */
.ticker {
  background: var(--ink); color: var(--amber-soft);
  overflow: hidden; padding: 16px 0; white-space: nowrap;
  font-family: var(--font-display); font-size: 20px; font-style: italic;
}
.ticker .track { display: inline-block; animation: tick 38s linear infinite; }
.ticker span { margin: 0 28px; }
.ticker .sep { color: var(--rust); font-style: normal; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* spine-motif divider */
.spine-divider { display: flex; justify-content: center; padding: 8px 0 0; }
.spine-divider svg { opacity: 0.55; }

/* card image zoom */
.card { overflow: hidden; }
.card .thumb { transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.card:hover .thumb { transform: scale(1.05); }

/* ---------- Trust strip ---------- */
.trust { background: var(--pine-deep); color: var(--paper); padding: 34px 0; }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 820px) { .trust .wrap { grid-template-columns: repeat(2, 1fr); } }
.trust .num { font-family: var(--font-display); font-size: 36px; color: var(--amber-soft); }
.trust .lbl { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.85; }

/* ---------- Sections ---------- */
section.block { padding: 84px 0; }
section.block.tint { background: var(--paper-deep); }
.sec-head { max-width: 680px; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 14px; }
.sec-head p { color: var(--ink-soft); font-size: 18px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .kicker { justify-content: center; }
.sec-head.center .kicker::before { display: none; }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 920px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--paper-deep); color: var(--pine);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
  font-family: var(--font-display);
}
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { font-size: 15.5px; color: var(--ink-soft); }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 14.5px; color: var(--rust); }

/* condition chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 20px; font-size: 15px;
  color: var(--ink-soft); transition: 0.2s;
}
.chip:hover { border-color: var(--pine); color: var(--pine); transform: translateY(-2px); }

/* ---------- Attorney band ---------- */
.attorney-band {
  background: var(--ink); color: var(--paper);
  border-radius: 22px; padding: 60px 56px;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 44px; align-items: center;
  position: relative; overflow: hidden;
}
.attorney-band::before {
  content: "§"; position: absolute; right: -30px; bottom: -90px;
  font-family: var(--font-display); font-size: 380px;
  color: rgba(200, 134, 46, 0.12); line-height: 1;
}
.attorney-band h2 { color: var(--paper); font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 16px; }
.attorney-band p { color: rgba(247, 243, 236, 0.8); font-size: 17px; }
.attorney-band .kicker { color: var(--amber-soft); }
.attorney-band .kicker::before { background: var(--amber-soft); }
@media (max-width: 820px) { .attorney-band { grid-template-columns: 1fr; padding: 44px 30px; } }

/* ---------- Testimonials ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 920px) { .quote-grid { grid-template-columns: 1fr; } }
.quote {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px; position: relative;
}
.quote::before {
  content: "\201C"; font-family: var(--font-display);
  font-size: 64px; color: var(--amber); position: absolute;
  top: 10px; left: 22px; line-height: 1;
}
.quote p { margin-top: 28px; font-size: 16px; font-style: italic; color: var(--ink-soft); }
.quote cite {
  display: block; margin-top: 18px; font-style: normal;
  font-weight: 700; font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--pine);
}
.stars { color: var(--amber); letter-spacing: 3px; margin-top: 6px; font-size: 14px; }

/* ---------- CTA banner ---------- */
.cta-banner { text-align: center; padding: 90px 0; }
.cta-banner h2 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 18px; }
.cta-banner p { color: var(--ink-soft); font-size: 18px; margin-bottom: 32px; }
.cta-banner .phone-big {
  font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px);
  color: var(--pine); display: block; margin-bottom: 26px;
}

/* ---------- Page hero (interior) ---------- */
.page-hero {
  padding: 70px 0 56px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-deep), var(--paper));
}
.page-hero h1 { font-size: clamp(34px, 4.4vw, 54px); margin-bottom: 16px; max-width: 18ch; }
.page-hero p { font-size: 18.5px; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Prose / detail lists ---------- */
.detail-list { display: grid; gap: 18px; }
.detail {
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--pine);
  border-radius: 10px; padding: 26px 28px;
}
.detail h3 { font-size: 20px; margin-bottom: 8px; }
.detail p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Forms ---------- */
form.lead { display: grid; gap: 16px; }
form.lead .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { form.lead .row { grid-template-columns: 1fr; } }
form.lead label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); display: block; margin-bottom: 6px; }
form.lead input, form.lead select, form.lead textarea {
  width: 100%; padding: 14px 16px; font-size: 16px;
  font-family: var(--font-body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 10px; transition: border 0.2s;
}
form.lead input:focus, form.lead select:focus, form.lead textarea:focus {
  outline: none; border-color: var(--pine);
}
.form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 36px; box-shadow: var(--shadow);
}
.form-note { font-size: 13px; color: var(--ink-soft); }

/* ---------- Hours / contact ---------- */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr.closed td { color: var(--ink-soft); opacity: 0.6; }

/* ---------- Insurance columns ---------- */
.ins-cols { columns: 3; column-gap: 36px; }
@media (max-width: 820px) { .ins-cols { columns: 2; } }
@media (max-width: 560px) { .ins-cols { columns: 1; } }
.ins-cols li { list-style: none; padding: 7px 0 7px 24px; position: relative; font-size: 15.5px; color: var(--ink-soft); break-inside: avoid; }
.ins-cols li::before { content: "✓"; position: absolute; left: 0; color: var(--pine); font-weight: 700; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--pine-deep); color: rgba(247, 243, 236, 0.82);
  padding: 64px 0 30px; margin-top: 0; font-size: 15px;
  position: relative; z-index: 1;
}
footer.site .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(247, 243, 236, 0.15);
}
@media (max-width: 820px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h4 {
  font-family: var(--font-display); color: var(--paper);
  font-size: 18px; margin-bottom: 16px; font-weight: 500;
}
footer.site a { color: rgba(247, 243, 236, 0.82); display: block; padding: 4px 0; }
footer.site a:hover { color: var(--amber-soft); }
footer.site .brandline { font-family: var(--font-display); font-size: 22px; color: var(--paper); margin-bottom: 10px; }
footer.site .legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-size: 13px; opacity: 0.7; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* sticky mobile call bar */
.callbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  background: var(--pine-deep); padding: 12px 16px;
  grid-template-columns: 1fr 1fr; gap: 12px;
}
.callbar a { text-align: center; font-weight: 700; font-size: 15px; padding: 12px; border-radius: 10px; }
.callbar .c1 { background: var(--amber); color: var(--white); }
.callbar .c2 { background: rgba(255,255,255,0.12); color: var(--paper); }
@media (max-width: 720px) { .callbar { display: grid; } body { padding-bottom: 70px; } }
