/*
 * Brearley design tokens. Source of truth: /DESIGN.md ("Executive Thermal Engineering").
 * Every value on the site comes from here. Contrast ratios were measured, not assumed:
 *
 *   text  #F8FAFC  on base 18.0 / s1 16.3 / s2 14.0 / s3 9.9
 *   muted #94A3B8  on base  7.3 / s1  6.6 / s2  5.7 / s3 4.0  -> never use on s3, use --muted-strong
 *   amber #F97316  on base  6.7 / s1  6.1 / s2  5.2           -> text OK on s2 and darker
 *   cyan  #38BDF8  on base  8.8 / s1  7.9 / s2  6.8 / s3 4.8
 *   blue  #0284C7  on base  4.6 / s2 3.6                      -> border and fill ONLY, never text
 *   btn   #0F172A  on amber 6.4
 *   input border #64748B on s1 3.6 (WCAG 1.4.11 needs 3:1)
 *
 * Deviations from DESIGN.md, deliberate: body 16px not 15px (iOS zooms inputs under 16px),
 * mono labels 12px not 11px (legibility at arm's length on a phone).
 */
:root {
  color-scheme: dark;

  /* Surfaces */
  --c-void: #070c18;
  --c-base: #0b1120;
  --c-s1: #131c2e;
  --c-s2: #1e293b;
  --c-s3: #334155;
  /* Home hero only: the night sky of the house video (sampled from its frame), so the video edges disappear */
  --c-night: #020c24;
  --c-night-hi: #04122e;

  /* Text */
  --c-text: #f8fafc;
  --c-muted: #94a3b8;
  --c-muted-strong: #a8b5c7;

  /* Brand */
  --c-amber: #f97316;
  --c-amber-hi: #fb923c;
  --c-amber-text: #fdba74;
  --c-on-amber: #0f172a;
  --c-blue: #0284c7;
  --c-cyan: #38bdf8;
  --c-cyan-text: #7dd3fc;

  /* State */
  --c-ok: #4ade80;
  --c-err: #fca5a5;

  /* Lines */
  --c-line: rgba(148, 163, 184, 0.12);
  --c-line-strong: rgba(148, 163, 184, 0.28);
  --c-input-border: #64748b;

  /* Thermal glows (DESIGN.md "Elevation & Depth") */
  --glow-amber: 0 8px 24px -4px rgba(249, 115, 22, 0.2);
  --glow-cyan: 0 8px 24px -4px rgba(56, 189, 248, 0.15);

  /* Type */
  --f-head: "Outfit", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --t-display: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --t-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
  --t-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  --t-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --t-h4: 1.25rem;
  --t-lg: 1.125rem;
  --t-md: 1rem;
  --t-sm: 0.875rem;
  --t-mono-lg: 0.875rem;
  --t-mono-sm: 0.75rem;

  /* Space (DESIGN.md scale, extended for section rhythm) */
  --s-xs: 0.25rem;
  --s-sm: 0.5rem;
  --s-md: 1rem;
  --s-lg: 1.5rem;
  --s-xl: 2.5rem;
  --s-2xl: 3rem; /* 4rem from tablet up: phones get tighter section rhythm */
  --s-3xl: 6rem;
  --gutter: 1rem;
  --margin: 1rem;
  --container: 1280px;

  /* Radii: one language, by element type (DESIGN.md "Shapes") */
  --r-control: 0.25rem; /* buttons, inputs, chips */
  --r-card: 0.5rem; /* cards, panels */
  --r-modal: 0.75rem; /* emphasis panels, calculators */
  --r-pill: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 160ms;

  --header-h: 64px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.5rem;
    --margin: 2rem;
    --s-2xl: 4rem;
  }
}

/* ---------- Fonts (self-hosted, latin subset, variable) ---------- */
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Brand scrollbar. Firefox and current Chrome/Edge read scrollbar-color; Safari reads the ::-webkit rules. */
html { scrollbar-color: var(--c-amber) var(--c-void); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--c-void); }
::-webkit-scrollbar-thumb { background: var(--c-amber); border: 3px solid var(--c-void); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--c-amber-hi); }
/* Reading progress across the top of the window (site.js), over the sticky header's top edge */
.scroll-progress { position: fixed; z-index: 80; inset: 0 0 auto 0; height: 3px; pointer-events: none; }
.scroll-progress[hidden] { display: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-amber), var(--c-amber-hi)); box-shadow: 0 0 8px rgba(249, 115, 22, 0.55); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
/* Touch screens: the page's own always-visible thumb (site.js), sitting clear of the header and the call bar */
.scroll-ind { position: fixed; z-index: 70; top: calc(var(--header-h) + 6px); bottom: calc(70px + env(safe-area-inset-bottom)); right: 2px; width: 4px; pointer-events: none; }
.scroll-ind[hidden] { display: none; }
.scroll-ind span { display: block; width: 100%; border-radius: var(--r-pill); background: var(--c-amber); box-shadow: 0 0 6px rgba(249, 115, 22, 0.45); will-change: transform; }
@media (min-width: 768px) { .scroll-ind { bottom: 8px; } }
/* Touch screens show the orange thumb instead, so hide the browser's own scrollbar to avoid two side by side */
@media (hover: none) and (pointer: coarse) {
  html { scrollbar-width: none; }
  ::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-h1); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--c-cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-cyan-text); }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--c-amber); color: var(--c-on-amber); }
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-md); top: -4rem; z-index: 100; background: var(--c-amber); color: var(--c-on-amber); padding: var(--s-sm) var(--s-md); border-radius: var(--r-control); font-weight: 700; }
.skip-link:focus { top: var(--s-md); }

.container { width: min(100% - 2 * var(--margin), var(--container)); margin-inline: auto; }
.section { padding-block: var(--s-2xl); }
.section--tight { padding-block: var(--s-xl); }
.section--s1 { background: var(--c-s1); }
.section--void { background: var(--c-void); }
.lede { font-size: var(--t-lg); color: var(--c-muted); max-width: 60ch; }
.muted { color: var(--c-muted); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-md); }
.prose p { color: var(--c-muted-strong); }
.prose strong { color: var(--c-text); }
.stack > * + * { margin-top: var(--s-md); }
.stack-lg > * + * { margin-top: var(--s-lg); }

