/* Heat Hero Wirral — site stylesheet.
   Tokens and element defaults are lifted from the Claude Design system
   (tokens/*.css + base.css); the layout rules below come from the
   HeatHeroPage template's helmet block. Everything else on the page is
   inline, exactly as the design authored it. */

/* ---------- Fonts ---------- */
/* Latin-subset variable builds from Google Fonts. "HH Body" is the design
   system's alias for Archivo — declared separately so the template's
   font-family:'HH Body' resolves without rewriting every inline style. */
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "HH Body";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --flame-700: #A82C00;
  --flame-600: #DB3500;
  --flame-500: #EF6317;
  --flame-400: #F98900;
  --flame-300: #F39438;
  --spark-500: #FFC629;
  --steel-500: #438DB4;
  --cta-500: #0B72C9;
  --ink-900: #12242B;
  --ink-800: #1D3942;
  --ink-600: #556A71;
  --ink-100: #E4E8E9;
  --paper: #FFFFFF;
  --paper-cream: #FBF4EC;
  --scrim-ink: rgba(18, 36, 43, .88);

  --text-strong: var(--ink-900);
  --text-body: var(--ink-800);
  --text-muted: var(--ink-600);
  --text-link: var(--flame-600);
  --text-link-hover: var(--flame-700);
  --surface-page: var(--paper);
  --focus-ring: var(--flame-400);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  --font-display: "Outfit", "Archivo", Helvetica, Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --weight-display: 800;
  --weight-bold: 700;
  --type-h1-size: clamp(32px, 6vw, 56px);
  --type-h2-size: clamp(26px, 4.2vw, 42px);
  --type-h3-size: 26px;
  --type-h4-size: 21px;
  --type-body-size: 16px;
  --type-small-size: 14px;
  --lh-snug: 1.08;
  --lh-heading: 1.15;
  --lh-body: 1.55;
  --ls-hero: -0.03em;
  --ls-heading: -0.02em;
  --space-4: 16px;
  --space-5: 20px;

  --dur-fast: 140ms;
  --ease-snap: cubic-bezier(.2, .9, .2, 1);
}

/* ---------- Element defaults ---------- */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-body-size);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--paper-cream);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  color: var(--text-strong);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--type-h1-size); line-height: var(--lh-snug); letter-spacing: var(--ls-hero) }
h2 { font-size: var(--type-h2-size) }
h3 { font-size: var(--type-h3-size) }
h4 { font-size: var(--type-h4-size) }
p { margin: 0 0 var(--space-4); text-wrap: pretty; max-width: 68ch }
a { color: var(--text-link); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color var(--dur-fast) var(--ease-snap) }
a:hover { color: var(--text-link-hover) }
/* Two-layer focus ring: white inner + ink halo, so it clears the 3:1
   non-text minimum on white, cream, navy and blue grounds alike. The old
   single amber ring measured 2.4:1 on white. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ink-900) !important;
}
strong { font-weight: var(--weight-bold) }
/* height:auto stops the width/height attributes (present for CLS) from
   overriding any aspect-ratio set in CSS. Inline heights still win. */
img { max-width: 100%; height: auto; display: block }
ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5) }
small { font-size: var(--type-small-size) }
::selection { background: var(--flame-300); color: var(--ink-900) }

/* ---------- Page layout ---------- */
.hhg {
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  display: inline-block;
}
.hhw { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px }
.g-hero { display: grid; gap: 44px; grid-template-columns: 1.04fr .96fr; align-items: center }
.g-split { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: start }
.g-band { display: grid; gap: 44px; grid-template-columns: .9fr 1.1fr; align-items: center }
.g-cards { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr) }
@media (max-width: 1231px) { .g-cards { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 639px) { .g-cards { grid-template-columns: 1fr } }
.g-pairs { display: grid; gap: 16px; grid-template-columns: 1fr 1fr }
.g-foot { display: grid; gap: 48px; grid-template-columns: 1.4fr 1fr 1fr }
/* Job gallery. Uniform 4/5 cells so portrait boiler shots and the one
   landscape radiator shot sit on the same grid without re-cropping. */
.g-gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr) }
.g-gallery figure {
  position: relative;
  margin: 0;
  border: 3px solid var(--ink-800);
  border-radius: 8px;
  overflow: hidden;
}
.g-gallery img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block }
.g-gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  background: var(--scrim-ink);
  color: #fff;
  font-family: "Outfit";
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.nav-links { display: flex; align-items: center; gap: 26px }

