/*
  Site skin: brings the generated pages (contact, reviews, financing, service areas,
  custom homes, service detail and legal pages) onto the same look as the homepage,
  Services and Replacements pages in /showcase. Loaded after styles.css.
*/
@font-face {
  font-family: "Barlow Display";
  src: url("/showcase/assets/display.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/showcase/assets/mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --navy-950: #123346;
  --navy-900: #143244;
  --navy-800: #1f4354;
  --blue-500: #159cea;
  --blue-600: #0f6fa8;
  --blue-700: #0b6aa3;
  --red: #c6292e;
  --red-dark: #ae2028;
  --paper: #f5f8fa;
  --rule: #c9d5dc;
  --muted: #465e6b;
  --gray-50: #f5f8fa;
  --gray-800: #183749;
  --radius: 2px;
  --shadow: 0 14px 34px rgba(18, 51, 70, 0.12);
  --heading: "Barlow Display", "Arial Narrow", Impact, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;
  --head: 66px;
}

body {
  color: var(--gray-800);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
html { scroll-padding-top: calc(var(--head) + 12px); }

/* ---------- Header (matches the showcase masthead) ---------- */
.sx-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.sx-head-inner {
  width: min(calc(100% - 2 * clamp(22px, 4.8vw, 76px)), 1550px);
  margin-inline: auto;
  height: var(--head);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.sx-icon {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sx-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  color: var(--navy-800);
}
.sx-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 0; background: none; }
.sx-brand span { font: 800 35px/0.9 var(--heading); letter-spacing: -0.018em; }
.sx-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 42px); }
.sx-nav a,
.sx-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 650;
  color: var(--gray-800);
}
.sx-nav a:hover,
.sx-phone:hover { color: var(--red-dark); }
.sx-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.sx-nav .sx-nav-more { display: none; }
.sx-actions { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 42px); }
.sx-phone { gap: 8px; white-space: nowrap; }
.sx-phone .sx-icon { width: 15px; height: 15px; }
.sx-phone .mobile-call { display: none; }
.sx-quote {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 24px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.sx-quote:hover { background: var(--red-dark); }
.sx-quote .sx-icon { width: 15px; height: 15px; }
.sx-toggle { display: none; }

@media (min-width: 781px) and (max-width: 1150px) {
  .sx-head-inner { gap: 16px; }
  .sx-nav { gap: clamp(9px, 1.4vw, 16px); }
  .sx-actions { gap: 14px; }
}
@media (max-width: 1050px) {
  .sx-phone span { display: none; }
}
@media (max-width: 780px) {
  :root { --head: 62px; }
  .sx-head-inner { gap: 10px; width: calc(100% - 2 * clamp(18px, 5vw, 36px)); }
  .sx-brand img { width: 32px; height: 32px; }
  .sx-brand span { font-size: 29px; }
  .sx-actions { gap: 8px; }
  .sx-quote { min-height: 40px; padding-inline: 14px; font-size: 12px; }
  .sx-quote .sx-icon { display: none; }
  .sx-phone {
    justify-content: center;
    min-height: 44px;
    padding-inline: 10px;
    gap: 5px;
    border: 1px solid var(--rule);
    border-radius: 24px;
    color: var(--navy-800);
  }
  .sx-phone .mobile-call { display: inline; font-size: 12px; }
  .sx-phone .sx-icon { width: 15px; height: 15px; }
  .sx-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: none;
    border: 1px solid var(--rule);
    color: var(--gray-800);
  }
  .sx-toggle .sx-icon { width: 20px; height: 20px; }
  .sx-nav { display: none; }
  .sx-nav.is-open {
    display: grid;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    gap: 0;
    padding: 5px clamp(18px, 5vw, 36px) 14px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 10px 12px rgba(36, 35, 30, 0.06);
  }
  .sx-nav.is-open a,
  .sx-nav.is-open .sx-nav-more {
    display: flex;
    padding: 12px 0;
    font-size: 15px;
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 430px) {
  .sx-brand span { font-size: 26px; }
  .sx-brand img { width: 29px; height: 29px; }
}
@media (max-width: 390px) {
  .sx-head-inner { gap: 4px; }
  .sx-actions { gap: 4px; }
  .sx-brand span { font-size: 25px; }
  .sx-brand img { width: 27px; height: 27px; }
  .sx-quote { display: none; }
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.96;
}
h1 { font-size: clamp(2.9rem, 6.4vw, 5.6rem); }
.hero-service h1 { font-size: clamp(2.9rem, 5.6vw, 4.9rem); }
.hero-home h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2.3rem, 4.2vw, 3.7rem); }
h3 { font-size: clamp(1.45rem, 2vw, 1.75rem); line-height: 1.02; }
.legal-content h2,
.footer-grid h2 { letter-spacing: -0.01em; }
.footer-grid h2 { font-size: 1.35rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font: 500 0.66rem/1.4 var(--mono);
  letter-spacing: 0.075em;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 29px;
  height: 4px;
  background: linear-gradient(110deg, var(--red) 0 49%, transparent 49% 54%, var(--blue-500) 54%);
}
.hero .eyebrow,
.new-build-copy > .eyebrow,
.section-diagnostic .eyebrow,
.cta-band .eyebrow { color: #bfdfed; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 26px;
  font-weight: 700;
  padding-inline: 21px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: none; }