/* Mono labels: the "gauge plate" voice from DESIGN.md */
.mono { font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-sm); font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-amber-text); }
.eyebrow--cyan { color: var(--c-cyan-text); }
.beacon { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--lg { width: 1.75rem; height: 1.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-sm);
  min-height: 48px; padding: 0.75rem 1.25rem;
  border-radius: var(--r-control); border: 1px solid transparent;
  font-family: var(--f-head); font-size: var(--t-md); font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn--primary { background: var(--c-amber); color: var(--c-on-amber); font-weight: 700; }
.btn--primary:hover { background: var(--c-amber-hi); color: var(--c-on-amber); box-shadow: var(--glow-amber), 0 0 12px rgba(249, 115, 22, 0.35); }
.btn--secondary { background: rgba(2, 132, 199, 0.1); border-color: var(--c-blue); color: var(--c-cyan); }
.btn--secondary:hover { background: rgba(2, 132, 199, 0.22); color: var(--c-cyan-text); }
.btn--ghost { background: transparent; color: var(--c-muted); }
.btn--ghost:hover { color: var(--c-text); }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0.5rem 1rem; font-size: var(--t-sm); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-md); }
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-sm); font-family: var(--f-mono); font-size: var(--t-mono-lg); font-weight: 600; text-decoration: none; min-height: 44px; }
.link-arrow .icon { width: 1em; height: 1em; transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: var(--s-sm); padding: 0.25rem 0.625rem; border-radius: var(--r-control); background: var(--c-s1); border: 1px solid var(--c-line-strong); font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted-strong); }
.chip--cyan { border-color: rgba(56, 189, 248, 0.3); color: var(--c-cyan); }
.chip--amber { border-color: rgba(249, 115, 22, 0.3); color: var(--c-amber-text); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-base); border-bottom: 1px solid var(--c-line); }
.topbar { display: none; background: var(--c-void); }
.topbar__in { display: flex; align-items: center; gap: var(--s-lg); min-height: 40px; font-size: var(--t-sm); color: var(--c-muted); }
.topbar__in a { color: var(--c-muted-strong); text-decoration: none; }
.topbar__in a:hover { color: var(--c-text); }
.topbar__phone { margin-left: auto; font-family: var(--f-mono); font-weight: 600; color: var(--c-amber-text) !important; }
.topbar__phone:hover { color: var(--c-amber) !important; }
.topbar__sos { display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 600; color: var(--c-amber-text) !important; }
.topbar__sos .icon { width: 1em; height: 1em; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; text-decoration: none; color: var(--c-text); }
.brand:hover { color: var(--c-text); }
.brand__mark { width: 36px; height: 36px; border-radius: var(--r-control); background: var(--c-amber); color: var(--c-on-amber); display: grid; place-items: center; }
.brand__mark .icon { width: 22px; height: 22px; stroke-width: 2; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em; }
.brand__sub { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
@media (max-width: 479px) { .brand__sub { letter-spacing: 0.02em; white-space: nowrap; } }
.nav-toggle { margin-left: auto; width: 48px; height: 48px; display: grid; place-items: center; background: transparent; border: 1px solid var(--c-line-strong); border-radius: var(--r-control); color: var(--c-text); cursor: pointer; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-cta { display: none; }

.nav { position: absolute; inset: 100% 0 auto 0; background: var(--c-base); border-bottom: 1px solid var(--c-line-strong); padding: var(--s-md) var(--margin) var(--s-lg); display: none; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.nav[data-open] { display: block; }
.no-js .nav { display: block; position: static; max-height: none; }
.no-js .nav-toggle { display: none; }
.nav ul { display: flex; flex-direction: column; }
.nav a { display: flex; align-items: center; min-height: 48px; padding-inline: var(--s-sm); color: var(--c-muted-strong); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--c-line); }
.nav a:hover { color: var(--c-text); }
.nav a[aria-current="page"] { color: var(--c-amber-text); font-weight: 700; }
.nav a.nav-quote { margin-top: var(--s-md); color: var(--c-on-amber); justify-content: center; border-bottom: 0; font-weight: 700; }
.nav a.nav-quote:hover { color: var(--c-on-amber); }
/* Emergency link: in the menu on phones and tablets; wide screens show it in the top bar instead */
.nav-sos a { gap: var(--s-sm); color: var(--c-amber-text); font-weight: 700; }
.nav-sos .icon { width: 1.1em; height: 1.1em; }

/* The full nav (nine links, the brand and the quote button) needs ~1140px on one line, so it starts at 1240px;
   below that the menu button stays, which keeps the button label and the brand line from wrapping. */
@media (min-width: 1240px) {
  :root { --header-h: 76px; }
  .topbar { display: block; }
  .nav-toggle { display: none; }
  .nav-cta { display: inline-flex; white-space: nowrap; }
  .brand__sub { white-space: nowrap; }
  .nav, .no-js .nav { position: static; display: block; padding: 0; border: 0; max-height: none; overflow: visible; margin-left: auto; }
  .nav ul { flex-direction: row; gap: 2px; }
  .nav a { min-height: 44px; padding-inline: 0.625rem; border: 0; border-radius: var(--r-control); font-size: var(--t-sm); white-space: nowrap; }
  .nav a:hover { background: var(--c-s1); }
  .nav a[aria-current="page"] { background: var(--c-s2); }
  .nav .nav-quote, .nav .nav-sos { display: none; }
}

/* Mobile call bar: urgent-need business, one tap */
.callbar { position: fixed; z-index: 60; inset: auto 0 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); padding: var(--s-sm) var(--margin) calc(var(--s-sm) + env(safe-area-inset-bottom)); background: var(--c-void); border-top: 1px solid var(--c-line-strong); }
.callbar .btn { min-height: 48px; }
@media (min-width: 768px) { .callbar { display: none; } body { padding-bottom: 0; } }

/* ---------- Hero ---------- */
/* Home hero. The house video sits on its own navy, so the hero takes that colour (--c-night) and fades to base.
   Mobile: one column in reading order (intro, house, job picker, price, call). Desktop: copy left, house right. */
.hero { position: relative; overflow: hidden; padding-block: var(--s-lg) var(--s-2xl); border-bottom: 1px solid var(--c-line); background: radial-gradient(45% 55% at 72% 38%, rgba(249, 115, 22, 0.08), transparent 70%), linear-gradient(180deg, var(--c-night-hi) 0%, var(--c-night) 55%, var(--c-base) 100%); }
.hero h1 { font-size: clamp(2.125rem, 1.5rem + 1.9vw, 3rem); line-height: 1.06; letter-spacing: -0.03em; }
.hero__accent { display: block; margin-top: 0.12em; color: var(--c-amber-text); }
.hero .lede { max-width: 52ch; color: var(--c-muted-strong); }
.hero__layout { display: grid; gap: var(--s-lg); }
.hero__col { display: contents; }
.hero__intro { order: 1; }
.hero__intro > * + * { margin-top: var(--s-md); }
.hero__stage { order: 2; }
.hero__pick { order: 3; }
.hero__prices { order: 4; }
.hero__cta { order: 5; }

.hero__pick-label { font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--s-sm); }
/* 2x2 by default; one row of four wherever the column is wide enough (tablet single column, wide desktop) */
.tabs__list.hero__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); margin: 0; }
@media (min-width: 768px) and (max-width: 1023px) { .tabs__list.hero__tabs { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1360px) { .tabs__list.hero__tabs { grid-template-columns: repeat(4, auto); justify-content: start; } }
.hero__tabs .tab { justify-content: flex-start; background: rgba(19, 28, 46, 0.8); }
.hero__tabs .tab[aria-selected="true"] { background: rgba(249, 115, 22, 0.12); box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.5); }
.no-js .hero__pick { display: none; }

