/* ESCO Plumbing design system. Tokens first, then base, layout, components, pages. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand (sampled from the ESCO logo) */
  --navy: #0a3157;
  --navy-deep: #071f38;
  --navy-ink: #0b2340;
  --flame: #e8600a;          /* decorative and large shapes only */
  --copper: #b8470a;         /* action colour: 5.3:1 with white */
  --copper-dark: #963907;
  --water: #0068ae;
  --water-soft: #e3eef7;

  /* Neutrals */
  --paper: #faf7f2;
  --paper-2: #f3eee6;
  --stone: #e7dfd2;
  --line: #d9cfbf;
  --white: #ffffff;
  --text: #1b2533;
  --muted: #4a5565;
  --on-dark: #f3eee6;
  --on-dark-muted: #c9d3df;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.94rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.38rem);
  --step-2: clamp(1.42rem, 1.27rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.15rem, 1.6rem + 2.5vw, 3.7rem);

  /* Space and shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;
  --radius-s: 6px;
  --radius: 12px;
  --radius-l: 22px;
  --shadow: 0 1px 2px rgba(11, 35, 64, 0.06), 0 8px 24px -12px rgba(11, 35, 64, 0.22);
  --shadow-lift: 0 2px 4px rgba(11, 35, 64, 0.08), 0 18px 40px -18px rgba(11, 35, 64, 0.38);
  --measure: 68ch;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--water);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
.frame picture, .photo picture, .card-media picture { width: 100%; height: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.15;
  color: var(--navy-ink);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 600; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 750; letter-spacing: 0; }
p, ul, ol, dl { margin: 0 0 var(--space-4); }
p { text-wrap: pretty; }
a { color: var(--water); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
strong { font-weight: 750; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-7) 0; }
::selection { background: var(--water-soft); color: var(--navy-ink); }

[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; 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(--space-4); top: -100px; z-index: 100;
  background: var(--navy); color: var(--white); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: var(--measure); }
.section { padding-block: var(--space-8); }
.section--tight { padding-block: var(--space-7); }
.section--stone { background: var(--paper-2); border-block: 1px solid var(--stone); }
.section--navy { background: var(--navy-deep); color: var(--on-dark); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a:not(.btn) { color: #9fd0f5; }
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.split { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .split--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .split--even { grid-template-columns: 1fr 1fr; align-items: center; }
}
.stack > * + * { margin-top: var(--space-4); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 750;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper);
  margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: var(--flame); border-radius: 2px; }
.section--navy .eyebrow { color: #ffb380; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.section--navy .lede { color: var(--on-dark-muted); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--copper); }

/* Buttons */
.btn {
  --btn-bg: var(--copper);
  --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0.7rem 1.35rem;
  border-radius: 999px; border: 2px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 750 var(--step-0)/1.1 var(--font-body); text-decoration: none; letter-spacing: 0.01em;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease), color 180ms var(--ease);
  white-space: nowrap;
}
.btn:hover { --btn-bg: var(--copper-dark); color: var(--white); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { --btn-bg: var(--navy); color: var(--white); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--navy-ink); border-color: var(--white); }
.btn--light:hover { --btn-bg: var(--paper-2); color: var(--navy-ink); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn--outline-light:hover { --btn-bg: var(--white); color: var(--navy-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
@media (max-width: 420px) { .btn-row .btn { flex: 1 1 100%; } .btn { white-space: normal; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--stone);
}
.header-inner { display: flex; align-items: center; gap: var(--space-5); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--navy); margin-right: auto; }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--font-body); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.06em; line-height: 1; color: var(--navy); }
.brand-name small { display: block; font-size: 0.66rem; letter-spacing: 0.32em; font-weight: 700; margin-top: 4px; color: var(--navy); }
.nav-list { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 999px;
  color: var(--navy-ink); font-weight: 650; text-decoration: none; font-size: 0.98rem;
}
.nav-list a:hover { background: var(--paper-2); color: var(--navy); }
.nav-list a[aria-current="page"] { background: var(--stone); }
.header-call { display: none; }
.nav-toggle {
  display: none; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1.5px solid var(--navy); background: transparent; color: var(--navy);
  font: 700 0.95rem/1 var(--font-body); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 1000px) {
  .header-call { display: inline-flex; min-height: 44px; padding-block: 0.55rem; }
}
@media (max-width: 999px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed; inset: 76px 0 auto 0; max-height: calc(100dvh - 76px); overflow-y: auto;
    background: var(--paper); border-bottom: 1px solid var(--stone); box-shadow: var(--shadow-lift);
    padding: var(--space-4) var(--gutter) var(--space-6);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 220ms var(--ease), opacity 220ms var(--ease), visibility 0s linear 220ms;
  }
  .js .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-list a { padding: 0.9rem 0.6rem; border-radius: var(--radius-s); font-size: 1.1rem; border-bottom: 1px solid var(--stone); }
  .nav-mobile-actions { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
  .site-nav:not(.is-open) .nav-mobile-actions { display: none; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: var(--space-3); }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}
