:root {
  /* Colours copied from jdpheating.co.uk */
  --navy: #1b345d;
  --orange: #fe830f;
  --orange-dark: #e8740a;
  --brand-blue: #0277f3;
  --quote-blue: #0268d6; /* their #0277f3 a shade darker so white text passes contrast */
  --dark: #333333;
  --ink: #1f2937;
  --muted: #374151;
  --line: #d1d5db;
  --bg-soft: #eaeaea;
  --wa: #25d366;
  --wa-ink: #052e16;
  --error: #b91c1c;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
}

[hidden] { display: none !important; }

a { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 2rem; color: var(--navy); }
h2 { font-size: 1.4rem; }

/* Page variants: data-page on <html> is service (also /), repairs, whatsapp or areas.
   Each .v-{page} block shows only on its own page; .not-whatsapp hides on /whatsapp. */
html:not([data-page="service"]) .v-service,
html:not([data-page="repairs"]) .v-repairs,
html:not([data-page="whatsapp"]) .v-whatsapp,
html:not([data-page="areas"]) .v-areas,
html:not([data-page="warranty"]) .v-warranty,
html:not([data-page="pressure"]) .v-pressure,
/* groups on the lead page: svc-like = service + warranty, rep-like = repairs + pressure, full-only = service + repairs */
html:not([data-page="service"]):not([data-page="warranty"]) .svc-like,
html:not([data-page="repairs"]):not([data-page="pressure"]) .rep-like,
html:not([data-page="service"]):not([data-page="repairs"]) .full-only,
[data-page="whatsapp"] .not-whatsapp { display: none; }

