/* ===== Bradley's Heating & Plumbing — concept build ===== */

:root {
  --navy: #0B2E4F;
  --navy-dark: #07203A;
  --navy-light: #71A8D6;
  --black: #000000;
  --orange: #E85D25;
  --orange-dark: #C64A19;
  --charcoal: #1E2933;
  --grey: #5B6B78;
  --grey-light: #8B9BA8;
  --light: #F2F6FA;
  --light-alt: #E8EEF3;
  --white: #ffffff;
  --banner-grey: #363636;
  --logo-red: #DD566C;
  --logo-blue: #4B9DD6;

  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --container: 1160px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
}

h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--grey); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--orange);
  display: block;
  margin-bottom: 12px;
}
.eyebrow-dark { color: var(--orange-dark); }
.center { text-align: center; }
section .container > .eyebrow.center,
section .container > h2.center,
.section-lead.center {
  margin-left: auto;
  margin-right: auto;
}
.section-lead {
  max-width: 640px;
  font-size: 1.02rem;
}

main { position: relative; z-index: 1; }

/* ===== Topbar ===== */
.topbar { position: relative; z-index: 1; background: var(--black); color: #cdd8e3; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.82rem;
}
.topbar-trust { margin: 0; font-weight: 500; letter-spacing: 0.01em; }
.topbar-links { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.topbar-links a { color: #cdd8e3; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s var(--ease); }
.topbar-links a:hover { color: var(--orange); }
.topbar-links svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--banner-grey);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  transition: padding 0.3s var(--ease);
}
.site-header.scrolled .header-inner { padding-top: 8px; padding-bottom: 8px; }
/* ===== Brand wordmark ===== */
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-word {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;            /* master size: everything below is relative to it */
  line-height: 1;
  transition: font-size 0.3s var(--ease);
}
.brand-word-top {
  display: block;
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 0.165em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.brand-word-sub {
  display: block;
  margin-top: 0.3em;
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bw-heat  { color: var(--logo-red); }
.bw-div   { color: var(--white); margin: 0 0.55em; }
.bw-plumb { color: var(--logo-blue); }
.site-header.scrolled .brand-word { font-size: 1.28rem; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--white);
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--orange-dark); }
.site-nav a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; }
.nav-caret {
  width: 11px; height: 11px;
  margin-left: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
  vertical-align: -1px;
}
.nav-dropdown.open .nav-caret,
.nav-dropdown:focus-within .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translate(-50%, 8px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 44px rgba(11,46,79,0.16);
  border: 1px solid rgba(11,46,79,0.08);
  padding: 10px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 50;
}
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown-menu a {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover { background: var(--light); color: var(--orange-dark); }
.nav-dropdown.open .nav-dropdown-menu a,
.nav-dropdown:focus-within .nav-dropdown-menu a { opacity: 1; transform: translateY(0); }
/* per-item transition-delay is set by js/main.js (setStagger), so it scales
   automatically if a service is added or removed rather than needing a matching
   nth-child edit here */

.nav-cta {
  background: var(--orange);
  color: var(--white) !important;
  padding: 10px 18px !important;
  border-radius: 100px;
  font-weight: 600 !important;
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-cta:hover { background: var(--orange-dark); transform: translateY(-1px); }
/* Always-visible call control, phone width only -- see @media (max-width: 720px)
   below. Sits outside .site-nav so it stays reachable while the nav panel
   itself is collapsed behind the hamburger. */
.header-call { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 14px 28px;
  border-radius: 100px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 93, 37, 0.32);
}
.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-small { padding: 10px 18px; font-size: 0.85rem; }

/* ===== Reveal on scroll ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 120px 0 70px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(232, 93, 37, 0.28), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  background-size: 180% 180%, 100% 100%;
  background-position: 82% 20%, 0 0;
  animation: glow-drift 15s ease-in-out infinite;
  z-index: 0;
}
@keyframes glow-drift {
  0%, 100% { background-position: 82% 20%, 0 0; }
  50% { background-position: 66% 34%, 0 0; }
}
.hero .hero-inner.reveal { opacity: 1; transform: none; }
.js .hero-inner > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .hero-inner.in-view > * { opacity: 1; transform: translateY(0); }
/* per-child transition-delay is set by js/main.js (setStagger), so it scales
   automatically if an element is added or removed from the hero rather than
   needing a matching nth-child edit here */
.hero-inner { position: relative; z-index: 2; max-width: 700px; }
.hero .eyebrow { color: var(--orange); }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3.2rem); text-wrap: balance; }
.hero-sub { color: #cdd8e3; font-size: 1.06rem; max-width: 600px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 30px 0 34px; }
.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.2);
  color: #e4ecf3;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
}

