/* Clogged Gutters in Nashville — homeowner guide.
   Mobile-first. System fonts. No JavaScript. No third-party requests.
   Organizing idea: a storm-response field card. Rain blue, warm off-white,
   charcoal, and one amber warning accent. One centered page axis. */

:root {
  --paper:      #F7F3EC;
  --paper-lift: #FDFBF7;
  --paper-warm: #F2EDE4;
  --stone:      #ECE9E3;
  --white:      #FFFFFF;

  --ink:        #23272C;
  --ink-soft:   #454C54;
  --muted:      #5F6870;

  --rain:       #2A5F8F;
  --rain-deep:  #1D4568;
  --rain-pale:  #E6EEF5;
  --rain-tint:  #F1F6FA;

  --amber:      #C0700D;
  --amber-deep: #8A4E06;
  --amber-pale: #FBEEDA;

  --line:       #DDD6CB;
  --line-warm:  #E7E1D7;
  --line-blue:  #C7D7E4;

  --wide: 70rem;
  --read: 66ch;
  --pad:  clamp(1.1rem, 4.2vw, 2.25rem);

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1.0625rem;            /* 17px */
  line-height: 1.6;
  overflow-wrap: break-word;
}

@media (min-width: 820px) {
  body { font-size: 1.125rem; line-height: 1.62; }
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--ink); }

a {
  color: var(--rain-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--amber-deep); text-decoration-thickness: 2px; }

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

h1, h2 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .55em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.05rem, 7.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 4.7vw, 2.05rem); font-weight: 700; }

ol, ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--pad);
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------- page menu --- */

.page-menu {
  width: 100%;
  margin: 0 0 clamp(1.8rem, 5vw, 3rem);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.page-menu summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  color: var(--rain-deep);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.page-menu summary::-webkit-details-marker { display: none; }

.menu-icon {
  display: grid;
  gap: 4px;
  width: 1.35rem;
}

.menu-icon i {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}

.page-menu[open] .menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.page-menu[open] .menu-icon i:nth-child(2) { opacity: 0; }
.page-menu[open] .menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.page-menu nav { padding-top: .65rem; }

.page-menu ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .8rem;
}

.page-menu a {
  display: block;
  min-height: 44px;
  padding: .55rem .65rem;
  color: var(--rain-deep);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  border-radius: 8px;
}

.page-menu a:hover {
  color: var(--amber-deep);
  background: rgba(255, 255, 255, .65);
}

@media (min-width: 700px) {
  .page-menu summary { display: none; }
  .page-menu nav { padding-top: 0; }
  .page-menu ul { display: flex; justify-content: space-between; gap: 1rem; }
  .page-menu a { min-height: 0; padding: .35rem .25rem; }
}

/* ------------------------------------------------------------- opening --- */

.opening {
  background: linear-gradient(180deg, var(--paper-lift) 0%, var(--paper-warm) 100%);
  border-top: 5px solid var(--rain-deep);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.4rem, 8vw, 4.5rem) clamp(2rem, 6vw, 3.25rem);
}

.opening__copy { max-width: 46rem; }

.opening h1 { max-width: 15ch; }

.answer {
  font-size: clamp(1.22rem, 4.3vw, 1.6rem);
  line-height: 1.42;
  font-weight: 500;
  color: var(--ink);
  max-width: 40ch;
}

.answer-note {
  max-width: var(--read);
  color: var(--muted);
}