@media (min-width: 1000px) { .nav-mobile-actions { display: none; } }

/* Breadcrumbs */
.breadcrumbs { font-size: var(--step--1); color: var(--muted); padding-top: var(--space-5); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--navy-ink); font-weight: 650; }

/* Hero */
.hero { position: relative; padding-block: var(--space-7) var(--space-8); overflow: clip; }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.hero h1 { margin-bottom: var(--space-5); }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.38rem 0.8rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--stone);
  font-size: var(--step--1); font-weight: 700; color: var(--navy-ink);
}
.badge svg { width: 1rem; height: 1rem; color: var(--copper); flex: none; }
.hero-media { position: relative; }
.hero-media .frame {
  border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3; background: var(--stone);
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-card {
  position: absolute; left: clamp(-1rem, -2vw, 0rem); bottom: -1.5rem;
  background: var(--navy-deep); color: var(--on-dark); border-radius: var(--radius);
  padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-lift); max-width: 19rem;
}
.hero-card strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--white); font-weight: 600; line-height: 1.1; }
.hero-card span { font-size: var(--step--1); color: var(--on-dark-muted); }
.page-hero { padding-block: var(--space-6) var(--space-7); }
.page-hero .lede { margin-bottom: var(--space-5); }
.hero-ornament { position: absolute; right: -6rem; top: -6rem; width: 26rem; opacity: 0.5; pointer-events: none; z-index: -1; color: var(--stone); }

/* Cards */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--stone); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card-body h3 { margin: 0; font-size: var(--step-1); }
.card-body p { margin: 0; color: var(--muted); }
.card-link { margin-top: auto; padding-top: var(--space-2); font-weight: 750; color: var(--copper); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-link svg { width: 1.05em; height: 1.05em; transition: transform 220ms var(--ease); }
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line); }
.card:hover .card-media img { transform: scale(1.035); }
.card:hover .card-link svg, .card:focus-within .card-link svg { transform: translateX(3px); }
.card:focus-within { box-shadow: var(--shadow-lift), var(--focus); }
.card-link:focus-visible { box-shadow: none; }
.card--plain .card-body { padding: var(--space-5) var(--space-5) var(--space-5); }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--copper); }
.card-icon svg { width: 26px; height: 26px; }

/* Feature list */
.ticks { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: var(--space-3); }
.ticks li { position: relative; padding-left: 2rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--water-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230068ae' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/0.9rem no-repeat;
}
.section--navy .ticks li::before { background-color: rgba(255, 255, 255, 0.12); }

/* Info panels */
.panel { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow); }
.panel--stone { background: var(--paper-2); box-shadow: none; }
.panel h2, .panel h3 { margin-top: 0; }
.notice {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start;
  border-left: 4px solid var(--flame); background: #fff4ec; border-radius: var(--radius-s);
  padding: var(--space-4) var(--space-5); margin-block: var(--space-5);
}
.notice svg { width: 26px; height: 26px; color: var(--copper); margin-top: 2px; }
.notice p { margin: 0; }
.notice p + p { margin-top: var(--space-2); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.steps li { counter-increment: step; position: relative; padding: var(--space-4) var(--space-4) var(--space-4) 4rem; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); }
.steps li::before {
  content: counter(step); position: absolute; left: var(--space-4); top: var(--space-4);
  width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--white); font-weight: 800; font-size: 0.95rem;
}
.steps strong { display: block; color: var(--navy-ink); }

/* Accordion */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-4) 0; font-weight: 750; color: var(--navy-ink); font-size: var(--step-0);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--line);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v10M5 10h10' stroke='%230a3157' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/0.85rem no-repeat;
  transition: transform 200ms var(--ease);
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .answer { padding: 0 0 var(--space-4); max-width: var(--measure); color: var(--text); }

