/* Crawl Space Rescue
   Design: a section cut through a house. The hero sits under the floor - dark,
   lit by a work light - then a structural datum line at floor level, and the
   rest of the page comes up into the light. */

:root {
  --ink:      #131E24;   /* wet slate: the space under the floor */
  --ink-soft: #1E2E37;
  --stone:    #41565F;   /* damp concrete: secondary text */
  --mist:     #E7EBE9;   /* cool pale concrete: page ground */
  --barrier:  #FFFFFF;   /* vapor barrier white: surfaces */
  --remedy:   #0E7C66;   /* deep teal-green: actions, remediated */
  --remedy-d: #0A5E4D;
  --line:     #C9D2CF;
  --focus:    #0E7C66;

  --measure: 68ch;
  --shell: 1140px;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.8vw, 1.95rem);
  --step-3:  clamp(1.9rem, 1.55rem + 1.5vw, 2.7rem);
  --step-4:  clamp(2.3rem, 1.7rem + 2.8vw, 4rem);
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: var(--step-0);
  line-height: 1.65;
  text-underline-offset: 0.18em;
}

h1, h2, h3, h4, .wordmark-name, .btn, .nav a, .stat-figure {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.1;
}

h1 { font-size: var(--step-4); margin: 0 0 0.6em; }
h2 { font-size: var(--step-2); margin: 2.4rem 0 0.8rem; }
h3 { font-size: var(--step-1); margin: 1.8rem 0 0.5rem; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--remedy-d); text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:where(a, button, summary, details, input, textarea, select):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 0.7rem 1rem; z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- masthead ---------- */
.masthead { background: var(--ink); color: #fff; }
.masthead-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 78px; flex-wrap: wrap; padding-block: 0.7rem;
}
.wordmark { margin-right: auto; text-decoration: none; color: #fff; }
.wordmark-name { display: block; font-size: 1.22rem; }
.wordmark-sub {
  display: block; font-size: 0.74rem; color: #93A8AE;
  font-family: "Source Serif 4", serif; letter-spacing: 0.01em; margin-top: 2px;
}
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a {
  color: #CFDBDE; text-decoration: none; font-size: 0.9rem; font-weight: 600;
  padding-block: 4px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; border-bottom-color: #4E6A74; }
.nav a.active { color: #fff; border-bottom-color: var(--remedy); }

/* ---------- mobile menu toggle ---------- */
.nav-toggle { display: none; }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top:  7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { top: 0; transform: rotate(-45deg); }

/* ---------- call button docked to the bottom on phones ---------- */
.call-dock { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-size: 0.98rem;
  padding: 0.85rem 1.4rem; border: 2px solid transparent;
}
.btn-call { background: var(--remedy); color: #fff; }
.btn-call:hover { background: #0B6B57; color: #fff; }
.btn-head { padding: 0.6rem 1rem; font-size: 0.92rem; }
.btn-ghost { background: transparent; color: #fff; border-color: #4E6A74; }
.btn-ghost:hover { background: #22343D; color: #fff; }

/* ---------- hero: below the floor ---------- */
.hero {
  background: var(--ink);
  color: #EAF0F1;
  /* a work light entering from the upper left of a dark void */
  background-image:
    radial-gradient(120% 90% at 12% -10%, rgba(226,240,235,0.17) 0%, rgba(226,240,235,0.05) 38%, transparent 68%),
    linear-gradient(180deg, #16242B 0%, #101A20 100%);
  border-bottom: 3px solid var(--remedy);   /* the datum: floor level */
}
.hero-inner { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.hero h1 { color: #fff; max-width: 22ch; }
.hero-lede { font-size: var(--step-1); color: #C6D4D7; max-width: 56ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-meta {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid #2B3C45;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem;
}
.hero-meta p { margin: 0; color: #A8BCC1; font-size: var(--step--1); max-width: 34ch; }
.hero-meta strong { display: block; color: #fff; font-family: Archivo, sans-serif;
  font-size: 1.05rem; letter-spacing: -0.02em; margin-bottom: 2px; }

/* ---------- page image ---------- */
.shot { margin: clamp(1.4rem, 3vw, 2.2rem) 0 0; }
.shot img {
  display: block; width: 100%; height: auto;
  max-height: 440px; object-fit: cover;
  background: var(--line);
  border-bottom: 3px solid var(--remedy);   /* the datum line again */
}
.shot figcaption {
  margin-top: 0.6rem; color: var(--stone);
  font-size: var(--step--1); max-width: 62ch;
}
.wordmark { display: flex; align-items: center; gap: 0.65rem; }
.wordmark-logo { display: block; height: 34px; width: auto; flex: none; }
.wordmark-mark { display: block; height: 37px; width: 37px; flex: none; color: #fff; }
.wordmark > span { display: block; }

/* ---------- generic sections ---------- */
main { display: block; }
main > section, main > .faq { padding-block: clamp(2.2rem, 4vw, 3.4rem); }
main > section > .shell > h2:first-child,
main > section > h2:first-child { margin-top: 0; }
.prose { max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--ink); }

.crumbs { padding: 0.9rem 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0 20px; list-style: none;
  max-width: var(--shell); margin-inline: auto; font-size: var(--step--1); color: var(--stone); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }

/* ---------- service rows (not cards) ---------- */
.rows { border-top: 2px solid var(--ink); margin-top: 1.4rem; }
.row {
  display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 0.4rem 2rem; align-items: baseline;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line);
}
.row:hover { background: rgba(14,124,102,0.045); }
.row h3 { margin: 0; font-size: var(--step-1); }
.row h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.row h3 a:hover, .row h3 a:focus-visible {
  color: var(--remedy-d); text-decoration-color: var(--remedy);
}
.row p { margin: 0; color: var(--stone); }

/* ---------- process: a real sequence, so numbered ---------- */
.steps { counter-reset: step; margin-top: 1.4rem; max-width: 78ch; }
.step {
  counter-increment: step; position: relative;
  padding: 0 0 1.5rem 3.4rem; border-left: 2px solid var(--line); margin-left: 0.9rem;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  content: counter(step); position: absolute; left: -0.95rem; top: 0;
  width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
  background: var(--ink); color: #fff; border-radius: 50%;
  font-family: Archivo, sans-serif; font-size: 0.86rem; font-weight: 700;
}
.step h3 { margin: 0.1rem 0 0.3rem; font-size: 1.08rem; }
.step p { margin: 0; color: var(--stone); }

/* ---------- panels ---------- */
.panel { background: var(--barrier); border: 1px solid var(--line); padding: clamp(1.2rem, 3vw, 2rem); }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.panel table + h3 { margin-top: 1.4rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; align-items: start; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; max-width: var(--measure); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 0.62rem; height: 0.62rem; background: var(--remedy);
}

.signs { list-style: none; padding: 0; margin: 1rem 0 0; }
.signs li { padding: 0.65rem 0 0.65rem 0; border-bottom: 1px solid var(--line); max-width: 62ch; }
.signs li:first-child { border-top: 1px solid var(--line); }

/* ---------- cta band ---------- */
.band { background: var(--ink); color: #fff; }
.band-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem; align-items: center; padding-block: clamp(2rem, 4vw, 3rem); }
.band h2 { margin: 0 0 0.5rem; color: #fff; }
.band p { color: #B9CACE; margin: 0; }
.band-action { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.band-note { font-size: var(--step--1); max-width: 40ch; }

/* ---------- faq ---------- */
.faq .faq-list { border-top: 2px solid var(--ink); max-width: 80ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: Archivo, sans-serif; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::marker, .faq summary::-webkit-details-marker { content: ""; display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 0.85rem;
  font-size: 1.3rem; color: var(--remedy); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 0 1.1rem; color: var(--stone); }

/* ---------- city index ---------- */
.county { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.county h3 { margin: 0 0 0.5rem; font-size: 1.02rem; }
.county-count { font-family: "Source Serif 4", serif; font-weight: 400; color: var(--stone); font-size: 0.86rem; }
.city-list { columns: 4 11rem; column-gap: 1.6rem; list-style: none; padding: 0; margin: 0; }
.city-list li { break-inside: avoid; font-size: var(--step--1); padding: 0.1rem 0; }
.city-list a { text-decoration: none; }
.city-list a:hover { text-decoration: underline; }
.city-plain { color: #35474F; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.4rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.stat { border-top: 2px solid var(--ink); padding-top: 0.7rem; }
.stat-figure { display: block; font-size: var(--step-2); }
.stat-label { color: var(--stone); font-size: var(--step--1); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #B9CACE; margin-top: 3rem; padding-top: 2.6rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.8rem; }
.foot h3 { color: #fff; font-size: 0.95rem; margin: 0 0 0.6rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 0.4rem; font-size: var(--step--1); }
.foot a { color: #CFDBDE; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot p { font-size: var(--step--1); max-width: 34ch; }
.foot-name { font-family: Archivo, sans-serif; font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 0.4rem; }
.foot-phone a { font-family: Archivo, sans-serif; font-size: 1.1rem; color: #fff; }
.foot-base { border-top: 1px solid #2B3C45; margin-top: 2.2rem; padding-block: 1.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-base p { margin: 0; max-width: none; }

/* ---------- contact ---------- */
.phone-lead { margin: 0 0 0.6rem; }
.phone-lead a {
  font-family: Archivo, sans-serif; font-weight: 700; font-size: 1.7rem;
  color: var(--ink); text-decoration-color: var(--remedy); text-decoration-thickness: 2px;
}
.phone-lead a:hover { color: var(--remedy-d); }

/* ---------- contact form ---------- */
.field { margin-bottom: 1rem; max-width: 34rem; }
.field label { display: block; font-family: Archivo, sans-serif; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--stone);
  background: #fff; font: inherit; font-size: 0.98rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
button.btn { cursor: pointer; font-family: Archivo, sans-serif; font-weight: 700; }

table { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--line); }
th { font-family: Archivo, sans-serif; }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .city-list { columns: 2 9rem; }

  /* header is the wordmark on the left and the menu button on the right,
     on one row. The tagline and the header call button come out: the call
     action lives in the docked bar instead. */
  /* wrap is required: the wordmark and the button share row one, and the
     open menu (width 100%, order 3) drops onto row two */
  .masthead-inner {
    min-height: 0; flex-wrap: wrap; gap: 0 1rem;
    justify-content: space-between; padding-block: 0.6rem;
  }
  .wordmark { margin-right: 0; }
  .wordmark .wordmark-sub, .btn-head { display: none; }
  .wordmark .wordmark-name { font-size: 1.1rem; line-height: 1.15; }
  .wordmark-mark, .wordmark-logo { height: 31px; width: 31px; }
  .wordmark { gap: 0.5rem; }

  .nav-toggle {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px;          /* a full touch target */
    background: transparent; border: 1px solid #3A4F58; border-radius: 4px;
    cursor: pointer; padding: 0;
  }
  .nav-toggle:hover { background: #22343D; }

  /* collapsed only where the toggle works; without JS the nav stays visible */
  .js .nav {
    display: none; order: 3; width: 100%;
    flex-direction: column; gap: 0;
    border-top: 1px solid #2B3C45; margin-top: 0.6rem; padding-top: 0.3rem;
  }
  .js .nav[data-open] { display: flex; }
  .js .nav a {
    padding: 0.85rem 0; border-bottom: 1px solid #22343D; border-bottom-width: 1px;
    font-size: 1rem;
  }
  .js .nav a:last-child { border-bottom: 0; }
  .js .nav a.active { border-bottom-color: #22343D; color: #fff; }

  /* without JS, keep the previous wrapped row */
  .nav { order: 3; width: 100%; gap: 0.9rem; }

  .call-dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--remedy); color: #fff; text-align: center;
    text-decoration: none; padding: 0.95rem 1rem;
    font-family: Archivo, sans-serif; font-weight: 700; font-size: 1.02rem;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.28);
  }
  .call-dock:hover, .call-dock:focus-visible { background: #0B6B57; color: #fff; }
  /* so the docked bar never covers the end of the footer */
  body { padding-bottom: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
