/* homeenergyrichmond: Swiss/data design system
   bg #f4f4f2 · ink #11161c · accent #e23b2e · surface #fff · muted #5f625e
   Square corners, 1px rules, no shadows. Arial/Helvetica throughout. */

:root {
  --bg: #f4f4f2;
  --ink: #11161c;
  --accent: #e23b2e;
  --surface: #ffffff;
  --muted: #5f625e;
  --rule: 1px solid var(--ink);
  --rule-soft: 1px solid rgba(17, 22, 28, 0.18);
  --xs: 0.4rem; --sm: 0.8rem; --md: 1.4rem; --lg: 2.8rem; --xl: 5.6rem;
  --font: Arial, Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 4.2rem; /* room for the mobile sticky call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.shell { max-width: 72rem; margin: 0 auto; padding: 0 var(--md); }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 4.4rem); line-height: 0.98; }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: var(--sm) var(--md);
  z-index: 100; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-head {
  background: var(--bg);
  border-bottom: var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.site-head__inner {
  display: flex; align-items: stretch; gap: var(--md);
  min-height: 3.6rem;
}
.brand {
  display: flex; flex-direction: column; justify-content: center;
  text-decoration: none; font-weight: 800; letter-spacing: -0.02em;
  font-size: 1.1rem; line-height: 1.1;
  padding: var(--xs) 0;
}
.brand span { color: var(--accent); }
.brand em {
  font-style: normal; font-weight: 400; color: var(--muted);
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.site-nav { display: flex; align-items: stretch; margin-left: auto; }
.site-nav a {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0 var(--md);
  text-decoration: none; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-left: var(--rule-soft);
}
.site-nav a i {
  font-style: normal; font-weight: 400; color: var(--accent);
  font-size: 0.7rem;
}
.site-nav a:hover { background: var(--surface); }
.call-btn {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--accent); color: #000;
  text-decoration: none; padding: var(--xs) var(--md);
  border-left: var(--rule);
  line-height: 1.15; text-align: center;
}
.call-btn__label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.16em;
}
.call-btn__num { font-weight: 800; font-size: 1rem; white-space: nowrap; }
.call-btn:hover { background: var(--ink); color: #fff; }

/* ---------- Breadcrumb ---------- */
.crumbs {
  padding: var(--sm) 0;
  border-bottom: var(--rule-soft);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
  overflow-x: auto; white-space: nowrap;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs ol, .crumbs ul { list-style: none; display: inline-flex; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--accent); }
.crumbs:empty { display: none; }

/* ---------- Hero ---------- */
.hero { padding: var(--lg) 0; border-bottom: var(--rule); }
.kicker {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--accent);
  margin-bottom: var(--md);
}
.lede {
  max-width: 44rem; margin-top: var(--md);
  font-size: 1.08rem; color: var(--muted);
}
.hero__rule {
  display: flex; gap: var(--md); margin-bottom: var(--md);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted);
}
.hero__rule span {
  border-top: 3px solid var(--ink); padding-top: var(--xs); flex: 1;
}
.hero__rule span:first-child { border-top-color: var(--accent); flex: 0 0 auto; min-width: 4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sm); margin-top: var(--lg); }
.disclosure {
  margin-top: var(--sm);
  font-size: 0.74rem; color: var(--muted);
}
.hero--home, .hero--cat {
  display: grid; gap: var(--lg);
}
@media (min-width: 860px) {
  .hero--home, .hero--cat { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .hero--svc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--lg); align-items: stretch; }
}
.hero__media { border: var(--rule); background: var(--surface); }
.hero__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.credit {
  font-size: 0.68rem; color: var(--muted);
  padding: var(--xs) var(--sm);
  border-top: var(--rule-soft);
}
.credit a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 800; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: var(--sm) var(--md);
  border: var(--rule);
}
.btn--primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn--primary:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--xl { font-size: 1.2rem; padding: var(--md) var(--lg); }

/* ---------- Stat line ---------- */
.statline {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-left: var(--rule);
  margin: var(--lg) 0;
}
@media (min-width: 720px) { .statline { grid-template-columns: repeat(4, 1fr); } }
.stat {
  border-right: var(--rule); border-top: var(--rule); border-bottom: var(--rule);
  background: var(--surface);
  padding: var(--md);
}
.stat strong {
  display: block; font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
}
.stat span {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
}
.stat--call strong a { color: var(--accent); text-decoration: none; }
.stat--call strong a:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.block { padding: var(--lg) 0; border-bottom: var(--rule-soft); }
.section-title {
  display: flex; align-items: baseline; gap: var(--sm);
  margin-bottom: var(--md);
  padding-bottom: var(--xs);
  border-bottom: var(--rule);
}
.section-title i {
  font-style: normal; font-weight: 400; color: var(--accent);
  font-size: 0.85rem;
}

