/* =============================================================================
   Fylde Boiler Co. — design system
   -----------------------------------------------------------------------------
   Premium, minimal, trustworthy. Restrained palette, confident typography,
   generous whitespace. System-font stack for performance (no web fonts, so no
   render-blocking / layout shift). A small critical subset of this file is
   also inlined into each page's <head>; this full sheet is loaded async.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  --ink:        #141414;   /* near-black text */
  --ink-soft:   #3a3a38;   /* secondary text */
  --ink-mute:   #6b6b66;   /* muted / captions */
  --paper:      #FAFAF8;   /* off-white background */
  --paper-2:    #F2F1EC;   /* subtle section tint */
  --line:       #E4E2DA;   /* hairline borders */
  --accent:     #12303A;   /* deep navy/forest — brand */
  --accent-ink: #0b1f27;   /* darker accent for hovers */
  --accent-soft:#1c4553;   /* lighter accent */
  --wa:         #25D366;   /* WhatsApp green — reserved for CTA only */
  --wa-ink:     #1ebe5a;   /* WhatsApp hover */

  --maxw: 1180px;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20,20,20,.04), 0 2px 8px rgba(20,20,20,.05);
  --shadow-md: 0 8px 30px rgba(18,48,58,.10);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Helvetica Neue", sans-serif;

  --step--1: clamp(.86rem, .84rem + .1vw, .92rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + .9vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 3.2vw, 4.25rem);
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
.content-img { width: 100%; height: auto; border-radius: var(--radius); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
p  { margin: 0 0 1rem; max-width: 68ch; }

:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: .75rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---- Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tint { background: var(--paper-2); }
.section--accent { background: var(--accent); color: #fff; }
.section--accent h2, .section--accent h3 { color: #fff; }
.section--accent p { color: rgba(255,255,255,.82); }
.section__head { max-width: 62ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft);
  margin-bottom: .85rem;
}
.section--accent .eyebrow { color: #8fb4c0; }
.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.muted { color: var(--ink-mute); }
.center { text-align: center; }
.center .section__head, .center p { margin-inline: auto; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .85rem 1.5rem; border-radius: 999px;
  font-size: var(--step-0); font-weight: 700; letter-spacing: -0.01em;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .16s ease, box-shadow .16s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }

/* WhatsApp — the ONE warm signal colour. Reserved for the primary CTA. */
.btn-wa {
  background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(37,211,102,.28);
}
.btn-wa:hover { background: var(--wa-ink); color: #fff; box-shadow: 0 8px 26px rgba(37,211,102,.36); }
.btn-wa--lg { min-height: 58px; padding: 1rem 2rem; font-size: var(--step-1); }
.btn-wa__sub { display: block; font-size: var(--step--1); font-weight: 500; opacity: .92; letter-spacing: 0; }

/* Secondary / tel — visually subordinate */
.btn-outline { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); background: #fff; }
.section--accent .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); }
.section--accent .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.btn-link { color: var(--accent); font-weight: 700; }
.btn-link::after { content: " \2192"; }

.cta-row { display: flex; flex-wrap: wrap; gap: .9rem 1.1rem; align-items: center; }
.cta-row--center { justify-content: center; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; min-height: 69px;   /* reserved so JS-injected nav causes ~zero CLS */
  background: rgba(250,250,248,.86); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__logo { height: 40px; width: auto; display: block; }
.site-nav { margin-left: auto; }
#site-menu { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
#site-menu a { color: var(--ink-soft); font-weight: 600; font-size: .98rem; }
#site-menu a:hover, #site-menu a[aria-current="page"] { color: var(--ink); }
.header-cta { margin-left: .4rem; }
.nav__toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .5rem; }
.hero__sub { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; margin-bottom: 1.75rem; max-width: 34ch; }
.hero .cta-row { margin-bottom: 1.5rem; }

.trust-row { display: flex; flex-wrap: wrap; gap: .5rem 1.35rem; align-items: center; font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; }
.trust-row li { list-style: none; display: inline-flex; align-items: center; gap: .4rem; }
.trust-row { margin: 0; padding: 0; }
.stars { color: #c8891b; letter-spacing: 1px; }

/* ---- Image placeholders -------------------------------------------------- */
.ph {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2);
  border: 1px dashed #cdccc3; display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-mute); font-size: var(--step--1); font-weight: 600; padding: 1rem;
  background-image: linear-gradient(135deg, #eceae2 25%, transparent 25%), linear-gradient(225deg, #eceae2 25%, transparent 25%), linear-gradient(45deg, #eceae2 25%, transparent 25%), linear-gradient(315deg, #eceae2 25%, #f4f3ee 25%);
  background-size: 22px 22px; background-position: 11px 0, 11px 0, 0 0, 0 0;
}
.ph--16x9 { aspect-ratio: 16 / 9; }
.ph--4x3  { aspect-ratio: 4 / 3; }
.ph--3x4  { aspect-ratio: 3 / 4; }
.ph--1x1  { aspect-ratio: 1 / 1; }
.ph__label { background: rgba(255,255,255,.75); padding: .4rem .7rem; border-radius: 8px; max-width: 90%; }

/* ---- Trust bar ----------------------------------------------------------- */
.trustbar { border-block: 1px solid var(--line); background: #fff; }
.trustbar__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.5rem; text-align: center; }
.trustbar__item { display: flex; flex-direction: column; gap: .2rem; align-items: center; }
.trustbar__num { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.trustbar__label { font-size: var(--step--1); color: var(--ink-mute); font-weight: 600; }
.gas-safe-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--accent);
  border: 2px solid var(--accent); border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; letter-spacing: -0.01em;
}
.gas-safe-badge small { display: block; font-weight: 600; color: var(--ink-mute); font-size: .68rem; letter-spacing: .04em; }

/* ---- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 2.5vw, 1.9rem); box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; }
.card p { margin-bottom: 0; color: var(--ink-soft); }
.card__icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--paper-2); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.card__icon svg { width: 24px; height: 24px; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.5rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: .3rem; }

/* Brand chips */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.chips li { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem 1.1rem; font-weight: 700; color: var(--accent); }

/* Includes / feature list */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--ink-soft); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/1.2rem no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/1.2rem no-repeat;
}