/* Sticky header is 74px tall, so in-page anchors need clearance. */
section[id] { scroll-margin-top: 92px }

/* Hero sunburst. Positioned here rather than inline so the mobile breakpoint
   can move it clear of the headline and bullets. */
.hero-blob {
  position: absolute;
  right: -8%;
  top: -16%;
  width: 54%;
  height: 132%;
  /* Burnt orange. flame-500 let the artwork vanish into it and flame-700 read
     as brick red, so this sits between them: dark enough to separate the
     flame, warm enough to stay orange rather than red. */
  background: #C4500F;
  border-radius: 48% 52% 46% 54% / 54% 48% 52% 46%;
  overflow: hidden;
}
.hero-badge { position: absolute; right: 0; top: 0; width: 150px; height: 150px }

/* Sunburst rays. The origin sits on the artwork's centre, measured against
   the blob box: the artwork lands at ~40% x / 47% y of the blob on desktop
   (35% at very wide), and centre at mobile where the band is symmetric. */
.hero-rays {
  position: absolute;
  left: -90%;
  top: -90%;
  width: 280%;
  height: 280%;
  background-image: repeating-conic-gradient(from 0deg, rgba(255,255,255,.14) 0deg 4.5deg, transparent 4.5deg 13deg);
}
@media (min-width: 900px) {
  .hero-rays { left: -102%; top: -93% }
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px }
.hero-cta > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 30px;
  border: 3px solid var(--ink-800);
  border-radius: 12px;
  font-family: "Outfit";
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink-800);
  white-space: nowrap;
}

@media (max-width: 899px) { .nav-links { display: none } }
@media (max-width: 899px) {
  /* The sticky bottom bar already carries "Call now" on mobile, so the header
     number is a third copy of the same action in the first viewport. */
  .hdr-call { display: none !important }

  /* Full-bleed band with a domed top edge, borrowing the section-divider
     swoosh language rather than staying a circle. The apex cuts across the top
     quarter of the hero photo. Above this width the sunburst sits right of the
     headline; below it, it was running under the bullets and dragging them to
     ~3.8:1 against orange. */
  .hero-blob {
    top: auto;
    bottom: 0;
    left: -6%;
    right: auto;
    width: 112%;
    height: 392px;
    border-radius: 50% 50% 0 0 / 60px 60px 0 0;
  }

  /* Sticker overhangs the viewport at this size; pull it inside the gutter. */
  .hero-badge { right: 6px; width: 118px; height: 118px }
  .hero-badge span { font-size: 17px !important }

  /* Centre the whole first fold on mobile. */
  .g-hero > div:first-child { text-align: center }
  /* !important: the paragraph carries an inline margin. */
  .g-hero > div:first-child > p { margin-left: auto !important; margin-right: auto !important }
  .g-hero > div:first-child > ul { justify-content: center }

  /* Both hero CTAs on one line. */
  .hero-cta { flex-wrap: nowrap }
  .hero-cta > a { flex: 1 1 0; min-width: 0; padding: 0 14px; font-size: 16px }
}
@media (max-width: 380px) {
  .hero-cta > a { font-size: 15px; padding: 0 10px; gap: 8px }
}
@media (max-width: 899px) {
  .g-hero, .g-split, .g-band, .g-foot { grid-template-columns: 1fr; gap: 32px }
  .g-gallery { grid-template-columns: repeat(2, 1fr) }
  .g-pairs { grid-template-columns: 1fr }
  .approved-strip { padding: 16px 18px; gap: 10px 18px }
  .approved-strip img { height: 26px }
  .approved-strip p { font-size: 11px }
}
@media (max-width: 639px) {
  .pad-band { padding-top: 44px !important; padding-bottom: 52px !important }
  /* At phone widths the caption overlay ate up to 43% of the photo. */
  .g-gallery figcaption { position: static; background: none; color: var(--ink-800); padding: 8px 2px 2px; font-size: 11px; letter-spacing: .08em }
}

