/* ==========================================================================
   Warren Heating & Cooling — design system
   Adapted from the frozen lead-site template (same component patterns),
   re-themed: steel-blue = cooling/primary, warm orange = urgent / no-heat only.
   All text colors are >= 4.5:1 on their backgrounds (see tools/contrast_check.py).
   Type: Archivo (display/UI) + Public Sans (body), self-hosted in /fonts (no third-party requests).
   ========================================================================== */

@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0E2A3B;        /* headlines, footer, dark sections */
  --steel: #1D5A82;       /* primary buttons, links, eyebrows */
  --steel-dark: #174A6B;  /* primary hover */
  --steel-tint: rgba(29, 90, 130, 0.10);
  --charcoal: #1F2D38;    /* photo placeholder wells */
  --bg: #F3F6F8;          /* page background */
  --card: #FFFFFF;
  --section-alt: #E7EEF3;
  --warm: #A63F0A;        /* urgent / no-heat only — keep rare */
  --warm-dark: #8A3308;
  --warm-tint: #FBEEE6;
  --ink: #2F3E4A;
  --muted: #4F5F6C;
  --line: rgba(14, 42, 59, 0.16);
  --line-soft: rgba(14, 42, 59, 0.10);
  --field-border: #6B7C89;   /* >= 3:1 against white for non-text UI */
  --ok: #1B6B3A;
  --err: #B3261E;
  --on-dark: #C3D8E6;
  --on-dark-muted: #9FB6C6;

  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1120px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-btn: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg);
  font-family: var(--font-body); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Skip link + focus */
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 8px;
  font: 700 14px var(--font-display); text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #0B63CE; outline-offset: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible, .nav-sheet :focus-visible { outline-color: #8CC4F0; }