/* Contact panel */
.contact-band { position: relative; overflow: hidden; }
.contact-band .container { position: relative; }
.contact-grid { display: grid; gap: var(--space-5); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.contact-methods { display: grid; gap: var(--space-3); }
.contact-method {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white); text-decoration: none; transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}
.section--navy .contact-method { color: var(--white); }
.contact-method:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); transform: translateY(-1px); }
.contact-method svg { width: 28px; height: 28px; color: #ffb380; flex: none; }
.contact-method small { display: block; color: var(--on-dark-muted); font-size: var(--step--1); }
.contact-method strong { font-size: var(--step-1); font-weight: 750; overflow-wrap: anywhere; }

/* Contact page */
.contact-cards { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.contact-card { display: block; padding: var(--space-6); border-radius: var(--radius-l); background: var(--white); border: 1px solid var(--stone); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--text); }
.contact-card .card-icon { margin-bottom: var(--space-4); }
.contact-card .value { display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--navy-ink); line-height: 1.1; margin: var(--space-2) 0; overflow-wrap: anywhere; }
.contact-card .value--email { font-size: var(--step-2); }
.contact-card .hint { color: var(--muted); font-size: var(--step--1); }
.details-list { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.details-list dt { font-weight: 750; color: var(--navy-ink); }
.details-list dd { margin: 0; color: var(--text); }
@media (max-width: 520px) { .details-list { grid-template-columns: 1fr; } .details-list dd { margin-bottom: var(--space-3); } }

/* Service selector */
.selector { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--shadow); }
.selector-options { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin: var(--space-5) 0; list-style: none; padding: 0; }
.selector-option {
  width: 100%; text-align: left; display: flex; gap: var(--space-3); align-items: center;
  padding: var(--space-4); border-radius: var(--radius); border: 1.5px solid var(--stone); background: var(--paper);
  font: 700 var(--step-0)/1.3 var(--font-body); color: var(--navy-ink); cursor: pointer; text-decoration: none;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}
.selector-option svg { width: 28px; height: 28px; color: var(--copper); flex: none; }
.selector-option:hover { border-color: var(--copper); transform: translateY(-1px); color: var(--navy-ink); }
.selector-option[aria-current="true"] { border-color: var(--navy); background: var(--water-soft); }
.selector-result { border-top: 1px solid var(--stone); padding-top: var(--space-5); }
.selector-result[hidden] { display: none; }
.selector-result h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); }

/* Diagrams */
.diagram { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); padding: var(--space-5); box-shadow: var(--shadow); }
.diagram figcaption { font-size: var(--step--1); color: var(--muted); margin-top: var(--space-3); }
.diagram svg { width: 100%; height: auto; }
.flow-hot { stroke-dasharray: 10 12; animation: flow 2.4s linear infinite; }
.flow-cool { stroke-dasharray: 10 12; animation: flow 2.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -44; } }
.diagram-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); list-style: none; padding: 0; margin: var(--space-3) 0 0; font-size: var(--step--1); color: var(--muted); }
.diagram-legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.swatch { width: 1.4rem; height: 4px; border-radius: 2px; display: inline-block; }
.swatch--hot { background: var(--flame); }
.swatch--cool { background: var(--water); }
.diagram-controls { margin-top: var(--space-3); }

/* Figure with photo */
.photo { border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 2; background: var(--stone); margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* Areas */
.region { padding-block: var(--space-5); border-top: 1px solid var(--stone); }
.region h2, .region h3 { font-size: var(--step-2); font-family: var(--font-display); font-weight: 600; margin-bottom: var(--space-3); }
.town-links { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.town-links a {
  display: inline-block; padding: 0.5rem 0.95rem; border-radius: 999px; background: var(--white);
  border: 1px solid var(--stone); color: var(--navy-ink); font-weight: 650; text-decoration: none;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.town-links a:hover { border-color: var(--copper); background: #fff7f1; }
.town-links a[aria-current="page"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.region-tag { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--water-soft); color: var(--navy); font-size: var(--step--1); font-weight: 750; margin-bottom: var(--space-3); }

/* Legal */
.legal { max-width: 74ch; }
.legal h2 { font-size: var(--step-2); margin-top: var(--space-7); scroll-margin-top: 100px; }
.legal h3 { margin-top: var(--space-5); scroll-margin-top: 100px; }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: var(--space-2); }
.legal table, table.data-table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0 var(--space-5); font-size: var(--step--1); }
.legal th, .legal td, .data-table th, .data-table td { text-align: left; vertical-align: top; padding: var(--space-3); border: 1px solid var(--stone); }
.legal th, .data-table th { background: var(--paper-2); color: var(--navy-ink); }
.table-wrap { overflow-x: auto; }
.toc { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-6); }
.toc h2 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 800; margin: 0 0 var(--space-3); }
.toc ol { columns: 2 16rem; margin: 0; padding-left: 1.2rem; }
.toc li { break-inside: avoid; margin-bottom: var(--space-1); }
.meta-line { color: var(--muted); font-size: var(--step--1); }
.model-form { border: 2px dashed var(--line); border-radius: var(--radius); padding: var(--space-5); background: var(--white); }

