/* ==========================================================================
   Target Fire Protection, Inc. — site styles
   Plain CSS, no build step. Design tokens live in :root.
   ========================================================================== */

:root {
  /* Company colors (from the logo): red #EA1C2C, black #231F20, gray #939598 */
  --brand-red: #ea1c2c;      /* logo red: graphics, lines, dots */
  --brand-black: #231f20;
  --brand-gray: #939598;
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --surface: #ffffff;
  --ink: #231f20;
  --ink-2: #3a3637;
  --muted: #5e6064;          /* 6.3:1 on white */
  --line: #e3e3e5;
  --line-strong: #b9babd;
  --accent: #e61b2b;         /* logo red, a hair deeper so white text passes WCAG AA (4.6:1) */
  --accent-dark: #c8101f;
  --dark: #231f20;
  --dark-2: #1a1718;
  --on-dark: #ffffff;
  --on-dark-muted: #b5b7ba;
  --focus: #e61b2b;

  /* Saira: squared, slightly extended letterforms that echo the logo's lettering */
  --font-sans: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: var(--font-sans);   /* small uppercase labels use Saira, extended */
  --stretch-display: 112%;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 11vw, 144px);
  --radius: 4px;
  --header-h: 72px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

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

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

h1, h2, h3 { margin: 0; font-weight: 600; font-stretch: var(--stretch-display); letter-spacing: -0.012em; line-height: 1.1; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.012em; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.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: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }

/* Small technical label, e.g. "01 — Services" */
.label {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500; font-stretch: 118%;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 1.25rem;
}
.label::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.label--plain::before { display: none; }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.muted { color: var(--muted); }
.measure { max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-size: 1rem; font-weight: 600; font-stretch: 108%; letter-spacing: .01em; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--light { background: var(--on-dark); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--accent); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: var(--on-dark); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .94rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow::after { content: "→"; transition: transform .25s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__name { font-weight: 700; letter-spacing: -0.015em; font-size: 1.05rem; line-height: 1.15; }
.brand__inc { font-weight: 500; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav ul a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.site-nav ul a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }

.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.nav-toggle__bars { width: 16px; height: 10px; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .25s, top .25s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }

@media (max-width: 1023px) {
  .brand__name { font-size: .98rem; }
  /* Without JS the nav simply wraps beneath the logo and stays usable */
  .header__inner { flex-wrap: wrap; }
  .site-nav { flex-wrap: wrap; gap: 12px 24px; padding-bottom: 12px; }
  .js .header__inner { flex-wrap: nowrap; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(35, 31, 32, .22);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a { display: block; padding: 14px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .js .site-nav ul a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
  .js .header__actions { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 18px; }
  .js .header__phone { padding: 6px 0; }
  .js .header__actions .btn { min-height: 48px; }
}

/* ---------- Riser: scroll-progress pipe along the left gutter ---------- */
.has-riser { position: relative; }
.riser { display: none; }
@media (min-width: 1100px) {
  .riser {
    display: block; position: absolute; top: 0; bottom: 0;
    left: clamp(22px, 2.6vw, 40px); width: 2px; background: var(--line);
    pointer-events: none; z-index: 1;
  }
  .riser__fill {
    position: absolute; inset: 0; background: var(--brand-red);
    transform-origin: top; transform: scaleY(0);
    will-change: transform;
  }
  .no-motion .riser__fill, html:not(.motion) .riser__fill { display: none; }
  /* Section "heads" on the riser */
  .has-riser [data-node]::before {
    content: ""; position: absolute; top: calc(var(--section-y) + 6px);
    left: calc(clamp(22px, 2.6vw, 40px) - 5px);
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--line-strong);
    transition: border-color .4s, background-color .4s, transform .4s var(--ease-out);
    z-index: 2;
  }
  .has-riser [data-node].is-reached::before { border-color: var(--brand-red); background: var(--brand-red); transform: scale(1.08); }
  .has-riser .section--dark[data-node]::before { background: var(--dark); }
}

/* Mobile/tablet progress bar (same idea, horizontal) */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--brand-red); transform-origin: left; transform: scaleX(0); pointer-events: none;
}
@media (min-width: 1100px) { .progress-bar { display: none; } }
html:not(.motion) .progress-bar { display: none; }

/* ---------- Scroll reveal (only active with JS + motion allowed) ---------- */
.motion [data-reveal] {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion [data-reveal].is-visible { opacity: 1; transform: none; }

/* Images wipe upward like a shutter, with a gentle settle */
.motion [data-reveal="image"] {
  opacity: 1; transform: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.15s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion [data-reveal="image"] > * { transform: scale(1.06); transition: transform 1.6s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-reveal="image"].is-visible { clip-path: inset(0 0 0 0); }
.motion [data-reveal="image"].is-visible > * { transform: none; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 112px) clamp(64px, 9vw, 128px); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.6rem; }
.hero .btn-row { margin-top: 2.2rem; }
.hero__art { color: var(--ink); }
.hero__art svg { width: 100%; max-width: 520px; margin-left: auto; }
.hero__note { margin-top: 1rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; }
@media (max-width: 899px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art svg { max-width: 420px; margin-inline: auto; }
  .hero__note { text-align: center; }
}

/* Technical drawing: lines draw in once on load */
.drawing .ln { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drawing .ln--thin { stroke-width: 1; stroke: var(--brand-gray); }
.drawing .ln--pipe { stroke-width: 3; }
.drawing .ln--accent { stroke: var(--brand-red); }
.drawing .fill-accent { fill: var(--accent); }
.drawing .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; fill: var(--muted); }
.motion .drawing .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease-out) forwards; animation-delay: var(--t, 0s); }
.motion .drawing .tag, .motion .drawing .fade { opacity: 0; animation: fade .8s ease forwards; animation-delay: var(--t, 1.4s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Page intro (inner pages) ---------- */
.page-intro { padding-block: clamp(56px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.page-intro h1 { max-width: 18ch; }
.page-intro .lede { margin-top: 1.4rem; max-width: 52ch; }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 899px) { .split { grid-template-columns: 1fr; } }

.facts { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt, .facts .k { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: .2em; }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Image placeholder (replace with real photos) ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: #f1f1f2; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 21 / 9; }
.media--card { aspect-ratio: 4 / 3; }
@media (max-width: 700px) { .media--wide { aspect-ratio: 4 / 3; } }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(35, 31, 32, .06) 11px 12px),
    #f1f1f2;
  color: var(--muted);
}
.ph__label { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; max-width: 34ch; }
.ph__label strong { display: block; color: var(--ink-2); font-weight: 600; }
.ph svg { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .55; }

/* ---------- Home: services index with sticky panel ---------- */
.svc-index { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.svc-index__aside { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
.svc-index__aside p { margin-top: 1.25rem; max-width: 36ch; }
.svc-index__counter {
  margin-top: 2.5rem; display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-mono); color: var(--muted); font-size: .85rem; letter-spacing: .06em;
}
.svc-index__counter b { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 500; color: var(--ink); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.svc-index__current { margin-top: .5rem; min-height: 1.6em; font-weight: 600; color: var(--accent); }
.svc-index__aside .link-arrow { margin-top: 2rem; }
.svc-index__aside .btn { margin-top: 2rem; }
html:not(.js) .svc-index__counter, html:not(.js) .svc-index__current { display: none; }

.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: svc; }
.svc-list li { border-bottom: 1px solid var(--line); counter-increment: svc; }
.svc-list a {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 12px; align-items: baseline;
  padding: 26px 0; text-decoration: none; color: var(--ink);
  transition: color .3s, padding-left .4s var(--ease-out);
}
.svc-list a::before { content: counter(svc, decimal-leading-zero); font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.svc-list a::after { content: "→"; color: var(--muted); transition: transform .3s var(--ease-out), color .3s; }
.svc-list h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); transition: color .3s; }
.svc-list p { grid-column: 2 / 3; margin: .4rem 0 0; color: var(--muted); font-size: 1rem; max-width: 52ch; }
.svc-list a:hover h3 { color: var(--accent); }
.svc-list a:hover::after { transform: translateX(4px); color: var(--accent); }
.js .svc-list li.is-active a { padding-left: 10px; }
.js .svc-list li.is-active a::before { color: var(--accent); }
@media (max-width: 899px) {
  .svc-index { grid-template-columns: 1fr; }
  .svc-index__aside { position: static; }
  .svc-index__counter, .svc-index__current { display: none; }
  .js .svc-list li.is-active a { padding-left: 0; }
}

/* ---------- Project cards ---------- */
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(20px, 2.5vw, 32px); list-style: none; margin: 0; padding: 0; }
@media (max-width: 1023px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

.project-card { display: flex; flex-direction: column; height: 100%; }
.project-card .media { margin-bottom: 18px; }
.project-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--surface); color: var(--ink-2); padding: 5px 8px; border-radius: 2px; border: 1px solid var(--line);
}
.project-card__type { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .45rem; }
.project-card h3 { margin-bottom: .3rem; }
.project-card__loc { color: var(--muted); font-size: .95rem; margin: 0 0 .9rem; }
.project-card__desc { font-size: .98rem; color: var(--ink-2); margin: 0 0 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 1.1rem; padding: 0; }
.tags li { font-size: .8rem; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); }
.project-card__more {
  margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); border-bottom: 1px solid currentColor;
}
.project-card__more:hover { color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0; list-style: none; }
.filter-btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2);
  font: inherit; font-size: .92rem; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  font-size: .95rem; color: var(--ink-2); background: rgba(255,255,255,.5); margin-bottom: 28px;
}
.notice strong { color: var(--ink); }

