/* Compare Water Treatment - comparewatertreatment.com
   SaaS comparison aesthetic: indigo core, white cards, soft shadows,
   pill chips, water-fill stepper. Figtree (UI) + Andada Pro (prose). */

:root {
  --indigo: #4338ca;
  --indigo-deep: #3730a3;
  --indigo-ink: #17153a;
  --wash: #eef0fe;
  --wash-strong: #dfe3fb;
  --bg: #f5f6fb;
  --card: #ffffff;
  --line: #e4e6f3;
  --heading: #1c1a44;
  --body: #494d68;
  --muted: #767a94;
  --green: #15803d;
  --green-wash: #e8f7ee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(23, 21, 58, 0.05), 0 10px 30px -12px rgba(67, 56, 202, 0.14);
  --shadow-lift: 0 2px 4px rgba(23, 21, 58, 0.06), 0 18px 44px -16px rgba(67, 56, 202, 0.22);
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Andada Pro", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }

a { color: var(--indigo); }
a:hover { color: var(--indigo-deep); }

.serif { font-family: var(--font-serif); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 12px;
}

:focus-visible {
  outline: 3px solid rgba(67, 56, 202, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--heading);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand .brand-mark { flex: 0 0 auto; display: block; }

.brand-region {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-deep);
  background: var(--wash);
  border: 1px solid var(--wash-strong);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  text-decoration: none;
  color: var(--body);
  font-weight: 600;
  font-size: 14.5px;
}

.site-nav a:hover { color: var(--indigo); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(67, 56, 202, 0.55);
}

.btn-primary:hover {
  background: var(--indigo-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: #fff;
  color: var(--indigo-deep);
  border-color: var(--wash-strong);
}

.btn-ghost:hover { border-color: var(--indigo); }

.btn-small { padding: 10px 18px; font-size: 14px; }

.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--indigo);
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 150px;
  text-align: center;
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(67, 56, 202, 0.12), transparent 65%),
    radial-gradient(rgba(67, 56, 202, 0.10) 1px, transparent 1.5px);
  background-size: auto, 24px 24px;
  background-color: var(--bg);
}

.hero-inner { max-width: 780px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw + 1rem, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero h1 .accent { color: var(--indigo); }

.hero-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  color: var(--body);
  max-width: 620px;
  margin: 0 auto 26px;
}

.symptom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.symptom-label {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.symptom-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--heading);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.symptom-chip svg { color: var(--indigo); }

.symptom-chip:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
  background: var(--wash);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  font-weight: 800;
}

.section-head p {
  font-family: var(--font-serif);
  color: var(--body);
}

/* ---------- Quiz ---------- */

.quiz-wrap {
  position: relative;
  z-index: 2;
  margin-top: -96px;
  padding-bottom: 8px;
}

.quiz-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  padding: 30px clamp(20px, 4vw, 44px) 36px;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.quiz-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
}

.quiz-steplabel {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Water-fill gauge: the fill rises left to right as steps complete */
.gauge {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
  margin-bottom: 26px;
}

.gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, var(--indigo));
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-ticks {
  position: absolute;
  inset: 0;
  display: flex;
}

.gauge-ticks span {
  flex: 1;
  border-right: 2px solid var(--bg);
}

.gauge-ticks span:last-child { border-right: 0; }

.quiz-step { display: none; }
.quiz-step.active { display: block; animation: stepIn 0.3s ease; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-q {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.4vw + 0.9rem, 1.6rem);
  color: var(--heading);
  margin-bottom: 6px;
}

.quiz-hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chip-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 14px 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  color: var(--heading);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.chip svg { flex: 0 0 auto; color: var(--indigo); }

.chip:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-soft);
}

.chip.selected {
  background: var(--wash);
  border-color: var(--indigo);
  color: var(--indigo-deep);
}

.chip-sub {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
}

.chip.selected .chip-sub { color: var(--indigo-deep); }

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  min-height: 24px;
}