/* Footer */
.site-footer { background: var(--navy-ink); color: var(--on-dark); padding-block: var(--space-8) var(--space-6); font-size: var(--step--1); }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.footer-grid h2 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: #ffb380; margin-bottom: var(--space-4); font-weight: 800; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand .chip { width: 52px; height: 52px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.footer-brand .chip img { width: 44px; height: 44px; }
.footer-brand span { font-weight: 800; letter-spacing: 0.08em; color: var(--white); font-size: 1.05rem; }
.footer-contact a { font-weight: 700; color: var(--white); }
.site-footer address { font-style: normal; }
.footer-legal { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.14); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between; color: var(--on-dark-muted); }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
.footer-legal a { color: var(--on-dark-muted); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-legal a:hover { color: var(--white); }
.footer-areas { columns: 2; column-gap: var(--space-4); }
.footer-areas li { break-inside: avoid; }

/* Mobile action bar */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: rgba(7, 31, 56, 0.97); border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.action-bar .btn { min-height: 46px; font-size: 0.98rem; padding-inline: 0.8rem; }
@media (min-width: 760px) { .action-bar { display: none; } }
@media (max-width: 759px) { body { padding-bottom: 72px; } }

/* Back to top */
.to-top {
  position: fixed; right: var(--space-4); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 39;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--stone);
  background: var(--white); color: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s linear 200ms; cursor: pointer;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (min-width: 760px) { .to-top { bottom: var(--space-5); right: var(--space-5); } }

/* Reveal on scroll (only when JS adds .reveal-ready and motion is allowed) */
.reveal-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }

/* Utility */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.nowrap { white-space: nowrap; }