/* ---------- Category tiles ---------- */
.tiles {
  display: grid; gap: 0;
  border-top: var(--rule); border-left: var(--rule);
}
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: var(--sm);
  background: var(--surface);
  border-right: var(--rule); border-bottom: var(--rule);
  padding: var(--md);
  text-decoration: none;
}
.tile:hover { background: var(--ink); color: #fff; }
.tile:hover .tile__desc { color: rgba(255, 255, 255, 0.75); }
.tile__num { color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.tile__name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.tile__desc { font-size: 0.88rem; color: var(--muted); }
.tile__go { margin-top: auto; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Service rows (geo pages) ---------- */
.svc-rows { border-top: var(--rule); }
.svc-row {
  display: grid; grid-template-columns: 2.6rem 1fr auto; gap: var(--sm);
  align-items: baseline;
  padding: var(--sm) 0;
  border-bottom: var(--rule-soft);
  text-decoration: none;
}
@media (min-width: 720px) { .svc-row { grid-template-columns: 2.6rem 15rem 1fr auto; } }
.svc-row__num { color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.svc-row__name { font-weight: 800; letter-spacing: -0.02em; }
.svc-row__desc { color: var(--muted); font-size: 0.88rem; grid-column: 2; }
@media (min-width: 720px) { .svc-row__desc { grid-column: auto; } }
.svc-row__go { font-weight: 800; color: var(--accent); }
.svc-row:hover .svc-row__name { text-decoration: underline; }

/* ---------- Region grid ---------- */
.region-grid {
  display: grid; gap: 0;
  border-top: var(--rule); border-left: var(--rule);
}
@media (min-width: 720px) { .region-grid { grid-template-columns: repeat(3, 1fr); } }
.region-grid a {
  display: flex; align-items: baseline; gap: var(--sm);
  background: var(--surface);
  border-right: var(--rule); border-bottom: var(--rule);
  padding: var(--md);
  text-decoration: none; font-weight: 800; letter-spacing: -0.02em;
}
.region-grid a i { font-style: normal; font-weight: 400; font-size: 0.75rem; color: var(--accent); }
.region-grid a:hover { background: var(--ink); color: #fff; }

/* ---------- Content block (document fields) ---------- */
.content-block { border-top: var(--rule); }
.content-block:empty { display: none; }
.content-block dl { display: block; }
.content-block dt,
.content-block th,
.content-block strong {
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink);
}
.content-block dt { padding-top: var(--sm); }
.content-block dd {
  padding: 0 0 var(--sm); margin: 0;
  color: var(--muted);
  border-bottom: var(--rule-soft);
}
.content-block table { width: 100%; border-collapse: collapse; }
.content-block td, .content-block th {
  text-align: left; vertical-align: top;
  padding: var(--sm) var(--sm) var(--sm) 0;
  border-bottom: var(--rule-soft);
}
.content-block td { color: var(--muted); }
.content-block ul, .content-block ol { list-style: none; }
.content-block li { padding: var(--sm) 0; border-bottom: var(--rule-soft); }
.content-block > div, .content-block p { padding: var(--sm) 0; border-bottom: var(--rule-soft); }
.content-block > div > div { border-bottom: none; padding: 0; }
@media (min-width: 860px) {
  .content-block dl {
    display: grid; grid-template-columns: 18rem 1fr; column-gap: var(--md);
  }
  .content-block dt { border-bottom: var(--rule-soft); padding: var(--sm) 0; }
  .content-block dd { padding: var(--sm) 0; }
}

/* ---------- Children listing ---------- */
.children-block:empty { display: none; }
.children-block a {
  display: block;
  padding: var(--sm) var(--md) var(--sm) 0;
  border-bottom: var(--rule-soft);
  text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
  position: relative;
}
.children-block a::after {
  content: "→"; position: absolute; right: 0;
  color: var(--accent); font-weight: 800;
}
.children-block a:hover { background: var(--surface); text-decoration: underline; }
.children-block ul, .children-block ol { list-style: none; }
.children-block p { color: var(--muted); font-size: 0.88rem; }
@media (min-width: 860px) {
  .children-block { column-count: 2; column-gap: var(--lg); border-top: var(--rule); }
  .children-block a { break-inside: avoid; }
}

/* Company cards injected by the engine into {{children}} on city pages */
.otomatic-companies { column-count: 1; }
.otomatic-company {
  background: var(--surface);
  border: var(--rule); border-left: 4px solid var(--accent);
  padding: var(--md); margin: var(--sm) 0;
  break-inside: avoid;
}
.otomatic-company a { font-weight: 800; text-decoration: none; }
.otomatic-company a:hover { text-decoration: underline; }
.otomatic-company p, .otomatic-company span, .otomatic-company li {
  color: var(--muted); font-size: 0.88rem;
}

/* ---------- Pagination ---------- */
.pager { margin-top: var(--md); }
.pager:empty { display: none; }
.pager a, .pager span, .pager strong {
  display: inline-block;
  min-width: 2.4rem; text-align: center;
  padding: var(--xs) var(--sm); margin: 0 2px 4px 0;
  border: var(--rule);
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.pager a:hover { background: var(--ink); color: #fff; }
.pager strong, .pager span[aria-current], .pager .current { background: var(--accent); border-color: var(--accent); color: #000; }

/* ---------- CSS compositions (service detail sheets) ---------- */
.hero__comp {
  position: relative; overflow: hidden;
  border: var(--rule); background: var(--surface);
  min-height: 16rem;
  display: flex; align-items: flex-end;
}
/* HVAC: airflow diagonals + thermostat scale */
.comp-hvac .comp-hvac__flow,
.comp-hvac__flow {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0, transparent 22px,
    rgba(17, 22, 28, 0.12) 22px, rgba(17, 22, 28, 0.12) 24px
  );
}
.comp-hvac__scale {
  position: relative;
  display: flex; width: 100%;
  border-top: var(--rule);
}
.comp-hvac__scale b {
  flex: 1; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.2em;
  padding: var(--sm) 0;
  border-right: var(--rule-soft);
}
.comp-hvac__scale b:first-child { background: var(--ink); color: #fff; }
.comp-hvac__scale b:last-child { background: var(--accent); color: #000; border-right: none; }
.comp-hvac__tag, .comp-plumb__tag {
  position: absolute; top: var(--sm); left: var(--sm);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
  color: var(--ink);
  border: var(--rule); background: var(--bg);
  padding: 2px 8px;
}
/* Plumbing: pipe-joint dot grid + pressure gauge strip */
.comp-plumb__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, rgba(17, 22, 28, 0.2) 3px, transparent 3.5px);
  background-size: 34px 34px;
}
.comp-plumb__gauge {
  position: relative;
  display: flex; width: 100%;
  border-top: var(--rule);
}
.comp-plumb__gauge b {
  flex: 1; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.2em;
  padding: var(--sm) 0;
}
.comp-plumb__gauge b:first-child { background: var(--accent); color: #000; }
.comp-plumb__gauge b:last-child { background: var(--ink); color: #fff; }

/* ---------- Dark CTA band ---------- */
.band {
  background: #11161c; color: #fff;
  border-top: var(--rule);
  margin-top: var(--lg);
}
.band__inner { padding: var(--xl) var(--md); text-align: left; }
.band__kicker {
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
}
.band__title {
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.02;
  margin: var(--sm) 0 var(--lg);
  max-width: 40rem;
}
.band .btn--primary { border-color: var(--accent); }
.band .btn--primary:hover { background: #fff; color: #000; border-color: #fff; }
.disclosure--band { color: rgba(255, 255, 255, 0.6); }

/* ---------- Footer ---------- */
.site-foot { background: var(--bg); }
.foot-grid {
  display: grid; gap: var(--lg);
  padding-top: var(--lg); padding-bottom: var(--lg);
}
@media (min-width: 860px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.foot-col p { color: var(--muted); font-size: 0.88rem; margin: var(--xs) 0 var(--sm); }
.foot-head {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink) !important;
  border-bottom: var(--rule); padding-bottom: var(--xs);
}
.foot-col a {
  display: block; text-decoration: none;
  font-size: 0.9rem; padding: var(--xs) 0;
  border-bottom: var(--rule-soft);
}
.foot-col a:hover { color: var(--accent); }
.foot-col .btn { display: inline-block; border-bottom: var(--rule); }
.foot-note { font-size: 0.72rem !important; }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  border-top: var(--rule);
}
.sticky-call a {
  display: block; text-align: center;
  background: var(--accent); color: #000;
  font-weight: 800; font-size: 1rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none;
  padding: var(--sm) var(--md);
}
.sticky-call a span { display: block; font-size: 0.85rem; letter-spacing: 0.1em; }
.sticky-call a:active { background: var(--ink); color: #fff; }
@media (min-width: 860px) {
  .sticky-call { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Print: keep the number visible ---------- */
@media print {
  .sticky-call, .site-nav, .band { display: none; }
  a[href^="tel:"]::after { content: " (" attr(href) ")"; font-weight: 400; }
}
