﻿/* Caldwell Plumbing & Heating. Fresh build, no shared chassis. */

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

html, body { overflow-x: clip; }

html {
  scrollbar-color: #B4BCB7 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

body::-webkit-scrollbar { width: 12px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb { background: #B4BCB7; border-radius: 6px; border: 3px solid var(--bg); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--s2);
  letter-spacing: -0.01em;
}

p { margin: 0 0 var(--s2); }

img { max-width: 100%; height: auto; display: block; }

svg[hidden] { display: none; }

a { color: inherit; }

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

[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 0 0 var(--radius) var(--radius);
}
.skip:focus { left: var(--s2); }

/* ---------- links: underline grows from the left ---------- */

.u-link {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 2px;
}
.u-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}
.u-link:hover::after, .u-link:focus-visible::after { transform: scaleX(1); }

.go-link { color: var(--accent); font-size: 15px; display: inline-block; padding: 8px 0; }

/* ---------- buttons: one ice-slate block per view ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 24px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  font-variant-numeric: tabular-nums;
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px); }

/* ---------- header: left stack + right vertical mini-nav ---------- */

.site-head { position: relative; z-index: 20; }
.site-head .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: var(--s3);
  padding-bottom: var(--s3);
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.brand-phone {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  padding: 2px 0;
}
.brand-phone:hover { color: var(--ink); }

.mini-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.mini-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 2px 0;
}
.mini-nav a[aria-current="page"] { color: var(--accent); }
.mini-nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle { display: none; }
.m-nav { display: none; }

/* ---------- hero (index) ---------- */

.hero {
  position: relative;
  height: min(76vh, 740px);
  min-height: 520px;
  overflow: clip;
  background: #0B0D0C;
}
.hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(245deg, rgba(5, 9, 8, 0.6) 0%, rgba(5, 9, 8, 0.24) 42%, rgba(5, 9, 8, 0) 66%);
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  top: clamp(40px, 9vh, 96px);
  right: clamp(20px, 6vw, 96px);
  z-index: 2;
  text-align: right;
  color: var(--night-ink);
  max-width: 21em;
}
.hero-copy h1 {
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  margin-bottom: var(--s2);
}
.hero-line {
  color: rgba(237, 241, 239, 0.82);
  font-size: 16px;
  margin-bottom: var(--s3);
}
.hero-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.hero-cta .after-btn { color: rgba(237, 241, 239, 0.82); font-size: 14px; font-weight: 400; padding: 10px 0; }

/* ---------- shared section spacing ---------- */

.band { padding: var(--s7) 0; }
.band-tight { padding: var(--s6) 0; }

.lede { color: var(--muted); max-width: var(--measure); }

/* ---------- index: two asymmetric trade blocks ---------- */

.trade {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(var(--s4), 5vw, var(--s7));
  align-items: center;
}
.trade + .trade { margin-top: var(--s7); }
.trade.rev { grid-template-columns: 5fr 7fr; }
.trade.rev .trade-photo { order: 2; }
.trade-photo img { width: 100%; height: auto; }
.trade-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.trade-copy p { color: var(--muted); max-width: 26em; }

/* ---------- signature: the cutaway ---------- */

.cut-band {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.cut-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: clamp(var(--s4), 4vw, var(--s6));
  align-items: center;
}
.cut-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.cut-copy p { color: var(--muted); }
.cut-note {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s2);
  margin-top: var(--s3);
  font-size: 14px;
  color: var(--muted);
}

