/* ==========================================================================
   Denver Water Restoration — brand stylesheet
   Palette: Deep Water Navy #0A2540 | Rapid Blue #1273B5 | Mist #EAF4FB
            Emergency Orange #EA580C | Slate text #33475B
   ========================================================================== */

:root {
  --navy: #0a2540;
  --navy-800: #10345c;
  --blue: #1273b5;
  --blue-dark: #0d5c92;
  --mist: #eaf4fb;
  --mist-deep: #d6e9f7;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --ink: #1f2f3f;
  --slate: #33475b;
  --muted: #5b7186;
  --line: #dbe7f0;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(10, 37, 64, 0.10);
  --shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--navy); line-height: 1.22; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

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

.section { padding: 72px 0; }
.section-alt { background: var(--mist); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); margin-top: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-emergency {
  background: var(--orange);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}
.btn-emergency:hover { background: var(--orange-dark); }

.btn-primary { background: var(--blue); color: #fff !important; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--white) !important;
  border: 2px solid rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.btn-block { width: 100%; }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(10, 37, 64, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo-text { line-height: 1.1; }
.logo-text .logo-name { font-weight: 800; font-size: 1.05rem; color: var(--navy); display: block; letter-spacing: -0.01em; }
.logo-text .logo-tag { font-size: 0.7rem; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: var(--slate); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--blue); text-decoration: none; }
.main-nav a.active { color: var(--blue); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { text-align: right; line-height: 1.2; display: block; text-decoration: none !important; }
.header-phone .ph-label { font-size: 0.68rem; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.07em; display: block; }
.header-phone .ph-number { font-size: 1.12rem; font-weight: 800; color: var(--navy); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-800) 55%, #14507e 100%);
  color: #e8f2fa;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -2px 0;
  height: 90px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 90" preserveAspectRatio="none"><path d="M0,60 C240,100 480,10 720,35 C960,60 1200,90 1440,45 L1440,90 L0,90 Z" fill="white"/></svg>') no-repeat bottom / 100% 100%;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 70px 20px 120px;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .hero-sub { font-size: 1.15rem; color: #c9ddef; margin-bottom: 1.6rem; max-width: 540px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 1.6rem; }
.hero-points { list-style: none; display: grid; gap: 9px; font-size: 0.98rem; }
.hero-points li { display: flex; align-items: center; gap: 10px; color: #d9e8f5; }
.hero-points svg { flex: none; }

/* Lead form card */
.form-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  color: var(--ink);
}
.form-card h2, .form-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.form-card .form-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }

.lead-form { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--ink);
  background: #fbfdff;
  transition: border-color 0.12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 115, 181, 0.14);
}
.field textarea { resize: vertical; min-height: 84px; }
.form-note { font-size: 0.78rem; color: var(--muted); text-align: center; }
.form-status { font-size: 0.9rem; font-weight: 600; text-align: center; display: none; }
.form-status.error { display: block; color: #b91c1c; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--white); padding: 8px 0 40px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.trust-item { padding: 10px; }
.trust-item .t-icon {
  width: 52px; height: 52px;
  margin: 0 auto 10px;
  background: var(--mist);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.trust-item strong { display: block; color: var(--navy); font-size: 1rem; }
.trust-item span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .card-icon {
  width: 48px; height: 48px;
  background: var(--mist);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; color: var(--muted); }
.card a.card-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 0.92rem; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { text-align: center; padding: 0 6px; }
.step .step-num {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: 0.86rem; color: var(--muted); }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .split-media {
  background: linear-gradient(145deg, var(--mist) 0%, var(--mist-deep) 100%);
  border-radius: 16px;
  padding: 34px;
  display: flex; align-items: center; justify-content: center;
}
.check-list { list-style: none; display: grid; gap: 12px; margin-top: 18px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { flex: none; margin-top: 4px; }
.check-list strong { color: var(--navy); }

/* ---------- Service areas ---------- */
.area-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.area-tag {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--blue);
  font-weight: 400;
  flex: none;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--slate); font-size: 0.97rem; }

/* ---------- Emergency CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #123c66 100%);
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #c9ddef; max-width: 620px; margin: 0 auto 26px; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #a9c3d8; padding: 56px 0 0; font-size: 0.93rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: #a9c3d8; }
.site-footer a:hover { color: #fff; }
.footer-about p { margin-top: 12px; line-height: 1.6; }
.footer-phone { font-size: 1.25rem; font-weight: 800; color: #fff !important; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Mobile sticky call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 70;
  background: var(--orange);
  box-shadow: 0 -4px 16px rgba(10, 37, 64, 0.25);
}
.mobile-call-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 10px;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.98rem;
  white-space: nowrap;
  text-decoration: none !important;
}
.mobile-call-bar svg { flex: none; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }

/* ---------- Article / prose ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-800) 70%, #14507e 100%);
  color: #fff;
  padding: 54px 0 58px;
  text-align: center;
}
.page-hero h1 { color: #fff; max-width: 860px; margin: 0 auto 12px; }
.page-hero p { color: #c9ddef; max-width: 680px; margin: 0 auto; font-size: 1.08rem; }
.page-hero .meta { color: #8fb3d1; font-size: 0.88rem; margin-top: 14px; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin: 2.4rem 0 0.9rem; }
.prose h3 { margin: 1.8rem 0 0.7rem; }
.prose p { margin-bottom: 1.1rem; color: var(--slate); }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.4rem; color: var(--slate); }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--navy); }
.prose blockquote {
  border-left: 4px solid var(--blue);
  background: var(--mist);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 1.4rem 0;
  color: var(--slate);
}

.table-wrap { overflow-x: auto; margin: 1.4rem 0; border-radius: var(--radius); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; }
table.data th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--slate); }
table.data tr:nth-child(even) td { background: #f7fbfe; }

.callout {
  background: var(--mist);
  border: 1px solid var(--mist-deep);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 1.6rem 0;
}
.callout.emergency { background: #fff3ec; border-color: #fbd7c0; }
.callout h3 { margin: 0 0 8px; }
.callout p { margin-bottom: 0.6rem; }
.callout .btn { margin-top: 6px; }

/* ---------- Blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card .post-banner {
  height: 130px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--mist) 0%, var(--mist-deep) 100%);
}
.post-card .post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card .post-date { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 8px; }
.post-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--navy); }
.post-card p { font-size: 0.9rem; color: var(--muted); flex: 1; }
.post-card .read-more { margin-top: 12px; font-weight: 700; font-size: 0.9rem; }

/* ---------- Calculator ---------- */
.calc-layout { display: grid; grid-template-columns: 1fr 0.9fr; gap: 34px; align-items: start; }
.calc-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.calc-panel fieldset { border: none; margin-bottom: 22px; }
.calc-panel legend { font-weight: 800; color: var(--navy); font-size: 1rem; margin-bottom: 10px; }
.radio-cards { display: grid; gap: 10px; }
.radio-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.radio-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card label {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
  color: var(--slate);
  transition: all 0.12s ease;
  height: 100%;
}
.radio-card label small { display: block; font-weight: 500; color: var(--muted); font-size: 0.76rem; margin-top: 2px; }
.radio-card input:checked + label {
  border-color: var(--blue);
  background: var(--mist);
  color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 115, 181, 0.12);
}
.range-field output { font-weight: 800; color: var(--blue); font-size: 1.05rem; }
input[type="range"] { width: 100%; accent-color: var(--blue); margin-top: 8px; }

.calc-result {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-800) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  position: sticky;
  top: 96px;
  text-align: center;
}
.calc-result h2 { color: #c9ddef; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.calc-price { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.02em; }
.calc-detail { color: #a9c3d8; font-size: 0.9rem; margin: 14px 0 20px; }
.calc-note { font-size: 0.76rem; color: #7fa3c2; margin-top: 16px; line-height: 1.5; }

/* ---------- Thank you ---------- */
.ty-wrap { text-align: center; max-width: 640px; margin: 0 auto; padding: 90px 20px; }
.ty-wrap .ty-icon { margin-bottom: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 52px 20px 110px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 15px 22px; border-top: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .logo-text .logo-tag { display: none; }
  .logo-text .logo-name { font-size: 0.95rem; }
  .logo-mark { width: 36px; height: 36px; }
  .header-cta .btn { padding: 11px 16px; font-size: 0.9rem; }
  .card-grid, .post-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .radio-cards.cols-3 { grid-template-columns: 1fr; }
  .mobile-call-bar { display: block; }
  body { padding-bottom: 56px; }
  .section { padding: 52px 0; }
}
