/* ==========================================================================
   Framingham Landscaping Pros — shared stylesheet (all pages)
   Mobile-first. No frameworks. Breakpoints: 560 / 768 / 1024 / 1280px
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --green: #1B4332;
  --green-800: #143326;
  --green-900: #0F2A1F;
  --green-700: #2D6A4F;
  --green-500: #40916C;
  --green-100: #E3EFE8;
  --green-50: #F1F7F3;

  --slate: #2D3748;
  --slate-700: #4A5568;
  --slate-500: #64748B;
  --slate-300: #CBD5E0;
  --slate-200: #E2E8F0;
  --slate-100: #EDF2F7;

  --bg: #F8FAFC;
  --surface: #FFFFFF;

  --amber: #D97706;
  --amber-dark: #B45309;
  --amber-light: #FBBF24;
  --amber-50: #FFFBEB;
  --ink: #111827;
  --error: #C53030;

  --on-dark: #DCE9E1;
  --on-dark-muted: #B7CDBF;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow: 0 12px 32px -14px rgba(27, 67, 50, .28);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .45);

  --container: 1180px;
  --gutter: 16px;
  --header-h: 68px;
  --mobile-bar-h: 64px;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--bg);
  overflow-x: hidden;
  /* room for the sticky mobile CTA bar */
  padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px));
}

img, picture, video { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 {
  color: var(--green);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li + li { margin-top: .35rem; }

a { color: var(--green-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--slate-200); margin: 2rem 0; }

/* ---------- 3. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 820px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 1000;
  background: var(--surface);
  color: var(--green);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.text-center { text-align: center; }
.muted { color: var(--slate-700); }
.small { font-size: .875rem; }
.lead { font-size: 1.1875rem; color: var(--slate-700); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }

.icon { width: 24px; height: 24px; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 20px; height: 20px; }

/* Primary conversion button — amber with dark text for AA contrast */
.btn-cta {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(217, 119, 6, .7);
}
.btn-cta:hover { background: var(--amber-dark); color: #fff; }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; }

.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }

.btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: #fff; color: var(--green); border-color: #fff; }

.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Text link with arrow */
.link-arrow { font-weight: 700; color: var(--green-700); text-decoration: none; }
.link-arrow::after { content: " \2192"; transition: margin .15s ease; }
.link-arrow:hover { color: var(--green); text-decoration: underline; }

/* ---------- 5. Top bar ---------- */
.topbar {
  background: var(--green-900);
  color: var(--on-dark-muted);
  font-size: .875rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}
.topbar-tagline { display: none; margin: 0; }
.topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.topbar-phone:hover { color: var(--amber-light); }
.topbar-phone .icon { width: 16px; height: 16px; }
@media (min-width: 640px) {
  .topbar-tagline { display: block; }
}

/* ---------- 6. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding: 8px 0;
  color: var(--green);
  text-decoration: none;
  line-height: 1.1;
}
.logo:hover { color: var(--green); text-decoration: none; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
}
.logo-mark .icon { width: 22px; height: 22px; }
.logo-text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.0625rem; letter-spacing: -.01em; white-space: nowrap; }
.logo-text small {
  display: none;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate-700);
}

@media (min-width: 480px) {
  .logo-text small { display: block; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--green-50); border-color: var(--green-500); }

.primary-nav { flex-basis: 100%; }
.js .primary-nav { display: none; }
.js .primary-nav.is-open {
  display: block;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 16px;
  display: flex;
  flex-direction: column;
}
.nav-list > li { margin: 0; border-top: 1px solid var(--slate-100); }

.nav-link,
.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  background: none;
  color: var(--slate);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .dropdown-toggle:hover { color: var(--green); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--green); }

.dropdown-toggle::after {
  content: "";
  width: 8px; height: 8px;
  margin: -4px 6px 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.has-dropdown.is-open > .dropdown-toggle::after { transform: rotate(-135deg); margin-top: 4px; }

.dropdown { list-style: none; margin: 0; padding: 0 0 12px 8px; }
.dropdown li { margin: 0; }
.js .dropdown { display: none; }
.js .has-dropdown.is-open > .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--slate-700);
  text-decoration: none;
}
.dropdown a:hover { background: var(--green-50); color: var(--green); }
.dropdown a[aria-current="page"] { color: var(--green); font-weight: 700; }
.dropdown .dropdown-all { color: var(--green); font-weight: 700; }

.nav-cta { border-top: 0 !important; padding-top: 12px; }
.nav-cta .btn { width: 100%; }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; gap: 16px; }
  .primary-nav,
  .js .primary-nav,
  .js .primary-nav.is-open { display: block; flex-basis: auto; max-height: none; overflow: visible; }
  .nav-list { flex-direction: row; align-items: center; gap: 2px; padding: 0; }
  .nav-list > li { position: relative; border: 0; }
  .nav-link,
  .dropdown-toggle { width: auto; padding: 10px 10px; border-radius: var(--radius-sm); font-size: .9375rem; white-space: nowrap; }
  .nav-cta .btn { white-space: nowrap; }
  .logo-text { font-size: 1rem; }
  .logo-text small { display: none; }
  .nav-link:hover,
  .dropdown-toggle:hover,
  .has-dropdown.is-open > .dropdown-toggle { background: var(--green-50); }
  .dropdown-toggle::after { margin-left: 8px; width: 7px; height: 7px; }

  .dropdown,
  .js .dropdown {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
  }
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown,
  .js .has-dropdown.is-open > .dropdown { opacity: 1; visibility: visible; transform: none; }

  .nav-cta { padding: 0 0 0 8px; }
  .nav-cta .btn { width: auto; min-height: 44px; padding: 10px 18px; }
}

@media (min-width: 1280px) {
  .logo-text small { display: block; }
  .nav-link,
  .dropdown-toggle { padding: 10px 12px; font-size: .96875rem; }
}

/* ---------- 7. Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0; font-size: .875rem; color: var(--slate-500); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--slate-300); }
.breadcrumbs a { color: var(--slate-700); }
.breadcrumbs [aria-current="page"] { color: var(--slate); font-weight: 600; }

.on-dark .breadcrumbs,
.on-dark .breadcrumbs li + li::before { color: var(--on-dark-muted); }
.on-dark .breadcrumbs a { color: var(--on-dark); }
.on-dark .breadcrumbs [aria-current="page"] { color: #fff; }

/* ---------- 8. Hero (homepage) & page hero (inner pages) ---------- */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 110% -10%, rgba(217, 119, 6, .16), transparent 60%),
    radial-gradient(900px 600px at -20% 120%, rgba(64, 145, 108, .35), transparent 60%),
    linear-gradient(160deg, var(--green) 0%, var(--green-800) 60%, var(--green-900) 100%);
  color: var(--on-dark);
}
.hero::after,
.page-hero::after {
  /* subtle contour-line texture */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 85% 20%, transparent 0 38px, rgba(255, 255, 255, .035) 38px 39px);
  pointer-events: none;
}
.hero > .container,
.page-hero > .container { position: relative; z-index: 1; }

