/* ==========================================================================
   Ferraro Heating: site styles
   BRAND COLOURS: change these to match the logo, and the whole site updates.
   ========================================================================== */
:root {
  --brand: #0b1628;         /* logo background navy (headings, header, dark sections) */
  --brand-dark: #070f1c;
  --accent: #1f6bff;        /* logo flame blue (buttons, highlights) */
  --accent-dark: #1553d1;
  --accent-light: #7fb0ff;  /* flame blue on dark backgrounds */
  --accent-soft: #e6efff;
  --silver: #d4d9e1;        /* logo wordmark silver */

  --ink: #1a2233;
  --muted: #566074;
  --bg: #fbfcfe;
  --tint: #f1f5fb;          /* cool light tint for alternating sections */
  --line: #e1e7f0;
  --white: #fff;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(11, 22, 40, .28);
  --font-head: "Nunito", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--brand);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; text-wrap: balance; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .6em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
  padding: 14px 24px; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px var(--accent); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-light { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-sm { padding: 9px 18px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 22, 40, .96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.brand-mark { flex: none; height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; font-family: var(--font-head); line-height: 1; }
.brand-text strong {
  font-size: 1.45rem; font-weight: 900; letter-spacing: .14em;
  background: linear-gradient(180deg, #fff 0%, var(--silver) 60%, #aab2bf 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text small { font-size: .78rem; font-weight: 700; color: var(--silver); letter-spacing: .04em; margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; }
.site-nav ul a {
  font-family: var(--font-head); font-weight: 700; color: var(--silver);
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { color: #fff; border-color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 10px; width: 24px; height: 3px;
  background: #fff; border-radius: 3px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 50%; margin-top: -1.5px; }
.nav-toggle-bar::before { left: 0; top: -8px; }
.nav-toggle-bar::after { left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
  color: var(--silver);
  background:
    radial-gradient(520px 380px at 85% 15%, rgba(31, 107, 255, .35), transparent 70%),
    radial-gradient(500px 400px at -10% 110%, rgba(31, 107, 255, .18), transparent 70%),
    var(--brand);
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--accent-light); }
.hero .btn-outline { border-color: rgba(255, 255, 255, .5); color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--brand); border-color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
/* Logo and Gas Safe images are transparent PNGs cut from the logo artwork (made for dark backgrounds) */
.hero-logo { width: min(300px, 70%); height: auto; margin: -8px 0 20px; }
.gas-safe { flex: none; height: auto; }
.hero-trust { display: flex; align-items: center; gap: 22px; }
.hero-trust .gas-safe { width: 76px; }
.hero-trust .trust-list { flex-direction: column; gap: 8px; }
.footer-about { display: flex; gap: 18px; align-items: flex-start; }
.footer-about .gas-safe { width: 60px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero .lead { color: var(--silver); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 26px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust-list li { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.tick {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); flex: none;
  position: relative;
}
.tick::after {
  content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

.hero-card {
  background: #fff; border-radius: 24px; padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); border: 1px solid var(--line);
  transform: rotate(1.5deg); color: var(--ink);
}
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 20%, var(--accent));
  color: #fff; font-family: var(--font-head); font-size: 2.6rem; font-weight: 900;
  border: 4px solid #fff; box-shadow: 0 0 0 3px var(--accent-soft);
  margin-bottom: 16px;
}
.hero-card-hello { font-family: var(--font-head); font-size: 1.5rem; font-weight: 900; color: var(--brand); margin-bottom: .4em; }
.hero-card-text { color: var(--muted); }
.hero-card-link { font-family: var(--font-head); font-weight: 800; text-decoration: none; color: var(--accent-dark); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-tint { background: var(--tint); }
.section-brand { background: var(--brand); color: var(--silver); }
.section-brand h2 { color: #fff; }
.section-brand .eyebrow { color: var(--accent-light); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }

/* Services */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); margin: 0; }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg, .contact-icon svg {
  width: 28px; height: 28px; fill: none; stroke: var(--accent-dark);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.why-grid li { border-top: 4px solid var(--accent); padding-top: 18px; }
.why-grid p { color: var(--muted); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.about-photo img,
.photo-placeholder {
  height: auto; /* let aspect-ratio set the height, not the img's height attribute */
  object-position: center top;
  width: 100%; aspect-ratio: 7 / 8; object-fit: cover; border-radius: 28px;
  box-shadow: 16px 16px 0 var(--accent-soft);
}
.photo-placeholder {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, var(--tint), var(--tint) 14px, #e4ebf5 14px, #e4ebf5 28px);
  color: var(--muted); font-weight: 700; border: 2px dashed var(--line);
}
.badges { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.badge {
  display: flex; flex-direction: column; padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--tint); border-left: 4px solid var(--brand); line-height: 1.3;
}
.badge strong { font-family: var(--font-head); color: var(--brand); }
.badge span { font-size: .9rem; color: var(--muted); }

/* Areas */
.areas { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.county-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.county {
  padding: 28px 26px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
}
.county-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent); margin-bottom: 16px;
}
.county-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.county h3 { color: #fff; font-size: 1.9rem; font-weight: 900; margin-bottom: .3em; }
.county p { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--silver); }

/* FAQ */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 12px; padding: 0 24px;
}
.faq details[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq summary {
  font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; color: var(--brand);
  padding: 20px 32px 20px 0; cursor: pointer; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--accent); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact-copy p { color: var(--muted); }
.hours { color: var(--ink) !important; }
.contact-list { display: grid; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--brand); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow-wrap: anywhere;
}
.contact-item:hover { transform: translateX(4px); box-shadow: var(--shadow); color: var(--brand); }
.contact-item small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .85rem; color: var(--muted); }
.contact-icon {
  flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft);
  display: grid; place-items: center;
}
.contact-icon svg { width: 24px; height: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: #9aa6b8; padding: 56px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner p { margin: 0 0 .3em; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; color: var(--silver); }
.footer-brand strong { color: #fff; letter-spacing: .12em; font-weight: 900; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 20px; font-size: .9rem; }
.footer-legal p { margin: 0; }

.mobile-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    background: var(--brand); border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding: 16px 20px 24px; box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .2);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav ul a { display: block; padding: 10px 0; font-size: 1.1rem; }

  .hero-inner, .about, .areas, .contact { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { transform: none; }
  .about-photo { max-width: 420px; }

  /* leave room for the sticky call bar */
  body { padding-bottom: 76px; }
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 252, 254, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 20px -12px rgba(0, 0, 0, .2);
  }
  .mobile-cta .btn { padding: 12px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .card-grid, .why-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-card { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