/* 404 */
.error-code { font-family: var(--font-display); font-size: clamp(5rem, 18vw, 10rem); line-height: 0.9; color: var(--copper); font-weight: 700; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .flow-hot, .flow-cool { animation: none; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .action-bar, .to-top, .site-footer, .contact-band { display: none !important; }
  body { background: #fff; padding: 0; }
  a { color: #000; }
}

/* ===================================================================
   v2: immersive dark heroes, interactive components, motion
   =================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }

:root {
  --ink-900: #061a30;
  --ink-800: #0a2440;
  --glow-copper: rgba(232, 96, 10, 0.22);
  --glow-water: rgba(0, 104, 174, 0.28);
  --hot: #f08a45;
  --hot-soft: #ffb380;
  --cool: #4fb3f0;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.14);
}

/* Scroll progress hairline under the header (progressive) */
@supports (animation-timeline: scroll()) {
  .site-header::after {
    content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--copper), var(--flame));
    transform-origin: 0 50%; transform: scaleX(0);
    animation: progress linear both; animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* Dark hero */
.hero--dark, .page-hero--dark {
  position: relative; isolation: isolate; overflow: clip;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--glow-water), transparent 60%),
    radial-gradient(40rem 26rem at 5% 110%, var(--glow-copper), transparent 60%),
    linear-gradient(180deg, var(--ink-900), var(--ink-800));
  color: var(--on-dark);
}
.hero--dark h1, .page-hero--dark h1 { color: var(--white); }
.hero--dark h1 em, .page-hero--dark h1 em { color: var(--hot-soft); font-style: italic; font-weight: 500; }
.hero--dark .lede, .page-hero--dark .lede { color: var(--on-dark-muted); }
.hero--dark .eyebrow, .page-hero--dark .eyebrow { color: var(--hot-soft); }
.hero--dark .badge, .page-hero--dark .badge { background: var(--glass); border-color: var(--glass-line); color: var(--white); }
.hero--dark .badge svg, .page-hero--dark .badge svg { color: var(--hot-soft); }
.hero--dark .btn--ghost, .page-hero--dark .btn--ghost { --btn-fg: var(--white); border-color: rgba(255,255,255,0.6); }
.hero--dark .btn--ghost:hover, .page-hero--dark .btn--ghost:hover { --btn-bg: var(--white); color: var(--navy-ink); }
.hero--dark :focus-visible, .page-hero--dark :focus-visible { box-shadow: 0 0 0 3px var(--ink-900), 0 0 0 6px var(--hot-soft); }
.hero--dark { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero--dark h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em; }
.page-hero--dark { padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4.5rem); }
.page-hero--dark .frame { box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6); }
.breadcrumbs-band { background: var(--ink-900); }
.breadcrumbs-band .breadcrumbs { color: var(--on-dark-muted); }
.breadcrumbs-band a { color: var(--on-dark-muted); }
.breadcrumbs-band [aria-current="page"] { color: var(--white); }
.breadcrumbs-band li + li::before { color: rgba(255,255,255,0.3); }
.page-hero--dark .lede a, .page-hero--dark .meta-line a { color: #9fd0f5; }
.page-hero--dark .contact-card .eyebrow { color: var(--copper); }
.page-hero--dark .meta-line { color: var(--on-dark-muted); }
.page-hero--dark .error-code { color: var(--hot-soft); }
.page-hero--dark .hero-media .frame { background: var(--ink-800); }

/* Flowing pipework lines behind dark heroes */
.pipes-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.pipes-bg path { fill: none; stroke-width: 2; stroke-linecap: round; }
.pipes-bg .p-hot { stroke: rgba(240, 138, 69, 0.35); }
.pipes-bg .p-cool { stroke: rgba(79, 179, 240, 0.32); }
.pipes-bg .p-flow { stroke-dasharray: 2 18; stroke-width: 3; animation: flow 3.2s linear infinite; }
.pipes-bg .p-flow.slow { animation-duration: 5s; }

/* Live status pill */
.live {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: var(--space-4);
  padding: 0.35rem 0.85rem 0.35rem 0.65rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--white);
  font-size: var(--step--1); font-weight: 650;
}
.live-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 0.6rem rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.live time { font-variant-numeric: tabular-nums; color: var(--hot-soft); }

/* House explorer */
.explorer { position: relative; }
.explorer-stage { position: relative; border-radius: var(--radius-l); background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)); border: 1px solid var(--glass-line); padding: clamp(0.5rem, 2vw, 1.25rem); }
.explorer-stage svg { width: 100%; height: auto; }
.explorer-canvas { position: relative; }
.house-line { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2.5; stroke-linejoin: round; }
.house-fill { fill: rgba(255, 255, 255, 0.04); }
.house-detail { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.house-solid { fill: rgba(255, 255, 255, 0.12); stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.6; }
.pipe-hot { fill: none; stroke: var(--hot); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.pipe-cool { fill: none; stroke: var(--cool); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.pipe-flow { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 14; opacity: 0.75; animation: flow 1.8s linear infinite; }
.house-label { fill: rgba(255,255,255,0.55); font: 600 11px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.explorer[data-active] .zone { opacity: 0.35; transition: opacity 300ms var(--ease); }
.explorer .zone { transition: opacity 300ms var(--ease); }
.explorer .zone.is-lit { opacity: 1; }
.hotspot {
  position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center;
}
.hotspot::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 4px rgba(240, 138, 69, 0.25); transition: transform 200ms var(--ease), background-color 200ms var(--ease); }
.hotspot::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px solid var(--hot); animation: ring 2.4s ease-out infinite; }
.hotspot span { position: relative; z-index: 1; color: var(--ink-900); font-weight: 800; font-size: 0.8rem; line-height: 1; }
.hotspot:hover::before, .hotspot[aria-expanded="true"]::before { transform: scale(1.18); background: var(--white); }
.hotspot[aria-expanded="true"]::after { animation: none; opacity: 0; }
@media (max-width: 600px) { .hotspot { width: 32px; height: 32px; } .hotspot::before, .hotspot::after { inset: 9px; } }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.2); opacity: 0; } }
.explorer-panel {
  margin-top: var(--space-4); padding: var(--space-5); border-radius: var(--radius);
  background: var(--white); color: var(--text); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.55);
  min-height: 9.5rem; display: grid; gap: var(--space-2); align-content: start;
}
.explorer-panel h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); color: var(--navy-ink); }
.explorer-panel p { margin: 0; color: var(--muted); }
.explorer-panel .card-link::after { display: none; }
.explorer-hint { font-size: var(--step--1); color: var(--on-dark-muted); margin: var(--space-3) 0 0; }
.explorer-list { display: none; }
html:not(.js) .hotspot { display: none; }
html:not(.js) .explorer-list { display: grid; gap: var(--space-2); list-style: none; padding: 0; margin: var(--space-4) 0 0; }
html:not(.js) .explorer-list a { color: var(--white); }
html:not(.js) .explorer-panel { display: none; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: var(--space-5); }
.stat { padding: var(--space-5) var(--space-5) var(--space-5) 0; border-top: 2px solid var(--navy); }
.stat strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 2rem + 2.4vw, 3.8rem); line-height: 1; color: var(--navy-ink); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: var(--space-2); color: var(--muted); }