@media (min-width: 900px) {
  .opening .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(20rem, .78fr);
    column-gap: clamp(3rem, 7vw, 6rem);
    row-gap: .85rem;
    align-items: center;
  }

  .page-menu { grid-column: 1 / -1; margin-bottom: 0; }
  .opening__copy { min-width: 0; }
  .answer { max-width: 44ch; }
  .urgency { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* three-level urgency scale — the page's controlling value, stated once */

.urgency {
  margin-top: clamp(1.9rem, 5vw, 2.9rem);
  padding-top: clamp(1.2rem, 3vw, 1.6rem);
  border-top: 1px solid var(--line);
}

.urgency__title {
  margin: 0 0 .9rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.urgency__levels {
  display: grid;
  gap: .7rem;
}

.lvl {
  min-width: 0;
  padding: .95rem 1.05rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-warm);
  border-left: 5px solid var(--rain);
  border-radius: 3px 12px 12px 3px;
}

.lvl--now  { border-left-color: var(--amber); background: var(--amber-pale); border-color: #EFDCBE; }
.lvl--days { border-left-color: var(--rain); }
.lvl--rain { border-left-color: var(--line-blue); }

.lvl__term {
  display: block;
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.25;
  color: var(--ink);
}

.lvl--now .lvl__term { color: var(--amber-deep); }

.lvl__when {
  display: block;
  margin-top: .25rem;
  font-size: .97rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ------------------------------------------------------- section fields --- */

.sec { padding-block: clamp(2.4rem, 7vw, 4rem); }

.sec h2 { scroll-margin-top: 1rem; }

.sec--where     { background: var(--white); border-bottom: 1px solid var(--line-warm); }
.sec--speed     { background: var(--rain-pale); border-bottom: 1px solid var(--line-blue); }
.sec--damage    { background: var(--paper); border-bottom: 1px solid var(--line); }
.sec--scope     { background: var(--white); border-bottom: 1px solid var(--line-warm); }
.sec--companies { background: var(--stone); }

/* section leads claim the full section width */

.lead {
  padding-bottom: clamp(1.2rem, 3vw, 1.7rem);
  margin-bottom: clamp(1.5rem, 3.6vw, 2.2rem);
  border-bottom: 2px solid var(--line-warm);
}

.sec--damage .lead { border-bottom-color: var(--line); }
.sec--companies .lead { border-bottom-color: #DAD5CC; }

.lead h2 { max-width: 24ch; }

.lead__answer {
  max-width: var(--read);
  margin: 0;
  font-size: 1.08em;
  line-height: 1.5;
  color: var(--ink);
}

@media (min-width: 940px) {
  .lead--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: end;
  }
  .lead--split h2 { margin-bottom: 0; max-width: 18ch; }
  .lead--split .lead__answer { max-width: 52ch; }
}

/* ------------------------------------------- symptom-to-action matrix --- */

.matrix { min-width: 0; }

.matrix table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.matrix th, .matrix td { text-align: left; vertical-align: top; }

/* mobile: each row is a complete labeled record */

.matrix thead {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.matrix table, .matrix tbody, .matrix tr, .matrix th, .matrix td {
  display: block;
  width: 100%;
}

.matrix tbody tr {
  margin-bottom: .9rem;
  background: var(--paper-lift);
  border: 1px solid var(--line-warm);
  border-top: 4px solid var(--rain);
  border-radius: 4px 4px 14px 14px;
  overflow: hidden;
}

.matrix tbody tr:last-child { margin-bottom: 0; }

.matrix tbody th, .matrix tbody td {
  padding: .85rem 1rem .95rem;
  border-bottom: 1px solid var(--line-warm);
}

.matrix tbody td:last-child { border-bottom: 0; }

.matrix tbody th::before,
.matrix tbody td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: .22rem;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
}

.matrix tbody th {
  background: var(--rain-tint);
  color: var(--ink);
  font-size: 1.04em;
  font-weight: 650;
  line-height: 1.4;
}

.matrix tbody th::before { color: var(--rain-deep); }

.matrix tbody td { color: var(--ink-soft); font-weight: 400; }

.matrix tbody td.next {
  background: var(--amber-pale);
  color: #4A3B24;
}

.matrix tbody td.next::before { color: var(--amber-deep); }

/* desktop: one cohesive matrix */

@media (min-width: 940px) {
  .matrix table { display: table; table-layout: fixed; }
  .matrix thead {
    position: static;
    display: table-header-group;
    width: auto; height: auto;
    margin: 0; clip: auto; clip-path: none;
    white-space: normal;
    overflow: visible;
  }
  .matrix tbody { display: table-row-group; }
  .matrix tr { display: table-row; margin: 0; border: 0; border-radius: 0; }
  .matrix th, .matrix td { display: table-cell; width: auto; }

  .matrix thead th {
    padding: .8rem .9rem;
    background: var(--rain-deep);
    color: var(--white);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .matrix thead th:first-child { border-radius: 12px 0 0 0; width: 34%; }
  .matrix thead th:nth-child(2) { width: 30%; }
  .matrix thead th:last-child { border-radius: 0 12px 0 0; width: 36%; }

  .matrix tbody th, .matrix tbody td {
    padding: 1rem .9rem 1.1rem;
    border-bottom: 1px solid var(--line-warm);
    border-right: 1px solid var(--line-warm);
    font-size: .99rem;
    line-height: 1.5;
  }

  .matrix tbody th::before, .matrix tbody td::before { content: none; }

  .matrix tbody th {
    background: var(--rain-tint);
    border-left: 1px solid var(--line-blue);
    font-size: 1rem;
  }

  .matrix tbody td.next { background: var(--amber-pale); }

  .matrix tbody tr:last-child th { border-radius: 0 0 0 12px; }
  .matrix tbody tr:last-child td:last-child { border-radius: 0 0 12px 0; }
}

.after {
  max-width: var(--read);
  margin-top: clamp(1.4rem, 3.4vw, 2rem);
}

/* ------------------------------------------------------ how quickly --- */

.sec--speed .panel {
  background: var(--white);
  border: 1px solid var(--line-blue);
  border-left: 6px solid var(--amber);
  border-radius: 4px 18px 18px 4px;
  padding: clamp(1.4rem, 4.5vw, 2.6rem);
  box-shadow: 0 1px 2px rgba(29, 69, 104, .05), 0 16px 34px -28px rgba(29, 69, 104, .55);
}

.sec--speed h2 { max-width: 22ch; }

.lede {
  max-width: var(--read);
  font-size: 1.1em;
  line-height: 1.5;
  color: var(--ink);
}

.sec--speed p { max-width: var(--read); }

.rainfall {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-blue);
  color: var(--ink-soft);
}

/* -------------------------------------------------------- water path --- */

.path {
  padding: clamp(1.1rem, 3.4vw, 1.6rem) clamp(1.1rem, 3.4vw, 1.75rem) clamp(1.3rem, 3.6vw, 1.8rem);
  background: var(--white);
  border: 1px solid var(--line-warm);
  border-radius: 16px;
}

.path__title {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.path__stages { display: grid; gap: 0; }

.stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: .95rem;
  padding: .55rem 0;
}

.stage::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.55rem;
  width: 2px;
  height: calc(100% - 2.1rem);
  background: linear-gradient(180deg, var(--rain) 0%, var(--line-blue) 100%);
}

.stage:last-child::before { display: none; }

.stage__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--rain-pale);
  border: 2px solid var(--rain);
  color: var(--rain-deep);
  font-size: .95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stage:last-child .stage__n {
  background: var(--amber-pale);
  border-color: var(--amber);
  color: var(--amber-deep);
}

.stage__name {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

@media (min-width: 860px) {
  .path__stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 4vw, 3rem);
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    row-gap: .7rem;
    padding: .25rem 0 .35rem;
  }

  .stage::before {
    left: 2.7rem;
    top: 1.02rem;
    width: calc(100% - 2.7rem + clamp(1.5rem, 4vw, 3rem));
    height: 2px;
    background: linear-gradient(90deg, var(--rain) 0%, var(--line-blue) 100%);
  }
}