.hero { padding: 0 0 48px; }
.page-hero { padding: 0 0 44px; }

.hero h1, .page-hero h1 { color: #fff; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-700);
}
.on-dark .eyebrow { color: var(--amber-light); }

.hero-grid { display: grid; gap: 32px; padding-top: 8px; }
.hero-lead,
.page-hero-lead { font-size: 1.1875rem; color: var(--on-dark); max-width: 38em; }

.hero-points { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: #fff; font-weight: 600; }
.hero-points .icon { width: 22px; height: 22px; color: var(--amber-light); margin-top: 2px; }

.hero-actions { margin-bottom: 8px; }

@media (min-width: 1024px) {
  .hero { padding-bottom: 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; padding-top: 24px; }
  .page-hero { padding-bottom: 64px; }
  .page-hero .page-hero-inner { max-width: 800px; padding-top: 16px; }
}

/* ---------- 9. Sections ---------- */
.section { padding: 56px 0; }
.section-white { background: var(--surface); }
.section-tint { background: var(--green-50); }
.section-tight { padding: 40px 0; }
@media (min-width: 768px) {
  .section { padding: 80px 0; }
  .section-tight { padding: 48px 0; }
}

.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--slate-700); font-size: 1.125rem; margin-bottom: 0; }
.section-more { margin: 28px 0 0; }
.section-head.center + * + .section-more,
.section-more.center { text-align: center; }