/* The house: poster image first (it is the LCP element), video fades in over it once it is actually playing */
.hero__stage { position: relative; margin-inline: calc(-1 * var(--margin)); margin-bottom: calc(-1 * var(--s-md)); /* the faded ground at the foot of the video reads as space already */ }
.hero__media {
  position: relative; aspect-ratio: 1600 / 902;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 84%, transparent);
  mask-composite: intersect;
}
.hero__media img, .hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media video { opacity: 0; transition: opacity 700ms var(--ease); }
.hero__stage.is-playing video { opacity: 1; }
.hero__toggle { position: absolute; top: var(--s-sm); left: calc(var(--margin) + var(--s-sm)); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-pill); background: rgba(11, 17, 32, 0.72); border: 1px solid var(--c-line-strong); color: var(--c-muted-strong); cursor: pointer; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.hero__toggle:hover { color: var(--c-text); border-color: var(--c-muted); }
.hero__toggle[hidden] { display: none; }
.hero__toggle .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.hero__toggle .icon-play, .hero__toggle[data-state="paused"] .icon-pause { display: none; }
.hero__toggle[data-state="paused"] .icon-play { display: block; }

/* Hotspots: pinned to the job on the house. Mouse shortcut for the job picker (the tabs stay the accessible control). */
.hotspot { position: absolute; left: var(--x); top: var(--y); z-index: 1; display: flex; align-items: center; transform: translate(-22px, -22px); color: var(--c-cyan); cursor: pointer; pointer-events: none; }
.hotspot__dot { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.hotspot__dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22), 0 0 12px rgba(56, 189, 248, 0.45); transition: transform var(--dur) var(--ease); }
.hotspot__dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0; }
.hotspot__label { margin-left: -6px; padding: 0.25rem 0.5rem; border-radius: var(--r-control); background: rgba(11, 17, 32, 0.85); border: 1px solid var(--c-line-strong); font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: var(--c-text); opacity: 0; transform: translateX(-4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.hotspot.is-active { color: var(--c-amber); }
.hotspot.is-active .hotspot__dot::before { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.28), 0 0 18px rgba(249, 115, 22, 0.6); }
.hotspot.is-active .hotspot__dot::after { animation: ping 2.4s var(--ease) infinite; }
.hotspot.is-active .hotspot__label { opacity: 1; transform: none; color: var(--c-amber-text); border-color: rgba(249, 115, 22, 0.5); }
.hotspot:not(.is-active) { display: none; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.85; } 80%, 100% { transform: scale(3.4); opacity: 0; } }
@media (min-width: 768px) {
  .hotspot { pointer-events: auto; }
  .hotspot:not(.is-active) { display: flex; }
  .hotspot:hover .hotspot__label { opacity: 1; transform: none; }
  .hotspot:hover .hotspot__dot::before { transform: scale(1.25); }
}

/* Price card for the picked job */
.hero__prices { display: grid; gap: var(--s-sm); container-type: inline-size; }
.tabpanel.hero-price { position: relative; display: grid; gap: var(--s-md); padding: var(--s-lg); background: rgba(19, 28, 46, 0.94); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-modal); box-shadow: var(--glow-amber); }
.hero-price::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--c-amber), var(--c-blue)); border-radius: var(--r-modal) var(--r-modal) 0 0; }
.hero-price__label { font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-amber-text); }
.hero-price__big { margin-top: var(--s-xs); font-family: var(--f-head); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-price__body p { font-size: var(--t-sm); color: var(--c-muted-strong); }
.hero-price__body .link-arrow { margin-top: var(--s-xs); }
.hero__fine { font-size: var(--t-sm); color: var(--c-muted); }
@container (min-width: 600px) { .tabpanel.hero-price { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-lg); } .hero-price__big { white-space: nowrap; } }

/* Phones already have the fixed call bar, so the hero's own buttons only show from tablet up */
.hero__cta .btn-row { display: none; }
.hero__cta > * + * { margin-top: var(--s-md); }
.hero__urgent { display: flex; align-items: center; gap: var(--s-sm); font-size: var(--t-sm); color: var(--c-muted-strong); }
.hero__urgent .icon { width: 1.1em; height: 1.1em; color: var(--c-amber); }
.hero__urgent a { font-weight: 600; white-space: nowrap; }
@media (min-width: 768px) { .hero__cta .btn-row { display: flex; } }

/* Callback bar */
.hero__quote { margin-top: var(--s-xl); }
.quote-bar { display: grid; gap: var(--s-lg); }
.quote-bar__head h2 { font-size: var(--t-h3); }
.quote-bar__head p { margin-top: var(--s-xs); }
@media (min-width: 640px) { .form--bar { grid-template-columns: 1fr 1fr; } .form--bar .form__foot { grid-column: 1 / -1; } }
.hero__facts { margin-top: var(--s-xl); }

@media (min-width: 1024px) {
  .hero { padding-block: var(--s-xl) var(--s-2xl); }
  .hero__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-xl); align-items: center; }
  .hero__col { display: flex; flex-direction: column; gap: var(--s-lg); }
  /* The house runs off the right edge of the page on wide screens; .hero clips the overflow */
  .hero__stage { margin-inline: 0 calc((min(100vw - 2 * var(--margin), var(--container)) - 100vw) / 2); margin-bottom: 0; }
  .hero__toggle { top: var(--s-md); left: var(--s-md); }
  .hero__prices { position: relative; z-index: 1; margin-top: calc(-1 * var(--s-2xl)); padding-inline: var(--s-lg); }
  .quote-bar { padding: var(--s-xl); }
}
/* One-row callback form only once the job dropdown has room for "New boiler or heating system" */
@media (min-width: 1280px) {
  .form--bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 1.4fr) auto; align-items: start; }
  .form--bar .form__consent { grid-column: 1 / 5; grid-row: 2; }
  .form--bar .form__submit { grid-column: 5; grid-row: 1; padding-top: calc(var(--t-sm) * 1.6 + 6px); }
  .form--bar .form-status { grid-column: 1 / -1; grid-row: 3; }
}

