/* Elite Heating Care Ltd — base stylesheet
   Designed for older and less tech-confident customers:
   19-21px body text, 7:1 contrast, 44px+ tap targets, no motion, no popups. */

:root {
  --ink:        #0b0c0c;   /* 17.9:1 on white — exceeds WCAG AAA */
  --ink-soft:   #3d4142;   /* 9.7:1  — still AAA for body text   */
  --rule:       #c9ccce;
  --bg:         #ffffff;
  --bg-tint:    #f3f5f5;
  --brand:      #0b4f9e;   /* 7.9:1 on white — AAA                */
  --brand-dk:   #08386f;
  --urgent:     #9e2a0b;   /* 7.3:1 on white — AAA                */
  --urgent-bg:  #fdf2ef;
  --safe:       #0f5c3f;
  --gas-yellow: #fff200;
  --focus:      #b8401f;
  --maxw:       68rem;
}

* { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;  /* stop iOS shrinking text */
  scroll-behavior: auto;            /* no smooth-scroll: disorienting */
}

body {
  margin: 0;
  /* System fonts — zero network cost, render instantly, respect OS text settings */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1.25rem;      /* 20px — above the 19px GOV.UK baseline */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* Room for the fixed call bar on mobile so it never covers content */
  padding-bottom: 5.5rem;
}

/* ---------- Skip link + focus (WCAG 2.4.13) ---------- */
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff;
  padding: 1rem 1.5rem; z-index: 200; font-weight: 700;
}
.skip:focus { left: 0; top: 0; }