/* ---------- 10. Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-gap-lg { gap: 40px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-dark { background: var(--green); border-color: var(--green); color: var(--on-dark); }
.card-dark h2, .card-dark h3 { color: #fff; }
.card-dark a:not(.btn) { color: #fff; }

.card-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--green-100);
  color: var(--green);
}

/* Service cards */
.service-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease;
}
.service-card:hover { color: inherit; text-decoration: none; border-color: var(--green-500); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card h3 { font-size: 1.125rem; }
.service-card p { color: var(--slate-700); font-size: .96875rem; }
.service-card .link-arrow { margin-top: auto; padding-top: 8px; }
.service-card:hover .link-arrow { text-decoration: underline; }

/* Feature rows (icon + text) */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .card-icon { margin: 0; }
.feature h3 { font-size: 1.125rem; margin-bottom: .3em; }
.feature p { margin: 0; color: var(--slate-700); }

/* Season cards */
.season-card { border-top: 5px solid var(--green-500); }
.season-card .season-months { display: block; margin-bottom: 8px; font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-dark); }
.season-card ul { padding-left: 1.1rem; color: var(--slate-700); }

/* ---------- 11. Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 800;
}
.steps h3 { font-size: 1.1875rem; }
.steps p { margin: 0; color: var(--slate-700); }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps.steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Vertical timeline (quote timelines) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--green-100); }
.timeline li { position: relative; margin: 0; padding: 0 0 24px 44px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--green-500);
}
.timeline h3 { font-size: 1.0625rem; margin-bottom: .2em; }
.timeline .timeline-when { display: inline-block; margin-bottom: 4px; font-size: .875rem; font-weight: 700; color: var(--amber-dark); }
.timeline p { margin: 0; color: var(--slate-700); }

/* ---------- 12. Area / neighborhood lists ---------- */
.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.area-list li { margin: 0; }
.area-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  color: var(--green);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.area-list a:hover { border-color: var(--green-500); background: var(--green-50); }
.area-list .icon { width: 18px; height: 18px; color: var(--amber-dark); }
@media (min-width: 768px) { .area-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .area-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.area-card { display: flex; flex-direction: column; }
.area-card .link-arrow { margin-top: auto; padding-top: 8px; }
.area-card p { color: var(--slate-700); }

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green);
  font-size: .8125rem;
  font-weight: 700;
}
.badge-amber { background: var(--amber-50); color: var(--amber-dark); }

/* Pill link lists (related services / neighborhoods) */
.pill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { margin: 0; }
.pill-list a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  color: var(--green);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}
.pill-list a:hover { border-color: var(--green-500); background: var(--green-50); }

.related { display: grid; gap: 28px; }
.related h2 { font-size: 1.25rem; }
@media (min-width: 768px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }

/* ---------- 13. Checklists, callouts, prose ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { position: relative; padding-left: 32px; margin: 0 0 10px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B4332' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--amber-50);
  color: var(--slate);
}
.callout p:last-child { margin-bottom: 0; }
.callout-green { border-left-color: var(--green-500); background: var(--green-50); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }

/* Cost / comparison tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--surface); }
.cost-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .96875rem; }
.cost-table th, .cost-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--slate-200); }
.cost-table thead th { background: var(--green); color: #fff; font-weight: 700; }
.cost-table tbody tr:nth-child(even) { background: var(--bg); }
.cost-table tbody tr:last-child td { border-bottom: 0; }
.cost-table caption { padding: 12px 16px; text-align: left; font-size: .875rem; color: var(--slate-500); caption-side: bottom; }
.cost-table-compact { min-width: 0; } /* two-column fact tables fit phones without scrolling */

/* ---------- 14. FAQ accordion ---------- */
.faq { display: grid; gap: 12px; max-width: 840px; }
.faq.center { margin-inline: auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.faq details[open] { border-color: var(--green-500); box-shadow: var(--shadow-sm); }
.faq summary {
  position: relative;
  list-style: none;
  padding: 18px 60px 18px 20px;
  color: var(--green);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; background: var(--amber); color: var(--ink); }
.faq summary:hover { color: var(--green-700); }
.faq-answer { padding: 0 20px 20px; color: var(--slate-700); }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- 15. Quote form ---------- */
.quote-card {
  background: var(--surface);
  color: var(--slate);
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--amber);
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
}
.section .quote-card { box-shadow: var(--shadow); }
.quote-card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.quote-card .quote-sub { color: var(--slate-700); font-size: .96875rem; margin-bottom: 20px; }
@media (min-width: 560px) { .quote-card { padding: 28px; } }