/* ===== Page banner (inner pages) ===== */
.page-banner {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 62px 0 42px;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(232, 93, 37, 0.24), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  background-size: 180% 180%, 100% 100%;
  background-position: 85% 15%, 0 0;
  animation: glow-drift-banner 22s ease-in-out infinite;
  z-index: 0;
}
@keyframes glow-drift-banner {
  0%, 100% { background-position: 85% 15%, 0 0; }
  50% { background-position: 77% 23%, 0 0; }
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner-crumb { margin: 0 0 12px; font-size: 0.84rem; color: #9fb1c1; }
.page-banner-crumb a { color: #cdd8e3; font-weight: 600; }
.page-banner-crumb a:hover { color: var(--orange); }
.page-banner h1 { color: var(--white); font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 10px; }
.page-banner-sub { color: #cdd8e3; max-width: 640px; margin: 0; font-size: 1.02rem; }

/* ===== Trust strip (light-background badge row, for inner pages) ===== */
.trust-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 30px 0 0; }
.trust-chip {
  background: var(--light);
  border: 1px solid rgba(11,46,79,0.1);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
}

/* ===== Ticker ===== */
.ticker { overflow: hidden; background: var(--light-alt); padding: 14px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 30s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set {
  display: flex; align-items: center; flex-shrink: 0; gap: 14px;
  padding-right: 14px;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ticker-set .dot { color: var(--orange); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Sections generic ===== */
section { padding: 88px 0; }
.section-alt { background: var(--light); }

/* ===== Stats band ===== */
.stats-band { background: var(--navy); padding: 46px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-number {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--orange);
  line-height: 1;
  display: inline-block;
}
.stat-number.pop { animation: stat-pop 0.4s var(--ease); }
@keyframes stat-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.stat-label {
  font-size: 0.86rem;
  color: #cdd8e3;
  font-weight: 500;
}

/* ===== Mid-page CTA strip ===== */
.mid-cta {
  margin-top: 40px;
  text-align: center;
  padding: 20px 24px;
  background: var(--light);
  border: 1px dashed rgba(11,46,79,0.2);
  border-radius: var(--radius);
}
.mid-cta p { margin: 0; color: var(--charcoal); font-weight: 500; }
.mid-cta a { color: var(--orange-dark); font-weight: 700; }
.section-alt .mid-cta { background: var(--white); }

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}
.service-card {
  background: var(--white);
  border: 1px solid rgba(11,46,79,0.08);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,46,79,0.1);
  border-color: var(--orange);
}
/* Photo treatment for service cards that have one. Cards without a photo keep
   the plain icon layout, so a partly-photographed grid still reads deliberately
   rather than broken. The icon stays as a badge over the photo, which keeps the
   line-draw continuity with the diagrams on the page each card links to. */
.service-photo {
  margin: -30px -26px 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  line-height: 0;
  background: var(--light-alt);
}
.service-photo img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.service-card:hover .service-photo img { transform: scale(1.05); }
.service-card--photo .service-icon {
  margin-top: -32px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(11,46,79,0.16);
}
.photo-credit { font-size: 0.74rem; color: #7d8f9e; margin-top: 6px; }
.photo-credit a { color: #9fb1c1; text-decoration: underline; }

.service-icon {
  width: 48px; height: 48px;
  background: var(--light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.06); background: rgba(232,93,37,0.12); }
.service-icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card h3 { margin: 4px 0 0; }
.service-card p { font-size: 0.94rem; margin: 0; }
a.service-card { text-decoration: none; }
.service-card-link {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
  color: var(--orange-dark);
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.service-card-link svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}
.service-card:hover .service-card-link svg { transform: translateX(4px); }

/* ===== Why us / benefits ===== */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 46px;
}
.benefit {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  border-top: 3px solid var(--orange);
}
.benefit h3 { font-size: 1.02rem; }
.benefit p { font-size: 0.92rem; margin: 0; }

/* ===== About / split ===== */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.para-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.para-list li {
  padding-left: 26px;
  position: relative;
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.96rem;
}
.para-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--orange);
}
.pull-quote {
  background: var(--light);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
  margin: 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--orange);
}
.pull-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--grey);
}