.page-hero { padding-block: var(--s-xl) var(--s-2xl); background: radial-gradient(55% 90% at 100% 0%, rgba(249, 115, 22, 0.09), transparent 70%), var(--c-s1); border-bottom: 1px solid var(--c-line); }
.page-hero__grid { display: grid; gap: var(--s-xl); align-items: center; }
.page-hero__grid--start { align-items: start; }
.page-hero__copy > * + * { margin-top: var(--s-md); }
.page-hero__copy .btn-row { margin-top: var(--s-lg); }
.crumbs { font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted); display: flex; gap: var(--s-sm); flex-wrap: wrap; }
.crumbs a { color: var(--c-muted-strong); text-decoration: none; min-height: 24px; }
.crumbs a:hover { color: var(--c-text); }
@media (min-width: 1024px) {
  .page-hero__grid { grid-template-columns: 7fr 5fr; gap: var(--s-2xl); }
}

/* Facts strip: real numbers only */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--r-card); overflow: hidden; }
.fact { background: var(--c-s1); padding: var(--s-md); display: flex; flex-direction: column; gap: 2px; }
.fact__n { font-family: var(--f-head); font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--c-text); }
.fact__n small { font-size: 1rem; font-weight: 500; color: var(--c-muted-strong); }
.fact__l { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.35; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Cards & panels ---------- */
.card { position: relative; background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-card); padding: var(--s-lg); }
.card--accent::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, var(--c-amber), var(--c-blue)); border-radius: var(--r-card) var(--r-card) 0 0; }
.panel { background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-modal); padding: var(--s-lg); box-shadow: var(--glow-amber); }
.panel--quote { position: relative; }
.panel--quote::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--c-amber), var(--c-blue)); border-radius: var(--r-modal) var(--r-modal) 0 0; }
.panel h2, .panel h3 { font-size: var(--t-h3); }
.callout { display: flex; gap: var(--s-md); padding: var(--s-md) var(--s-lg); background: var(--c-s2); border: 1px solid rgba(249, 115, 22, 0.3); border-radius: var(--r-card); }
.callout .icon { color: var(--c-amber); margin-top: 2px; }
.callout--cyan { border-color: rgba(56, 189, 248, 0.3); }
.callout--cyan .icon { color: var(--c-cyan); }
.callout p + p { margin-top: var(--s-sm); }
.callout p { color: var(--c-muted-strong); }
.callout strong { color: var(--c-text); }

.section-head { display: grid; gap: var(--s-md); margin-bottom: var(--s-xl); }
.section-head > p { color: var(--c-muted); max-width: 56ch; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s-2xl); } }

.split { display: grid; gap: var(--s-xl); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-2xl); align-items: start; } .split--wide-left { grid-template-columns: 7fr 5fr; } }

/* ---------- Tabs ---------- */
.tabs__list { display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-bottom: var(--s-lg); }
.tab { display: inline-flex; align-items: center; gap: var(--s-sm); min-height: 48px; padding: 0.5rem 1rem; background: var(--c-s1); border: 1px solid var(--c-line-strong); border-radius: var(--r-control); color: var(--c-muted-strong); font-family: var(--f-mono); font-size: var(--t-mono-lg); font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.tab:hover { color: var(--c-text); }
.tab[aria-selected="true"] { background: var(--c-s2); color: var(--c-amber-text); border-color: rgba(249, 115, 22, 0.5); }
.tab .icon { width: 1.1em; height: 1.1em; }
.tabpanel { background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-modal); padding: var(--s-lg); display: grid; gap: var(--s-lg); animation: rise 240ms var(--ease); }
.tabpanel[hidden] { display: none; }
.no-js .tabs__list { display: none; }
.no-js .tabpanel[hidden] { display: grid; } /* panels pre-hidden in the HTML (home page) all show without JS */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tabpanel h3 { font-size: var(--t-h2); }
.tabpanel__price { font-family: var(--f-head); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.tabpanel__price small { display: block; font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted); font-weight: 600; margin-bottom: 4px; }
@media (min-width: 900px) { .tabpanel { grid-template-columns: 1.4fr 1fr; padding: var(--s-xl); align-items: center; } }
.tabpanel.tabpanel--bare { display: block; background: none; border: 0; padding: 0; }
.tabpanel.tabpanel--bare[hidden] { display: none; }

/* ---------- Tables & spec lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line-strong); border-radius: var(--r-card); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-md); }
caption { text-align: left; padding: var(--s-md); font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted); }
th, td { text-align: left; padding: var(--s-md); border-top: 1px solid var(--c-line); vertical-align: top; }
thead th { background: var(--c-s3); color: var(--c-text); font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; border-top: 0; }
tbody th { font-weight: 600; color: var(--c-text); }
td { color: var(--c-muted-strong); }
td.num, th.num { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; color: var(--c-text); }
/* Phones: each row becomes a card (job, then price, then the note), so nothing scrolls sideways */
@media (max-width: 639px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .table--stack, .table--stack tbody, .table--stack th, .table--stack td { display: block; }
  .table--stack tr { display: grid; gap: var(--s-xs); padding: var(--s-md); border-top: 1px solid var(--c-line); }
  .table--stack tbody tr:first-child { border-top: 0; }
  .table--stack th, .table--stack td { padding: 0; border: 0; }
  .table--stack td.num { color: var(--c-amber-text); white-space: normal; }
  .table--stack td.num br { display: none; }
  .table--stack td:last-child { font-size: var(--t-sm); }
  .table--stack th a { display: inline-flex; align-items: center; min-height: 44px; }
}
.spec { display: grid; }
.spec__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-md); padding: var(--s-sm) 0; border-top: 1px solid var(--c-line); font-size: var(--t-sm); }
.spec__row:first-child { border-top: 0; }
.spec__row dt { color: var(--c-muted); }
.spec__row dd { margin: 0; font-family: var(--f-mono); font-weight: 600; text-align: right; color: var(--c-text); }
/* Contact details: icon labels, and values that wrap rather than overflow on a phone (the email address is long) */
.contact-spec dt { display: inline-flex; align-items: center; gap: var(--s-sm); white-space: nowrap; }
.contact-spec dt .icon { width: 1.1em; height: 1.1em; color: var(--c-amber); }
.contact-spec dd { overflow-wrap: anywhere; }
.contact-spec dd a { display: inline-block; padding-block: 0.625rem; margin-block: -0.625rem; }
.contact-spec + .form-note { margin-top: var(--s-md); }
@media (max-width: 479px) {
  .contact-spec .spec__row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .contact-spec dd { text-align: left; }
}
/* Emergency first-steps cards: icon beside the heading */
.card--sos h3 { display: flex; gap: var(--s-sm); align-items: flex-start; font-size: var(--t-h4); }
.card--sos h3 .icon { flex: none; width: 1.25em; height: 1.25em; margin-top: 0.05em; color: var(--c-amber); }

.ticks > li { display: flex; gap: var(--s-sm); align-items: flex-start; padding-block: 0.25rem; color: var(--c-muted-strong); }
.ticks .icon { color: var(--c-cyan); margin-top: 0.2em; width: 1.1em; height: 1.1em; }
.ticks--amber .icon { color: var(--c-amber); }