/* ---------- Approved installer strip ---------- */
.approved-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 34px;
  margin-top: 34px;
  padding: 24px 28px;
  border: 3px solid var(--ink-800);
  border-radius: 18px;
  background: #fff;
}
.approved-strip > div { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; justify-content: center }
.approved-strip img { height: 34px; width: auto }
.approved-strip p {
  margin: 0;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Outfit";
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-600);
}

/* WhatsApp green on an orange band or navy footer is muddy on its own. The
   brand's own guidance backs the mark onto white when the ground is coloured. */
.wa-chip {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
}
.wa-chip img { display: block; width: 22px; height: 22px }
.foot-social .wa-chip img { width: 18px; height: 18px }

/* ---------- Footer socials ---------- */
.foot-social { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px }
.foot-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: rgba(255, 255, 255, .74);
  text-decoration: none;
  font-weight: 600;
}
.foot-social a:hover { color: #fff }
.foot-social .hhg { width: 20px; height: 20px }

/* ---------- Reviews ---------- */
.rev-stars { display: inline-flex; gap: 3px; color: var(--flame-500) }
.rev-stars .hhg {
  width: 20px;
  height: 20px;
  -webkit-mask-image: url("../icons/star.svg");
  mask-image: url("../icons/star.svg");
}
.rev-headline {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin: 30px 0 40px;
  padding: 28px 32px;
  background: var(--spark-500);
  border: 3px solid var(--ink-800);
  border-radius: 18px;
  box-shadow: 10px 10px 0 var(--ink-800);
}
.rev-headline .rev-stars { color: var(--ink-800) }
.g-reviews { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr) }
.rev-card-featured { grid-column: span 2 }
@media (max-width: 1099px) { .g-reviews { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 639px) { .g-reviews { grid-template-columns: 1fr } .rev-card-featured { grid-column: auto } }
.rev-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 24px;
  background: #fff;
  border: 3px solid var(--ink-800);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink-800);
}
.rev-card blockquote {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-800);
  font-weight: 500;
}
.rev-card figcaption {
  margin-top: auto;
  padding-top: 4px;
  font-family: "Outfit";
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-800);
}
.rev-card figcaption span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--flame-600);
}
/* Hero proof strip */
.hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-800);
}
.hero-proof .rev-stars .hhg { width: 16px; height: 16px }

/* Declared after the shared breakpoint block above, so these need their own
   media query to win on source order. */
@media (max-width: 899px) {
  .rev-headline { padding: 24px; justify-items: center; text-align: center }
  .hero-proof { justify-content: center; flex-wrap: wrap }
}

#engineer .g-band > div:first-child { width: 100%; max-width: 480px; margin: 0 auto }
#quote .g-split { align-items: center }
.ba-wrap { max-width: 860px; margin: 0 auto }

