/* Section order: hero orange, services + projects dark brown, contact + footer black. */
/* SRP Plumbing — local demo. Orange + black foundation (v1). Tokens and layout follow the Figma v1 page. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --orange-500: #e8541f;
  --orange-hover: #f06a35;
  --ink-900: #14100e;   /* black */
  --ink-800: #241d1a;   /* dark brown (Services, Projects) */
  --ink-700: #3b332f;   /* rules */
  --ink-200: #ddd5ce;   /* secondary text on black */
  --white: #ffffff;
  --blue-300: #6ea3ff;  /* water accent: links + focus on black */
  --copper-500: #b87333; /* leak illustration only */
  --copper-300: #e3a46b;
  --copper-800: #6a3a18;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 20px;
  --section-y: clamp(56px, 7.78vw, 112px);
}

@media (min-width: 720px) {
  :root { --gutter: clamp(32px, 5.56vw, 80px); }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink-900);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  overflow-x: hidden; /* safety net only; layout is verified not to overflow */
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus (keyboard only) ---------- */
/* Default (black sections): blue ring, 7.5:1 on black */
a:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
}
a:focus:not(:focus-visible) { outline: none; }
/* Skip-link target: focusable by script only, not a control, so no ring */
main:focus { outline: none; }

/* On the orange field (header + hero) blue fails (1.8:1): two-tone white + black ring */
.skip-link:focus-visible,
.site-header a:focus-visible,
.hero .btn:focus-visible,
.hero-yelp:focus-visible {
  outline: 3px solid transparent; /* stays visible in forced-colors mode */
  outline-offset: 0;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink-900);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  background: var(--ink-900); /* black on the orange header, so it reads as a button and takes the two-tone ring */
  color: var(--white);
  padding: 12px 16px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 12px; }

/* ---------- Header: part of the orange field, badge centered inside it ---------- */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px var(--gutter) 6px;
  background: var(--orange-500);
  color: var(--ink-900);
}

.logo {
  display: block;
  flex: none;
  width: 96px; /* phones: smaller badge keeps the call button above the fold on short screens */
  aspect-ratio: 855 / 770; /* the SVG's own proportions: trimmed, transparent outside the badge, cream fill intact */
}
.logo img {
  display: block;
  width: 100%;
  height: 100%;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.nav a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s; }
.nav a:hover { text-decoration-color: currentColor; }

@media (min-width: 720px) {
  .site-header { padding: 16px var(--gutter) 8px; }
  .logo { width: clamp(120px, 13.05vw, 188px); }
  .nav { gap: 16px; }
  .nav a { padding: 14px 12px; font-size: 17px; }
}

/* Wide screens: badge truly centered, nav on the right */
@media (min-width: 1024px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px var(--gutter);
  }
  .logo { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 3; grid-row: 1; justify-self: end; margin-right: -12px; /* aligns link text with the hero right edge */ }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 12px var(--gutter) clamp(48px, 7.78vw, 112px);
  background: var(--orange-500);
  color: var(--ink-900);
}
@media (min-width: 720px) {
  .hero { padding-top: clamp(20px, 2.22vw, 32px); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(24px, 2.78vw, 40px);
  min-width: 0;
}

/* Van sticker: below the call button on phones and tablets, beside the copy on wide screens */
.hero-art {
  width: 100%;
  max-width: 640px;
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto; /* keeps the sticker's 1689 x 931 proportions, transparent edge and blue outline intact */
}
@media (min-width: 1024px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    column-gap: clamp(32px, 3.9vw, 56px);
    align-items: center;
  }
  .hero-art { max-width: none; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  /* 72px at 390 (mockup); scales down so "Residential" fits down to 280 */
  font-size: clamp(40px, calc((100vw - 2 * var(--gutter)) * 0.21), 72px); /* fills the same share of the column from 280 to 390 px */
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  width: 100%;
}
@media (min-width: 720px) {
  .hero h1 { font-size: clamp(64px, 9.44vw, 136px); }
  .hero h1 span { display: block; }
}
/* Beside the sticker the headline sits in a narrower column: three lines at a smaller size */
@media (min-width: 1024px) {
  .hero h1 { font-size: clamp(64px, 7.6vw, 112px); }
}

.hero-sub {
  max-width: 820px;
  font-size: clamp(20px, 2.08vw, 30px);
  font-weight: 500;
  line-height: 1.3;
}

/* Local-business line: grouped with the summary, leads into the call button */
.hero-local {
  max-width: 62ch;
  margin-top: calc(-1 * clamp(12px, 1.67vw, 24px));
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.hero-local-cta { display: none; } /* phones show the first sentence only */
@media (min-width: 720px) {
  .hero-local { max-width: none; font-size: clamp(18px, 1.53vw, 22px); }
  .hero-local-cta { display: inline; }
}

.call-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
@media (min-width: 720px) {
  .call-row { flex-direction: row; align-items: center; gap: 32px; }
}

/* Trust link right beside the first call button */
.hero-yelp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.hero-yelp:hover { text-decoration-thickness: 3px; }

/* Phones: persistent tap-to-call bar */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 16px env(safe-area-inset-bottom);
  background: var(--ink-900);
  border-top: 2px solid var(--orange-500);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.call-bar:hover { background: var(--ink-700); }
@media (max-width: 719px) {
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* Keep a focused control and its outline (up to 6px) clear of the fixed call bar */
  html { scroll-padding-bottom: calc(56px + 16px + env(safe-area-inset-bottom)); }
}
@media (min-width: 720px) {
  .call-bar { display: none; }
}

/* ---------- Call button ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 19px 24px;
  background: var(--ink-900);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--ink-700); }
@media (min-width: 720px) {
  .btn { display: inline-flex; padding: 24px 44px; font-size: 24px; }
}

/* ---------- Shared section bits ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 5vw, 72px);
  line-height: 64px;
}

/* ---------- Services ---------- */
.services {
  padding: var(--section-y) var(--gutter);
  background: var(--ink-800);
}

.services-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .services-layout { flex-direction: row; gap: 80px; align-items: flex-start; }
  .services-layout .section-title { flex: none; width: 300px; }
  .service-rows { flex: 1; min-width: 0; }
}

.service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--ink-700);
}
.service:first-child { border-top-color: var(--orange-500); }
.service:last-child { border-bottom: 1px solid var(--ink-700); }

