/* =========================================================
   Dave Series Plumbing – landing page
   Palette taken from the mascot: overall blue, shirt orange, backdrop red
   ========================================================= */
:root {
  --navy: #111111;
  --navy-2: #a12c2d;
  --blue-tint: #f5f5f5;
  --orange: #a12c2d;
  --orange-dark: #7e2122;
  --red: #a12c2d;
  --ink: #111111;
  --muted: #333333;
  --line: #dddddd;
  --bg: #f7f7f7;
  --white: #fff;
  --radius: 10px;
  --wrap: 1180px;
  --header-h: 82px;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --blue: #2b4f9c;
  --heading: #1f2433;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; color: var(--heading); letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-intro { max-width: 68ch; color: var(--muted); }
.eyebrow { color: var(--red); font-weight: 700; font-size: 1rem; margin-bottom: .4em; }
mark.todo { background: #fff2c2; color: #6a4b00; padding: 0 .3em; border-radius: 3px; font-size: .85em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 1.05rem/1 var(--font-body);
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { padding: 15px 26px; font-size: 1.05rem; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn-ghost:hover { background: var(--orange); color: #fff; }
.btn-light { background: #fff; color: var(--orange); }
.btn-light:hover { background: #f5f5f5; color: var(--orange-dark); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--orange); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; color: #111;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: #111; text-decoration: none; font-family: var(--font-body); font-size: 1.45rem; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.brand:hover { color: #111; }
.brand img { width: 66px; height: auto; }

.main-nav { justify-self: center; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a, .sub-toggle {
  display: block; padding: 10px 14px; color: #111; text-decoration: none;
  font: 700 1.05rem/1 var(--font-body); background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.main-nav a:hover, .sub-toggle:hover { background: #f2f2f2; color: var(--orange); }
.sub-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.has-sub { position: relative; }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 270px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(0,0,0,.14);
  display: none;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: block; }
.sub a { color: #111; padding: 10px 12px; font-weight: 500; }
.sub a:hover { background: #f5f5f5; color: var(--orange); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; background: transparent; color: #111; border: 2px solid #111; border-radius: 999px; padding: 9px 16px; font: 700 1rem var(--font-body); cursor: pointer; }

.mobile-menu { background: #fff; border-top: 1px solid var(--line); padding: 8px 0 28px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu .mm-h { display: block; font: 800 1.15rem/1.1 var(--font-head); color: var(--orange); margin: 20px 0 6px; }
.mm-links { display: grid; }
.mm-links a { color: #111; text-decoration: none; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.mm-call { margin-top: 24px; width: 100%; }

/* ---------- Estimate form ---------- */
.estimate { background: #fff; color: #111; border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) 0; }
.estimate h2 { color: #111; }
.estimate a { color: var(--orange); font-weight: 700; }
.estimate-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.alert { background: #f7f7f7; border-left: 5px solid var(--orange); padding: 14px 16px; border-radius: 6px; }

.est-form { background: #fff; color: var(--ink); border-radius: 16px; padding: clamp(22px, 3vw, 36px); border: 2px solid #111; }
.step { display: none; border: 0; margin: 0; padding: 0; min-width: 0; }
.step.is-active { display: block; }
.step legend { font: 700 1.9rem/1.1 var(--font-head); color: #111; padding: 0; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; float: left; }
.step legend + * { clear: both; }
.count { font: 600 .95rem var(--font-body); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 13px 20px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; background: #fff; transition: all .15s; }
.chips label:hover span { border-color: var(--orange); }
.chips input:checked + span { background: var(--orange); color: #fff; border-color: var(--orange); }
.chips input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.back { margin-top: 22px; background: none; border: 0; color: var(--navy-2); font: 600 1rem var(--font-body); text-decoration: underline; cursor: pointer; padding: 6px 0; }
.field { display: block; font-weight: 600; margin-bottom: 14px; }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: 400 1.05rem var(--font-body); border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(161,44,45,.25); }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 6px; }
.form-actions .back { margin: 0; }
.form-done { font-size: 1.15rem; margin: 0; }
.form-done[hidden] { display: none; }

/* ---------- Trust strip ---------- */
.trust { background: var(--orange); }
.trust-list { list-style: none; padding: 18px 0; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 28px; }
.trust-list li { font-weight: 700; color: #fff; line-height: 1.3; padding-left: 28px; position: relative; font-size: 1rem; }
.trust-list li::before { content: ""; position: absolute; left: 4px; top: .15em; width: 8px; height: 15px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(40deg); }

/* ---------- Services ---------- */
.services { background: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--orange); box-shadow: 0 10px 26px rgba(0,0,0,.12); color: var(--ink); }
.card-img { aspect-ratio: 16 / 10; width: 100%; background-size: cover; background-position: center; }
.ph { background: repeating-linear-gradient(135deg, #f5f5f5 0 14px, #ebebeb 14px 28px); }
.card h3 { padding: 18px 20px 0; margin: 0 0 6px; }
.card p { padding: 0 20px 22px; margin: 0; color: var(--muted); font-size: 1rem; }
.card:hover h3 { color: var(--orange-dark); }

/* ---------- About ---------- */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-photo { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid var(--orange); }
.about-photo figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: .98rem; }
.about-photo figcaption strong { display: block; font: 700 1.4rem/1.1 var(--font-head); color: var(--navy); }
.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.points li { padding: 18px 0 18px 22px; border-left: 4px solid var(--orange); margin-bottom: 14px; background: #fff; border-radius: 0 var(--radius) var(--radius) 0; padding-right: 20px; }
.points h3 { margin-bottom: .2em; font-size: 1.4rem; }
.points p { margin: 0; color: var(--muted); }

/* ---------- How it works ---------- */
.how { background: #fff; }
.steps { list-style: none; counter-reset: s; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.steps li { position: relative; padding-top: 8px; }
.steps li::after { content: ""; position: absolute; top: 28px; left: 64px; right: -22px; height: 3px; background: var(--line); }
.steps li:last-child::after { display: none; }
.num { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: #fff; font: 800 1.7rem/1 var(--font-head); margin-bottom: 16px; box-shadow: 0 0 0 5px #fff; }
.steps h3 { margin-bottom: .3em; }
.steps p { color: var(--muted); font-size: 1rem; }

/* ---------- Areas ---------- */
.areas { background: #f7f7f7; }
.areas-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.town-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.town-list a { background: #fff; border: 2px solid var(--orange); color: var(--orange); font-weight: 700; padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.town-list a:hover { background: var(--orange); color: #fff; }
.not-listed { background: #fff; color: #111; border: 2px solid var(--orange); padding: 30px; border-radius: 16px; }
.not-listed h3 { color: #111; }

/* ---------- Reviews ---------- */
.reviews { background: #fff; }
.review-grid { columns: 3; column-gap: 22px; margin-top: 40px; }
.review-grid blockquote { break-inside: avoid; margin: 0 0 22px; padding: 26px 24px 22px; background: var(--bg); border-radius: var(--radius); border-top: 5px solid var(--orange); }
.review-grid p { margin: 0 0 14px; font-size: 1.02rem; }
.review-grid cite { font: 700 1.25rem var(--font-head); color: var(--navy); font-style: normal; }

/* ---------- FAQ ---------- */
.faq { background: var(--bg); }
.faq-wrap { max-width: 900px; }
.faq-list { margin-top: 32px; display: grid; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
details[open] { border-color: var(--orange); }
summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 700; font-size: 1.1rem; position: relative; color: #111; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 700 1.8rem/1 var(--font-body); color: var(--orange-dark); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 22px 22px; margin: 0; color: var(--muted); }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--orange); color: #fff; padding: clamp(44px, 6vw, 72px) 0; }
.final-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.final-cta h2 { color: #fff; margin-bottom: .2em; }
.final-cta p { margin: 0; font-size: 1.15rem; }
.final-cta .btn-row { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; color: #111; border-top: 1px solid var(--line); padding: 56px 0 0; font-size: 1rem; }
.site-footer a { color: #111; text-decoration: none; }
.site-footer a:hover { color: var(--orange); text-decoration: underline; }
.site-footer .foot-h { display: block; font: 800 1.3rem/1.1 var(--font-head); color: var(--orange); margin: 0 0 .5em; letter-spacing: -.01em; }
.site-footer .brand { color: #111; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); margin-top: 44px; padding: 20px 0 24px; font-size: .92rem; }
.footer-base p { margin: 0; }

/* ---------- Sticky mobile bar ---------- */
.sticky-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .menu-btn { display: inline-block; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .steps li::after { display: none; }
  .review-grid { columns: 2; }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  :root { --header-h: 68px; }
  .hero-grid, .estimate-grid, .about-grid, .areas-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .portrait-frame { width: min(100%, 340px); }
  .about-photo { position: static; max-width: 360px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-cta .btn, .header-phone { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 17px; padding-bottom: 76px; }
  .brand { font-size: 1.4rem; }
  .brand img { width: 48px; height: 44px; }
  .service-grid, .steps, .trust-list { grid-template-columns: 1fr; }
  .review-grid { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .sticky-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
  .sticky-bar .btn { padding: 14px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   Round 3: header + hero to match the reference screenshot
   ========================================================= */
.brand strong { color: var(--blue); font-weight: 800; }
.header-inner { gap: 24px; }
.header-phone { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; background: var(--blue); color: #fff; border-radius: 999px; font: 800 1.05rem/1 var(--font-body); text-decoration: none; white-space: nowrap; border: 0; }
.header-phone:hover { background: #20407f; color: #fff; }
.ico { flex: none; }
.btn-lg { padding: 20px 34px; font-size: 1.1rem; }
.btn-call { background: #fff; color: var(--blue); border: 2px solid #c9d6ee; }
.btn-call:hover { background: #eef3fb; border-color: var(--blue); color: var(--blue); }

.hero { background: linear-gradient(180deg, #e8eff6, #ffffff); padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; color: var(--blue); font: 800 .95rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.kicker::before { content: ""; width: 26px; height: 4px; border-radius: 2px; background: var(--orange); }
.hero h1 { margin-bottom: .45em; }
.swoosh { position: relative; display: inline-block; z-index: 0; }
.swoosh::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.14em; height: .2em; z-index: -1; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C60 4 150 3 297 9' fill='none' stroke='%23a12c2d' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.lead { font-size: 1.28rem; line-height: 1.6; color: #4a5060; max-width: 30em; }
.hero .btn-row { margin-top: 2em; gap: 16px; }

.hero-visual { display: flex; justify-content: center; }

@media (max-width: 1080px) { .header-phone { display: none; } .header-inner { grid-template-columns: 1fr auto; } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}
@media (max-width: 600px) { .btn-lg { width: 100%; } }

/* fixes */
.brand span { white-space: nowrap; }
.brand { flex-wrap: nowrap; }
.sub-toggle { display: inline-flex; align-items: center; white-space: nowrap; }
.main-nav a { white-space: nowrap; }
.hero h1 { font-size: clamp(2.5rem, 4.8vw, 4.2rem); }
.btn, .header-phone { white-space: nowrap; }
.header-inner { grid-template-columns: auto 1fr auto; gap: 20px; }
.brand { font-size: 1.35rem; gap: 10px; }
.main-nav a, .sub-toggle { padding: 10px 11px; }
.btn-sm { padding: 14px 22px; }
.header-phone { padding: 14px 20px; }
@media (max-width: 1240px) { .header-phone { display: none; } }

/* ---------- Banner image (demo 2 style): circle photo, mascot badge, name tag ---------- */
.portrait-frame { position: relative; width: min(100%, 440px); }
.portrait-frame .portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid var(--orange); }
.hero-mascot { position: absolute; right: -10px; bottom: 28px; width: 128px; height: auto; border-radius: 12px; border: 4px solid var(--orange); background: var(--red); box-shadow: 0 8px 22px rgba(0,0,0,.25); transform: rotate(4deg); }
.name-tag { position: absolute; left: 50%; bottom: -18px; transform: translateX(-62%); margin: 0; white-space: nowrap; padding: 10px 16px; background: var(--orange); color: #fff; border-radius: 8px; font: 600 .95rem/1.3 var(--font-body); }
.name-tag strong { display: block; font: 800 1.25rem/1.1 var(--font-body); color: #fff; }
@media (max-width: 820px) { .portrait-frame { width: min(100%, 340px); } }

/* Core Web Vitals: skip rendering work for sections far below the first screen */
.faq, .reviews, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Small-screen header fixes (all pages) */
.menu-btn { min-height: 44px; }
@media (max-width: 600px) {
  .header-inner { gap: 10px; }
  .brand { font-size: 1.12rem; gap: 8px; }
  .brand img { width: 42px; }
  .menu-btn { padding: 8px 14px; }
}
@media (max-width: 380px) {
  .brand { font-size: 1rem; gap: 6px; }
  .brand img { width: 36px; }
  .menu-btn { padding: 8px 12px; font-size: .95rem; }
  .wrap { width: min(100% - 28px, var(--wrap)); }
}

/* Stop long buttons or text forcing sideways scroll on phones */
.hero-grid > *, .about-grid > *, .estimate-grid > *, .areas-grid > *, .footer-grid > * { min-width: 0; }
@media (max-width: 820px) {
  .hero-grid, .estimate-grid, .about-grid, .areas-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .btn { white-space: normal; text-align: center; line-height: 1.2; }
}
@media (max-width: 380px) {
  .brand span { white-space: normal; line-height: 1.05; }
}
@media (max-width: 600px) { .sticky-bar .btn-light { border: 2px solid var(--orange); color: var(--orange); } }

/* Service-card photos (images/D3.jpg to D11.jpg) */
img.card-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #f0f0f0; }