.prose {
  max-width: var(--read);
  margin-top: clamp(1.5rem, 3.6vw, 2.1rem);
}

.prose__close {
  margin-top: 1.3rem;
  padding-left: 1.1rem;
  border-left: 4px solid var(--amber);
  font-size: 1.06em;
  color: var(--ink);
}

/* -------------------------------------------------- service checklist --- */

.steps { display: grid; gap: 0; }

.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.65rem;
}

.step:last-child { margin-bottom: 0; }

/* connector between consecutive steps — reads as one continuous visit */
.step::after {
  content: "";
  position: absolute;
  left: 1.85rem;
  bottom: -1.65rem;
  width: 2px;
  height: 1.65rem;
  background: var(--line-blue);
}

.step:last-child::after { display: none; }

.step__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: .9rem;
  padding: .9rem 1.05rem .95rem;
  background: var(--amber-pale);
  border-bottom: 1px solid #EFDCBE;
}

.step__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 8px;
  background: var(--amber-deep);
  color: #FFFFFF;
  font-size: .95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.step__action {
  margin: 0;
  align-self: center;
  font-size: 1.05em;
  line-height: 1.35;
  color: var(--ink);
}

.step__action strong { font-weight: 700; }

.step__note {
  margin: 0;
  padding: .95rem 1.05rem 1.1rem;
  color: var(--ink-soft);
}