a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
header.site {
  border-bottom: 4px solid var(--brand);
  background: var(--bg);
}
.bar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  padding: 1rem 0;
}
.brandmark { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brandmark img { height: 52px; width: auto; }
.brandmark b { font-size: 1.3rem; line-height: 1.15; display: block; }
.brandmark span { font-size: .95rem; color: var(--ink-soft); }

/* Desktop phone — large, because people copy it onto a landline */
.hdr-phone {
  text-align: right; text-decoration: none; color: var(--ink);
  display: block; padding: .4rem .25rem;
}
.hdr-phone strong { display: block; font-size: 1.75rem; color: var(--brand-dk); letter-spacing: .5px; }
.hdr-phone em { font-style: normal; font-size: .95rem; color: var(--ink-soft); }

/* ---------- Navigation: plain, always visible, no hamburger ---------- */
nav.main { border-top: 1px solid var(--rule); background: var(--bg-tint); }
nav.main ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
nav.main a {
  display: block;
  padding: .85rem 1.1rem;       /* ≥44px tall target */
  min-height: 44px;
  color: var(--brand-dk);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
nav.main a:hover { background: var(--brand); color: #fff; }
nav.main a[aria-current="page"] { background: var(--brand-dk); color: #fff; }

/* ---------- Typography ---------- */
h1 { font-size: 2.35rem; line-height: 1.2; margin: 2rem 0 1rem; }
h2 { font-size: 1.75rem; line-height: 1.25; margin: 2.5rem 0 .85rem; }
h3 { font-size: 1.35rem; line-height: 1.3; margin: 1.75rem 0 .6rem; }
p, li { max-width: 42em; }
p { margin: 0 0 1.15rem; }
ul.spaced li, ol.spaced li { margin-bottom: .7rem; }

main a { color: var(--brand-dk); text-underline-offset: 3px; }
main a:hover { color: var(--urgent); }

.lede { font-size: 1.4rem; line-height: 1.5; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; min-height: 56px;
  padding: .95rem 1.6rem;
  font-size: 1.25rem; font-weight: 700;
  text-decoration: none; border: 3px solid transparent;
  border-radius: 4px; cursor: pointer;
}
.btn-call   { background: var(--urgent); color: #fff; border-color: var(--urgent); }
.btn-call:hover   { background: #7d2108; color: #fff; }
.btn-ghost  { background: #fff; color: var(--brand-dk); border-color: var(--brand-dk); }
.btn-ghost:hover  { background: var(--brand-dk); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-tint); border-bottom: 1px solid var(--rule); padding: 1px 0 2rem; }
.hero h1 { margin-bottom: .75rem; }

/* ---------- Gas Safe verification box ---------- */
.gassafe {
  border: 3px solid var(--ink);
  background: #fff;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap;
}
.gassafe img { width: 90px; height: auto; flex-shrink: 0; }
.gassafe .num {
  font-size: 1.9rem; font-weight: 800; letter-spacing: 1px;
  display: block; margin: .25rem 0 .6rem;
}
.gassafe p:last-child { margin-bottom: 0; }

/* ---------- Gas emergency notice ---------- */
.emergency {
  border: 3px solid var(--urgent);
  background: var(--urgent-bg);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.emergency strong { color: var(--urgent); font-size: 1.3rem; display: block; margin-bottom: .4rem; }
.emergency p:last-child { margin-bottom: 0; }
.emergency a { color: var(--urgent); font-weight: 700; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
.card {
  border: 2px solid var(--rule); border-left: 8px solid var(--brand);
  padding: 1.35rem 1.5rem; background: #fff;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card a.more { font-weight: 700; display: inline-block; min-height: 44px; padding-top: .5rem; }

/* ---------- Honest placeholder (no fake stock photos) ---------- */
.placeholder {
  border: 3px dashed var(--rule); background: var(--bg-tint);
  padding: 2rem 1.5rem; text-align: center; color: var(--ink-soft);
  margin: 1.5rem 0;
}

/* ---------- Tables (prices) ---------- */
table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 1.15rem; }
caption { text-align: left; font-weight: 700; padding-bottom: .6rem; font-size: 1.2rem; }
th, td { border: 1px solid var(--rule); padding: .9rem 1rem; text-align: left; vertical-align: top; }
th { background: var(--bg-tint); }
td.price { font-weight: 700; white-space: nowrap; }

/* ---------- FAQ: open by default, <details> so it works without JS ---------- */
details.faq { border-bottom: 2px solid var(--rule); padding: .4rem 0; }
details.faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.25rem;
  padding: .95rem .25rem; min-height: 44px; list-style-position: outside;
}
details.faq[open] summary { color: var(--brand-dk); }
details.faq > *:not(summary) { padding: 0 .25rem .5rem; }

/* ---------- Forms ---------- */
form.enquiry { max-width: 34rem; margin: 1.5rem 0; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 700; margin-bottom: .45rem; font-size: 1.2rem; }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 1.05rem; margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1.2rem;
  padding: .85rem .9rem; min-height: 56px;
  border: 3px solid var(--ink-soft); border-radius: 3px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-dk); }

/* ---------- Fixed call bar (mobile only) ---------- */
.callbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--urgent); border-top: 4px solid #6d1c06;
  display: none;
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 64px; padding: .5rem 1rem;
  color: #fff; font-size: 1.35rem; font-weight: 800;
  text-decoration: none; letter-spacing: .5px;
}

/* ---------- Footer ---------- */
footer.site {
  margin-top: 3.5rem; border-top: 4px solid var(--brand);
  background: var(--bg-tint); padding: 2rem 0;
  font-size: 1.1rem;
}
footer.site h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
footer.site ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
footer.site li { margin-bottom: .2rem; }
footer.site a { display: inline-block; padding: .5rem 0; min-height: 44px; color: var(--brand-dk); }
.foot-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.legal {
  border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: 1.25rem;
  color: var(--ink-soft); font-size: 1rem;
}
.legal p { max-width: none; }

/* ---------- TODO marker: visible so nothing ships half-finished ---------- */
.todo {
  background: #fff8c5; border: 3px solid #8a6d00; color: #4a3b00;
  padding: 1rem 1.25rem; margin: 1.25rem 0; font-size: 1.1rem;
}
.todo strong { color: #6b5400; }

/* ---------- Responsive ---------- */
@media (max-width: 48rem) {
  body { font-size: 1.2rem; }
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.5rem; }
  .hdr-phone { display: none; }   /* replaced by the fixed call bar */
  .callbar { display: block; }
  .bar { padding: .85rem 0; }
  .brandmark img { height: 44px; }
}

@media (min-width: 48rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 62rem) {
  .cards.three { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Respect reduced-motion and forced-colours ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Print: put the phone number on paper ---------- */
@media print {
  .callbar, nav.main, form.enquiry { display: none; }
  body { font-size: 12pt; padding-bottom: 0; }
  a[href^="tel:"]::after { content: ""; }
}

/* real photos */
figure.photo { margin: 1.5rem 0; max-width: 380px; }
figure.photo img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
figure.photo figcaption { font-size: .95rem; margin-top: .5rem; color: var(--ink-soft, #333); }

/* let long price wording wrap on phones instead of pushing the page sideways */
@media (max-width: 600px) {
  td.price { white-space: normal; }
  th, td { padding: .7rem .6rem; }
  table { font-size: 1.05rem; }
}

.map-wrap { margin: 1.5rem 0 .5rem; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.map-wrap iframe { display: block; width: 100%; height: 420px; border: 0; }
.map-note { font-size: .95rem; margin-top: .5rem; }
@media (max-width: 600px){ .map-wrap iframe { height: 320px; } }
