/*
  Design direction: "Prairie limestone and storm slate"
  Palette: limestone #f5f0e7 (page), chalk #fffdf8 (panels), storm slate #1f3442 (header, footer, bands),
           ink #1d2327 (text), river blue #1f5a73 (links), rust #b4451b (call actions only), rule #d9cfbf.
  Type pairing: transitional serif headings (Charter / Cambria / Georgia stack) over a system sans body.
  Spacing scale: 0.25rem steps, fluid section rhythm via clamp(); content measure 68ch.
  Shape language: near-square corners (3px), thick 6px left rules on callouts, a shingle-course
  stripe under the header, flat panels with hairline borders instead of shadows.
*/
:root {
  --limestone: #f5f0e7;
  --chalk: #fffdf8;
  --slate: #1f3442;
  --slate-2: #2a4556;
  --ink: #1d2327;
  --muted: #5b6166;
  --river: #1f5a73;
  --rust: #b4451b;
  --rust-dark: #a63f17;
  --rule: #d9cfbf;
  --sand: #e9e1d3;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.7vw, 2.6rem);
  --gap: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --section: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --radius: 3px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--limestone); color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--sans);
  padding-bottom: 4.5rem; /* room for the phone call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--river); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; color: var(--slate); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--slate); text-wrap: balance; }
h1 { font-size: var(--step-3); margin: 0.4rem 0 1rem; }
h2 { font-size: var(--step-2); margin: 2.4rem 0 0.75rem; }
h3 { font-size: var(--step-1); margin: 1.8rem 0 0.5rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gap), 72rem); margin-inline: auto; }
.skip { position: absolute; left: 0.5rem; top: -3rem; background: var(--chalk); padding: 0.6rem 1rem; z-index: 20; }
.skip:focus { top: 0.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.35rem; border-radius: var(--radius);
  font: 700 1.05rem/1.2 var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-call { background: var(--rust); color: #fff; }
.btn-call:hover { background: var(--rust-dark); color: #fff; text-decoration: underline; }
.btn-call::before {
  content: ""; inline-size: 1.05em; block-size: 1.05em; flex: none;
  background: currentColor;
  -webkit-mask: url("../img/phone.svg") center / contain no-repeat;
  mask: url("../img/phone.svg") center / contain no-repeat;
}
.btn-ghost { background: transparent; color: var(--slate); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--slate); }

/* Header */
.site-header { background: var(--slate); color: #fff; position: sticky; top: 0; z-index: 10; }
.site-header::after {
  content: ""; display: block; block-size: 6px;
  background: repeating-linear-gradient(90deg, var(--rust) 0 34px, var(--rust-dark) 34px 36px, #c86a3f 36px 70px, var(--rust-dark) 70px 72px);
}
.header-row { display: flex; align-items: center; gap: 0.75rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font: 700 1.05rem/1.1 var(--serif); margin-inline-end: auto; padding-block: 0.4rem; }
.brand:hover { color: var(--sand); }
.site-nav { order: 3; }
.menu-toggle {
  min-height: 44px; min-width: 44px; padding: 0.5rem 0.9rem; background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.5); border-radius: var(--radius); font: 600 1rem var(--sans); cursor: pointer;
}
.menu-toggle:hover { border-color: #fff; }
.site-menu { list-style: none; margin: 0; padding: 0; display: none; }
.site-menu.is-open {
  display: block; position: absolute; inset-inline: 0; top: 100%;
  background: var(--slate-2); padding: 0.5rem var(--gap) 1rem; border-bottom: 4px solid var(--rust);
}
.site-menu a { display: block; color: #fff; text-decoration: none; padding: 0.75rem 0.25rem; min-height: 44px; font-weight: 600; }
.site-menu a:hover { text-decoration: underline; }
.site-menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.35em; }
.btn-head { display: none; }

/* Hero */
.hero { background: var(--chalk); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; gap: var(--gap); padding-block: clamp(1.5rem, 1rem + 2vw, 3rem); }
.overview { font-size: var(--step-1); line-height: 1.55; color: var(--ink); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.hero-actions .btn { font-size: 1.15rem; min-height: 56px; padding-inline: 1.6rem; }
.trust { margin: 0; color: var(--muted); font-size: 0.95rem; }
.hero-media img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; inline-size: 100%; }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.25rem; color: var(--rule); }
.crumbs a, .crumbs span { display: inline-block; padding-block: 0.6rem; }

/* Content */
.content-grid { display: grid; gap: var(--gap); padding-block: var(--section); }
.prose { max-width: 68ch; min-width: 0; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--rust); }
.figure { margin: 2rem 0; }
.figure img { border-radius: var(--radius); }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.note { border-inline-start: 6px solid var(--river); background: var(--chalk); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.note > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--rule); background: var(--chalk); border-radius: var(--radius); }
.table-wrap:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; inline-size: 100%; min-inline-size: 34rem; font-size: 0.95rem; }
caption { text-align: start; font: 700 1rem var(--serif); color: var(--slate); padding: 0.85rem 1rem 0.5rem; }
th, td { text-align: start; vertical-align: top; padding: 0.65rem 1rem; border-top: 1px solid var(--rule); }
thead th { background: var(--sand); color: var(--slate); font-weight: 700; }
tbody th { font-weight: 600; color: var(--slate); }