.service h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 40px;
}
.service p {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-200);
}
@media (min-width: 720px) {
  .service {
    display: grid;
    grid-template-columns: minmax(200px, 340px) 1fr;
    gap: 40px;
    padding: 32px 0;
  }
  .service h3 { font-size: clamp(36px, 3.33vw, 48px); line-height: 52px; }
}

/* ---------- Projects ---------- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: var(--section-y) var(--gutter);
  background: var(--ink-800);
  border-top: 1px solid var(--orange-500);
}
@media (min-width: 900px) {
  .projects { gap: 56px; }
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.project-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.project {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.photo {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  flex: none;
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--pos-y, 50%);
}

/* Mobile crops match the 390 mockup */
.photo-large  { height: 360px; --pos-y: 50%; }
.photo-heater { height: 220px; --pos-y: 31%; }
.photo-copper { height: 220px; --pos-y: 47%; }

figcaption { display: flex; flex-direction: column; gap: 4px; }
figcaption h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 28px;
}
figcaption p { color: var(--ink-200); }

@media (min-width: 720px) and (max-width: 899px) {
  .photo-large  { height: 560px; }
  .photo-heater,
  .photo-copper { height: 360px; }
}

/* Asymmetric gallery: one tall photo left, two stacked right */
@media (min-width: 900px) {
  .project-grid {
    display: grid;
    grid-template-columns: 656fr 592fr;
    gap: 32px;
    align-items: stretch;
  }
  .photo-large { height: auto; aspect-ratio: 656 / 824; }
  /* Right photos fill whatever height the tall photo sets */
  .project-column > .project { flex: 1; }
  .photo-heater,
  .photo-copper { height: auto; flex: 1; min-height: 240px; }
  .photo-heater { --pos-y: 24%; }
  .photo-copper { --pos-y: 37%; }
}

.reviews {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-700);
}
.reviews h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 40px;
}
@media (min-width: 720px) {
  .reviews { flex-direction: row; align-items: center; justify-content: space-between; }
}

.text-link {
  display: inline-block;
  padding: 10px 0;
  color: var(--blue-300);
  font-size: 20px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-position: from-font;
}
.text-link:hover { text-decoration-thickness: 2px; }
@media (min-width: 720px) {
  .text-link { font-size: 22px; }
}
.text-link-plain {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  overflow-wrap: anywhere;
}

/* ---------- Contact ---------- */
.contact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: var(--section-y) var(--gutter) 40px;
  background: var(--ink-900);
  border-top: 1px solid var(--orange-500);
}
@media (min-width: 720px) {
  .contact { align-items: flex-start; gap: clamp(24px, 2.78vw, 40px); }
}

