/* Missouri Water Experts: expert-curated directory, 2026 edition */

:root {
  --green: #065f46;
  --green-deep: #04442f;
  --green-ink: #0a3b2b;
  --green-soft: rgba(6, 95, 70, 0.08);
  --green-line: rgba(6, 95, 70, 0.28);
  --ivory: #fffdf8;
  --cream: #f7f2e6;
  --card: #ffffff;
  --line: #e7e0cf;
  --text: #26332c;
  --muted: #5d6b63;
  --error: #8f3b25;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Mulish', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

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

[id] { scroll-margin-top: 28px; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: var(--ivory);
  padding: 10px 18px;
  z-index: 50;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus { left: 12px; top: 12px; }

/* Masthead */

.masthead {
  border-top: 5px solid var(--green);
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--text);
}

.brand-seal { width: 42px; height: 42px; flex: none; }

.brand-name {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.15;
  color: var(--green-deep);
}

.brand-tag {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }

.site-nav a {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--green); }

/* Shared type */

.kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}

h1, h2, h3 { font-family: var(--serif); color: var(--green-ink); }

.lede {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 660px;
  margin: 0;
}

/* Hero */

.hero {
  padding: 72px 0 58px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 700;
  line-height: 1.18;
  max-width: 780px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 6px;
  border: 1.5px solid var(--green);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-solid { background: var(--green); color: var(--ivory); }
.btn-solid:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); }

/* Find-by-need band */

.need-bar { background: var(--green); }

.need-bar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 15px;
  padding-bottom: 15px;
}

.need-label {
  color: rgba(255, 253, 248, 0.75);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.need-links { display: flex; gap: 10px; flex-wrap: wrap; }

.need-links a {
  padding: 7px 17px;
  border: 1px solid rgba(255, 253, 248, 0.45);
  border-radius: 999px;
  color: var(--ivory);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.need-links a:hover { background: var(--ivory); color: var(--green); }

/* Directory */

.directory { padding: 64px 0 56px; }

.section-head { margin-bottom: 32px; max-width: 760px; }

.section-head h2 {
  position: relative;
  margin: 8px 0 12px;
  padding-bottom: 15px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.25;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: var(--green);
}

.section-sub { margin: 0; color: var(--muted); font-size: 0.97rem; }

.listing {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr 230px;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px;
  margin-bottom: 16px;
}

.listing-featured {
  border: 2px solid var(--green);
  box-shadow: 0 14px 34px rgba(6, 95, 70, 0.12);
  margin-top: 30px;
  margin-bottom: 34px;
  padding-top: 30px;
}

.pick-seal {
  position: absolute;
  top: -26px;
  right: 20px;
  width: 122px;
  height: 122px;
  transform: rotate(8deg);
  filter: drop-shadow(0 8px 14px rgba(4, 68, 47, 0.35));
  pointer-events: none;
}

.listing-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--green);
  background: var(--cream);
  border: 1px solid var(--green-line);
  flex: none;
}

.avatar-featured {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
}

.listing-flag {
  margin: 0 0 7px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.listing-name { margin: 0 0 11px; font-size: 1.45rem; line-height: 1.2; }

.tag-row {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 13px;
}

.tag-row li {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(6, 95, 70, 0.22);
  padding: 4px 11px;
  border-radius: 999px;
}

.listing-desc { margin: 0 0 12px; font-size: 0.96rem; }

.listing-coverage { margin: 0; font-size: 0.88rem; color: var(--muted); }

.listing-coverage strong {
  color: var(--green-deep);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  margin-right: 6px;
}

.proof-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 13px 0 0;
  margin: 14px 0 0;
  border-top: 1px dashed var(--line);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--green-deep);
}

.proof-row li::before { content: "\2713\00a0"; color: var(--green); }

.listing-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.listing-featured .listing-actions {
  justify-content: flex-start;
  padding-top: 110px;
}

.listing-site {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.listing-note {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}

/* Needs */

.needs {
  padding: 64px 0;
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.need-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.need-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px;
}

.need-card h3 {
  margin: 0 0 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
}

.need-card p { margin: 0 0 14px; font-size: 0.93rem; }

.need-fit {
  background: var(--green-soft);
  border: 1px solid rgba(6, 95, 70, 0.15);
  border-radius: 6px;
  padding: 13px 15px;
  font-size: 0.9rem;
  margin-bottom: 0 !important;
}

.need-fit strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green-deep);
  text-transform: uppercase;
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  font-weight: 800;
}

.need-fit a { color: var(--green); font-weight: 700; }

/* Callback form */

.callback { padding: 72px 0; background: var(--green); }

.callback-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--ivory);
  border: 1px solid rgba(6, 95, 70, 0.2);
  border-radius: 10px;
  padding: 40px 42px;
  box-shadow: 0 24px 60px rgba(3, 42, 30, 0.35);
}

.callback-card h2 {
  margin: 4px 0 10px;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  line-height: 1.3;
}