.quiz-back {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quiz-back:hover { color: var(--indigo); }
.quiz-back[hidden] { display: none; }

.town-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.town-row input {
  flex: 1 1 220px;
}

input[type="text"], input[type="tel"] {
  font-family: var(--font-ui);
  font-size: 15.5px;
  color: var(--heading);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus, input[type="tel"]:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-error {
  color: #b42318;
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 0;
}

.form-error a { color: #b42318; }

.form-error[hidden] { display: none; }

/* ---------- Quiz result ---------- */

.result-recap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.recap-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo-deep);
  background: var(--wash);
  border: 1px solid var(--wash-strong);
  border-radius: 999px;
  padding: 5px 12px;
}

.result-system {
  font-size: clamp(1.5rem, 2vw + 0.9rem, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.result-system .accent { color: var(--indigo); }

.result-explain {
  font-family: var(--font-serif);
  font-size: 16.5px;
  color: var(--body);
}

.result-note {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

.provider-card {
  margin-top: 26px;
  background: linear-gradient(180deg, var(--wash), #fff 70%);
  border: 1.5px solid var(--wash-strong);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.provider-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 6px;
}

.provider-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 10px;
}

.provider-facts {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 7px;
}

.provider-facts li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
}

.provider-facts svg { flex: 0 0 auto; margin-top: 2px; color: var(--green); }

.provider-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
}

.result-form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin: 24px 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.form-grid .field-wide { grid-column: 1 / -1; }
.form-grid .field { margin-bottom: 0; }

.form-actions { margin-top: 16px; }

.form-fineprint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
  margin-bottom: 0;
}

.success-panel {
  text-align: center;
  padding: 26px 12px;
}

.success-panel svg { color: var(--green); margin-bottom: 10px; }

.success-panel h4 { font-size: 19px; margin-bottom: 6px; }

.success-panel p { font-size: 15px; margin-bottom: 0; }

.restart-row {
  margin-top: 22px;
  text-align: center;
}

/* ---------- Comparison table ---------- */

.compare-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 960px;
  font-size: 14px;
}

.compare-table th, .compare-table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--heading);
  background: #fafbfe;
  white-space: nowrap;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: 0; }

.compare-table tbody th {
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.compare-table .sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  box-shadow: 1px 0 0 var(--line);
}

.compare-table thead .sticky-col { background: #fafbfe; }

.col-jones {
  background: var(--wash);
}

.compare-table thead .col-jones { background: var(--wash-strong); }

.pick-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--indigo);
  border-radius: 999px;
  padding: 3px 9px;
  margin-top: 5px;
}

.cell-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-weight: 600;
  color: var(--green);
}

.cell-check svg { flex: 0 0 auto; margin-top: 1px; }

.cell-neutral { color: var(--muted); }

.compare-note {
  max-width: 760px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--heading);
}

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

.faq-item summary .faq-icon {
  flex: 0 0 auto;
  color: var(--indigo);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .faq-icon { transform: rotate(45deg); }

.faq-body {
  padding: 0 22px 20px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: var(--body);
}

.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Quote band ---------- */

.quote-band {
  background:
    radial-gradient(900px 400px at 85% -80px, rgba(99, 102, 241, 0.35), transparent 60%),
    linear-gradient(135deg, var(--indigo-ink), #262064);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.quote-copy h2 {
  color: #fff;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem);
  font-weight: 800;
}

.quote-copy .eyebrow { color: #a5b4fc; }

.quote-copy p {
  font-family: var(--font-serif);
  color: #c7cbf2;
  font-size: 16px;
}

.quote-copy .provider-facts li { color: #e3e5fa; }
.quote-copy .provider-facts svg { color: #6ee7a0; }

.quote-copy a { color: #a5b4fc; }

.quote-form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-lift);
}

.quote-form-card h3 { font-size: 18px; margin-bottom: 16px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--indigo-ink);
  color: #b9bcdf;
  margin-top: 80px;
  padding: 48px 0 36px;
  font-size: 14px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-nav a {
  color: #b9bcdf;
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover { color: #fff; }

.footer-provider { font-size: 13.5px; color: #8f93c0; }

.disclosure {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 13px;
  color: #8f93c0;
  max-width: 760px;
}

.copyright {
  margin-top: 14px;
  font-size: 12.5px;
  color: #6f74a6;
}

/* ---------- Methodology page ---------- */

.page-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(900px 380px at 50% -120px, rgba(67, 56, 202, 0.12), transparent 65%),
    var(--bg);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.8rem);
  font-weight: 800;
  max-width: 700px;
}

.page-hero p {
  font-family: var(--font-serif);
  max-width: 640px;
  font-size: 17px;
}

.method-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 4vw, 40px);
  max-width: 820px;
  margin: 0 auto 24px;
}

.method-card h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.method-card p, .method-card li {
  font-family: var(--font-serif);
  font-size: 16px;
}

.method-card ul { padding-left: 22px; margin: 0 0 1em; }

.method-card li { margin-bottom: 8px; }

.rule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 8px 0 16px;
}

.rule-table th, .rule-table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-ui);
}

.rule-table th {
  background: #fafbfe;
  font-weight: 700;
  color: var(--heading);
}

.rule-table td strong { color: var(--indigo-deep); }

.method-callout {
  background: var(--wash);
  border: 1.5px solid var(--wash-strong);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--indigo-deep);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .quote-band { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
  .site-nav .nav-hide-sm { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 52px 0 130px; }
  .section { padding: 56px 0; }
  .chip-grid, .chip-grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .header-row { gap: 12px; }
  .brand-region { display: none; }
  .site-nav { gap: 14px; }
  .quiz-wrap { margin-top: -84px; }
}

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