/* Problem finder */
.finder { display: grid; gap: var(--space-6); }
@media (min-width: 960px) { .finder { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; } }
.finder-card { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); box-shadow: var(--shadow-lift); overflow: hidden; }
.finder-progress { height: 4px; background: var(--paper-2); }
.finder-progress span { display: block; height: 100%; width: 33%; background: linear-gradient(90deg, var(--copper), var(--flame)); transition: width 400ms var(--ease); }
.finder-body { padding: clamp(1.25rem, 3vw, 2.25rem); }
.finder-step[hidden] { display: none; }
.finder-step { animation: stepIn 360ms var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.finder-q { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); color: var(--navy-ink); margin: 0 0 var(--space-4); }
.finder-options { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.finder-option {
  width: 100%; display: flex; align-items: center; gap: var(--space-3); text-align: left;
  padding: var(--space-4); border: 1.5px solid var(--stone); border-radius: var(--radius); background: var(--paper);
  font: 700 var(--step-0)/1.3 var(--font-body); color: var(--navy-ink); cursor: pointer; text-decoration: none;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease), background-color 160ms var(--ease);
}
.finder-option svg { width: 26px; height: 26px; color: var(--copper); flex: none; }
.finder-option:hover { border-color: var(--copper); background: #fff7f1; transform: translateY(-2px); color: var(--navy-ink); }
.finder-back { margin-top: var(--space-4); background: none; border: 0; padding: var(--space-2) 0; color: var(--water); font: 700 var(--step--1) var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.urgency { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: var(--step--1); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-3); }
.urgency--now { background: #fde4d4; color: #8a2f00; }
.urgency--soon { background: #fff1c7; color: #6b4a00; }
.urgency--plan { background: var(--water-soft); color: var(--navy); }
.finder-result h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-3); margin-bottom: var(--space-3); }
.finder-result ul { padding-left: 1.2rem; margin-bottom: var(--space-5); }

/* Bento services */
.bento { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(13rem, auto); grid-auto-flow: dense; }
  .bento .tile--wide { grid-column: span 2; }
  .bento .tile--tall { grid-row: span 2; }
}
.tile {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2);
  min-height: 13rem; padding: 5.25rem var(--space-5) var(--space-5); border-radius: var(--radius-l);
  background: var(--white); border: 1px solid var(--stone); color: var(--text); text-decoration: none;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 260ms var(--ease);
  background: radial-gradient(22rem circle at var(--mx) var(--my), rgba(232, 96, 10, 0.12), transparent 60%);
}
.tile:hover, .tile:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line); color: var(--text); }
.tile:hover::before, .tile:focus-visible::before { opacity: 1; }
.tile h3 { margin: 0; font-size: var(--step-1); position: relative; }
.tile p { margin: 0; color: var(--muted); position: relative; }
.tile .tile-icon { position: absolute; top: var(--space-5); left: var(--space-5); width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--paper-2); color: var(--copper); }
.tile .tile-icon svg { width: 26px; height: 26px; }
.tile .tile-go { position: absolute; top: var(--space-5); right: var(--space-5); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--stone); color: var(--navy); transition: transform 260ms var(--ease), background-color 260ms var(--ease), color 260ms var(--ease); }
.tile .tile-go svg { width: 18px; height: 18px; }
.tile:hover .tile-go, .tile:focus-visible .tile-go { transform: rotate(-45deg); background: var(--copper); color: var(--white); border-color: var(--copper); }
.tile--photo { color: var(--white); border: 0; min-height: 17rem; }
.tile--photo picture, .tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.tile--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 26, 48, 0.05) 25%, rgba(6, 26, 48, 0.88)); }
.tile--photo > :not(picture) { position: relative; z-index: 1; }
.tile--photo h3, .tile--photo p { color: var(--white); }
.tile--photo p { color: #dbe3ec; }
.tile--photo:hover { color: var(--white); }
.tile--photo:hover img { transform: scale(1.05); }
.tile--photo .tile-go { border-color: rgba(255,255,255,0.5); color: var(--white); }
.tile--dark { background: var(--ink-900); border-color: var(--ink-900); color: var(--white); }
.tile--dark h3 { color: var(--white); }
.tile--dark p { color: var(--on-dark-muted); }
.tile--dark .tile-icon { background: rgba(255,255,255,0.08); color: var(--hot-soft); }
.tile--dark .tile-go { border-color: rgba(255,255,255,0.3); color: var(--white); }
.tile--dark:hover { color: var(--white); }
.tile--dark::before { background: radial-gradient(22rem circle at var(--mx) var(--my), rgba(240, 138, 69, 0.22), transparent 60%); }

/* Process timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5); counter-reset: tl; position: relative; }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(4, 1fr); } }
.timeline li { counter-increment: tl; position: relative; padding-top: 3.25rem; }
.timeline li::before { content: "0" counter(tl); position: absolute; top: 0; left: 0; font: 600 1.6rem/1 var(--font-display); color: var(--copper); }
.timeline li::after { content: ""; position: absolute; top: 2.3rem; left: 0; right: 0; height: 2px; background: var(--stone); }
.timeline strong { display: block; font-size: var(--step-1); color: var(--navy-ink); margin: var(--space-2) 0; }
.timeline p { color: var(--muted); margin: 0; }
@supports (animation-timeline: view()) {
  .timeline li::after { background: linear-gradient(90deg, var(--copper) 50%, var(--stone) 50%) 100% 0 / 200% 100% no-repeat; animation: fill linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  @keyframes fill { to { background-position: 0 0; } }
}

/* Coverage map */
.coverage { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 960px) { .coverage { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.map { position: relative; border-radius: var(--radius-l); background: var(--ink-900); border: 1px solid var(--ink-800); overflow: hidden; box-shadow: var(--shadow-lift); }
.map svg { width: 100%; height: auto; }
.map .grid-line { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
.map .river { fill: none; stroke: rgba(79, 179, 240, 0.45); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.map .river-label { fill: rgba(79, 179, 240, 0.85); font: italic 600 18px var(--font-body); }
.map .radius { fill: rgba(240, 138, 69, 0.06); stroke: rgba(240, 138, 69, 0.3); stroke-dasharray: 4 6; }
.map .town { cursor: pointer; }
.map .town circle { fill: var(--hot); stroke: var(--ink-900); stroke-width: 2.5; transition: r 200ms var(--ease), fill 200ms var(--ease); }
.map .town text { fill: rgba(255,255,255,0.82); font: 650 20px var(--font-body); paint-order: stroke; stroke: var(--ink-900); stroke-width: 4px; transition: fill 200ms var(--ease); }
.map .town:hover circle, .map .town:focus circle, .map .town.is-hot circle { fill: var(--white); r: 11; }
.map .town:hover text, .map .town:focus text, .map .town.is-hot text { fill: var(--white); }
.map .town:focus { outline: none; }
.map .town:focus-visible circle { stroke: var(--hot-soft); stroke-width: 4; }
.map .town--home circle { fill: var(--cool); }
.map .town--current circle { fill: var(--white); r: 12; }
.map .town--current text { fill: var(--white); font-weight: 800; }
.map-caption { margin: 0; padding: 0 var(--space-4) var(--space-4); display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--step--1); color: var(--on-dark-muted); pointer-events: none; }
.map-caption span { display: inline-flex; align-items: center; gap: 0.4rem; }
.map-caption i { width: 0.7rem; height: 0.7rem; border-radius: 50%; display: inline-block; background: var(--hot); }
.map-caption i.home { background: var(--cool); }
.region-filter { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0; padding: 0; list-style: none; }
.chip { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--stone); background: var(--white); color: var(--navy-ink); font: 700 var(--step--1) var(--font-body); cursor: pointer; transition: all 160ms var(--ease); }
.chip:hover { border-color: var(--copper); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--stone); background: var(--white); position: relative; }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 2.5rem; padding: 1.1rem 1.25rem; margin: 0; list-style: none; }
.marquee li { white-space: nowrap; font: 600 var(--step-1) var(--font-display); color: var(--navy-ink); display: inline-flex; align-items: center; gap: 2.5rem; }
.marquee li::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flame); }
.marquee a { color: inherit; text-decoration: none; }
.marquee a:hover { color: var(--copper); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-toggle { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stone); background: var(--white); color: var(--navy); cursor: pointer; display: grid; place-items: center; }
.marquee-toggle svg { width: 16px; height: 16px; }