/* ---------- Before/after slider ---------- */
.ba-slider {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink-800);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink-800);
  touch-action: pan-y;
}
.ba-slider > img, .ba-after img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.ba-after {
  position: absolute;
  inset: 0;
  /* Reveal the "after" from the right of the divider. */
  clip-path: inset(0 0 0 var(--pos));
}
.ba-after img { position: absolute; inset: 0; width: 100%; height: 100% }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  transform: translateX(-50%);
  width: 4px;
  background: #fff;
  pointer-events: none;
}
.ba-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ink-800);
  box-shadow: 3px 3px 0 var(--ink-800);
}
.ba-handle .hhg {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--ink-800);
  margin-top: -8px;
}
.ba-handle .hhg:first-child { margin-left: -22px }
.ba-handle .hhg:last-child { margin-left: 6px }
.ba-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.ba-slider input[type="range"]:focus-visible ~ .ba-handle::before,
.ba-slider:has(input[type="range"]:focus-visible) .ba-handle::before {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}
.ba-tag {
  position: absolute;
  top: 12px;
  padding: 6px 12px;
  border: 2px solid var(--ink-800);
  border-radius: 999px;
  font-family: "Outfit";
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  pointer-events: none;
}
.ba-tag-before { left: 12px; background: #fff; color: var(--ink-800) }
.ba-tag-after { right: 12px; background: var(--flame-600); color: #fff }

/* ---------- Quote form states ---------- */
.hh-field-error {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: #C22B0F;
}
.hh-invalid .hh-field-error { display: block }
.hh-invalid input, .hh-invalid select, .hh-invalid textarea { border-color: #C22B0F }
.hh-form-note { margin: 0; font-size: 15px; font-weight: 600 }
.hh-form-note[hidden] { display: none }

/* ---------- Interaction states ---------- */
/* The comic shadow promises a pressable block; these make good on it.
   Inline shadows force the !important. The attribute selector catches every
   link carrying an inline hard shadow; .hero-cta gets its shadow from CSS. */
a[style*="box-shadow"], .hero-cta > a, .cta-bar a {
  transition: transform var(--dur-fast) var(--ease-snap), box-shadow var(--dur-fast) var(--ease-snap), filter var(--dur-fast) var(--ease-snap);
}
a[style*="box-shadow"]:hover, .hero-cta > a:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink-800) !important;
}
a[style*="box-shadow"]:active, .hero-cta > a:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--ink-800) !important;
}
.cta-bar a:hover { filter: brightness(1.12) }
.cta-bar a:active { filter: brightness(.94) }
.nav-links a:hover { color: var(--flame-600) !important }
footer a:hover { color: #fff !important }
a[href^="mailto"]:hover { text-decoration: underline }

/* ---------- Tap targets ---------- */
/* Footer links measured 18-25px tall. Padding grows the hit area; the
   negative margin keeps the visual rhythm unchanged. */
footer .g-foot a { display: inline-flex; align-items: center; padding: 11px 0; margin: -11px 0 }
.nav-links a { padding: 12px 0; margin: -12px 0 }

/* ---------- Sticky call bar is mobile-only ---------- */
@media (min-width: 900px) {
  /* !important: the bar carries display:grid inline. */
  .cta-bar { display: none !important }
  .page-wrap { padding-bottom: 0 !important }
}

/* ---------- Motion ---------- */
@keyframes hh-flicker {
  0%, 100% { transform: rotate(-9deg) scale(1) }
  42% { transform: rotate(-11deg) scale(1.05) }
  68% { transform: rotate(-7.5deg) scale(.98) }
}
.hero-badge { animation: hh-flicker 3.4s var(--ease-in-out, ease-in-out) infinite }

/* Scroll reveal: JS stamps .rv-init at load and .rv on intersect, so
   content is never hidden without JS. Delay is set inline per element. */
.rv-init { opacity: 0; transform: translateY(16px) }
.rv-init.rv { opacity: 1; transform: none; transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1); transition-delay: var(--rv-delay, 0ms) }

/* Micro-moments on already-pressable things. */
.g-cards a .hhg:last-child { transition: transform var(--dur-fast) var(--ease-snap) }
.g-cards a:hover .hhg:last-child { transform: translateX(4px) }
.g-gallery figure { overflow: hidden }
.g-gallery img { transition: transform .45s cubic-bezier(.16,1,.3,1) }
.g-gallery figure:hover img { transform: scale(1.045) }
.foot-social a, .nav-links a { transition: color var(--dur-fast) var(--ease-snap) }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