.btn-accent,
.btn-primary {
  color: #fff;
  background: var(--red);
  box-shadow: none;
}
.btn-accent:hover,
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { color: var(--navy-950); border-color: var(--rule); background: #fff; }
.btn-ghost:hover { border-color: var(--navy-950); }
.btn-light { color: var(--navy-950); background: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, 0.45); background: transparent; }
.btn-ghost-light:hover { border-color: #fff; }

/* ---------- Heroes and dark bands ---------- */
.hero { background: var(--navy-950); }
.hero-compact,
.section-new-build,
.section-diagnostic,
.cta-band,
.quote-note { background: var(--navy-950); }
.hero-compact { border-bottom: 4px solid var(--blue-500); }
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 32, 45, 0.9), rgba(10, 32, 45, 0.62) 46%, rgba(10, 32, 45, 0.08)),
    linear-gradient(0deg, rgba(10, 32, 45, 0.7), transparent 55%);
}
.hero-copy { color: #dfebf0; }

/* ---------- Cards, panels and forms ---------- */
.section-muted { background: #e9f3f8; }
.service-card,
.calculator,
.contact-grid .contact-card,
.review-card,
.faq-list details,
.legal-sidebar,
.legal-facts,
.form-shell,
.wizard,
.pricing-table-wrap,
.new-build-form,
.area-grid a,
.chip-grid label,
.contact-flow-tab {
  border-radius: var(--radius);
  box-shadow: none;
}
.service-card { border-color: var(--rule); }
.service-card:hover { box-shadow: none; border-color: var(--navy-800); }
.service-card-icon {
  background: #e3eef4;
  border-radius: var(--radius);
  color: var(--navy-950);
}
.contact-flow-tab[aria-selected="true"] { border-color: var(--navy-950); box-shadow: inset 0 -4px 0 var(--red); }
.new-build-steps span::before { color: #fff; background: var(--red); }
.diagnostic-note { color: #fff; background: var(--red); }
.wizard-progress span { background: linear-gradient(90deg, var(--blue-500), var(--red)); }
.wizard-result { border-left-color: var(--red); }
.review-card { border-top: 4px solid var(--red); }
.review-card:nth-child(3n + 2) { border-top-color: var(--blue-500); }
.review-card:nth-child(3n) { border-top-color: var(--navy-800); }
.footer-badges span { border-radius: 2px; }
.skip-link { background: var(--navy-950); color: #fff; }

input:focus,
select:focus,
textarea:focus { border-color: var(--blue-500); }

/* ---------- Footer ---------- */
.site-footer { background: #0f2a3a; border-top: 4px solid var(--red); }
.footer-brand { gap: 9px; }
.footer-brand img { border-radius: 0; background: none; }
.footer-brand span { font: 800 30px/0.9 var(--heading); letter-spacing: -0.018em; color: #fff; }
.footer-grid a:hover { color: #7bd2ff; }

/* ---------- Mobile call bar ---------- */
.sticky-call {
  color: #fff;
  background: var(--red);
  border-radius: 28px;
  box-shadow: 0 10px 26px rgba(18, 51, 70, 0.28);
  font-weight: 700;
}