.eyebrow,
.detail dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-500);
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 8.89vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

/* Contact button: orange on black, black text (5.15:1) */
.contact .btn {
  background: var(--orange-500);
  color: var(--ink-900);
}
.contact .btn:hover { background: var(--orange-hover); }

.details {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--ink-700);
}
.detail dd { font-size: 18px; line-height: 28px; }

@media (min-width: 900px) {
  .details { flex-direction: row; gap: 40px; padding-top: 8px; }
  .detail { flex: 1; min-width: 0; padding: 24px 0 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 0 var(--gutter) 40px;
  background: var(--ink-900);
}
.site-footer p {
  padding-top: 24px;
  border-top: 1px solid var(--ink-700);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-200);
}
.site-footer a { display: inline-block; padding: 10px 0; }
@media (min-width: 720px) {
  .site-footer { padding-bottom: 56px; }
  .site-footer p { padding-top: 40px; }
}

/* ---------- Leaking copper elbow and runoff (decorative) ---------- */
/* Built by drop.js into .drop-art: left gutter on desktop (>=1024px), a contained burst beside the headline on
   phones and tablets, and a frozen frame under prefers-reduced-motion. Pure function of scroll; no idle animation. */
body { position: relative; }
.drop-art {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* above section fills; skip link is 10, fixed call bar is 5 */
  pointer-events: none;
  overflow: hidden;
}
.drop-live .drop-art { display: block; }

.cu-ol, .cu-base, .cu-hi, .cu-dark { fill: none; stroke-linejoin: round; }
.cu-ol { stroke: var(--ink-900); stroke-width: 14.5; }
.cu-base { stroke: var(--copper-500); stroke-width: 12; }
.cu-hi { stroke: var(--copper-300); stroke-width: 2.6; stroke-linecap: round; }
.cu-nut { fill: var(--copper-500); stroke: var(--ink-900); stroke-width: 1.5; }
.cu-dark { stroke: var(--copper-800); stroke-width: 1.4; }
.water { fill: var(--blue-300); stroke: var(--ink-900); stroke-width: .8; stroke-linejoin: round; }
.water-hi { fill: var(--white); opacity: .6; }
.stream-under { fill: none; stroke: var(--ink-900); opacity: .85; }
.stream-top { fill: none; stroke: var(--blue-300); }
.drain-body { fill: var(--ink-900); stroke: var(--ink-700); stroke-width: 1.5; }
.drain-slot { stroke: var(--ink-700); stroke-width: 1.2; stroke-linecap: round; }
.puddle { fill: none; stroke: var(--blue-300); stroke-width: 1.5; }
.band { fill: var(--ink-200); stroke: var(--ink-900); stroke-width: 1; opacity: 0; transition: opacity .45s ease .1s; }
.glint { fill: none; stroke: var(--white); stroke-width: 1.4; stroke-linecap: round; opacity: 0; }
.is-settled .band { opacity: 1; }
.is-settled .glint { animation: srp-glint .9s ease .45s both; }
@keyframes srp-glint {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  100% { opacity: .6; }
}

/* Lottie pieces (burst in the hero, splash and drain at Contact): same box and layering as .drop-art.
   Once they load, .lt-on swaps out the SVG jets, droplets, puddle and drain they replace. */
.lt-art {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.drop-live .lt-art { display: block; }
.lt-art > div { position: absolute; }
.lt-art svg { display: block; width: 100%; height: 100%; }
.lt-on .water, .lt-on .water-hi, .lt-on .puddle, .lt-on .drain-body, .lt-on .drain-slot { display: none; }

/* ---------- Service pages ---------- */
.crumbs { font-size: 16px; line-height: 24px; margin-bottom: 8px; }
.crumbs a { display: inline-block; padding: 10px 0; }
.page-hero { padding-bottom: clamp(40px, 5vw, 72px); }
.page-services, .page-when, .page-related { border-top: 1px solid var(--orange-500); }
.page-photo { margin-top: 32px; max-width: 656px; }
.page-photo .photo-large { height: 360px; }
.when-list, .related-list { flex: 1; min-width: 0; }
.when-list li { padding: 20px 0; border-top: 1px solid var(--ink-700); font-size: 18px; line-height: 28px; color: var(--ink-200); }
.when-list li:first-child { border-top-color: var(--orange-500); }
.when-list li:last-child { border-bottom: 1px solid var(--ink-700); }
.related-list { display: flex; flex-wrap: wrap; gap: 4px 32px; }
.service h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--orange-500); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.service h3 a:hover { text-decoration-color: var(--white); }
