/* ============================================================
   Plumbing network stylesheet
   Identity: deep ink navy + copper + warm white; emergency red.
   Forced-light armour throughout: this site renders light-mode
   only, regardless of OS/browser dark preference or extensions.
   ============================================================ */

/* ---------- Fonts (self-hosted, Fontsource) ---------- */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/archivo-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/archivo-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

/* ---------- Forced-light armour ---------- */
:root { color-scheme: only light; }
html { background: #f7f5f1 !important; }
@media (prefers-color-scheme: dark) {
  html, body { background: #f7f5f1 !important; color: #17202e !important; }
}

/* ---------- Tokens ---------- */
:root {
  --ink: #17202e;          /* deep navy-ink: headings, footer bg */
  --ink-soft: #2c3a4f;
  --body: #33404f;
  --muted: #5c6a7a;
  --paper: #f7f5f1;        /* warm white page */
  --card: #ffffff;
  --line: #e3ded4;
  --copper: #b26e3f;       /* accent */
  --copper-deep: #8f5228;
  --copper-pale: #f3e7db;
  --emergency: #c0392b;    /* red CTA family */
  --emergency-deep: #96281b;
  --ok: #2e7d4f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23,32,46,.06), 0 4px 16px rgba(23,32,46,.07);
  --wrap: 1120px;
  --step-0: 1rem;
  --step-1: 1.185rem;
  --step-2: 1.4rem;
  --step-3: 1.68rem;
  --step-4: 2.1rem;
  --step-5: 2.7rem;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 var(--step-0)/1.65 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--body);
  background: var(--paper) linear-gradient(180deg, #f7f5f1 0%, #f7f5f1 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Archivo', 'Inter', sans-serif; color: var(--ink); line-height: 1.18; margin: 0 0 .55em; letter-spacing: -.012em; }
h1 { font-size: var(--step-5); font-weight: 800; }
h2 { font-size: var(--step-4); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: var(--step-2); font-weight: 700; margin-top: 1.3em; }
p { margin: 0 0 1.05em; }
a { color: var(--copper-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; }
li { margin-bottom: .35em; }
strong { color: var(--ink); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Copper pipe-line divider motif */
.pipe-divider { border: 0; height: 4px; margin: 2.2rem 0; background:
  linear-gradient(90deg, var(--copper) 0 38px, transparent 38px 46px, var(--copper) 46px 54px, transparent 54px 62px, var(--copper) 62px 100%);
  border-radius: 2px; opacity: .55; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
@media (prefers-color-scheme: dark) { .site-header { background: #fff !important; } }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-weight: 800; font-size: 1.28rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.logo .mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--copper) 0%, var(--copper-deep) 100%); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .93rem; padding: 9px 12px; border-radius: 8px; }
.nav a:hover { background: var(--copper-pale); color: var(--ink); }
.nav .cta-call { background: var(--emergency); color: #fff !important; padding: 10px 16px; border-radius: 9px; font-weight: 700; }
.nav .cta-call:hover { background: var(--emergency-deep); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .nav .cta-call { text-align: center; margin-top: 6px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink) linear-gradient(160deg, #17202e 0%, #223047 78%, #2a3c55 100%); color: #e8e4dc; padding: 3.4rem 0 3rem; }
@media (prefers-color-scheme: dark) { .hero { background: #17202e !important; } }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero .lede { font-size: var(--step-1); max-width: 46em; color: #cfd6e0; }
.hero .kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--copper); background: rgba(178,110,63,.14); border: 1px solid rgba(178,110,63,.4); padding: 4px 11px; border-radius: 999px; margin-bottom: 1.1rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 700; border-radius: 9px; padding: 13px 22px; font-size: 1rem; border: 0; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-emergency { background: var(--emergency); color: #fff; }
.btn-emergency:hover { background: var(--emergency-deep); color: #fff; }
.btn-copper { background: var(--copper); color: #fff; }
.btn-copper:hover { background: var(--copper-deep); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-soft); }
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }

/* ---------- Sections & cards ---------- */
.section { padding: 2.6rem 0; }
.section-alt { background: #fdfcfa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; font-size: 1.12rem; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--copper-deep); }
.card p { font-size: .94rem; color: var(--muted); margin-bottom: .4em; }
.card .from { font-weight: 700; color: var(--copper-deep); font-size: .92rem; }
.card-link-list a { display: block; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.card-link-list a:last-child { border-bottom: 0; }
.card-link-list a:hover { color: var(--copper-deep); }

/* Emergency strip */
.emergency-strip {
  position: relative;
  background: linear-gradient(100deg, #a52f22 0%, var(--emergency) 45%, #d14836 100%);
  color: #fff;
  padding: 1rem 0;
  border-top: 3px solid #7d1f14;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 10px rgba(150,40,27,.25);
  overflow: hidden;
}
.emergency-strip::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-55deg, rgba(255,255,255,.05) 0 14px, transparent 14px 34px);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .emergency-strip { background: #c0392b !important; color: #fff !important; } }
.es-inner { display: flex; align-items: center; gap: 18px; position: relative; }
.es-badge {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-weight: 800; font-size: .86rem; letter-spacing: .06em;
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.3);
  padding: 7px 13px; border-radius: 999px; color: #fff;
}
.es-pulse {
  width: 9px; height: 9px; border-radius: 50%; background: #ffd34d;
  box-shadow: 0 0 0 0 rgba(255,211,77,.65);
  animation: es-pulse 1.8s ease-out infinite;
}
@keyframes es-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,211,77,.65); }
  70% { box-shadow: 0 0 0 9px rgba(255,211,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,211,77,0); }
}
.es-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.es-text strong {
  color: #fff; font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-weight: 700;
  font-size: 1.1rem; line-height: 1.25; letter-spacing: -.01em;
}
.es-text span { color: #ffe0da; font-size: .92rem; line-height: 1.4; }
.es-call {
  flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 11px;
  background: #fff; color: var(--emergency-deep); text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(80,15,8,.3), inset 0 -2px 0 rgba(150,40,27,.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.es-call:hover { color: var(--emergency-deep); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(80,15,8,.35), inset 0 -2px 0 rgba(150,40,27,.18); }
.es-icon { flex: none; }
.es-call-text { display: flex; flex-direction: column; line-height: 1.15; }
.es-call-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #b8543f; }
.es-call-num { font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; }
@media (max-width: 720px) {
  .es-inner { flex-wrap: wrap; gap: 10px 14px; }
  .es-badge { order: 1; }
  .es-text { order: 2; flex: 1 1 100%; }
  .es-call { order: 3; margin-left: 0; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .es-pulse { animation: none; } }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table.data { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
table.data caption { caption-side: top; text-align: left; font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-weight: 700; color: var(--ink); padding: 0 0 .5rem; font-size: 1.02rem; }
table.data th { background: var(--ink); color: #fff; text-align: left; padding: 11px 14px; font-weight: 600; font-size: .9rem; }
@media (prefers-color-scheme: dark) { table.data th { background: #17202e !important; color: #fff !important; } }
table.data td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: #faf8f5; }

/* ---------- Forms ---------- */
.lead-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.lead-form h2, .lead-form h3 { margin-top: 0; }
.lead-form .form-note { font-size: .88rem; color: var(--muted); margin-top: .2em; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid #cfc9bd; border-radius: 8px;
  font: inherit; font-size: .98rem; background: #fff !important; color: var(--ink) !important;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--copper); border-color: var(--copper); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; font-weight: 600; display: none; }
.form-status.ok { display: block; color: var(--ok); }
.form-status.err { display: block; color: var(--emergency); }
.urgency-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.urgency-tabs button { flex: 1; padding: 10px; border-radius: 8px; border: 1.5px solid var(--line); background: #faf8f5; font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.urgency-tabs button.active { background: var(--emergency); border-color: var(--emergency); color: #fff; }
.urgency-tabs button.active.std { background: var(--copper); border-color: var(--copper); }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 1rem 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--copper-deep); text-decoration: underline; }
.crumbs span.sep { margin: 0 6px; color: #b8b1a4; }

/* ---------- FAQ ---------- */
.faq { margin: 1.5rem 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 15px 18px; font-family: 'Archivo', 'Inter', system-ui, sans-serif; font-size: 1rem; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 17px; top: 50%; transform: translateY(-52%); color: var(--copper); font-size: 1.35rem; font-weight: 600; }
.faq details[open] summary::after { content: '\2212'; }
.faq .faq-a { padding: 0 18px 15px; color: var(--body); }

/* ---------- Local info blocks ---------- */
.local-note { background: var(--copper-pale); border-left: 4px solid var(--copper); border-radius: 0 var(--radius) var(--radius) 0; padding: 15px 18px; margin: 1.3rem 0; font-size: .96rem; }
.local-note strong { color: var(--copper-deep); }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 1.2rem 0; font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.trust-row span::before { content: '\2713\00a0'; color: var(--ok); font-weight: 800; }

/* ---------- Prose (guides) ---------- */
.prose { max-width: 760px; }
.prose h2 { position: relative; padding-top: .3em; }
.prose h2::before { content: ''; display: block; width: 46px; height: 3px; background: var(--copper); border-radius: 2px; margin-bottom: .55em; }
.guide-meta { font-size: .88rem; color: var(--muted); margin-bottom: 1.6rem; }
.related-block { background: #fdfcfa; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 2rem 0; }
.related-block h3 { margin-top: 0; font-size: 1.05rem; }
.related-block ul { margin-bottom: 0; }

/* ---------- Sticky bottom CTA (mobile/tablet) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff !important;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(23,32,46,.14);
}
@media (prefers-color-scheme: dark) { .sticky-cta { background: #fff !important; } }
.sticky-cta a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-weight: 800; font-size: 1rem; letter-spacing: .01em;
  padding: 13px 10px; border-radius: 11px;
}
.sticky-cta .sc-call {
  background: linear-gradient(160deg, var(--emergency) 0%, #a52f22 100%);
  color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.sticky-cta .sc-call:active { transform: translateY(1px); }
.sticky-cta .sc-quote {
  background: #fff; color: var(--copper-deep);
  border: 2px solid var(--copper);
}
.sticky-cta .sc-quote:active { background: var(--copper-pale); }
@media (max-width: 940px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 74px; } /* keep footer content clear of the bar */
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c1cd; margin-top: 3.5rem; padding: 2.8rem 0 1.6rem; font-size: .92rem; }
@media (prefers-color-scheme: dark) { .site-footer { background: #17202e !important; } }
.site-footer h4 { color: #fff; font-size: .98rem; margin-bottom: .7em; }
.site-footer a { color: #cfd6e0; text-decoration: none; }
.site-footer a:hover { color: var(--copper); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-legal { border-top: 1px solid #2c3a4f; margin-top: 2rem; padding-top: 1.3rem; font-size: .82rem; color: #8794a6; }
.footer-legal a { color: #8794a6; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: .88rem; color: var(--muted); }
.badge { display: inline-block; background: var(--copper-pale); color: var(--copper-deep); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.two-col { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 34px; align-items: start; }
@media (max-width: 940px) { .two-col { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: 84px; }

/* ═══════════ Heating-site additions ═══════════ */

/* Gas Safe notice — appears on every gas-appliance page */
.gas-safe-note {
  background: #eef6ff !important;
  color: #10243a !important;
  border-left: 4px solid #1a6fb5;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 18px;
  margin: 1.4rem 0;
  font-size: .95rem;
  line-height: 1.55;
}
.gas-safe-note strong { color: #124a7c !important; }
@media (prefers-color-scheme: dark) {
  .gas-safe-note { background: #eef6ff !important; color: #10243a !important; }
  .gas-safe-note strong { color: #124a7c !important; }
}

/* Winter mode banner on guides */
.winter-banner {
  background: #0e2f4a !important;
  color: #f2f8ff !important;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 1.4rem;
  font-size: .95rem;
}
.winter-banner a { color: #9ed0ff !important; text-decoration: underline; }
.winter-banner strong { color: #fff !important; }
@media (prefers-color-scheme: dark) {
  .winter-banner { background: #0e2f4a !important; color: #f2f8ff !important; }
}

/* Carbon monoxide safety link */
.co-link {
  font-size: .95rem;
  margin: 1.2rem 0;
  padding-left: 14px;
  border-left: 3px solid #c0392b;
}

/* Multi-step quote form */
.quote-step { border: 0; padding: 0; margin: 0 0 .4rem; }
.quote-step legend {
  font-family: var(--font-head, inherit);
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: .6rem;
  padding: 0;
  color: var(--ink, #16202b) !important;
}
.quote-step[hidden] { display: none; }
.quote-progress { margin: 0 0 1rem; }
.qp-bar {
  display: block;
  height: 6px;
  background: #e3e8ee !important;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .4rem;
}
.qp-fill {
  display: block;
  height: 100%;
  width: 16.6%;
  background: var(--copper, #b5651d) !important;
  border-radius: 99px;
  transition: width .25s ease;
}
.qp-label { font-size: .82rem; color: #667585 !important; }
.quote-nav { display: flex; gap: 10px; align-items: center; margin-top: .6rem; }
.quote-nav .btn { flex: 1 1 auto; }
.quote-nav [hidden] { display: none !important; }
@media (prefers-color-scheme: dark) {
  .qp-bar { background: #e3e8ee !important; }
  .qp-label { color: #667585 !important; }
}

/* Error code + brand page bits */
.code-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  background: #16202b !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: .9rem;
  letter-spacing: .04em;
}
.brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: .9rem;
  color: #4a5866 !important;
  margin: .6rem 0 1.2rem;
}
.brand-meta span { white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .code-badge { background: #16202b !important; color: #fff !important; }
  .brand-meta { color: #4a5866 !important; }
}