.cutaway { width: 100%; height: auto; }
.cutaway .ln { fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: 0.8; stroke-linejoin: round; }
.cutaway .plate { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0.42; }
.cutaway .thin { stroke-width: 1.1; }
.cutaway .ground { fill: none; stroke: var(--ink); stroke-width: 1.7; }
.cutaway .frost { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 7 6; }
.cutaway .pipe { fill: none; stroke: var(--copper); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.cutaway .pipe.thin { stroke-width: 1.6; }
.cutaway .pipe.ink { stroke: var(--ink); opacity: 0.6; }
.cutaway .lab { font-family: var(--font-body); font-size: 15px; font-weight: 700; fill: var(--ink); }
.cutaway .lab2 { font-family: var(--font-body); font-size: 14px; font-weight: 400; fill: var(--muted); }
.cutaway .leader { stroke: var(--muted); stroke-width: 1; opacity: 0.65; }
.cutaway .dot { fill: var(--accent); }
.cutaway #glint { fill: #E4A268; opacity: 0; }

/* mobile-only nudge under the drawing; the scroll starts centered on the house */
.cut-cue {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- the one dark band: winter ---------- */

.winter { background: var(--night); color: var(--night-ink); }
.winter-grid {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(var(--s4), 5vw, var(--s7));
  align-items: center;
}
.winter h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.winter-rows { margin: var(--s4) 0; }
.winter-row {
  border-top: 1px solid var(--night-hairline);
  padding: var(--s2) 0;
  font-size: 16px;
}
.winter-row:last-child { border-bottom: 1px solid var(--night-hairline); }
.winter-row strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.winter-row span { color: var(--night-muted); }
.winter-photo img { width: 100%; height: auto; }
.winter .after-btn { color: var(--night-muted); font-size: 14px; margin-left: var(--s2); }

/* ---------- coverage: the map carries the minutes on its pins ---------- */

.coverage-head { max-width: 44em; }
.map-shell {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--panel);
  margin: var(--s4) 0 0;
}
#map { height: 460px; }
#map.map-tall { height: 520px; }

.cov-line {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin: var(--s3) 0 0;
  padding: var(--s2) 0;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cov-line strong { color: var(--ink); font-weight: 700; }

.leaflet-container { font-family: var(--font-body); font-size: 12px; }
.pin { background: none; border: 0; position: relative; }
.pin-dot {
  display: block;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(19, 27, 23, 0.3);
}
.pin-shop {
  display: block;
  width: 14px; height: 14px; border-radius: 2px;
  background: var(--ink); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(19, 27, 23, 0.35);
}
.pin-tag {
  position: absolute;
  left: 17px; top: -4px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pin-tag.tag-left { left: auto; right: 17px; }
.leaflet-popup-content-wrapper { border-radius: var(--radius); }

/* ---------- facts as a running ruled line ---------- */

.facts {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--s4) 0;
}
.facts p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  max-width: none;
}
.facts strong { color: var(--ink); font-weight: 700; }
.facts p + p { margin-top: 6px; }

/* ---------- call band ---------- */

.call-band { text-align: center; }
.call-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.call-band .lede { margin: 0 auto var(--s4); }
.call-band .after-btn { display: block; margin-top: var(--s2); color: var(--muted); font-size: 14px; }

/* ---------- subpage lead ---------- */

.page-lead { height: clamp(300px, 44vh, 460px); overflow: clip; background: var(--night); }
.page-lead img { width: 100%; height: 100%; object-fit: cover; }
.page-head { padding: var(--s5) 0 0; }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: var(--s1); }
.page-head .lede { font-size: 17px; }

/* ---------- service runs: bold-lead ruled lines, Caldwell's fact style ---------- */

.svc-run { max-width: 46em; }
.svc-line {
  margin: 0;
  border-top: 1px solid var(--hairline);
  padding: var(--s3) 0;
  font-size: 16px;
}
.svc-line:last-child { border-bottom: 1px solid var(--hairline); }
.svc-line strong { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.svc-line span { color: var(--muted); font-size: 15px; }

.photo-pair {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--s3);
  align-items: start;
}
.photo-pair img { width: 100%; height: 100%; object-fit: cover; }

.fine { font-size: 13px; color: var(--muted); }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(var(--s4), 4vw, var(--s7));
  align-items: start;
}
.nap { font-style: normal; }
.nap .nap-phone {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding: 4px 0;
}
.nap .nap-phone:hover { color: var(--accent); }
.nap p { color: var(--muted); font-size: 15px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 96, 114, 0.18);
}
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  grid-column: 1 / -1;
  display: none;
  background: rgba(74, 96, 114, 0.08);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
  font-size: 15px;
}
.form-note.show { display: block; }
.form-note a { font-weight: 700; }

/* ---------- footer: one ruled block, no link columns ---------- */