/* Type */
.eyebrow { font: 700 11px/1.3 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.eyebrow--warm { color: var(--warm); }
h1, .h1 { font: 800 clamp(30px, 4.6vw, 52px)/1.08 var(--font-display); letter-spacing: -0.03em; color: var(--navy); text-wrap: balance; }
h2, .h2 { font: 800 clamp(25px, 3.2vw, 36px)/1.12 var(--font-display); letter-spacing: -0.02em; color: var(--navy); text-wrap: balance; }
h3, .h3 { font: 700 clamp(19px, 2vw, 24px)/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--navy); }
h4, .h4 { font: 700 16px/1.3 var(--font-display); color: var(--navy); }
p, .body-text { font: 400 15px/1.6 var(--font-body); color: var(--ink); text-wrap: pretty; }
@media (min-width: 900px) { p, .body-text { font-size: 17px; line-height: 1.65; max-width: 64ch; } }
.lede { font-size: 17px; }
@media (min-width: 900px) { .lede { font-size: 19px; } }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (min-width: 900px) { p.small { font-size: 14px; } }
.on-dark { color: #fff; }
.on-dark p, .on-dark .body-text { color: var(--on-dark); }
.on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .eyebrow { color: #A9D2F0; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }
@media (min-width: 1100px) { .container { padding: 0 40px; } }
.section { padding: 44px 0; }
.section--tight { padding: 30px 0; }
.section--alt { background: var(--section-alt); }
.section--dark { background: var(--navy); }
@media (min-width: 900px) { .section { padding: 80px 0; } .section--tight { padding: 52px 0; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--lg { gap: 24px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) and (max-width: 1099px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius-btn);
  font: 700 16px var(--font-display); border: none; width: 100%; text-decoration: none; text-align: center;
}
@media (min-width: 560px) { .btn { width: auto; } }
.btn-primary { background: var(--steel); color: #fff; }
.btn-primary:hover { background: var(--steel-dark); }
.btn-secondary { background: transparent; color: var(--steel); border: 1.5px solid rgba(29,90,130,.5); }
.btn-secondary:hover { background: var(--steel-tint); }
.btn-inverse { background: #fff; color: var(--navy); }
.btn-warm { background: var(--warm); color: #fff; }
.btn-warm:hover { background: var(--warm-dark); }
.btn-row { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 560px) { .btn-row { flex-direction: row; } }
.btn[disabled] { opacity: .65; cursor: progress; }

.tag { display: inline-flex; padding: 7px 13px; border-radius: 999px; background: var(--steel-tint); color: var(--navy); font: 600 12px var(--font-body); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px; }
.card h3, .card h4 { margin-bottom: 6px; }
.card p { font-size: 14px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 700 14px var(--font-body); color: var(--steel); }

.photo-well {
  border-radius: var(--radius); background: var(--charcoal);
  aspect-ratio: 16 / 9; min-height: 160px;
  display: flex; align-items: flex-end; padding: 16px;
  color: #D5E1E9; font: 600 12px/1.45 var(--font-body);
}
.photo-well--4x3 { aspect-ratio: 4 / 3; }
.photo-well figcaption { max-width: 60ch; }
.photo-well b { color: #fff; }

.dash-item { display: flex; gap: 11px; }
.dash-item::before { content: "\2014"; color: var(--steel); font: 700 15px var(--font-display); flex: none; }
.dash-item p, .dash-item div { font-size: 14px; line-height: 1.55; }
@media (min-width: 900px) { .dash-item p, .dash-item div { font-size: 16px; } }
.dash-item b { color: var(--navy); }

.numbered-item { display: flex; gap: 12px; }
.numbered-item .num {
  flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--steel); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 700 13px var(--font-display);
}
.numbered-item--warm .num { background: var(--warm); }

.data-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table .row {
  display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--card);
  border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.data-table .row:last-child { border-bottom: none; }
.data-table .row .k { font-weight: 600; color: var(--navy); }
.data-table .row .v { color: var(--ink); text-align: right; font-size: 14px; font-weight: 600; }

.callout {
  border: 1px solid rgba(14,42,59,.22); background: var(--steel-tint);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.callout p { font-size: 14px; max-width: none; }
@media (min-width: 900px) { .callout p { font-size: 16px; } }
.callout--warm { border-color: rgba(166,63,10,.45); background: var(--warm-tint); }
.callout--warm h2, .callout--warm h3 { color: var(--warm-dark); }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 12px; }
@media (min-width: 640px) { .site-header__row { padding: 12px 32px; } }
@media (min-width: 1100px) { .site-header__row { padding: 14px 40px; max-width: var(--container); margin: 0 auto; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--steel); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 800 13px var(--font-display); letter-spacing: .03em;
}
.brand__name { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name span { font: 800 13px var(--font-display); letter-spacing: .02em; color: var(--navy); text-transform: uppercase; }
.on-dark .brand__name span { color: #fff; }
.desktop-nav { display: none; }
@media (min-width: 1000px) {
  .desktop-nav { display: flex; align-items: center; gap: 22px; }
  .desktop-nav > a, .nav-drop > summary { font: 600 14px var(--font-body); color: var(--navy); text-decoration: none; }
  .desktop-nav > a:hover, .nav-drop > summary:hover { color: var(--steel); text-decoration: underline; }
  .desktop-nav .btn { min-height: 44px; padding: 0 20px; font-size: 14px; color: #fff; }
  .desktop-nav a[aria-current="page"] { color: var(--steel); text-decoration: underline; }
  .nav-toggle { display: none !important; }
}
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: " \25BE"; }
.nav-drop__menu {
  position: absolute; top: 100%; left: -12px; z-index: 5; min-width: 260px; margin-top: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  box-shadow: 0 12px 30px rgba(14,42,59,.14);
}
.nav-drop__menu a { display: block; padding: 10px 12px; border-radius: 6px; font: 600 14px var(--font-body); color: var(--navy); text-decoration: none; }
.nav-drop__menu a:hover { background: var(--steel-tint); }

.nav-toggle { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: none; border: none; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); }
.nav-toggle span:last-child { width: 15px; }

.nav-sheet {
  position: fixed; inset: 0; z-index: 50; background: var(--navy); display: flex; flex-direction: column;
  padding: 20px; overflow-y: auto; transform: translateX(100%); visibility: hidden; pointer-events: none;
  transition: transform .28s ease, visibility 0s linear .28s;
}
.nav-sheet.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; transition: transform .28s ease, visibility 0s; }
.nav-sheet__top { display: flex; align-items: center; justify-content: space-between; }
.nav-sheet__close { background: none; border: none; color: #fff; font: 800 28px var(--font-display); line-height: 1; padding: 8px 12px; }
.nav-sheet__links { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 0; }
.nav-sheet__links a { padding: 12px 4px; font: 700 19px var(--font-display); color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); }
.nav-sheet__links a[aria-current="page"] { color: #A9D2F0; }
.nav-sheet .btn { margin-top: 12px; flex: none; }
@media (min-width: 1000px) { .nav-sheet { display: none !important; } }

.alert-bar { background: var(--warm); color: #fff; font: 700 13px var(--font-display); text-align: center; padding: 10px 16px; }
.alert-bar a { color: #fff; text-decoration: underline; }
.breadcrumb { font: 500 13px var(--font-body); color: var(--muted); padding: 14px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-current] { color: var(--navy); font-weight: 600; }

/* Hero (copy + form side by side) */
.hero { display: grid; gap: 24px; padding-top: 22px; padding-bottom: 36px; }
.hero__copy { display: flex; flex-direction: column; gap: 14px; }
.hero__form { min-width: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 48px; padding-bottom: 72px; }
  .hero__form { position: sticky; top: 92px; }
}
@media (max-width: 899px) {
  .hero h1 { font-size: clamp(27px, 7vw, 34px); }
  .hero .lede { font-size: 15px; }
}
.hero--urgent .hero__copy { }
.checklist { display: flex; flex-direction: column; gap: 8px; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 20px 14px;
  background: rgba(243,246,248,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(14,42,59,.1);
  transform: translateY(120%); transition: transform .25s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .btn { min-height: 48px; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
.pad-bottom-sticky { padding-bottom: 84px; }
@media (min-width: 900px) { .pad-bottom-sticky { padding-bottom: 0; } }

/* FAQ */
.faq-item { border-top: 1px solid var(--line); padding: 2px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; font: 600 16px/1.4 var(--font-body); color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 700 22px var(--font-display); color: var(--steel); flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.faq-answer p { font-size: 15px; line-height: 1.6; max-width: 70ch; }
.faq-answer .src { font-size: 13px; color: var(--muted); }

/* Forms */
.form-panel {
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 20px;
  box-shadow: 0 10px 30px rgba(14,42,59,.07); display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 100%; min-width: 0; position: relative;
}
@media (min-width: 900px) { .form-panel { padding: 28px; } }
.form-panel h2 { font-size: 22px; }
.form-panel--urgent { border-top: 5px solid var(--warm); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font: 600 14px var(--font-body); color: var(--navy); }
.field .optional { font-weight: 400; color: var(--muted); }
.field .req { color: var(--err); font-weight: 700; }
.field-row { display: grid; gap: 12px; }
@media (min-width: 520px) { .field-row--2 { grid-template-columns: 1fr 1fr; } }
.field input[type=text], .field input[type=tel], .field textarea, .field select {
  width: 100%; max-width: 100%; min-width: 0; min-height: 48px; border-radius: 9px; border: 1.5px solid var(--field-border);
  background: #fff; padding: 0 14px; font: 400 16px var(--font-body); color: var(--navy);
}
.field select { padding-right: 8px; }
.field textarea { height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid #0B63CE; outline-offset: 1px; border-color: #0B63CE; }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--err); border-width: 2px; }
.field-hint { font: 400 13px/1.45 var(--font-body); color: var(--muted); }
.field-error { font: 600 13px/1.4 var(--font-body); color: var(--err); }
.field-error:empty { display: none; }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--steel); }
.check label { font: 400 14px/1.5 var(--font-body); color: var(--ink); }
.check--urgent { padding: 12px 14px; border: 1.5px solid rgba(166,63,10,.5); background: var(--warm-tint); border-radius: 9px; }
.check--urgent label { font-weight: 700; color: var(--warm-dark); }
.field.is-invalid .check label { color: var(--err); }

/* honeypot: off-screen, not display:none (some bots skip display:none fields) */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-status { font: 600 14px/1.5 var(--font-body); }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: var(--ok); background: #E9F5EE; border: 1px solid #B7DCC4; border-radius: 9px; padding: 14px; }
.form-status[data-state="error"] { color: var(--err); background: #FDEDEC; border: 1px solid #F1C0BC; border-radius: 9px; padding: 12px 14px; }
.form-status[data-state="info"] { color: var(--navy); background: var(--steel-tint); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.staging-note { font: 600 13px/1.45 var(--font-body); color: var(--navy); background: #FFF4CC; border: 1px solid #E5CD73; border-radius: 8px; padding: 10px 12px; }
.staging-note[hidden] { display: none; }

/* Footer */
.site-footer { background: var(--navy); color: #fff; padding: 44px 0 28px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px; margin: 26px 0; }
.footer-col { display: flex; flex-direction: column; gap: 9px; min-width: 150px; }
.footer-col h2 { font: 700 11px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: #A9D2F0; margin-bottom: 2px; }
.footer-col a { font: 400 14px var(--font-body); color: var(--on-dark); }
.footer-col a:hover { color: #fff; }
.footer-col span.plain { font: 400 14px var(--font-body); color: var(--on-dark); }
.footer-rule { height: 1px; background: rgba(255,255,255,.18); margin: 20px 0; }
.footer-bottom { display: flex; flex-direction: column; gap: 8px; }
.footer-bottom p { max-width: 80ch; }
.footer-bottom .lead { font: 600 14px/1.5 var(--font-body); color: #fff; }
.footer-bottom .fine { font: 400 13px/1.5 var(--font-body); color: var(--on-dark); }
.footer-bottom .copy { font: 400 12px var(--font-body); color: var(--on-dark-muted); }

.legal h2 { margin-top: 12px; font-size: 24px; }
.legal p, .legal li { max-width: 70ch; }
.legal ul { display: flex; flex-direction: column; gap: 8px; list-style: disc; padding-left: 22px; }
.legal li { font: 400 16px/1.6 var(--font-body); }
.src-list { display: flex; flex-direction: column; gap: 6px; }
.src-list li { font-size: 13px; line-height: 1.5; color: var(--muted); }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }

/* Small helpers added for HVAC pages */
.hero__media { display: none; }
@media (min-width: 900px) { .hero__media { display: block; } }
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a { display: inline-flex; padding: 10px 14px; border: 1.5px solid rgba(29,90,130,.45); border-radius: 999px; font: 700 14px var(--font-body); color: var(--steel); text-decoration: none; background: var(--card); }
.related a:hover { background: var(--steel-tint); }
.towns { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.towns li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: 600 14px var(--font-body); color: var(--navy); }
.towns li a { font-weight: 700; }
.area-graphic { width: 100%; height: auto; display: block; }
.src-note { font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 80ch; }
.cost-note { font-size: 14px; color: var(--muted); }
.data-table { margin: 0; }
.data-table dd { margin: 0; }

/* Real photos (rendered when public/images/<slot> exists) */
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--charcoal); aspect-ratio: 16 / 9; }
.photo--4x3 { aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