/* ===== Scroll-driven cutaway background (boiler-installations.html, whole page) ===== */
.cutaway-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.cutaway-bg svg { width: 100%; height: 100%; display: block; }
.cutaway-house {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.22;
}
.cutaway-boiler,
.cutaway-radiator {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.32;
}
.cutaway-return {
  fill: none;
  stroke: var(--grey-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
}
.cutaway-flow {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.cutaway-flow-arrow {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.cutaway-pulse {
  fill: var(--orange);
  filter: drop-shadow(0 0 6px rgba(232, 93, 37, 0.7));
}
.cutaway-content .split-text,
.cutaway-content .split-list {
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 10px 30px rgba(11,46,79,0.06);
}


/* ===== Shared scroll diagram backgrounds (service pages) =====
   Two mechanisms share this markup:
     .branch-bg  -- branches draw outward on whole-page scroll progress,
                    each endpoint icon lighting as its branch lands.
     .marker-bg  -- markers light one at a time, each bound by
                    IntersectionObserver to the list item that names it.
   Both are aria-hidden decoration; every fact they show is already in
   the adjacent copy, so nothing is conveyed by motion alone. */
.diagram-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.diagram-bg svg { width: 100%; height: 100%; display: block; }
.diagram-structure {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.18;
}
.diagram-object {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.3;
}
.diagram-pipe {
  fill: none;
  stroke: var(--grey-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
}

/* --- Mechanism A: outward branch draw --- */
.branch-path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.7;
}
.branch-icon {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.2;
  transition: opacity 0.55s var(--ease), stroke 0.55s var(--ease);
}
.branch-icon.lit {
  stroke: var(--orange);
  opacity: 0.85;
}

/* --- Mechanism B: markers bound to list items --- */
.diagram-marker {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.diagram-marker.lit { opacity: 1; transform: scale(1); }
.diagram-marker circle { fill: var(--orange); opacity: 0.9; }
.diagram-marker path {
  fill: none;
  stroke: var(--white);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.diagram-seal {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.55) rotate(-14deg);
  transition: opacity 0.65s var(--ease) 0.15s, transform 0.65s var(--ease) 0.15s;
}
.diagram-seal.lit { opacity: 1; transform: scale(1) rotate(-8deg); }
.diagram-seal circle,
.diagram-seal path { fill: none; stroke: var(--orange); stroke-linecap: round; stroke-linejoin: round; }
.diagram-seal circle { stroke-width: 3; }
.diagram-seal path { stroke-width: 2.6; }
.diagram-seal text {
  fill: var(--orange);
  font-family: var(--font-head);
  font-weight: 700;
  text-anchor: middle;
}

/* Component labels. Declared after .branch-icon so text renders filled
   rather than outlined, and lights with its branch like the icon does. */
.diagram-label {
  fill: var(--navy);
  stroke: none;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-anchor: middle;
  opacity: 0.28;
  transition: opacity 0.55s var(--ease), fill 0.55s var(--ease);
}
.diagram-label.lit { fill: var(--orange); opacity: 0.92; }

/* Readable panels wherever body copy sits over a diagram */
.diagram-content .split-text,
.diagram-content .split-list,
.diagram-content .trust-strip {
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 10px 30px rgba(11,46,79,0.06);
}
.diagram-content .trust-strip { padding: 16px 20px; margin-top: 30px; }
.section-alt.diagram-content .split-text,
.section-alt.diagram-content .split-list,
.section-alt.diagram-content .trust-strip { background: rgba(255,255,255,0.94); }

/* ===== Boiler types ===== */
.boiler-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 46px;
}
.boiler-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(11,46,79,0.06);
}
.boiler-card h3 { font-size: 1rem; }
.boiler-card p { font-size: 0.9rem; margin: 0; }

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 46px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--white);
  border: 1px solid rgba(11,46,79,0.08);
  border-radius: var(--radius);
  padding: 0 24px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.faq-item:hover { border-color: var(--orange); }
.faq-item[open] { box-shadow: 0 12px 30px rgba(11,46,79,0.08); border-color: var(--orange); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-chevron {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease), stroke 0.3s var(--ease);
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); stroke: var(--orange); }
.faq-answer { padding: 0 0 22px; animation: faq-in 0.3s var(--ease); }
.faq-answer p { margin: 0; color: var(--grey); font-size: 0.96rem; }
.faq-answer a, .section-lead a { color: var(--orange-dark); font-weight: 600; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Contact ===== */
.section-cta { background: var(--navy); color: var(--white); }
.section-cta .eyebrow { color: var(--orange); }
.section-cta h2 { color: var(--white); }
.section-cta p { color: #cdd8e3; }
.cta-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.cta-inner .hero-actions { justify-content: center; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
  text-align: left;
  align-items: stretch;
}
.contact-direct {
  min-width: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-direct a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
  overflow-wrap: anywhere;
}
.contact-direct a:hover { color: var(--orange); }
.contact-direct .btn-ghost-light { align-self: flex-start; margin-top: 6px; }
.contact-map { border-radius: var(--radius); overflow: hidden; min-height: 220px; }
.contact-map iframe { width: 100%; height: 100%; min-height: 220px; }
.contact-address { margin-top: 24px; color: #cdd8e3; font-size: 0.92rem; }
.contact-hours { margin: 6px 0 0; color: #cdd8e3; font-size: 0.92rem; }

/* ===== Footer ===== */
.site-footer { position: relative; z-index: 1; background: var(--navy-dark); color: #9fb1c1; padding: 40px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.brand-footer .brand-word { font-size: 1.35rem; }
.brand-footer .brand-word-top { color: var(--white); }
.brand-footer .bw-plumb { color: var(--navy-light); }
.brand-footer .bw-div { color: var(--grey); }
.brand-tagline {
  margin: 13px 0 0;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #B8C7D4;
}
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.88rem; }
.footer-nav a:hover { color: var(--orange); }
.footer-meta { text-align: right; font-size: 0.8rem; line-height: 1.7; }
.footer-meta a { color: var(--orange); }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--orange);
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  z-index: 200;
}

/* ===== Icon line-draw ===== */
.service-icon svg path,
.service-icon svg rect,
.service-icon svg circle {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .reveal.in-view .service-icon svg path,
.js .reveal.in-view .service-icon svg rect,
.js .reveal.in-view .service-icon svg circle {
  transition: stroke-dashoffset 0.7s var(--ease) 0.2s;
  stroke-dashoffset: 0;
}

/* ===== Gallery (gallery.html) =====
   Each photo is a link to its full-size file; main.js opens it in the viewer
   below instead. Thumbnails share one 3:4 frame so the grid stays even; the
   viewer shows the whole photo. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--light-alt);
}
.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item:focus-visible { outline: 3px solid var(--orange-dark); outline-offset: 3px; }

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(7, 32, 58, 0.94); }
html.lightbox-open { overflow: hidden; }
.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 68px 72px 28px;
  touch-action: pan-y pinch-zoom;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100% - 36px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-count { margin: 0; font-size: 0.9rem; color: #cdd8e3; }
.lightbox-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lightbox-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev,
.lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lightbox-figure { padding: 68px 12px 84px; }
  .lightbox-prev,
  .lightbox-next { top: auto; bottom: 18px; transform: none; }
}

/* ===== Reviews carousel (index.html) =====
   A scroll-snap row, so with no JS it is still a list you can swipe; main.js adds
   the controls and the gentle auto-advance. One review shows with the controls
   hidden; with none added, only the rating summary shows. */
.reviews { margin-top: 28px; }
.reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 18px 22px;
  background: var(--light);
  border-radius: var(--radius);
  border-left: 4px solid var(--orange);
}
.reviews-rating {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--navy);
}
.reviews-score { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.reviews-stars { color: var(--orange); font-size: 1.05rem; letter-spacing: 0.06em; }
.reviews-count { color: var(--grey); font-size: 0.9rem; font-weight: 500; }
.reviews-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.reviews-summary .service-card-link { margin: 0; }
.reviews-carousel { margin-top: 14px; }
/* No reviews added yet: hide the empty carousel, so it is not an empty
   landmark for screen readers either. */
.reviews-carousel:not(:has(.review)) { display: none; }
.reviews-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* Inline-size containment keeps the row's intrinsic width out of the grid
     column's sizing; without it the slides widen the column past a phone screen.
     It is the only guard against that, so keep it if this rule is edited. */
  contain: inline-size;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 100%;
  margin: 0;
  padding: 22px 24px 20px;
  background: var(--light);
  border-radius: var(--radius);
  border-left: 4px solid var(--orange);
  scroll-snap-align: start;
}
.review-stars { margin: 0 0 8px; color: var(--orange); letter-spacing: 0.06em; }
.review-text { margin: 0; }
.review-text p { margin: 0; font-style: italic; color: var(--navy); font-size: 1rem; }
.review-author { margin-top: 12px; font-size: 0.86rem; font-weight: 600; color: var(--charcoal); }
.review-source { font-weight: 500; color: var(--grey); }
.reviews-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.reviews-nav[hidden] { display: none; }
.reviews-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(11, 46, 79, 0.18);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.reviews-btn:hover { border-color: var(--orange); color: var(--orange-dark); }
.reviews-btn svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reviews-toggle .icon-play,
.reviews-toggle.is-paused .icon-pause { display: none; }
.reviews-toggle.is-paused .icon-play { display: block; }
.reviews-dots { display: flex; gap: 2px; margin-left: auto; }
.reviews-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.reviews-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(11, 46, 79, 0.55);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.reviews-dot[aria-current="true"]::before { background: var(--orange); transform: scale(1.25); }
.reviews-btn:focus-visible,
.reviews-dot:focus-visible { outline: 2px solid var(--orange-dark); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .faq-answer { animation: none !important; }
  .ticker-set:nth-child(2) { display: none; }
  .service-icon svg path, .service-icon svg rect, .service-icon svg circle {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
  .hero-bg, .page-banner::before, .stat-number.pop { animation: none !important; }
  .js .hero-inner > *, .nav-dropdown-menu a { transition: none !important; }
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .service-photo img { transition: none !important; transform: none !important; }
  .cutaway-flow { stroke-dashoffset: 0 !important; }
  /* Scroll diagrams: JS sets the completed end state; kill the tweening only. */
  .branch-path { stroke-dashoffset: 0 !important; }
  .branch-icon,
  .diagram-marker,
  .diagram-seal { transition: none !important; }
  .reviews-btn, .reviews-dot::before { transition: none !important; }
  .gallery-item img { transition: none !important; }
  .gallery-item:hover img { transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .boiler-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-meta { text-align: center; }
}

/* Six nav links, the dropdown and the call pill only fit a tablet-width header
   with tighter spacing; below 721px the hamburger takes over. */
@media (min-width: 721px) and (max-width: 900px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.86rem; }
  .nav-cta { padding: 9px 13px !important; }
}

@media (max-width: 640px) {
  .topbar-trust { display: none; }
  .topbar-inner { justify-content: flex-end; }
}

@media (max-width: 720px) {
  .site-nav {
    /* Hangs from the header's own bottom edge rather than a fixed pixel
       offset, so it still lines up once .scrolled shrinks the header's
       padding -- .site-header (position: sticky) is the positioned
       ancestor this is absolute against. */
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 30px;
    gap: 18px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    border-bottom: 1px solid rgba(11,46,79,0.08);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; }
  .site-nav a { color: var(--charcoal); }
  .site-nav a[aria-current="page"] { color: var(--orange-dark); }
  .nav-toggle { display: flex; }
  .header-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 100px;
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    /* The auto margin takes the header's spare width, so the button sits
       beside the hamburger instead of being centred by space-between. */
    margin-left: auto;
    margin-right: 8px;
  }
  .header-call:hover { background: var(--orange-dark); transform: translateY(-1px); }
  .brand-word, .site-header.scrolled .brand-word { font-size: 1.2rem; }
  .services-grid, .benefits, .boiler-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .hero { padding-top: 100px; }
  .cta-inner { text-align: left; }
  .mid-cta { text-align: left; }
  .page-banner { padding-top: 96px; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 2px 0 4px 14px;
    min-width: 0;
  }
  .nav-dropdown-menu a {
    color: var(--grey);
    font-size: 0.88rem;
    padding: 8px 0;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nav-caret { display: none; }
}

@media (max-width: 420px) {
  .brand-word, .site-header.scrolled .brand-word { font-size: 1.02rem; }
  /* Icon-only circle -- the number is still announced, via aria-label. */
  .header-call-text { display: none; }
  .header-call { width: 44px; height: 44px; padding: 0; justify-content: center; }
}
