/* Murfreesboro Foundation Repair Pros, site styles
   Design tokens per wiki/components/component-library.md. No web fonts, no build step. */

:root {
  --brand: #C0392B;
  --brand-dark: #a93226;
  --navy: #152244;
  --navy-dark: #0e1830;
  --teal: #2980B9;
  --teal-dark: #2172a4;
  --gold: #C8A040;
  --gold-dark: #a8863a;
  --ink: #1a1a2e;
  --ink-soft: #4a5a6a;
  --line: #e3e8ee;
  --bg: #fff;
  --bg-alt: #f5f7fa;
  --hero-a: #eaf2fb;
  --hero-b: #f7fafd;
  --max: 1160px;
  --radius: 6px;
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.28rem); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
strong { color: var(--navy); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .75em 1.3em; border-radius: var(--radius); border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn--lg { padding: .95em 1.6em; font-size: 1.08rem; }
.btn--red { background: var(--brand); color: #fff; }
.btn--red:hover { background: var(--brand-dark); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-dark); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy-dark); }
.btn--gold:hover { background: var(--gold-dark); color: #fff; }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: .4em 0 1.4em; }

/* ---------- Header: one row ----------
   Colors come from niche-specific tokens (set per site in :root):
   --header-bg (dark niche color; navy for foundation repair, forest green for tree service, etc.)
   --header-accent (Call button / hover color). */
:root { --header-bg: var(--navy); --header-bg-dark: var(--navy-dark); --header-accent: var(--gold); --header-accent-dark: var(--gold-dark); }
.site-header { position: relative; z-index: 40; background: var(--header-bg); color: #fff; box-shadow: 0 2px 10px rgba(14,24,48,.18); }
.header__inner { display: flex; align-items: center; gap: 12px; min-height: 78px; }
.nav__logo { color: #fff; text-decoration: none; font-family: var(--font-head); font-size: 1.12rem; line-height: 1.2; margin-right: auto; padding: 10px 0; }
.nav__logo strong { color: var(--header-accent); display: block; font-size: 1.32rem; letter-spacing: .01em; }
.nav__logo:hover { color: #fff; }
.site-nav { display: flex; align-items: center; }
.nav__links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav__links > li { position: relative; }
.nav__links a { display: block; color: #fff; text-decoration: none; font-weight: 600; padding: 10px 11px; font-size: .97rem; border-radius: var(--radius); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--header-accent); border-radius: 0; }
.nav__links .nav__call { background: var(--header-accent); color: var(--header-bg-dark); font-weight: 800; padding: 11px 16px; margin-left: 8px; border-radius: var(--radius); box-shadow: none; }
.nav__links .nav__call:hover { background: var(--header-accent-dark); color: #fff; box-shadow: none; border-radius: var(--radius); }
.nav__sub { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: 100%; min-width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 10px 24px rgba(21,34,68,.14); display: none; }
.nav__sub a { color: var(--navy); padding: 12px 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
.nav__sub a:hover { background: var(--bg-alt); color: var(--brand); box-shadow: none; }
.nav__has-sub:hover .nav__sub, .nav__has-sub:focus-within .nav__sub { display: block; }

/* Hamburger + tablet Call button: hidden on desktop */
.nav__toggle, .nav__call-compact { display: none; }
.nav__toggle { background: transparent; border: 2px solid rgba(255,255,255,.55); border-radius: var(--radius); width: 46px; height: 42px; padding: 0; cursor: pointer; align-items: center; justify-content: center; }
.nav__bars, .nav__bars::before, .nav__bars::after { display: block; width: 22px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .2s, background .2s; }
.nav__bars { position: relative; }
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
.nav__bars::before { top: -7px; }
.nav__bars::after { top: 7px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }
.nav__call-compact { align-items: center; padding: 9px 14px; border-radius: var(--radius); background: var(--header-accent); color: var(--header-bg-dark); font-weight: 800; text-decoration: none; white-space: nowrap; }
.nav__call-compact:hover { background: var(--header-accent-dark); color: #fff; }

/* Sticky: tablet + desktop (>=601px). Phones (<=600px) never pin the header; the bottom .callbar does that job. */
@media (min-width: 601px) {
  .site-header { position: sticky; top: 0; }
  html { scroll-padding-top: 90px; }
}

/* Collapsed menu (<=1023px): hamburger opens a full-width panel under the header bar. */
@media (max-width: 1023px) {
  .nav__toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: var(--header-bg-dark); max-height: calc(100vh - 78px); overflow-y: auto; box-shadow: 0 12px 24px rgba(0,0,0,.25); }
  .site-nav.is-open { display: block; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 16px; }
  .nav__links a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 0; }
  .nav__links a:hover, .nav__links a[aria-current="page"] { box-shadow: none; color: var(--header-accent); }
  .nav__sub { position: static; display: block; box-shadow: none; border: 0; background: transparent; min-width: 0; }
  .nav__sub a { color: #dbe3f0; padding-left: 20px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 500; }
  .nav__sub a:hover { background: transparent; color: var(--header-accent); }
  .nav__links .nav__call { text-align: center; margin: 14px 0 0; }
}
/* Tablet (601-1023px): Call button stays visible beside the hamburger. */
@media (min-width: 601px) and (max-width: 1023px) {
  .nav__call-compact { display: inline-flex; }
  .nav__links .nav__call { display: none; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); padding: 56px 0 60px; border-bottom: 1px solid var(--line); }
.hero__split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.hero__inner { max-width: 760px; }
.hero__eyebrow { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; padding: 6px 14px; border-radius: 16px; margin-bottom: 18px; }
.hero h1 { text-transform: uppercase; letter-spacing: .01em; }
.hero__lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.hero__checklist { list-style: none; padding: 0; margin: 0 0 1.4em; }
.hero__checklist li { position: relative; padding-left: 1.8em; margin-bottom: .45em; font-weight: 600; }
.hero__checklist li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 900; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero__hours { margin: 14px 0 0; font-size: .95rem; color: var(--ink-soft); }

/* Hero photo (homepage) */
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 14px 34px rgba(21,34,68,.16); }

/* Image band between sections. Landscape images only. */
.band { padding: 18px 0; }
.band img { width: 100%; max-height: 360px; object-fit: cover; object-position: center; border-radius: var(--radius); }

/* Hero side card (legacy) */
.hero__card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: 0 14px 34px rgba(21,34,68,.10); }
.hero__card h2 { font-size: 1.3rem; }
.hero__card ol { padding-left: 1.2em; margin-bottom: 1.1em; }
.hero__card li { margin-bottom: .35em; }
.hero__card .btn { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__lead { max-width: 72ch; }
.section--center h2 { text-align: center; }
.section--center .wrap > p { text-align: center; margin-top: 18px; }
.section--center .wrap > .btn-row { justify-content: center; }
.section h2 + .grid, .section .section__lead + .grid { margin-top: 26px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 24px 24px 18px; }
.section--alt .card { box-shadow: 0 4px 14px rgba(21,34,68,.05); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: .4em; }
.card__link { font-weight: 700; text-decoration: none; color: var(--brand); }
.card__link:hover { color: var(--navy); }
.card--team .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; margin-bottom: 14px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 54px 20px 18px; position: relative; }
.steps li::before { content: counter(step); position: absolute; top: 16px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }

/* Link list */
.linklist { list-style: none; padding: 0; margin: 22px 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.linklist a { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 12px 16px; text-decoration: none; color: var(--navy); font-weight: 600; }
.linklist a:hover { border-left-color: var(--brand); color: var(--brand); }
.linklist__desc { display: block; font-weight: 400; color: var(--ink-soft); font-size: .92rem; margin-top: 2px; }
.more-link { font-weight: 700; text-decoration: none; }

/* Area links */
.area-group { margin-bottom: 30px; }
.area-group h2, .area-group h3 { margin-bottom: .5em; }
.area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.area-link { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; }
.area-link:hover { border-color: var(--brand); }
.area-link__name { display: block; font-weight: 700; color: var(--navy); }
.area-link__city { display: block; font-size: .88rem; color: var(--ink-soft); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 20px 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-weight: 700; }
tbody tr:nth-child(even) td { background: var(--bg-alt); }
tbody tr:last-child td { border-bottom: 0; }
.note { font-size: .92rem; color: var(--ink-soft); }

/* FAQ accordion */
.faq { max-width: 860px; margin: 24px auto 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 700; color: var(--navy); position: relative; font-family: var(--font-head); font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--brand); font-family: var(--font-body); }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 20px 6px; }

/* Article (blog, legal, FAQ page) */
.article { max-width: 800px; }
.article h2 { margin-top: 1.6em; }
.article h3 { margin-top: 1.3em; }
.article > :first-child { margin-top: 0; }
.article .btn-row { margin-top: .2em; }

/* Split */
.split { display: grid; grid-template-columns: 60fr 40fr; gap: 40px; align-items: start; }
.call-card { background: var(--teal); color: #fff; border-radius: var(--radius); padding: 30px 28px; position: sticky; top: 20px; }
.call-card h2, .call-card h3 { color: #fff; }
.call-card p { color: #eef6fc; }
.call-card .btn { width: 100%; font-size: 1.2rem; }
.call-card__phone { font-size: 1.7rem; font-weight: 800; color: #fff; text-decoration: none; display: block; margin: 6px 0 14px; }
.facts-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: var(--radius); padding: 24px; }
.facts-card dl { margin: 0 0 1em; }
.facts-card dt { font-weight: 700; color: var(--navy); }
.facts-card dd { margin: 0 0 .8em; }

/* Phone strip */
.phone-strip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0; text-align: center; }
.phone-strip h2 { margin-bottom: .3em; }
.phone-strip .sub { color: var(--ink-soft); margin-bottom: 1.2em; }
.phone-strip .btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #c9d3e3; padding: 52px 0 0; font-size: .95rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1em; }
.site-footer a { color: #e6ecf5; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 34px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45em; }
.footer-brand { font-family: var(--font-head); color: #fff; font-size: 1.2rem; margin-bottom: .5em; }
.footer-disclosure { font-size: .85rem; color: #9fb0c8; }
.footer-phone { font-size: 1.25rem; font-weight: 800; color: var(--gold) !important; }
.footer-bottom { margin-top: 40px; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 22px; font-size: .88rem; color: #9fb0c8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Mobile sticky call bar */
.callbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__split, .split { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .linklist { grid-template-columns: repeat(2, 1fr); }
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .call-card { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .header__inner { min-height: 68px; }
  .nav__logo { font-size: 1rem; }
  .nav__logo strong { font-size: 1.15rem; }
  .site-nav { max-height: calc(100vh - 68px); }
  .hero { padding: 38px 0 42px; }
  .hero__cta .btn, .phone-strip .btns .btn { width: 100%; }
  .section { padding: 46px 0; }
  .grid--2, .grid--3, .steps, .steps--3, .linklist { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: #fff; font-weight: 800; text-decoration: none;
    padding: 14px 12px; font-size: 1.02rem; box-shadow: 0 -4px 14px rgba(0,0,0,.18);
  }
  .callbar:hover { color: #fff; background: var(--brand-dark); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