/* ---- Reviews ------------------------------------------------------------- */
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .75rem; }
.review__stars { color: #c8891b; letter-spacing: 2px; font-size: 1.05rem; }
.review__text { color: var(--ink); margin: 0; font-size: var(--step-0); }
.review__meta { font-weight: 700; color: var(--ink); font-size: .95rem; }
.review__meta span { display: block; font-weight: 500; color: var(--ink-mute); font-size: .85rem; }

/* ---- Finance ------------------------------------------------------------- */
.finance-box { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
.finance-box .price { font-size: var(--step-3); font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }

/* ---- FAQ (native details/summary — accessible, no JS needed) ------------- */
.faq { display: grid; gap: .75rem; max-width: 820px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq__item > summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.25rem; font-weight: 700; font-size: var(--step-0);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__q { display: inline; }
.faq__item > summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; transition: transform .2s ease; }
.faq__item[open] > summary::after { transform: rotate(45deg); }
.faq__a { padding: 0 1.25rem 1.2rem; color: var(--ink-soft); margin: 0; }

/* ---- Final CTA band ------------------------------------------------------ */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: .5rem; }
.cta-band p { margin-inline: auto; margin-bottom: 1.75rem; color: rgba(255,255,255,.82); }

/* ---- Breadcrumb ---------------------------------------------------------- */
.breadcrumb { padding-top: 1.5rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; font-size: var(--step--1); color: var(--ink-mute); }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; margin-right: .4rem; color: var(--line); }
.breadcrumb a { color: var(--ink-mute); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--accent); color: rgba(255,255,255,.78); padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #cfe0e6; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer__brand { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; margin-bottom: .5rem; }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .95rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---- Floating mobile WhatsApp button ------------------------------------- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 120; display: none;
  width: 58px; height: 58px; border-radius: 999px; background: var(--wa); color: #fff;
  align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.4);
}
.wa-float:hover { color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---- Reveal animation ---------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---- Prose (article pages) ----------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: .4rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.split--reverse > *:first-child { order: 2; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid, .split, .finance-box { grid-template-columns: 1fr; }
  .split--reverse > *:first-child { order: 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .trustbar__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: inline-flex; }
  .site-nav { margin-left: auto; }
  .brand__logo { height: 34px; }
  #site-menu {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gap) 1rem;
    display: none;
  }
  #site-menu.is-open { display: flex; }
  #site-menu li { border-top: 1px solid var(--line); }
  #site-menu a { display: block; padding: .9rem .25rem; }
  .header-cta { margin: .75rem 0 0; }
  .header-cta .btn { width: 100%; }
  .wa-float { display: inline-flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero .cta-row .btn-wa { width: 100%; }
}

@media (max-width: 460px) {
  .trustbar__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