.steps { counter-reset: step; display: grid; gap: var(--s-md); }
.steps > li { counter-increment: step; position: relative; padding: var(--s-lg); padding-left: calc(var(--s-lg) + 3rem); background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-card); }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: var(--s-lg); top: var(--s-lg); font-family: var(--f-mono); font-weight: 700; font-size: var(--t-mono-lg); color: var(--c-amber-text); }
.steps h3 { font-size: var(--t-h4); margin-bottom: var(--s-xs); }
.steps p { color: var(--c-muted); font-size: var(--t-sm); }
@media (min-width: 900px) { .steps--2 { grid-template-columns: 1fr 1fr; } .steps--3 { grid-template-columns: repeat(3, 1fr); } .steps--4 { grid-template-columns: repeat(4, 1fr); } }

.deflist { display: grid; }
.deflist > div { display: grid; gap: var(--s-xs); padding: var(--s-lg) 0; border-top: 1px solid var(--c-line-strong); }
.deflist > div:last-child { border-bottom: 1px solid var(--c-line-strong); }
.deflist dt { font-family: var(--f-head); font-size: var(--t-h4); font-weight: 600; display: flex; align-items: center; gap: var(--s-md); }
.deflist dt .icon { color: var(--c-amber); }
.deflist dd { margin: 0; color: var(--c-muted-strong); max-width: 62ch; }
.deflist .price { font-family: var(--f-mono); font-weight: 600; color: var(--c-amber-text); font-size: var(--t-mono-lg); }
@media (min-width: 900px) { .deflist > div { grid-template-columns: 5fr 7fr; gap: var(--s-xl); } }

/* ---------- FAQ ---------- */
.faq { display: grid; border-top: 1px solid var(--c-line-strong); }
.faq details { border-bottom: 1px solid var(--c-line-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-md); min-height: 56px; padding-block: var(--s-md); font-family: var(--f-head); font-size: var(--t-h4); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--dur) var(--ease); color: var(--c-amber); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq__a { padding-bottom: var(--s-lg); color: var(--c-muted-strong); max-width: 68ch; }
.faq__a p + p { margin-top: var(--s-sm); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-md); }
.form--2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form--2 { grid-template-columns: 1fr 1fr; } .form--2 .field--full, .form--2 .form__foot { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field > label, .field > legend, .fieldset legend { font-size: var(--t-sm); font-weight: 600; color: var(--c-text); padding: 0; }
.field .hint { font-size: var(--t-sm); color: var(--c-muted); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 0.625rem 0.75rem;
  background: var(--c-s1); color: var(--c-text);
  border: 1px solid var(--c-input-border); border-radius: var(--r-control);
  font-family: var(--f-body); font-size: var(--t-md); line-height: 1.4;
}
textarea.input { min-height: 112px; resize: vertical; }
.input::placeholder { color: var(--c-muted); }
.input:focus { outline: none; border-color: var(--c-amber); box-shadow: 0 0 0 1px var(--c-amber); }
.input[aria-invalid="true"] { border-color: var(--c-err); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
.field__error { font-size: var(--t-sm); color: var(--c-err); font-weight: 600; }
.field__error:empty { display: none; }
.check { display: flex; gap: var(--s-md); align-items: flex-start; font-size: var(--t-sm); color: var(--c-muted-strong); }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--c-amber); flex: none; }
.check label { padding-top: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: var(--s-md) var(--s-lg); border-radius: var(--r-card); background: var(--c-s1); border: 1px solid var(--c-line-strong); }
.form-status[hidden] { display: none; }
.form-status--ok { border-color: rgba(74, 222, 128, 0.4); }
.form-status--err { border-color: rgba(252, 165, 165, 0.5); }
.form-status h3 { font-size: var(--t-h4); margin-bottom: var(--s-xs); }
.form-status p { color: var(--c-muted-strong); font-size: var(--t-sm); }
.form-status .btn { margin-top: var(--s-md); }
.form-note { font-size: var(--t-sm); color: var(--c-muted); }

/* ---------- Calculators ---------- */
.calc { display: grid; gap: var(--s-lg); background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-modal); padding: var(--s-lg); }
.calc__controls { display: grid; gap: var(--s-lg); align-content: start; }
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-sm); min-width: 0; }
.fieldset legend { margin-bottom: var(--s-sm); }
.choices { display: grid; gap: var(--s-sm); grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); }
/* Phones: always two columns, and an odd last option takes the full row instead of leaving a gap */
@media (max-width: 479px) { .choices { grid-template-columns: 1fr 1fr; } .choices > .choice:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__box { display: grid; gap: 2px; align-content: center; min-height: 56px; padding: 0.625rem 0.875rem; background: var(--c-s1); border: 1px solid var(--c-input-border); border-radius: var(--r-control); transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.choice__box strong { font-weight: 600; font-size: var(--t-sm); color: var(--c-text); }
.choice__box span { font-size: 0.8125rem; color: var(--c-muted); line-height: 1.3; }
.choice input:checked + .choice__box { background: rgba(249, 115, 22, 0.12); border-color: var(--c-amber); box-shadow: 0 0 0 1px var(--c-amber); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--c-cyan); outline-offset: 2px; }
.choice:hover .choice__box { border-color: var(--c-muted); }
.toggle-row { display: grid; gap: var(--s-sm); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--c-input-border); border-radius: var(--r-control); background: var(--c-s1); width: fit-content; }
.stepper button { width: 48px; height: 48px; background: transparent; border: 0; color: var(--c-text); font-size: 1.5rem; cursor: pointer; border-radius: var(--r-control); }
.stepper button:hover { background: var(--c-s3); }
.stepper output { min-width: 3ch; text-align: center; font-family: var(--f-mono); font-weight: 700; }
.range { width: 100%; accent-color: var(--c-amber); min-height: 32px; }
.num-input { max-width: 9rem; }