.site-foot {
  border-top: 1px solid var(--hairline);
  margin-top: var(--s7);
  padding: var(--s5) 0 var(--s4);
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
}
.foot-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.foot-id p { margin: 0 0 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.foot-id a { text-decoration: none; color: var(--ink); }
.foot-id a:hover { color: var(--accent); }
.foot-meta { text-align: right; max-width: 34em; }
.foot-links { margin-bottom: var(--s2); }
.foot-links a {
  display: inline-block;
  padding: 8px 0 8px 18px;
  font-size: 14px;
}
.foot-meta .fine { margin: 0 0 4px; }
.foot-meta .fine.lic { color: var(--ink); font-size: 13px; }

/* ---------- mobile sticky call bar: one full-width call action ---------- */

.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  padding: 10px var(--s2) calc(10px + env(safe-area-inset-bottom));
  transform: translateY(0);
  transition: transform 250ms ease;
}
.call-bar.hidden { transform: translateY(110%); }
.call-bar .btn { display: block; text-align: center; padding: 13px 18px; }

/* ---------- reveals (JS adds .js to html) ---------- */

html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 620ms ease, transform 620ms ease;
}
html.js .cut-labels { opacity: 0; transition: opacity 700ms ease; }
html.js .cut-labels.in { opacity: 1; }

/* ---------- reduced motion: static page stays complete ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.js .reveal, html.js .cut-labels { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .cut-grid, .winter-grid, .contact-grid { grid-template-columns: 1fr; }
  .cut-grid .cut-copy { order: -1; }
  #map { height: 380px; }
}

@media (max-width: 859px) {
  [id] { scroll-margin-top: 76px; }

  .site-head {
    position: sticky; top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
  }
  .site-head .wrap {
    align-items: center;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  /* header links hold the 44px tap floor */
  .brand { gap: 0; }
  .brand-name {
    font-size: 15px;
    display: inline-flex; align-items: center;
    min-height: 44px;
  }
  .brand-phone {
    font-size: 14px;
    display: inline-flex; align-items: center;
    min-height: 44px;
    padding: 0;
  }
  .mini-nav { display: none; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle:active { transform: translateY(1px); }
  .menu-toggle .ic-x { display: none; }
  .menu-toggle[aria-expanded="true"] .ic-menu { display: none; }
  .menu-toggle[aria-expanded="true"] .ic-x { display: block; }

  .m-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: var(--s2) var(--s3) var(--s3);
  }
  .m-nav.open { display: block; }
  .m-nav a {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
  }
  .m-nav a:last-child { border-bottom: 0; }
  .m-nav a[aria-current="page"] { color: var(--accent); }

  .band { padding: var(--s6) 0; }
  .band-tight { padding: var(--s5) 0; }

  .hero { height: 72vh; min-height: 480px; }
  .hero-copy { right: var(--s3); left: var(--s3); max-width: none; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(5, 9, 8, 0.62) 0%, rgba(5, 9, 8, 0.28) 46%, rgba(5, 9, 8, 0) 68%);
  }

  .cut-art { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cutaway { min-width: 640px; }
  .cut-cue { display: block; }

  .pin-tag { font-size: 10.5px; padding: 1px 5px; left: 15px; }
  .pin-tag.tag-left { left: auto; right: 15px; }

  .trade, .trade.rev { grid-template-columns: 1fr; gap: var(--s3); }
  .trade.rev .trade-photo { order: 0; }
  .trade + .trade { margin-top: var(--s6); }

  .svc-row { grid-template-columns: 1fr; gap: 6px; padding: var(--s2) 0; }
  .photo-pair { grid-template-columns: 1fr; }

  .form { grid-template-columns: 1fr; }

  .foot-grid { flex-direction: column; gap: var(--s3); }
  .foot-meta { text-align: left; }
  .foot-links a { padding: 12px 24px 12px 0; }

  .call-bar { display: grid; }
  .call-bar.hidden { display: grid; }

  main { padding-bottom: 0; }
  body { padding-bottom: 76px; }
}

@media (max-width: 420px) {
  .hero-copy h1 { font-size: 1.75rem; }
  .brand-name { font-size: 14px; max-width: 21ch; }
}