.empty-state { padding: 40px 0; color: var(--muted); }

/* Project dialog */
.project-dialog {
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: 6px; background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.35);
}
.project-dialog::backdrop { background: rgba(35, 31, 32, .6); }
.project-dialog__inner { padding: clamp(20px, 4vw, 40px); }
.project-dialog__close {
  position: sticky; top: 0; float: right; margin: 12px 12px 0 0; z-index: 3;
  min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.project-dialog__photos { display: grid; gap: 12px; margin-top: 24px; }
.project-dialog__photos .media { aspect-ratio: 16 / 10; }
.project-dialog dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 20px; margin: 24px 0 0; }
.project-dialog dt { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: .25em; }
.project-dialog dd { margin: 0; }
@media (max-width: 560px) { .project-dialog dl { grid-template-columns: 1fr; gap: 2px; } .project-dialog dd { margin-bottom: 10px; } }

/* ---------- Services page ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 2.2rem 0 0; padding: 0; }
.jump a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--ink-2);
}
.jump a:hover { border-color: var(--ink); color: var(--ink); }

.service { display: grid; grid-template-columns: 3.5rem minmax(0, 4fr) minmax(0, 6fr); gap: clamp(16px, 4vw, 64px); padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.service__num { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); padding-top: .55rem; }
.service__icon { width: 56px; height: 56px; color: var(--ink); margin-bottom: 20px; }
.service__icon .acc { stroke: var(--brand-red); }
.service h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.service__body { font-size: 1.08rem; color: var(--ink-2); padding-top: .35rem; }
.service__body .meta { margin-top: 1.2rem; font-size: .95rem; color: var(--muted); }
@media (max-width: 899px) {
  .service { grid-template-columns: 1fr; gap: 12px; }
  .service__num { padding-top: 0; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; counter-reset: step; }
.steps li { border-top: 2px solid var(--ink); padding-top: 20px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: .8rem; color: var(--accent); margin-bottom: 14px; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--muted); font-size: 1rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Dark CTA ---------- */
.section--dark { background: var(--dark); color: var(--on-dark); --focus: #ffffff; }
.section--dark + .section, .section + .section--dark { border-top: 0; }
.section--dark h2 { color: #fff; }
.section--dark .label { color: var(--on-dark-muted); }
.section--dark a:not(.btn) { color: #fff; }
.section--dark a:not(.btn):hover { color: #ff8a93; }
.cta { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.cta h2 { max-width: 18ch; }
.cta p.lede { color: var(--on-dark-muted); margin-top: 1.25rem; }
.cta .btn-row { margin-top: 2rem; }
.contact-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.14); }
.contact-lines li { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.contact-lines .k { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--on-dark-muted); padding-top: .25em; }
.contact-lines a { text-decoration: none; font-weight: 600; }
.contact-lines a:hover { text-decoration: underline; }
@media (max-width: 899px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 899px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 899px) { .contact-card { position: static; } }
.contact-card .item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-card .item:first-of-type { border-top: 1px solid var(--line); }
.contact-card .k { display: block; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-card .v { font-size: 1.2rem; font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-card a.v:hover { color: var(--accent); text-decoration: underline; }
.contact-card address { font-style: normal; font-size: 1.1rem; }
.contact-card .small { margin-top: 6px; font-size: .92rem; }

/* ---------- Form ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 4vw, 44px); }
.form h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.form__intro { color: var(--muted); margin: .75rem 0 1.75rem; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }
.field label, .field .field__label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .req { color: var(--accent); font-weight: 600; margin-left: 2px; }
.field .opt { color: var(--muted); font-weight: 400; font-size: .88rem; margin-left: 4px; }
.field .hint { display: block; color: var(--muted); font-size: .88rem; margin: -2px 0 8px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23231f20' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(230, 27, 43, .22); }
.field input[type="file"] { padding: 10px; background: #fff; min-height: auto; }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border: 1px solid var(--ink); border-radius: var(--radius);
  background: #fff; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.field [aria-invalid="true"] { border-color: var(--accent); background: #fff5f5; }
.field__error { display: flex; gap: 6px; align-items: flex-start; color: var(--accent); font-size: .9rem; font-weight: 500; margin-top: 6px; }
.field__error:empty { display: none; }
.field__error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; }

.form__footer { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__footer .note { color: var(--muted); font-size: .9rem; flex: 1 1 260px; margin: 0; }
.form__required-note { font-size: .9rem; color: var(--muted); margin: 0 0 20px; }

.alert { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; font-size: .98rem; }
.alert:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.alert h3 { font-size: 1.05rem; margin-bottom: 6px; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert a { font-weight: 600; }
.alert--error { background: #fff3f1; border: 1px solid #f1b5ad; color: #5c1009; }
.alert--success { background: #eef6ef; border: 1px solid #a9cfae; color: #173b1c; }
.alert--info { background: #f2f1ed; border: 1px solid var(--line-strong); color: var(--ink); }
.alert[hidden] { display: none; }
.alert .btn-row { margin-top: 14px; }

.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-2); color: var(--on-dark-muted); padding-block: clamp(48px, 7vw, 80px) 32px; font-size: .95rem; --focus: #ffffff; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer__brand { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: .5rem; }
.site-footer h2 { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer address { font-style: normal; }
.footer__base { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Mobile contact bar ---------- */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .mobile-cta .btn { min-height: 46px; padding: 0 12px; font-size: .95rem; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}

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

/* ---------- Print ---------- */
@media print {
  .site-header, .mobile-cta, .riser, .progress-bar, .site-footer, .filters { display: none !important; }
  body { background: #fff; padding: 0; }
  .section--dark { background: #fff; color: #000; }
}

/* ---------- Service area ---------- */
.area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 899px) { .area { grid-template-columns: 1fr; } }
.area__list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.area__list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.area__list h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.area__list p { margin: 0; color: var(--muted); font-size: 1rem; }
.area__note { margin-top: 1.5rem; font-size: .98rem; }
.area__map { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #f1f1f2; }
.map { height: clamp(360px, 52vw, 560px); width: 100%; }
.map .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.map.is-unavailable { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); height: auto; min-height: 200px; }
.area__caption { padding: 10px 14px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); }
.leaflet-container { font-family: var(--font-sans); }
.leaflet-container a { color: var(--ink-2); }
.motion .area__map[data-reveal="image"] > * { transform: none; }
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: 1rem; }
.checklist li { position: relative; padding-left: 22px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 520px) { .checklist { grid-template-columns: 1fr; } }

/* ---------- Services: compact list ---------- */
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: clamp(28px, 4vw, 48px); }
.split > .section-title { margin-bottom: 0; }
.work-types { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.work-types li { padding: 18px 16px 0 0; font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; letter-spacing: -0.01em; }
.work-types .k { display: block; font-family: var(--font-mono); font-size: .76rem; font-weight: 500; color: var(--accent); margin-bottom: 8px; }
@media (max-width: 640px) { .work-types { grid-template-columns: 1fr 1fr; row-gap: 20px; } }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { padding: clamp(20px, 3vw, 32px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; background: transparent; transition: background-color .3s; }
.tile:hover { background: var(--surface); }
.tile__icon { width: 48px; height: 48px; color: var(--ink); }
.tile__icon .acc { stroke: var(--brand-red); }
.tile h3 { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
@media (max-width: 1023px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tile { min-height: 150px; padding: 18px; } .tile h3 { font-size: 1rem; } }

.checklist--lg { font-size: 1.1rem; gap: 14px 32px; margin-bottom: 1.5rem; }
.small-print { font-size: .92rem; margin: 0; }

/* 24/7 emergency marker */
.emergency-pill { display: inline-flex; align-items: center; gap: 10px; margin: 1.6rem 0 0; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.5); }
.emergency-pill a { text-decoration: none; }
.emergency-pill a:hover { text-decoration: underline; }
.emergency-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-red); box-shadow: 0 0 0 0 rgba(234, 28, 44, .5); }
.motion .emergency-pill .dot { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(234,28,44,.45); } 70% { box-shadow: 0 0 0 8px rgba(234,28,44,0); } 100% { box-shadow: 0 0 0 0 rgba(234,28,44,0); } }
.emergency-pill--dark { margin: 0 0 1.5rem; color: var(--on-dark); border-color: rgba(255,255,255,.25); background: transparent; }
.page-intro .emergency-pill { margin-top: 2rem; }

/* ---------- Logo ---------- */
.brand__logo { height: 52px; width: auto; }
@media (max-width: 520px) { .brand__logo { height: 38px; } }
.footer__brand img { height: 52px; width: auto; margin-bottom: 8px; }

.hero__links { margin: 1.4rem 0 0; }

/* ---------- Home: inspections & service feature ---------- */
.service-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 2.5vw, 28px); }
@media (max-width: 899px) { .service-feature { grid-template-columns: 1fr; } }
.feature-card {
  display: flex; flex-direction: column; gap: 18px; justify-content: space-between;
  padding: clamp(24px, 3.5vw, 40px); border-radius: 6px; text-decoration: none;
  background: var(--dark); color: var(--on-dark); min-height: 340px;
  transition: background-color .3s;
  --focus: #ffffff;
}
.feature-card:hover { background: #2f2a2b; color: #fff; }
.feature-card__tag { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.feature-card__title { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; color: #fff; }
.feature-card__more { display: inline-flex; align-self: flex-start; align-items: center; gap: .5em; font-weight: 600; padding: 12px 18px; border-radius: var(--radius); background: var(--accent); color: #fff; }
.feature-card__more::after { content: "→"; transition: transform .25s var(--ease-out); }
.feature-card:hover .feature-card__more::after { transform: translateX(4px); }
.bf-art { width: 100%; max-width: 360px; color: var(--on-dark-muted); }
.bf-art .acc { stroke: var(--brand-red); }
.motion .feature-card .bf-art path, .motion .feature-card .bf-art rect { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.6s var(--ease-out) .3s; }
.motion .feature-card.is-visible .bf-art path, .motion .feature-card.is-visible .bf-art rect { stroke-dashoffset: 0; }

.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); align-self: stretch; }
.svc-grid li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc-grid a { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; height: 100%; min-height: 112px; padding: 20px 22px; text-decoration: none; font-weight: 600; font-size: 1.08rem; color: var(--ink); transition: background-color .25s, color .25s; }
.svc-grid a::after { content: "→"; color: var(--muted); transition: transform .25s var(--ease-out), color .25s; }
.svc-grid a:hover { background: var(--surface); color: var(--accent); }
.svc-grid a:hover::after { transform: translateX(4px); color: var(--accent); }
@media (max-width: 420px) { .svc-grid a { min-height: 92px; padding: 16px; font-size: 1rem; } }

/* ---------- Services: backflow block ---------- */
.backflow { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 899px) { .backflow { grid-template-columns: 1fr; } }
.backflow__art { background: var(--dark); border-radius: 6px; padding: clamp(28px, 5vw, 56px); }
.backflow__art .bf-art--lg { max-width: none; }
.backflow__text .section-title { margin-bottom: 1.5rem; }
.checklist--one { grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (max-width: 640px) { .hero__art svg { max-width: 300px; } .hero__grid { gap: 24px; } }

/* Alternate section background (light tint of the logo gray) */
.section--alt { background: var(--bg-alt); }
.section--alt + .section, .section + .section--alt { border-top: 0; }
.has-riser .section--alt[data-node]::before { background: var(--bg-alt); }
.section--alt .tile:hover, .section--alt .svc-grid a:hover { background: #fff; }

/* ---------- Font refinements ---------- */
.site-nav ul a, .header__phone { font-stretch: 108%; }
.work-types li, .feature-card__title, .svc-grid a, .footer__brand { font-stretch: var(--stretch-display); }

/* ---------- Hero subline ---------- */
.hero__sub { margin: 1.1rem 0 0; font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 500; font-stretch: var(--stretch-display); color: var(--muted); letter-spacing: .01em; }
.hero .btn-row { margin-top: 2rem; }

/* ---------- Company photo ---------- */
.media--photo { aspect-ratio: 2 / 1; }
.media--photo img { object-position: 50% 45%; }
@media (max-width: 700px) { .media--photo { aspect-ratio: 4 / 3; } .media--photo img { object-position: 30% 50%; } }

/* ---------- Services: tiles that open to a one-line explanation ---------- */
.tiles-hint { margin: -12px 0 20px; color: var(--muted); font-size: .95rem; }
.tile { padding: 0; min-height: 0; display: block; }
.tile details { height: 100%; }
.tile summary {
  list-style: none; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  min-height: 170px; padding: clamp(20px, 3vw, 28px);
}
.tile summary::-webkit-details-marker { display: none; }
.tile summary:focus-visible { outline-offset: -4px; }
.tile__name { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tile__toggle { position: relative; flex: none; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; transition: transform .3s var(--ease-out), border-color .2s, background-color .2s; }
.tile__toggle::before, .tile__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.tile__toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .2s; }
.tile summary:hover .tile__toggle { border-color: var(--accent); }
.tile details[open] .tile__toggle { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.tile details[open] .tile__toggle::before { background: #fff; }
.tile details[open] .tile__toggle::after { opacity: 0; }
.tile details[open] { background: var(--surface); }
.tile__info { margin: 0; padding: 0 clamp(20px, 3vw, 28px) clamp(20px, 3vw, 28px); color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
.motion .tile details[open] .tile__info { animation: tile-in .45s var(--ease-out); }
@keyframes tile-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Contact: request type ---------- */
.req-type { border: 0; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req-type legend { font-weight: 600; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.req-type label { position: relative; cursor: pointer; }
.req-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.req-type span {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 14px; text-align: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 600; font-stretch: 108%;
  transition: background-color .2s, color .2s, border-color .2s;
}
.req-type label:hover span { border-color: var(--ink); }
.req-type input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.req-type input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 420px) { .req-type { grid-template-columns: 1fr; } }
.area__map { margin-top: 0; }

/* ---------- Home: expandable systems list ---------- */
.svc-list summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 12px; align-items: center;
  padding: 24px 0; color: var(--ink); transition: padding-left .4s var(--ease-out);
}
.svc-list summary::-webkit-details-marker { display: none; }
.svc-list summary::before { content: counter(svc, decimal-leading-zero); font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.svc-list summary:hover h3 { color: var(--accent); }
.svc-list summary:hover .tile__toggle { border-color: var(--accent); }
.svc-list details[open] .tile__toggle { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.svc-list details[open] .tile__toggle::before { background: #fff; }
.svc-list details[open] .tile__toggle::after { opacity: 0; }
.svc-list__info { margin: -8px 0 0; padding: 0 40px 24px 3.95rem; color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 60ch; }
.motion .svc-list details[open] .svc-list__info { animation: tile-in .45s var(--ease-out); }
.js .svc-list li.is-active summary { padding-left: 10px; }
.js .svc-list li.is-active summary::before { color: var(--accent); }
@media (max-width: 899px) { .js .svc-list li.is-active summary { padding-left: 0; } .svc-list__info { padding-left: 0; padding-right: 0; } }

/* Portfolio card title spacing (type is now the title) */
.project-card h3 { margin-top: 2px; }
.media picture { display: block; width: 100%; height: 100%; }

/* ---------- Portfolio: grouped "More Projects" list ---------- */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 56px); }
@media (max-width: 1023px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .more-grid { grid-template-columns: 1fr; } }
.more-group h3 { font-size: 1.05rem; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 2px solid var(--ink); }
.more-group ul { list-style: none; margin: 0; padding: 0; }
.more-group li { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.more-name { font-weight: 600; font-size: .98rem; }
.more-loc { color: var(--muted); font-size: .88rem; }

/* ---------- Home: systems list (hover to preview; replaces the dropdowns) ---------- */
.svc-list__name { margin: 0; }
.svc-list__btn {
  width: 100%; display: grid; grid-template-columns: 3.2rem 1fr; gap: 12px; align-items: center;
  padding: 24px 0; background: none; border: 0; text-align: left; cursor: default;
  font: inherit; font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; font-stretch: var(--stretch-display);
  letter-spacing: -0.012em; color: var(--ink); transition: color .25s, padding-left .4s var(--ease-out);
}
.svc-list li { counter-increment: svc; }
.svc-list__btn::before { content: counter(svc, decimal-leading-zero); font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--muted); transition: color .25s; }
.svc-list li.is-active .svc-list__btn { color: var(--accent); }
.svc-list li.is-active .svc-list__btn::before { color: var(--accent); }
.js .svc-list li.is-active .svc-list__btn { padding-left: 10px; }
.svc-list__btn:focus-visible { outline-offset: -2px; }
.svc-index__desc { margin: .6rem 0 0; max-width: 34ch; color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; min-height: 4.7em; }
.motion .svc-index__desc.is-in { animation: tile-in .4s var(--ease-out); }
/* Desktop: description shows on the left under the red name. Phones: under each system. */
@media (min-width: 900px) { .js .svc-list__info { display: none; } }
@media (max-width: 899px) {
  .svc-list__btn { padding: 20px 0 6px; cursor: auto; }
  .svc-list__info { margin: 0; padding: 0 0 20px 3.95rem; color: var(--muted); font-size: .98rem; line-height: 1.5; }
  .svc-index__desc { display: none; }
  .js .svc-list li.is-active .svc-list__btn { padding-left: 0; color: var(--ink); }
  .svc-list li.is-active .svc-list__btn::before { color: var(--muted); }
}
html:not(.js) .svc-index__desc { display: none; }
.map.is-static { height: auto; background: #eceae6; }
.map.is-static img { display: block; width: 100%; height: auto; }

/* ==========================================================================
   WordPress additions
   ========================================================================== */
.header__portal { font-weight: 500; font-size: .95rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; border-bottom: 1px solid transparent; padding: 6px 0; }
.header__portal:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.header__portal[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 1023px) { .js .header__portal { padding: 6px 0; } }
@media (min-width: 1024px) and (max-width: 1180px) { .site-nav { gap: 20px; } .site-nav ul { gap: 18px; } .header__actions { gap: 14px; } }

.page-intro--compact { padding-bottom: clamp(28px, 4vw, 48px); }

/* Generic page content */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); }
.prose a { color: var(--accent); }

/* ---------- ServiceTrade Service Portal ---------- */
.portal { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.portal--with-login { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 899px) { .portal--with-login { grid-template-columns: 1fr; } .portal__login { order: -1; } }
.portal__login { position: sticky; top: calc(var(--header-h) + 24px); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.portal-widget__title { font-size: 1.1rem; margin-bottom: 12px; }
.portal__coming { padding: 32px; border: 1px dashed var(--line-strong); border-radius: 6px; }
.portal__coming h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.notice-admin { margin-bottom: 20px; padding: 12px 16px; border-left: 4px solid var(--accent); background: #fff5f5; font-size: .95rem; }
.notice-admin a { margin-left: 8px; font-weight: 600; color: var(--accent); }

/* Style the plugin's output to match the site (ServiceTrade wraps it in .servicetrade-portal) */
.servicetrade-portal { font-family: var(--font-sans); color: var(--ink); font-size: 1rem; }
.servicetrade-portal h1, .servicetrade-portal h2, .servicetrade-portal h3 { font-family: var(--font-sans); font-stretch: var(--stretch-display); color: var(--ink); }
.servicetrade-portal a { color: var(--accent); }
.servicetrade-portal table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .95rem; }
.servicetrade-portal th { text-align: left; font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 10px 12px; }
.servicetrade-portal td { border-bottom: 1px solid var(--line); padding: 12px; vertical-align: top; }
.servicetrade-portal tr:hover td { background: var(--bg-alt); }
.servicetrade-portal input[type="text"], .servicetrade-portal input[type="email"], .servicetrade-portal input[type="password"], .servicetrade-portal select, .servicetrade-portal textarea,
.portal__login input[type="text"], .portal__login input[type="email"], .portal__login input[type="password"] {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.servicetrade-portal input:focus, .servicetrade-portal select:focus, .servicetrade-portal textarea:focus,
.portal__login input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(230, 27, 43, .22); }
.servicetrade-portal button, .servicetrade-portal input[type="submit"], .servicetrade-portal .button,
.portal__login button, .portal__login input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; cursor: pointer;
}
.servicetrade-portal button:hover, .servicetrade-portal input[type="submit"]:hover, .servicetrade-portal .button:hover,
.portal__login button:hover, .portal__login input[type="submit"]:hover { background: var(--accent-dark); }
.portal__login label { display: block; font-weight: 600; font-size: .92rem; margin: 10px 0 4px; }
@media (max-width: 640px) { .servicetrade-portal table { display: block; overflow-x: auto; } }

/* ---------- Hero: animated apartment-building sprinkler illustration (gray / black / red) ---------- */
.apt { display: block; width: 100%; overflow: visible; --a-gray: #939598; --a-ink: #231f20; --a-red: #ea1c2c; }
.apt .a-bld { fill: none; stroke: var(--a-gray); stroke-width: 1; stroke-linejoin: round; }
.apt .a-bld--base { stroke-width: 1.4; }
.apt .a-bld--roof { stroke-width: 1.2; }
.apt .a-bld--cut { stroke-dasharray: 3 4; }
.apt .a-win { fill: none; stroke: var(--a-gray); stroke-width: .8; opacity: .8; }
.apt .a-part { fill: none; stroke: var(--a-gray); stroke-width: .8; stroke-dasharray: 2 4; opacity: .8; }
.apt .a-eq { fill: #fff; stroke: var(--a-ink); stroke-width: 1.2; stroke-linejoin: round; }
.apt .a-eq--pad { stroke: var(--a-gray); stroke-width: 1; }
.apt .a-pipe { fill: none; stroke: var(--a-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.apt .a-pipe--main { stroke-width: 3.4; }
.apt .a-head { fill: none; stroke: var(--a-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.apt .a-valve { fill: #fff; stroke: var(--a-ink); stroke-width: 1.2; }
.apt .a-water { fill: none; stroke: var(--a-red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.apt .a-stream { fill: none; stroke: #fff; stroke-width: .9; stroke-linecap: round; stroke-dasharray: .008 .03; opacity: .85; }
.apt .a-flash { fill: none; stroke: var(--a-red); stroke-width: 1.2; opacity: 0; }
.apt .a-cone { fill: none; stroke: var(--a-red); stroke-width: 1; stroke-dasharray: 3 4; }
.apt .a-wet { fill: var(--a-red); fill-opacity: .06; stroke: var(--a-red); stroke-width: 1; stroke-dasharray: 3 4; }
.apt .a-ring { fill: none; stroke: var(--a-red); stroke-width: .9; opacity: 0; }
.apt .a-drop { fill: var(--a-red); opacity: .8; transform: translate(calc(var(--dx) * .6px), calc(var(--dy) * .6px)); }
.apt .a-tags text { font-family: inherit; font-size: 11.5px; font-weight: 500; letter-spacing: .1em; fill: var(--a-gray); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }

.apt .a-flame__outer { fill: var(--a-red); }
.apt .a-flame__core { fill: #fff; }
.apt .a-fire { transform: scale(.7); transform-box: view-box; }
.apt .a-flame { transform-box: view-box; }
.apt .a-smoke { fill: var(--a-gray); opacity: 0; transform-box: fill-box; transform-origin: center; }

/* Motion: one 10s loop — fire starts, head opens, water flows from the pump, spray puts the fire out, reset */
.motion .apt { --loop: 10s; }
.motion .apt .a-fire { transform: scale(0); animation: apt-fire var(--loop) ease-in-out infinite; }
.motion .apt .a-flame { animation: apt-flicker .5s ease-in-out var(--fd) infinite alternate; }
.motion .apt .a-smoke { animation: apt-smoke var(--loop) linear infinite; animation-delay: var(--sd); }
.motion .apt .a-water { stroke-dashoffset: 1; animation: apt-fill var(--loop) linear infinite; }
.motion .apt .a-stream { opacity: 0; animation: apt-stream 1.1s linear infinite, apt-stream-on var(--loop) linear infinite; }
.motion .apt .a-flash { animation: apt-flash var(--loop) ease-out infinite; }
.motion .apt .a-spray { opacity: 0; animation: apt-spray var(--loop) linear infinite; }
.motion .apt .a-drop { opacity: 0; transform: none; animation: apt-drop var(--du) cubic-bezier(.3,0,.75,.6) var(--dl) infinite; }
.motion .apt .a-ring { animation: apt-ring 1.3s ease-out var(--dl) infinite; transform-box: view-box; }
.motion .apt .a-tags { opacity: 0; animation: apt-show .8s ease-out .6s forwards; }
.apt.is-paused, .apt.is-paused * { animation-play-state: paused !important; }

/* 0–6% calm · 6–24% fire grows · 24% head opens · 24–44% water travels from the pump · 44–86% spray · 50–70% fire goes out · 86–96% shut off and reset */
@keyframes apt-fire { 0%, 5% { transform: scale(0); } 12% { transform: scale(.45); } 24%, 48% { transform: scale(1); } 70%, 100% { transform: scale(0); } }
@keyframes apt-flicker { from { transform: scale(1, 1); } to { transform: scale(.88, 1.12); } }
@keyframes apt-smoke {
  0%, 50% { opacity: 0; transform: translate(0, 0); }
  56% { opacity: .45; }
  80% { opacity: 0; transform: translate(4px, -34px) scale(1.6); }
  100% { opacity: 0; transform: translate(4px, -34px); }
}
@keyframes apt-fill { 0%, 24% { stroke-dashoffset: 1; opacity: 1; } 44% { stroke-dashoffset: 0; } 88% { stroke-dashoffset: 0; opacity: 1; } 95% { stroke-dashoffset: 0; opacity: 0; } 96%, 100% { stroke-dashoffset: 1; opacity: 0; } }
@keyframes apt-stream-on { 0%, 43% { opacity: 0; } 46%, 86% { opacity: .85; } 90%, 100% { opacity: 0; } }
@keyframes apt-flash { 0%, 23% { opacity: 0; r: 3; } 24% { opacity: .9; r: 3; } 31% { opacity: 0; r: 14; } 100% { opacity: 0; r: 14; } }
@keyframes apt-spray { 0%, 43% { opacity: 0; } 46%, 84% { opacity: 1; } 89%, 100% { opacity: 0; } }
@keyframes apt-stream { to { stroke-dashoffset: -.038; } }
@keyframes apt-show { to { opacity: 1; } }
@keyframes apt-drop {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: .9; }
  80% { opacity: .75; }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)); }
}
@keyframes apt-ring { 0% { opacity: .55; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.1); } }
.apt .a-bld--faint { stroke-dasharray: 2 4; opacity: .6; }
.apt .a-bld--edge { stroke-width: 1.4; }
.apt .a-slab { fill: #939598; fill-opacity: .07; stroke: var(--a-gray); stroke-width: 1; stroke-linejoin: round; }
.apt .a-slab--roof { fill-opacity: .12; }
.apt .a-side { fill: #939598; fill-opacity: .1; stroke: var(--a-gray); stroke-width: 1; }
.apt .a-bld--faint { stroke-dasharray: 2 4; opacity: .6; }
.apt .a-bld--edge { stroke-width: 1.4; }
.apt .a-slab { fill: #939598; fill-opacity: .07; stroke: var(--a-gray); stroke-width: 1; stroke-linejoin: round; }
.apt .a-slab--roof { fill-opacity: .12; }
.apt .a-side { fill: #939598; fill-opacity: .1; stroke: var(--a-gray); stroke-width: 1; }
.header__actions .btn { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1180px) { .site-nav ul { gap: 18px; } .header__actions { gap: 16px; } .site-nav a, .header__portal { font-size: .92rem; } }