@media (min-width: 820px) {
  .step__head { padding: 1rem 1.4rem 1.05rem; column-gap: 1.1rem; }
  .step__note { padding: 1.15rem 1.4rem 1.3rem 4.4rem; max-width: 78ch; }
  .step::after { left: 2.35rem; }
}

/* ------------------------------------------------- provider comparison --- */

.company-table { min-width: 0; }

.company-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.company-table thead { display: none; }

.company-table tbody,
.company-table tr,
.company-table th,
.company-table td { display: block; }

.company-table tr {
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--rain-deep);
  border-radius: 4px 4px 16px 16px;
}

.company-table tr:last-child { margin-bottom: 0; }

.company-table th,
.company-table td {
  padding: .9rem 1rem;
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}

.company-table td:last-child { border-bottom: 0; }

.company-table th::before,
.company-table td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: .3rem;
  color: var(--amber-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.provider__name {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--rain-deep);
}

@media (min-width: 900px) {
  .company-table table { display: table; table-layout: fixed; }
  .company-table thead { display: table-header-group; }
  .company-table tbody { display: table-row-group; }
  .company-table tr { display: table-row; margin: 0; border: 0; }
  .company-table th,
  .company-table td { display: table-cell; padding: 1.15rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .company-table th::before,
  .company-table td::before { content: none; }
  .company-table thead th {
    padding: .85rem 1rem;
    color: var(--white);
    background: var(--rain-deep);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .company-table thead th:first-child { width: 21%; border-radius: 12px 0 0 0; }
  .company-table thead th:nth-child(2) { width: 22%; }
  .company-table thead th:nth-child(3) { width: 31%; }
  .company-table thead th:last-child { width: 26%; border-radius: 0 12px 0 0; border-right: 0; }
  .company-table tbody th { background: #EEF3F5; }
  .company-table tbody td:last-child { border-right: 0; }
  .company-table tbody tr:last-child th { border-radius: 0 0 0 12px; }
  .company-table tbody tr:last-child td:last-child { border-radius: 0 0 12px 0; }
}

/* ------------------------------------------------------------- footer --- */

.foot {
  background: var(--ink);
  color: #C8CDD3;
  padding-block: clamp(1.7rem, 4vw, 2.4rem);
}

.foot p { margin: 0; max-width: var(--read); font-size: .95rem; }

/* ------------------------------------------------------------ 404 page --- */

.notfound {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(3.5rem, 12vw, 7rem) var(--pad);
}

.notfound h1 { max-width: 14ch; }

.notfound p { max-width: 52ch; font-size: 1.1em; }

/* --------------------------------------------------------- preferences --- */

@media (prefers-contrast: more) {
  .lvl, .step, .company-table tbody tr, .path, .matrix tbody tr { border-color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