.callback-sub { margin: 0 0 24px; color: var(--muted); font-size: 0.95rem; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfc7b2;
  border-radius: 6px;
  background: #fffefb;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.btn-wide { width: 100%; padding: 14px; font-size: 0.95rem; }

.btn-wide:disabled { opacity: 0.7; cursor: default; }

.form-status { display: none; margin: 14px 0 0; font-size: 0.92rem; font-weight: 700; }

.form-status.ok {
  display: block;
  color: var(--green-deep);
  background: var(--green-soft);
  border: 1px solid rgba(6, 95, 70, 0.25);
  padding: 12px 14px;
  border-radius: 6px;
}

.form-status.err {
  display: block;
  color: var(--error);
  background: rgba(143, 59, 37, 0.07);
  border: 1px solid rgba(143, 59, 37, 0.3);
  padding: 12px 14px;
  border-radius: 6px;
}

.form-status a { color: inherit; font-weight: 800; }

.form-alt { margin: 16px 0 0; text-align: center; font-size: 0.88rem; color: var(--muted); }

.form-alt a { color: var(--green); font-weight: 800; }

/* FAQ */

.faq { padding: 64px 0 72px; }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item:first-of-type { border-top: 1px solid var(--line); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 2px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--green);
}

.faq-item[open] summary::after { content: "\00d7"; }

.faq-item p {
  margin: 0;
  padding: 0 2px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 800px;
}

.faq-item p a { color: var(--green); font-weight: 700; }

/* Methodology page */

.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  max-width: 720px;
}

.method { padding: 56px 0 72px; }

.method > .wrap > p {
  max-width: 800px;
  margin: 0 0 18px;
  font-size: 0.98rem;
}

.method h2 {
  position: relative;
  margin: 44px 0 18px;
  padding-bottom: 13px;
  font-size: 1.5rem;
}

.method h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  background: var(--green);
}

.criteria {
  list-style: none;
  counter-reset: crit;
  padding: 0;
  margin: 34px 0 10px;
  display: grid;
  gap: 16px;
}

.criteria li {
  counter-increment: crit;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px 24px 88px;
}

.criteria li::before {
  content: counter(crit, decimal-leading-zero);
  position: absolute;
  left: 26px;
  top: 22px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--green);
}

.criteria h3 { margin: 0 0 8px; font-size: 1.15rem; }

.criteria p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.editorial-note {
  margin: 30px 0 10px;
  background: var(--cream);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 26px 30px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.85;
  color: #34423b;
  max-width: 820px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--green);
  border-radius: 10px;
  padding: 34px 38px;
  margin: 48px 0 8px;
}

.cta-band h2 { margin: 0; padding: 0; color: var(--ivory); font-size: 1.35rem; }

.cta-band h2::after { display: none; }

.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-invert { background: var(--ivory); color: var(--green); border-color: var(--ivory); }
.btn-invert:hover { background: var(--cream); border-color: var(--cream); }

.btn-ghost-invert { background: transparent; color: var(--ivory); border-color: rgba(255, 253, 248, 0.7); }
.btn-ghost-invert:hover { background: rgba(255, 253, 248, 0.12); }

/* Footer */

.site-foot {
  background: var(--green-deep);
  color: rgba(255, 253, 248, 0.88);
  padding: 46px 0 40px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ivory);
}

.foot-seal { width: 30px; height: 30px; flex: none; }

.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }

.foot-nav a {
  color: rgba(255, 253, 248, 0.85);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.foot-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.foot-disclosure {
  margin: 0 0 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 253, 248, 0.18);
  max-width: 780px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: rgba(255, 253, 248, 0.72);
}

.foot-copy { margin: 0; font-size: 0.8rem; color: rgba(255, 253, 248, 0.55); }

/* Responsive */

@media (max-width: 860px) {
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 12px; }

  .hero { padding: 52px 0 44px; }

  .listing { grid-template-columns: 56px 1fr; padding: 24px 22px; }

  .listing-avatar { width: 56px; height: 56px; font-size: 1.15rem; }

  .listing-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 18px;
  }

  .listing-featured .listing-actions { padding-top: 18px; }

  .pick-seal { width: 94px; height: 94px; top: -20px; right: 12px; }

  .listing-featured { padding-top: 34px; }

  .listing-featured .listing-flag { max-width: calc(100% - 92px); }

  .need-grid { grid-template-columns: 1fr; }

  .callback-card { padding: 32px 24px; }

  .cta-band { padding: 28px 24px; }

  .criteria li { padding: 22px 22px 22px 74px; }

  .criteria li::before { left: 20px; }
}

@media (max-width: 520px) {
  .wrap { padding-left: 18px; padding-right: 18px; }

  .listing { grid-template-columns: 1fr; }

  .listing-avatar { width: 52px; height: 52px; }

  .pick-seal { width: 86px; height: 86px; top: -18px; right: 8px; }

  .hero-actions .btn { width: 100%; }

  .listing-actions .btn { width: 100%; }

  .listing-site { text-align: left; }
}