.calc__result { background: var(--c-s1); border: 1px solid var(--c-line-strong); border-radius: var(--r-card); padding: var(--s-lg); display: grid; gap: var(--s-md); align-content: start; }
.calc__result .label { font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-amber-text); font-weight: 600; }
.calc__big { font-family: var(--f-head); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc__big--cyan { color: var(--c-cyan-text); }
.calc__lines { display: grid; }
.calc__lines > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s-md); padding: var(--s-sm) 0; border-top: 1px solid var(--c-line); font-size: var(--t-sm); color: var(--c-muted); }
/* A value never breaks mid-range ("£10,750 –" / "£13,350"); when it does not fit beside its label it drops below, right-aligned */
.calc__lines dd { margin: 0 0 0 auto; font-family: var(--f-mono); font-weight: 600; color: var(--c-text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc__lines .grant dd, .calc__lines .grant dt { color: var(--c-cyan-text); }
.calc__note { font-size: var(--t-sm); color: var(--c-muted); }
.calc__advice { font-size: var(--t-sm); color: var(--c-amber-text); }
.calc__advice:empty { display: none; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.3fr 1fr; padding: var(--s-xl); gap: var(--s-xl); } .calc__result { position: sticky; top: calc(var(--header-h) + 1rem); } }

/* ---------- Footer ---------- */
.trust-strip { background: var(--c-s1); border-top: 1px solid var(--c-line); }
.trust-strip__in { display: grid; grid-template-columns: 1fr; gap: var(--s-md); padding-block: var(--s-lg); }
.trust-item { display: flex; gap: var(--s-md); align-items: center; font-size: var(--t-sm); color: var(--c-muted); }
.trust-item .icon { color: var(--c-cyan); width: 1.75rem; height: 1.75rem; }
.trust-item a { display: inline-flex; align-items: center; min-height: 44px; }
.trust-item strong { display: block; font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text); }
@media (min-width: 768px) { .trust-strip__in { grid-template-columns: repeat(4, 1fr); } }
.site-footer { background: var(--c-void); color: var(--c-muted); }
.site-footer a { color: var(--c-muted-strong); text-decoration: none; }
.site-footer a:hover { color: var(--c-amber-text); }
.site-footer h2 { font-size: var(--t-mono-sm); font-family: var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text); margin-bottom: var(--s-sm); font-weight: 600; }
.footer-small { font-size: var(--t-sm); line-height: 1.6; }
.footer-small + .footer-small { margin-top: var(--s-sm); }
/* Running-text links stay inline and underlined so they read as links */
.site-footer p a { text-decoration: underline; text-underline-offset: 2px; }

/* Link grid. Phones: brand on top, Services and Where we work side by side, then Talk to Andy. */
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg) var(--s-md); padding-block: var(--s-xl) var(--s-lg); }
.footer-brand, .footer-col--talk { grid-column: 1 / -1; }
.footer-brand__name { font-size: 1.5rem; color: var(--c-text); }
.footer-brand .brand__sub { margin-bottom: var(--s-md); }
.footer-col ul { display: grid; }
.footer-col li a { display: flex; align-items: center; gap: var(--s-sm); min-height: 44px; }
.footer-col li a .icon { color: var(--c-amber); width: 1.1em; height: 1.1em; }
.footer-col > .footer-small { margin-top: var(--s-sm); }
.footer-col--talk ul { grid-template-columns: 1fr 1fr; column-gap: var(--s-md); }
.footer-hours { display: flex; gap: var(--s-sm); align-items: flex-start; margin-top: var(--s-md); }
.footer-hours .icon { flex: none; width: 1.1em; height: 1.1em; margin-top: 0.3em; color: var(--c-amber); }
.footer-hours a { display: block; padding-block: 0.625rem; color: var(--c-amber-text) !important; font-weight: 600; }
.footer-badge { display: flex; align-items: center; gap: var(--s-md); margin-top: var(--s-md); padding: var(--s-md); border: 1px solid var(--c-line-strong); border-radius: var(--r-card); background: var(--c-s1); min-height: 44px; }
.footer-badge .icon { color: var(--c-cyan); width: 1.75rem; height: 1.75rem; }
.footer-badge span { display: grid; font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text); }
.footer-badge small { font-family: var(--f-body); font-size: var(--t-sm); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--c-muted); }
.footer-badge:hover small { color: var(--c-amber-text); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-xl); padding-block: var(--s-2xl) var(--s-xl); }
  .footer-col--talk { grid-column: auto; }
  .footer-col--talk ul { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; }
  .footer-brand { grid-column: auto; }
}
/* Mouse users get tighter rows; touch screens keep the 44px tap targets */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) { .footer-col li a { min-height: 34px; } }

/* Legal and regulatory text: its own band, small and quiet, three across on desktop */
.footer-legal { display: grid; gap: var(--s-lg); padding-block: var(--s-xl); border-top: 1px solid var(--c-line); }
.footer-legal .footer-small { font-size: 0.8125rem; }
@media (min-width: 768px) { .footer-legal { grid-template-columns: 1fr 1fr 1.4fr; gap: var(--s-xl); } }
.footer-base { border-top: 1px solid var(--c-line); padding-block: var(--s-lg); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-xl); justify-content: space-between; font-size: var(--t-sm); }
.footer-base nav { display: flex; flex-wrap: wrap; gap: 0 var(--s-lg); }
.footer-base nav a, .footer-base__credit a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-base__credit { color: var(--c-muted); }
.footer-base__credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Scroll reveals (Vesica house pattern) ----------
   Only beats when JS is on: html.js is set by the inline switch in the head. Without JS
   nothing is hidden. Transform + opacity only, so nothing reflows and CLS stays at zero. */
.js [data-reveal] { opacity: 0; transform: translateY(44px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].visible { opacity: 1; transform: none; }
.js [data-stagger] > * { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-stagger].visible > * { opacity: 1; transform: none; }
.js [data-stagger].visible > *:nth-child(1) { transition-delay: 0.04s; }
.js [data-stagger].visible > *:nth-child(2) { transition-delay: 0.12s; }
.js [data-stagger].visible > *:nth-child(3) { transition-delay: 0.2s; }
.js [data-stagger].visible > *:nth-child(4) { transition-delay: 0.28s; }
.js [data-stagger].visible > *:nth-child(5) { transition-delay: 0.36s; }
.js [data-stagger].visible > *:nth-child(6) { transition-delay: 0.44s; }
.js [data-stagger].visible > *:nth-child(7) { transition-delay: 0.52s; }
.js [data-stagger].visible > *:nth-child(8) { transition-delay: 0.6s; }
/* A reveal that sits inside a staggered block must never be stranded by it. */
.js [data-stagger].visible [data-reveal] { opacity: 1; transform: none; }

/* Open facts the owner still has to supply */
.confirm { background: rgba(249, 115, 22, 0.14); outline: 1px dashed var(--c-amber); outline-offset: 1px; color: var(--c-amber-text); padding: 0 4px; border-radius: 2px; font-family: var(--f-mono); font-size: 0.9em; }

/* ---------- Misc ---------- */
.areas { display: flex; flex-wrap: wrap; gap: var(--s-sm); }
.badge-num { font-family: var(--f-mono); font-weight: 700; color: var(--c-amber-text); }
.big-stat { font-family: var(--f-head); font-weight: 700; font-size: clamp(2.5rem, 2rem + 3vw, 4rem); line-height: 1; letter-spacing: -0.03em; }
.two-up { display: grid; gap: var(--s-lg); }
@media (min-width: 900px) { .two-up { grid-template-columns: 1fr 1fr; } }
.cta-band { background: var(--c-s2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-modal); padding: var(--s-xl) var(--s-lg); display: grid; gap: var(--s-lg); align-items: center; box-shadow: var(--glow-amber); }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; padding: var(--s-2xl); } .cta-band .btn-row { justify-content: flex-end; } }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }

/* ---------- Explore: services, guides and areas link block ---------- */
.explore { border-top: 1px solid var(--c-line); }
.explore__cols { display: grid; gap: var(--s-lg); }
.explore h2 { font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--s-sm); }
.explore a { display: inline-flex; align-items: center; gap: var(--s-sm); min-height: 44px; color: var(--c-muted-strong); text-decoration: none; }
.explore a:hover { color: var(--c-amber-text); }
.explore a .icon { width: 0.9em; height: 0.9em; color: var(--c-amber); }
@media (min-width: 768px) { .explore__cols { grid-template-columns: repeat(3, 1fr); gap: var(--s-xl); } }

/* ---------- Our work: photos, before/after pairs, job write-ups ---------- */
.shot { position: relative; margin: 0; }
.shot > a { display: block; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--c-line-strong); background: var(--c-s1); }
.shot img { width: 100%; height: auto; }
.shot .chip { position: absolute; top: var(--s-sm); left: var(--s-sm); z-index: 1; background: rgba(11, 17, 32, 0.88); }
.shot figcaption { margin-top: var(--s-sm); font-size: var(--t-sm); color: var(--c-muted); line-height: 1.4; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); align-items: start; }
@media (max-width: 639px) { .ba--land { grid-template-columns: 1fr; } }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); align-items: start; }
.mosaic > .shot:first-child { grid-column: 1 / -1; }