/* Pressure gauge */
.gauge { display: grid; gap: var(--space-5); align-items: center; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
@media (min-width: 760px) { .gauge { grid-template-columns: 15rem 1fr; } }
.gauge svg { width: 100%; max-width: 15rem; margin-inline: auto; }
.gauge-needle { transform-origin: 120px 120px; transition: transform 300ms var(--ease); }
.gauge label { font-weight: 800; color: var(--navy-ink); display: block; margin-bottom: var(--space-2); }
.gauge input[type="range"] { width: 100%; accent-color: var(--copper); height: 2rem; }
.gauge output { font: 600 var(--step-3) var(--font-display); color: var(--navy-ink); font-variant-numeric: tabular-nums; }
.gauge-advice { border-left: 4px solid var(--water); padding: var(--space-3) var(--space-4); background: var(--paper); border-radius: var(--radius-s); margin-top: var(--space-3); }
.gauge-advice[data-level="low"], .gauge-advice[data-level="high"] { border-left-color: var(--flame); background: #fff4ec; }
.gauge-advice strong { display: block; color: var(--navy-ink); }

/* Boiler picker */
.picker { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .picker { grid-template-columns: 1.2fr 1fr; } }
.picker fieldset { border: 0; padding: 0; margin: 0 0 var(--space-4); }
.picker legend { font-weight: 800; color: var(--navy-ink); margin-bottom: var(--space-2); }
.seg { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { padding: 0.55rem 1rem; border-radius: 999px; border: 1.5px solid var(--stone); cursor: pointer; font-weight: 700; color: var(--navy-ink); background: var(--paper); transition: all 160ms var(--ease); }
.seg input:checked + label { background: var(--navy); border-color: var(--navy); color: var(--white); }
.seg input:focus-visible + label { box-shadow: var(--focus); }
.picker-result { background: var(--ink-900); color: var(--on-dark); border-radius: var(--radius); padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; }
.picker-result h3 { color: var(--white); font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); margin: 0; }
.picker-result p { margin: 0; color: var(--on-dark-muted); }
.picker-result .tag { color: var(--hot-soft); font-size: var(--step--1); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

/* Emergency checklist */
.checklist { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.checklist-head { padding: var(--space-4) var(--space-5); background: var(--ink-900); color: var(--white); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.checklist .checklist-head strong { font-size: var(--step-1); color: var(--white); text-decoration: none; }
.checklist .checklist-head span { color: var(--white); }
.checklist-meter { flex: 1 1 8rem; max-width: 14rem; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; }
.checklist-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ddc84, #9be7b9); transition: width 300ms var(--ease); }
.checklist ol { list-style: none; margin: 0; padding: 0; }
.checklist li { border-top: 1px solid var(--stone); }
.checklist label { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); padding: var(--space-4) var(--space-5); cursor: pointer; }
.checklist input { width: 1.4rem; height: 1.4rem; margin-top: 0.15rem; accent-color: #1f9d55; }
.checklist strong { display: block; color: var(--navy-ink); }
.checklist span { color: var(--muted); }
.checklist input:checked ~ div strong { text-decoration: line-through; text-decoration-color: rgba(31, 157, 85, 0.6); }

/* Interactive radiator diagram */
.trv-btn { cursor: pointer; }
.trv-btn:focus-visible rect { stroke: var(--water); stroke-width: 4; }
rect.rad-body { fill: #ffe0c7; transition: fill 300ms var(--ease); }
.rad-off rect.rad-body { fill: #e3e9ef; }

/* Footer credit */
.footer-credit { color: var(--on-dark-muted); }

/* Softer reveal: never hide content completely */
.reveal-ready .reveal { opacity: 0.6; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  .pipe-flow, .pipes-bg .p-flow, .live-dot, .hotspot::after, .marquee-track { animation: none !important; }
  .marquee-track { width: auto; }
  .marquee-track ul[aria-hidden="true"] { display: none; }
  .marquee ul { flex-wrap: wrap; row-gap: 0.6rem; }
  .marquee-toggle { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