.form-grid { display: grid; gap: 16px; }
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-full { grid-column: 1 / -1; }
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--slate);
  font-size: .9375rem;
  font-weight: 700;
}
.field .req { color: var(--amber-dark); }
.field .optional { color: var(--slate-500); font-weight: 500; font-size: .875rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: 10px;
  background: var(--surface);
  color: var(--slate);
  font: inherit;
  font-size: 1rem; /* 16px prevents iOS zoom */
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D3748' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--slate-500); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate-500); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(64, 145, 108, .22);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--error); }

.form-submit { margin-top: 4px; }
.form-submit .btn { width: 100%; }
.form-note { margin: 12px 0 0; font-size: .8125rem; color: var(--slate-500); text-align: center; }
.form-alt { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--slate-200); text-align: center; font-size: .9375rem; }
.form-alt a { font-weight: 800; color: var(--green); }

/* Quote section layout (copy + form) */
.quote-section-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .quote-section-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
}

/* ---------- 16. Content + sidebar layout ---------- */
.layout-sidebar { display: grid; gap: 32px; }
.layout-sidebar > * { min-width: 0; } /* let wide tables scroll inside .table-wrap instead of stretching the column */
.sidebar { display: grid; gap: 20px; align-content: start; }
@media (min-width: 1024px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
  .sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
}

.mini-steps { list-style: none; counter-reset: mini; margin: 0; padding: 0; }
.mini-steps li { counter-increment: mini; position: relative; margin: 0 0 14px; padding-left: 40px; }
.mini-steps li:last-child { margin-bottom: 0; }
.mini-steps li::before {
  content: counter(mini);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green);
  font-weight: 800;
  font-size: .875rem;
}

.phone-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--green);
  text-decoration: none;
}
.phone-big:hover { color: var(--green-700); text-decoration: underline; }
.card-dark .phone-big { color: var(--amber-light); }

/* ---------- 17. CTA band ---------- */
.cta-band {
  display: grid;
  gap: 20px;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green) 0%, var(--green-900) 100%);
  color: var(--on-dark);
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 44px 48px; }
}

/* ---------- 18. Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: var(--on-dark-muted);
  font-size: .9375rem;
  padding: 56px 0 28px;
}
.site-footer h2 { color: #fff; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 40px; } }

.footer-brand .logo { color: #fff; }
.footer-brand .logo-mark { background: var(--green-700); }
.footer-brand .logo-text small { color: var(--on-dark-muted); }
.footer-brand p { margin: 14px 0; }
.footer-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; color: var(--amber-light) !important; }
.footer-phone .icon { width: 20px; height: 20px; }
.footer-brand .btn { margin-top: 16px; }

.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links li { margin: 0; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8125rem;
}
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }
.footer-bottom li { margin: 0; }
.disclaimer { max-width: 75ch; margin: 24px 0 0; font-size: .8125rem; line-height: 1.6; }
.prototype-notice { max-width: 75ch; margin: 12px 0 0; font-size: .75rem; line-height: 1.5; opacity: .75; font-style: italic; }

/* ---------- 19. Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--slate-200);
  box-shadow: 0 -8px 24px -10px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}
.mobile-cta-bar .btn { min-height: 48px; padding: 10px 6px; font-size: .875rem; gap: 5px; white-space: nowrap; }
.mobile-cta-bar .btn .icon { width: 16px; height: 16px; }
@media (min-width: 400px) {
  .mobile-cta-bar .btn { font-size: .9375rem; }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .mobile-cta-bar { display: none; }
}

/* ---------- 20. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .site-header nav, .nav-toggle, .mobile-cta-bar, .quote-card form { display: none !important; }
  body { padding: 0; background: #fff; }
  .hero, .page-hero { background: none; color: var(--slate); }
  .hero h1, .page-hero h1 { color: var(--green); }
}

/* ---------- Prototype entry warning ---------- */
.gate-open { overflow: hidden; }
.prototype-gate {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow-y: auto;
  padding: 28px 24px;
  border: 0;
  border-top: 6px solid var(--amber);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.prototype-gate::backdrop { background: rgba(15, 42, 31, .72); }
.prototype-gate-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-dark);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.prototype-gate h2 { margin: 0 0 12px; color: var(--green); }
.prototype-gate p, .prototype-gate li { color: var(--slate-700); line-height: 1.6; }
.prototype-gate ul { margin: 0 0 20px; padding-left: 1.2em; }
.prototype-gate li { margin-bottom: 6px; }
.prototype-gate .btn { width: 100%; justify-content: center; }
@media (min-width: 640px) { .prototype-gate { padding: 36px 36px 32px; } }
