/* ==========================================================================
   Rockville Home Inspectors — Common Stylesheet
   Simple HTML/CSS stack. Shared across all pages.
   ========================================================================== */

:root {
  --color-navy: #0f2c4d;
  --color-navy-dark: #0a2138;
  --color-blue: #1b6ec2;
  --color-blue-dark: #155a9c;
  --color-accent: #f0a202;
  --color-accent-dark: #d18a00;
  --color-text: #1f2933;
  --color-muted: #5b6770;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fb;
  --color-border: #e2e8f0;
  --color-success: #1d8a4e;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-head: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1140px;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(15, 44, 77, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 44, 77, 0.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}
li {
  margin-bottom: 0.4em;
}

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}
.section--alt {
  background: var(--color-bg-alt);
}
.section__lead {
  max-width: 760px;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 0.6em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-navy-dark);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn--block {
  display: block;
  text-align: center;
}

/* ==========================================================================
   Header (modular partial: partials/header.html)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-navy);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-blue), var(--color-navy));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand__sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  white-space: nowrap;
}
.header-phone:hover {
  text-decoration: none;
  background: var(--color-navy-dark);
}
.nav-toggle {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 80% 20%,
      rgba(27, 110, 194, 0.35),
      transparent 45%
    ),
    radial-gradient(circle at 10% 90%, rgba(240, 162, 2, 0.18), transparent 40%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 72px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero h1 {
  color: #fff;
}
.hero p {
  font-size: 1.15rem;
  color: #d7e2ee;
  max-width: 36ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.hero__trust {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
  color: #c2d2e2;
}
.hero__trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero__card {
  background: #fff;
  color: var(--color-text);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.hero__card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.4em;
}
.hero__card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.hero__card li {
  padding: 8px 0 8px 30px;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}
.hero__card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--color-success);
  font-weight: 800;
}

/* ----- Trust bar ----- */
.trustbar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.trustbar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 36px;
  padding: 18px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.95rem;
}
.trustbar__inner span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid {
  display: grid;
  gap: 24px;
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--color-bg-alt);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.card h3 {
  margin-bottom: 0.4em;
}
.card p {
  color: var(--color-muted);
  margin-bottom: 0;
  font-size: 0.98rem;
}

/* Service block (long form) */
.service-block {
  scroll-margin-top: 90px;
}
.service-block + .service-block {
  margin-top: 18px;
  padding-top: 38px;
  border-top: 1px solid var(--color-border);
}
.service-block h2 {
  margin-bottom: 0.3em;
}

/* Highlighted callout (emergency) */
.callout {
  border-left: 5px solid var(--color-accent);
  background: #fff8e9;
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.callout h2 {
  margin-top: 0;
}
.callout .btn {
  margin-top: 6px;
}

/* ----- Local insights ----- */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.insight {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.insight h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.insight h3 .tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-navy);
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
}
.insight p {
  color: var(--color-muted);
  margin-bottom: 0;
  font-size: 0.97rem;
}

/* ----- Neighborhoods ----- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chips li {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 30px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-navy);
  margin: 0;
}

/* ----- Process steps ----- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  padding: 0;
}
.steps li {
  position: relative;
  padding-top: 56px;
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-blue);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.steps h3 {
  font-size: 1.05rem;
}
.steps p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ----- FAQ ----- */
.faq details {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-navy);
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.4rem;
  color: var(--color-blue);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--color-muted);
  margin-top: 0;
}

/* ----- CTA band ----- */
.cta-band {
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-navy) 100%);
  color: #fff;
  text-align: center;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: #d7e2ee;
  max-width: 600px;
  margin: 0 auto 22px;
}

/* ==========================================================================
   Request inspection form
   ========================================================================== */
.request-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}
.request-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-banner {
  background: #fff8e9;
  border: 1px solid var(--color-accent);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius);
  color: var(--color-navy);
  font-weight: 700;
  padding: 12px 16px;
  margin: 0 0 22px;
}
.form-row {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.form-row--2 {
  grid-template-columns: 1fr 1fr;
}
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.form-row .form-field {
  margin-bottom: 0;
}
.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-navy);
  margin-bottom: 6px;
}
.form-field .req {
  color: #c0392b;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.15);
}
.form-field textarea {
  resize: vertical;
}
.form-note {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 14px 0 0;
}
.request-aside {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
}
.request-aside h3 {
  margin-top: 0;
}
.request-aside ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.request-aside li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.97rem;
}
.request-aside li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--color-success);
  font-weight: 800;
}

/* ==========================================================================
   Footer (modular partial: partials/footer.html)
   ========================================================================== */
.site-footer {
  background: var(--color-navy-dark);
  color: #c2d2e2;
  padding: 56px 0 26px;
}
.site-footer a {
  color: #c2d2e2;
}
.site-footer a:hover {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 8px;
}
.footer-brand .brand {
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 0.95rem;
}
.footer-phone {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 4px 0 10px;
}
.footer-bottom {
  max-width: var(--maxw);
  margin: 34px auto 0;
  padding: 18px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: #8ba3bb;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .grid--3,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .insight-grid,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .request-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .section {
    padding: 48px 0;
  }
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--color-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 18px 20px;
  }
  .grid--3,
  .steps {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row--2 {
    grid-template-columns: 1fr;
  }
  .hero__inner {
    padding: 48px 20px;
  }
}