/* CTA band */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; background: var(--slate); color: #fff; padding: 1.25rem 1.5rem; margin: 2.5rem 0; border-radius: var(--radius); border-inline-start: 6px solid var(--rust); }
.cta-band p { margin: 0; flex: 1 1 18rem; }
.cta-end { background: var(--slate); color: #fff; padding-block: var(--section); text-align: center; }
.cta-end h2 { color: #fff; margin-top: 0; }
.cta-end p { max-width: 52ch; margin-inline: auto; margin-bottom: 1.5rem; color: var(--sand); }

/* FAQ */
.faq { margin-top: 3rem; border-top: 2px solid var(--slate); }
.faq-item { border-bottom: 1px solid var(--rule); padding-bottom: 0.5rem; }
.faq-item h3 { font-size: 1.15rem; }

/* Related links */
.related { display: grid; gap: 1.5rem; align-content: start; }
.links { background: var(--chalk); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; }
.links h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.links ul { list-style: none; margin: 0; padding: 0; }
.links a { display: block; padding: 0.55rem 0; min-height: 44px; border-bottom: 1px solid var(--sand); }

/* Cards and area grid */
.cards { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.card { background: var(--chalk); border: 1px solid var(--rule); border-top: 4px solid var(--slate); padding: 1rem 1.15rem; border-radius: var(--radius); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.area-grid { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.25rem 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
.area-grid a { display: block; padding: 0.6rem 0; min-height: 44px; font-weight: 600; }

/* Footer */
.site-footer { background: #17262f; color: var(--sand); padding-block: var(--section) 2rem; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: var(--gap); }
.footer-brand { font: 700 1.2rem var(--serif); color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding-block: 0.5rem; }
.footer-call { font-weight: 700; display: inline-block; padding-block: 0.5rem; }
.disclaimer { border-top: 1px solid var(--slate-2); padding-top: 1.25rem; margin-top: 2rem; font-size: 0.85rem; line-height: 1.6; }
.copy { font-size: 0.85rem; color: #c9c0b1; }

/* Phone call bar */
.call-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 9; background: var(--slate); padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)); border-top: 3px solid var(--rust); }
.btn-bar { inline-size: 100%; min-height: 52px; }

/* Call dialog (desktop only, opened from script with showModal) */
.call-dialog {
  max-inline-size: min(30rem, 100% - 2rem); border: 0; border-radius: var(--radius); padding: 1.75rem;
  background: var(--chalk); color: var(--ink); border-top: 6px solid var(--rust);
  opacity: 0; transform: translateY(10px) scale(0.96);
  transition: opacity 200ms ease, transform 200ms ease, overlay 200ms ease, display 200ms ease;
  transition-behavior: allow-discrete;
}
.call-dialog[open] { opacity: 1; transform: none; }
@starting-style { .call-dialog[open] { opacity: 0; transform: translateY(10px) scale(0.96); } }
.call-dialog h2 { margin-top: 0; }
.call-dialog form { margin-top: 0.75rem; }
.call-dialog::backdrop {
  background: rgba(23, 38, 47, 0); overflow: hidden; overscroll-behavior: contain;
  transition: background-color 200ms ease, overlay 200ms ease, display 200ms ease;
  transition-behavior: allow-discrete;
}
.call-dialog[open]::backdrop { background: rgba(23, 38, 47, 0.6); }
@starting-style { .call-dialog[open]::backdrop { background: rgba(23, 38, 47, 0); } }
dialog:modal { overscroll-behavior: contain; }

/* Wider screens */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .call-bar { display: none; }
  .menu-toggle { display: none; }
  .site-nav { order: 0; }
  .site-menu { display: flex; gap: 0.25rem; }
  .site-menu a { padding: 0.6rem 0.75rem; }
  .btn-head { display: inline-flex; min-height: 44px; padding: 0.5rem 1rem; font-size: 1rem; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1100px) {
  .content-grid { grid-template-columns: minmax(0, 68ch) minmax(15rem, 1fr); justify-content: space-between; }
  .related { position: sticky; top: 6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn-call, .cta-band, .card { border: 2px solid CanvasText; }
  .site-menu a[aria-current="page"] { text-decoration-color: CanvasText; }
}
