/* =========================================================
   Bob's Emergency Plumbing — Design System
   Palette: deep navy (trust), water blue (service), emergency
   red (urgency, used sparingly). Display type is a bold
   condensed grotesque echoing the logo's confident mark;
   body copy is a plain, highly-legible humanist sans.
   ========================================================= */

:root {
  /* Color tokens */
  --navy-950: #0a1a2f;
  --navy-900: #0e2542;
  --navy-800: #123259;
  --navy-700: #1a4374;
  --water-600: #1477b0;
  --water-500: #1f93d1;
  --water-100: #e7f4fb;
  --water-050: #f2f9fd;
  --red-700: #a91c2e;
  --red-600: #d0202f;
  --red-500: #e0313f;
  --ink-900: #0f1720;
  --ink-700: #33404c;
  --slate-500: #5c6b78;
  --slate-300: #9fadb8;
  --line: #dde6ec;
  --line-dark: #24405f;
  --paper: #ffffff;
  --paper-tint: #f6f9fb;

  /* Type */
  --font-display: "Archivo Black", "Arial Narrow Bold", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius-s: 4px;
  --radius-m: 10px;
  --header-h: 84px;
  --sticky-bar-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--water-600); text-decoration-thickness: 1.5px; }
a:hover { color: var(--navy-800); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: 0.2px;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 74ch; }
ul, ol { padding-left: 1.25em; }
main :is(section) { position: relative; }

:focus-visible {
  outline: 3px solid var(--red-600);
  outline-offset: 2px;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--red-600); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 6px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius-s); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-call {
  background: var(--red-600); color: #fff;
}
.btn-call:hover { background: var(--red-700); color: #fff; }
.btn-outline {
  background: transparent; color: var(--paper); border-color: rgba(255,255,255,.55);
}
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-navy {
  background: var(--navy-800); color: #fff;
}
.btn-navy:hover { background: var(--navy-900); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--navy-800); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--navy-800); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.phone-num { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 70px; width: auto; }
.brand-text { display: none; }

.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 10px; color: var(--navy-900); font-weight: 600;
  font-size: 14px; text-decoration: none; border-radius: var(--radius-s);
}
.main-nav a:hover { background: var(--water-050); color: var(--water-600); }
.has-menu { position: relative; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 12px 28px rgba(10,26,47,.12);
  min-width: 240px; padding: 8px; z-index: 50;
}
.has-menu:hover .dropdown, .has-menu:focus-within .dropdown { display: block; }
.dropdown a { font-weight: 500; font-size: .92rem; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-phone {
  display: none; align-items: center; gap: 8px; text-decoration: none;
  color: var(--navy-900); font-weight: 700;
}
.header-phone small { display: block; font-weight: 500; color: var(--slate-500); font-size: .74rem; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--paper); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.dropdown ul {
    display: block;
}
.mobile-nav {
  display: none; position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper);
  z-index: 90; overflow-y: auto; padding: 12px 20px 100px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 14px 4px; color: var(--navy-900); font-weight: 600; text-decoration: none; }
.mobile-nav .sub-list { padding-left: 12px; }
.mobile-nav .sub-list a { font-weight: 500; color: var(--ink-700); padding: 10px 4px; }

@media (min-width: 960px) {
  .main-nav { display: block; }
  .header-phone { display: flex; }
  .nav-toggle { display: none; }
  .brand-text { display: block; font-family: var(--font-display); color: var(--navy-900); }
}

/* ---------- Sticky mobile call bar ---------- */
.sticky-call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--red-600); color: #fff; display: flex;
  align-items: center; justify-content: center; height: var(--sticky-bar-h);
  box-shadow: 0 -6px 18px rgba(0,0,0,.18);
}
.sticky-call-bar a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem;
  display: flex; align-items: center; gap: 10px; width: 100%; height: 100%;
  justify-content: center;
}
.sticky-call-bar svg { width: 20px; height: 20px; }
body { padding-bottom: var(--sticky-bar-h); }
@media (min-width: 960px) {
  .sticky-call-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--navy-950) 0%, var(--navy-800) 62%, var(--water-600) 130%);
  color: #fff; padding: 56px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 46px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 60%);
}
.hero-grid { display: grid; gap: 36px; align-items: center; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-block; color: #cfe8f8; font-weight: 700; font-size: .92rem;
  border-left: 3px solid var(--red-500); padding-left: 10px; margin-bottom: 14px;
}
.hero h1 { color: #fff; }
.hero-sub { color: #d9e7f2; font-size: 1.12rem; max-width: 56ch; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; color: #e7f1f8; font-size: .96rem; }
.hero-points svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--water-500); }
.hero-art { position: relative; display: none; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .hero-art { display: block; }
}
.ripple-svg { width: 100%; height: auto; opacity: .9; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tint { background: var(--paper-tint); }
.section-navy { background: var(--navy-900); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 68ch; margin-bottom: 34px; }
.section-head p { color: var(--slate-500); font-size: 1.05rem; }
.kicker {
  color: var(--water-600); font-weight: 700; font-size: .95rem; margin-bottom: 6px; display: block;
}

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 24px; border-left: 4px solid var(--water-500);
}
.card h3 { margin-bottom: 8px; font-size: 1.12rem; }
.card p { color: var(--slate-500); font-size: .96rem; margin-bottom: 12px; }
.card a.card-link { font-weight: 700; text-decoration: none; font-size: .92rem; }
.card--emergency { border-left-color: var(--red-600); }

.problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.problem-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-s); text-decoration: none; color: var(--navy-900); font-weight: 600;
}
.problem-list a:hover { border-color: var(--water-500); background: var(--water-050); }
.problem-list span.arrow { color: var(--water-600); font-weight: 700; }

.area-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
@media (min-width: 640px){ .area-grid{ grid-template-columns: repeat(4,1fr);} }
.area-grid a {
  display: block; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-s); text-decoration: none; color: var(--navy-900); font-weight: 600; font-size: .95rem;
}
.area-grid a:hover { border-color: var(--water-500); color: var(--water-600); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(3,1fr); } }
.steps li { position: relative; padding-top: 46px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy-800); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: .95rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--red-600); color: #fff; padding: 44px 0; text-align: left;
}
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.3rem,2.4vw,1.8rem); }
.cta-band p { color: #ffe3e6; margin: 4px 0 0; }
.cta-band .btn-outline { border-color: rgba(255,255,255,.7); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 18px 4px; font-weight: 700; color: var(--navy-900);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--water-600); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 4px 20px; color: var(--ink-700); max-width: 72ch; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0; font-size: .88rem; color: var(--slate-500); background: var(--paper-tint); border-bottom: 1px solid var(--line); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs a { color: var(--slate-500); text-decoration: none; }
.breadcrumbs a:hover { color: var(--water-600); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--slate-300); }
.breadcrumbs li[aria-current] { color: var(--navy-900); font-weight: 600; }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  background: var(--navy-900); color: #fff; padding: 42px 0 46px;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #d9e7f2; max-width: 68ch; font-size: 1.05rem; }
.page-hero .btn { margin-top: 18px; }

/* ---------- Content layout ---------- */
.content-wrap { display: grid; gap: 40px; padding: 54px 0; }
@media (min-width: 960px) { .content-wrap.with-rail { grid-template-columns: 1fr 300px; } }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--navy-800); }
.answer-box {
  background: var(--water-050); border: 1px solid var(--water-100); border-left: 4px solid var(--water-500);
  padding: 18px 20px; border-radius: var(--radius-s); font-size: 1.02rem; margin: 0 0 1.6em;
}
.answer-box strong { color: var(--navy-900); }
.symptom-list, .involves-list { display: grid; gap: 10px; padding: 0; margin: 0 0 1.4em; list-style: none; }
.symptom-list li, .involves-list li {
  padding: 12px 14px 12px 40px; background: var(--paper-tint); border-radius: var(--radius-s);
  position: relative; font-size: .97rem;
}
.symptom-list li::before {
  content: "!"; position: absolute; left: 14px; top: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red-600); color: #fff; font-size: .75rem; font-weight: 800; display: flex;
  align-items: center; justify-content: center;
}
.involves-list li::before {
  content: "\2713"; position: absolute; left: 14px; top: 11px; color: var(--water-600); font-weight: 800;
}
.rail { display: flex; flex-direction: column; gap: 18px; }
.rail-card { background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; }
.rail-card h3 { font-size: 1rem; margin-bottom: 10px; }
.rail-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rail-card a { font-size: .93rem; font-weight: 600; text-decoration: none; }
.rail-call { background: var(--navy-900); color: #fff; border: none; text-align: center; }
.rail-call h3 { color: #fff; }
.rail-call .btn { width: 100%; justify-content: center; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #cbd8e2; padding: 56px 0 24px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 36px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand img { margin-bottom: 14px; }
.footer-brand p { color: #9fb0bf; font-size: .92rem; max-width: 42ch; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { color: #b9c8d4; text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-phone {
  display: inline-flex; align-items: center; gap: 8px; color: #fff !important; font-weight: 700;
  margin-top: 12px; font-size: 1.05rem;
}
.footer-bottom {
  border-top: 1px solid var(--line-dark); padding-top: 20px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px; font-size: .84rem; color: #8697a5;
}
.footer-bottom a { color: #8697a5; }
.footer-legal-note { font-size: .82rem; color: #7c8e9c; max-width: 100%; margin-top: 16px; }

/* ---------- Blog cards ---------- */
.blog-card { display: flex; flex-direction: column; gap: 10px; }
.blog-card .tag { color: var(--water-600); font-weight: 700; font-size: .82rem; }
.blog-card h3 a { color: var(--navy-900); text-decoration: none; }
.blog-card h3 a:hover { color: var(--water-600); }

/* ---------- 404 ---------- */
.error-page { text-align: left; padding: 90px 0; }
.error-page .code { font-family: var(--font-display); font-size: 5rem; color: var(--water-500); margin: 0; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: flex; flex-wrap: wrap; gap: 12px; }
.small { font-size: .88rem; color: var(--slate-500); }