.btn-wa-big { min-height: 64px; font-size: 1.2rem; margin: 4px 0 8px; }
/* "Areas covered" map: Google Maps embed with the coverage circle drawn on top (see main.js) */
.area-map {
  position: relative;
  height: 360px;
  margin: 8px 0 10px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.area-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.area-map-hit { position: absolute; inset: 0; cursor: pointer; }
.area-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: rgba(254, 131, 15, 0.16);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  pointer-events: none;
}
.area-map-link { margin: 0 0 8px; }
@media (min-width: 860px) { .lp .area-map { height: 440px; } }
.gasbar {
  display: block;
  background: #fff;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.gasbar:hover { text-decoration: underline; }

/* Header, copied from jdpheating.co.uk: dark bar, transparent logo, nav, blue quote pill */
.site-header { background: var(--dark); color: #fff; position: relative; z-index: 40; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 84px; padding-top: 8px; padding-bottom: 8px; }
.logo-link { display: block; flex: none; }
.logo { display: block; width: auto; height: 68px; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 16px;
  background: var(--quote-blue); color: #fff;
  border: 0; border-radius: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
}
/* Mobile: logo centred, menu button on the left, nav drops down under the bar */
.header-row { position: relative; }
.header-row .logo-link { position: absolute; left: 50%; transform: translateX(-50%); }
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark); border-top: 1px solid #4b4b4b; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { padding: 8px 20px 16px; }
.site-nav a { display: block; padding: 12px 0; color: #e5e5e5; text-decoration: none; font-weight: 700; }
.site-nav a:hover { color: #fff; }
.site-nav li ul a { padding: 10px 0 10px 16px; font-weight: 400; color: #cfcfcf; }
.quote-btn { text-transform: uppercase; }
.site-nav .quote-btn { display: inline-block; margin-top: 8px; padding: 10px 18px; background: var(--quote-blue); color: #fff; border-radius: 999px; font-size: 0.95rem; }
.site-nav .quote-btn:hover { background: #0258b5; }
.hero { background: var(--bg-soft); padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 24px; }

.badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.sub { color: var(--muted); margin: 0 0 16px; }
.price { font-size: 1.3rem; font-weight: 800; margin: 0 0 8px; color: var(--navy); padding-left: 12px; border-left: 5px solid var(--orange); }
.note { color: var(--muted); font-size: 0.95rem; margin: 6px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.or { text-align: center; color: var(--muted); font-weight: 700; margin: 18px 0 10px; }
.btn-wa:hover { background: #1fbe5a; }
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { opacity: 0.7; cursor: wait; }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-small { min-height: 48px; padding: 10px 18px; width: auto; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(27, 52, 93, 0.10);
}

.field { margin-bottom: 14px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid #9ca3af;
  border-radius: 8px;
}
textarea { min-height: 96px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: 0.95rem; margin: 4px 0 0; min-height: 0; }
.err:empty { display: none; }
.form-error { color: var(--error); font-weight: 700; margin: 12px 0 0; }
.small { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.success { padding: 20px 0; font-size: 1.3rem; font-weight: 800; color: var(--navy); }

.about, .work { padding: 40px 0; }
.about-grid { display: grid; gap: 20px; align-items: center; }
.about-photo { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; display: block; }
#james-photo-slot:empty { display: none; }

.work { background: var(--bg-soft); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.work-item:empty { display: none; }
.work-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }

.footer { background: var(--dark); color: #fff; padding: 28px 0 100px; border-top: 4px solid var(--orange); }
.footer p { margin: 0 0 6px; }
.footer a { color: #fff; }

.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  max-width: 560px;
  margin: 0 auto;
}
.cookie-banner p { margin: 0 0 12px; }
.cookie-actions { display: flex; gap: 10px; }

/* Privacy page */
.doc { padding: 32px 0 48px; max-width: 760px; }
.doc h2 { margin-top: 28px; }

@media (min-width: 980px) {
  .header-row { min-height: 120px; }
  .header-row .logo-link { position: static; transform: none; }
  .logo { height: 100px; }
  .menu-btn { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .site-nav > ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .site-nav > ul > li { position: relative; }
  .site-nav > ul > li > a { padding: 10px 14px; color: #d4d4d4; }
  .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
  .site-nav li ul { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px 0; background: var(--dark); border-radius: 0 0 8px 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
  .has-sub:hover > ul, .has-sub:focus-within > ul { display: block; }
  .site-nav li ul a { padding: 10px 18px; }
  .site-nav .quote-btn { margin: 0 0 0 10px; padding: 10px 16px; font-size: 0.9rem; }
}

@media (min-width: 860px) {
  h1 { font-size: 2.6rem; }
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
  .about-grid { grid-template-columns: 200px 1fr; }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .footer { padding-bottom: 28px; }
}

/* ---------- Full lead page (index.html: /, /service, /repairs) ----------
   Brand hexes only: navy #1b345d, orange #fe830f, dark #333333, soft grey #eaeaea.
   The price sticker is the one signature element; everything else stays quiet. */
html[data-page="service"], html[data-page="repairs"], html[data-page="warranty"], html[data-page="pressure"] { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
.lp #enquiry { scroll-margin-top: 12px; }
.gasbar-check { text-decoration: underline; }

.lp-hero { background: var(--bg-soft); padding: 28px 0 40px; border-bottom: 1px solid var(--line); }
.lp-hero-grid { display: grid; gap: 20px; }
.lp-title h1 { font-size: 2.3rem; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
.james-photo img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.lp-sub { margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.lp-ctas { display: grid; gap: 12px; }
.lp-direct { margin: 0; font-weight: 700; color: var(--navy); }

.sticker {
  max-width: 320px;
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(27, 52, 93, 0.18);
  transform: rotate(-1.5deg);
}
.sticker p { margin: 0; text-align: center; }
.sticker-label {
  background: var(--orange);
  color: var(--navy);
  border-bottom: 3px solid var(--navy);
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sticker-price { padding: 16px 12px 2px; font-size: 2.4rem; font-weight: 900; line-height: 1.1; color: var(--navy); }
.sticker-ex { padding: 0 12px 16px; font-size: 1rem; color: var(--muted); }

.lp-section { padding: 44px 0; border-top: 1px solid var(--line); }
.lp-section > .wrap > p { margin: 0 0 14px; }
.lp-section h2, .lp-form-section h2, .lp-close h2 { font-size: 1.6rem; color: var(--navy); margin: 0 0 18px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: start; align-content: start; }
.step-num {
  grid-row: span 2;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  font-weight: 800; font-size: 1.25rem;
}
.steps h3 { margin: 10px 0 2px; font-size: 1.15rem; color: var(--ink); }
.steps p { grid-column: 2; margin: 0; color: var(--muted); }

.covers { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.covers li { position: relative; padding-left: 32px; }
.covers li::before {
  content: ""; position: absolute; left: 4px; top: 0.4em;
  width: 14px; height: 8px;
  border-left: 3px solid var(--navy); border-bottom: 3px solid var(--navy);
  transform: rotate(-45deg);
}
.covers-extra { color: var(--muted); }

.rating { font-weight: 800; color: var(--navy); }
.reviews { display: grid; gap: 14px; margin: 0 0 14px; }
.review { margin: 0; padding: 18px 20px; background: var(--bg-soft); border-left: 4px solid var(--orange); border-radius: 10px; }
.review p { margin: 0 0 8px; }
.review footer { font-weight: 700; color: var(--navy); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { min-height: 52px; padding: 14px 0; font-weight: 700; color: var(--navy); cursor: pointer; }
.faq details p { margin: 0 0 16px; }

.lp-form-section { background: var(--bg-soft); padding: 44px 0; border-top: 1px solid var(--line); }
.lp-form-section .form-card { max-width: 620px; margin: 0 auto; }

.lp-close { background: var(--navy); color: #fff; padding: 44px 0; text-align: center; }
.lp-close h2 { color: #fff; }
.lp-close .lp-ctas { max-width: 640px; margin: 0 auto; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, visibility 0.2s;
}
.sticky-cta .btn { flex: 1 1 0; min-height: 52px; padding: 10px 12px; }
.sticky-cta.is-off { transform: translateY(110%); visibility: hidden; }

@media (min-width: 860px) {
  .lp-hero { padding: 64px 0 72px; }
  .lp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "title sticker" "sub sticker" "ctas sticker" "direct sticker";
    column-gap: 64px; row-gap: 20px; align-items: start;
  }
  [data-page="repairs"] .lp-hero-grid, [data-page="pressure"] .lp-hero-grid { grid-template-columns: minmax(0, 820px); grid-template-areas: "title" "sub" "ctas" "direct"; }
  .lp-title { grid-area: title; display: flex; align-items: center; gap: 24px; }
  .lp-title h1 { font-size: 3.4rem; }
  .james-photo img { width: 128px; height: 128px; margin: 0; }
  .lp-sub { grid-area: sub; font-size: 1.25rem; }
  .sticker { grid-area: sticker; align-self: center; width: 100%; }
  .lp-ctas { grid-area: ctas; grid-auto-flow: column; justify-content: start; }
  .lp-ctas .btn { width: auto; padding-left: 28px; padding-right: 28px; }
  .lp-direct { grid-area: direct; }
  .lp-section, .lp-form-section, .lp-close { padding: 64px 0; }
  .lp-section h2, .lp-form-section h2, .lp-close h2 { font-size: 2rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { grid-template-columns: 1fr; }
  .step-num { grid-row: auto; margin-bottom: 4px; }
  .steps p { grid-column: auto; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .lp-close .lp-ctas { justify-content: center; }
  .sticky-cta { display: none; }
}
/* Lead page: nothing under 16px (the shared rules use 0.9rem = 14.4px; /whatsapp and /areas keep theirs) */
.lp .gasbar, .lp .small, .lp .note, .lp .err, .lp .site-nav .quote-btn { font-size: 1rem; }