.job { display: grid; gap: var(--s-lg); padding-block: var(--s-2xl); border-top: 1px solid var(--c-line); }
.job:first-child { border-top: 0; padding-top: 0; }
.job__copy > * + * { margin-top: var(--s-md); }
.job__copy h2 { font-size: var(--t-h2); }
.job__intro { color: var(--c-muted-strong); max-width: 60ch; }
.job__copy > .job__sub { margin-top: var(--s-lg); }
.job__sub { font-family: var(--f-mono); font-size: var(--t-mono-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
@media (min-width: 900px) {
  .job { grid-template-columns: 7fr 5fr; gap: var(--s-2xl); align-items: start; }
  .job--flip { grid-template-columns: 5fr 7fr; }
  .job--flip .job__media { order: 2; }
}
.job__media--narrow { max-width: 26rem; }
@media (min-width: 900px) { .job__media--narrow { justify-self: center; width: 100%; } }
.page-hero__media { display: none; }
@media (min-width: 1024px) { .page-hero__media { display: block; max-width: 22rem; justify-self: end; } }

/* Home page strip */
.work-strip { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
.work-strip .shot > a { aspect-ratio: 3 / 4; }
.work-strip .shot img { height: 100%; object-fit: cover; }
.work-strip > .shot:nth-child(3) { display: none; }
@media (min-width: 640px) { .work-strip { grid-template-columns: repeat(3, 1fr); } .work-strip > .shot:nth-child(3) { display: block; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}
@media print {
  .site-header, .callbar, .site-footer, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Guide bylines: who wrote it and when (matches the BlogPosting markup) */
.byline { font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.04em; color: var(--c-muted); }

/* Town chips that link to the other town pages */
.areas a.chip { min-height: 44px; text-decoration: none; }
.areas a.chip:hover { color: var(--c-amber-text); border-color: rgba(249, 115, 22, 0.5); }

/* Key-number block in a narrow column: always two across */
@media (min-width: 900px) { .facts.facts--2 { grid-template-columns: 1fr 1fr; } }
.facts--2 .fact__n { font-size: 1.25rem; line-height: 1.15; }

/* Town pages: the job photo sits beside the local copy, cropped landscape so it matches the text height */
.town-photo .shot > a { aspect-ratio: 3 / 2; }
@media (min-width: 900px) { .town-local { align-items: center; } }
.town-photo .shot img { height: 100%; object-fit: cover; object-position: 50% 40%; }

/* ---------- Consent toast (GA4) ---------- */
.cookie-toast { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 34rem; margin-inline: auto; z-index: 100; padding: 1.15rem 1.35rem; background: var(--c-s1); color: var(--c-text); border: 1px solid var(--c-line-strong); border-radius: var(--r-md, 12px); box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 0.85rem; transition: transform 0.3s ease, opacity 0.3s ease; }
.cookie-toast.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.cookie-toast p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--c-muted-strong); }
.cookie-toast a { color: var(--c-amber-text); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-btn { padding: 0.45rem 0.95rem; min-height: 2.3rem; font-size: 0.75rem; }
.link-button { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 37rem) {
  .cookie-toast { padding: 0.85rem 1rem; gap: 0.6rem; }
  .cookie-toast p { font-size: 0.8rem; }
}

/* ---------- AI assistant (joined onto site.css at build time) ---------- */
.btn[hidden], .link-arrow[hidden], .assistant-card[hidden], .footer-link[hidden] { display: none !important; }

/* The launcher: always on screen, above the phone call bar on small screens */
.chat-launch { position: fixed; z-index: 65; right: 16px; bottom: calc(64px + var(--s-md) + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 0.5rem; min-height: 52px; padding: 0.75rem 1.15rem 0.75rem 0.95rem; border: 0; border-radius: var(--r-pill); background: var(--c-amber); color: var(--c-on-amber); font-family: var(--f-head); font-size: var(--t-md); font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 10px 28px -6px rgba(249, 115, 22, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45); transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.chat-launch:hover { background: var(--c-amber-hi); transform: translateY(-1px); }
.chat-launch .icon { width: 1.4rem; height: 1.4rem; stroke-width: 2; }
.chat-launch__long { display: none; }
.chat-launch__dot { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--c-cyan); border: 2px solid var(--c-base); animation: pulse 2.4s ease-in-out infinite; }
.chat-launch[hidden], .chat-nudge[hidden], .chat[hidden] { display: none; }
@media (min-width: 768px) { .chat-launch { right: 24px; bottom: 24px; } .chat-launch__short { display: none; } .chat-launch__long { display: inline; } }

/* One polite prompt per visit */
.chat-nudge { position: fixed; z-index: 66; right: 16px; bottom: calc(64px + var(--s-md) + 52px + 12px + env(safe-area-inset-bottom)); max-width: min(17rem, calc(100vw - 32px)); display: flex; align-items: flex-start; background: var(--c-s2); border: 1px solid var(--c-line-strong); border-radius: var(--r-card); box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6); }
.chat-nudge__go { flex: 1; text-align: left; padding: 0.75rem 0 0.75rem 0.9rem; background: none; border: 0; color: var(--c-muted-strong); font: inherit; font-size: var(--t-sm); line-height: 1.45; cursor: pointer; min-height: 44px; }
.chat-nudge__go strong { color: var(--c-text); }
.chat-nudge__x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: none; border: 0; color: var(--c-muted); cursor: pointer; }
.chat-nudge__x:hover { color: var(--c-text); }
@media (min-width: 768px) { .chat-nudge { right: 24px; bottom: calc(24px + 52px + 12px); } }

/* The panel: a full-screen sheet on phones, a floating window on larger screens */
.chat { position: fixed; z-index: 90; left: 0; right: 0; top: var(--chat-top, 0px); height: var(--chat-h, 100dvh); display: flex; flex-direction: column; background: var(--c-base); color: var(--c-text); }
html.chat-open { overflow: hidden; }
@media (min-width: 768px) {
  .chat { left: auto; top: auto; right: 24px; bottom: 24px; width: 400px; height: min(660px, calc(100dvh - 48px)); border: 1px solid var(--c-line-strong); border-radius: var(--r-modal); box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.75), var(--glow-amber); overflow: hidden; }
  html.chat-open { overflow: auto; }
}
.chat__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm); padding: var(--s-sm) var(--s-sm) var(--s-sm) var(--s-md); background: var(--c-s1); border-bottom: 1px solid var(--c-line-strong); }
.chat__head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--c-amber), var(--c-blue)); }
.chat__who { display: flex; align-items: center; gap: var(--s-sm); min-width: 0; }
.chat__avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--r-control); background: var(--c-amber); color: var(--c-on-amber); }
.chat__avatar .icon { width: 20px; height: 20px; stroke-width: 2; }
.chat__head h2 { font-size: var(--t-md); line-height: 1.2; }
.chat__head p { font-family: var(--f-mono); font-size: var(--t-mono-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-cyan-text); }
.chat__tools { display: flex; align-items: center; flex: none; }
.chat__reset, .chat__close { min-height: 44px; min-width: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--c-muted-strong); font: inherit; font-size: var(--t-sm); cursor: pointer; border-radius: var(--r-control); }
.chat__reset { padding-inline: 0.5rem; }
.chat__reset:hover, .chat__close:hover { color: var(--c-text); background: var(--c-s2); }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: var(--s-md); display: flex; flex-direction: column; gap: var(--s-sm); }
.msg { max-width: 90%; padding: 0.65rem 0.85rem; border-radius: 14px; font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: var(--c-s2); border: 1px solid var(--c-line); border-bottom-left-radius: 4px; color: var(--c-muted-strong); }
.msg--me { align-self: flex-end; background: rgba(249, 115, 22, 0.16); border: 1px solid rgba(249, 115, 22, 0.4); border-bottom-right-radius: 4px; color: var(--c-text); white-space: pre-wrap; }
.msg--notice { border-style: dashed; border-color: rgba(249, 115, 22, 0.45); }
.msg p + p, .msg p + ul, .msg p + ol, .msg ul + p, .msg ol + p { margin-top: 0.5rem; }
.msg ul, .msg ol { padding-left: 1.15rem; margin: 0.35rem 0; }
.msg ul { list-style: disc; }
.msg ol { list-style: decimal; }
.msg li + li { margin-top: 0.2rem; }
.msg strong { color: var(--c-text); font-weight: 700; }
.msg a { color: var(--c-cyan); text-underline-offset: 2px; }
.msg--typing { display: flex; gap: 5px; align-items: center; min-height: 40px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-muted); animation: pulse 1.2s ease-in-out infinite; }
.msg--typing i:nth-of-type(2) { animation-delay: 0.2s; }
.msg--typing i:nth-of-type(3) { animation-delay: 0.4s; }
.chat__chips { display: flex; flex-wrap: wrap; gap: var(--s-sm); padding: 0 var(--s-md) var(--s-sm); }
.chat__chips[hidden] { display: none; }
.chat__chip { min-height: 44px; padding: 0.5rem 0.9rem; background: var(--c-s1); border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); color: var(--c-text); font: inherit; font-size: var(--t-sm); cursor: pointer; text-align: left; }
.chat__chip:hover { border-color: var(--c-amber); color: var(--c-amber-text); }
.chat__form { display: flex; align-items: flex-end; gap: var(--s-sm); padding: var(--s-sm) var(--s-md); border-top: 1px solid var(--c-line); }
.chat__form textarea { flex: 1; min-height: 48px; max-height: 120px; resize: none; padding: 0.7rem 0.75rem; background: var(--c-s1); color: var(--c-text); border: 1px solid var(--c-input-border); border-radius: var(--r-control); font-family: var(--f-body); font-size: 1rem; line-height: 1.4; }
.chat__form textarea:focus { outline: none; border-color: var(--c-amber); box-shadow: 0 0 0 1px var(--c-amber); }
.chat__send { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: var(--c-amber); color: var(--c-on-amber); border: 0; border-radius: var(--r-control); cursor: pointer; }
.chat__send:hover:not([disabled]) { background: var(--c-amber-hi); }
.chat__send[disabled] { opacity: 0.5; cursor: wait; }
.chat__fine { padding: 0 var(--s-md) var(--s-sm); font-size: 0.75rem; line-height: 1.45; color: var(--c-muted); }
.chat__fine a { color: var(--c-muted-strong); }
.chat__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); padding: var(--s-sm) var(--s-md) calc(var(--s-sm) + env(safe-area-inset-bottom)); border-top: 1px solid var(--c-line); background: var(--c-s1); }

/* "Ask the assistant" cards on the pages */
.assistant-card { display: flex; align-items: center; gap: var(--s-md); padding: var(--s-md); background: var(--c-s2); border: 1px solid rgba(249, 115, 22, 0.35); border-radius: var(--r-card); }
.assistant-card > div { flex: 1; min-width: 0; }
.assistant-card strong { display: block; color: var(--c-text); font-family: var(--f-head); }
.assistant-card span:not(.assistant-card__icon) { display: block; font-size: var(--t-sm); color: var(--c-muted-strong); line-height: 1.45; }
.assistant-card__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-control); background: rgba(249, 115, 22, 0.16); color: var(--c-amber); }
@media (max-width: 559px) { .assistant-card { flex-wrap: wrap; } .assistant-card .btn { width: 100%; } }
.footer-col li button { display: flex; align-items: center; gap: var(--s-sm); min-height: 44px; padding: 0; background: none; border: 0; color: var(--c-muted-strong); font: inherit; cursor: pointer; }
.footer-col li button:hover { color: var(--c-amber-text); }
.footer-col li button .icon { color: var(--c-amber); width: 1.1em; height: 1.1em; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) { .footer-col li button { min-height: 34px; } }
@media print { .chat, .chat-launch, .chat-nudge, .assistant-card { display: none !important; } }
