/* Reid Pro Plumbing and Heating — design system.
   Brand: badge blue (#2A8CD4 family from the logo/Squarespace accent),
   deep charcoal-navy, steel greys, one sparing yellow highlight carried
   over from the old site palette. Archivo Black display + Space Grotesk
   body (same faces as the Squarespace build, self-hosted).
   Animation is interaction-only; prefers-reduced-motion respected. */

@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/archivo-black-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #131c23;
  --ink-soft: #3c4a55;
  --navy: #0e1a24;
  --navy-2: #14242f;
  --blue: #2a8cd4;
  --blue-bright: #45a5e8;
  --blue-deep: #175c8d;
  --steel: #cfdbe3;
  --paper: #f4f7f9;
  --white: #ffffff;
  --yellow: #ffd52e;
  --red: #c0392b;
  --trane-red: #e83a14; /* sampled from the Trane x Reid Pro logo lockup */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(14, 26, 36, .10);
  --shadow-lg: 0 18px 50px rgba(14, 26, 36, .18);
  --wrap: 1160px;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Space Grotesk", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0; font-family: var(--body); color: var(--ink);
  background: var(--white); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); }
a:hover { color: var(--blue); }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-family: var(--body); font-weight: 700; font-size: 1.22rem; line-height: 1.3; margin: 0 0 .45em; }
h4 { font-weight: 700; margin: 0 0 .4em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--yellow); color: var(--ink); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 12px; top: 12px; }

.eyebrow {
  font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  font-size: .8rem; color: var(--blue); margin: 0 0 .8em;
}
.section-eyebrow { margin-bottom: .4em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--blue); color: #fff;
  font-family: var(--body); font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: var(--radius-sm); border: 2px solid var(--blue);
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.on-dark .btn-ghost, .btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.75); background: transparent; }
.on-dark .btn-ghost:hover, .btn-ghost.on-dark:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #ffca00; border-color: #ffca00; color: var(--ink); }
.btn-trane { background: var(--trane-red); border-color: var(--trane-red); color: var(--white); }
.btn-trane:hover { background: #c92e0e; border-color: #c92e0e; color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.4em 0 .6em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid #e3eaef;
}
.header-row { display: flex; align-items: center; gap: 26px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-text { font-family: var(--display); font-size: 1.22rem; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.brand-text em { font-style: normal; color: var(--blue); }
.brand-text small { display: block; font-family: var(--body); font-weight: 600; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; padding: 10px 13px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: var(--radius-sm); white-space: nowrap; }
.site-nav a:hover { background: var(--paper); color: var(--blue-deep); }
.nav-toggle { display: none; }
.has-sub { position: relative; }
.has-sub .sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border: 1px solid #e3eaef; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; flex-direction: column; gap: 2px;
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: flex; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.header-phone { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; white-space: nowrap; }
.header-phone:hover { color: var(--blue); }

.call-fab { display: none; }

/* ---------- hero / page head ---------- */
.page-head { background: var(--navy); color: #fff; padding: 72px 0 64px; }
.page-head.has-img { background-size: cover; background-position: center; }
.page-head-icon { display: block; width: 72px; height: 72px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .95; }
.page-head .eyebrow { color: var(--yellow); }
.page-head h1 { color: #fff; max-width: 21ch; }
.hero-sub { font-size: 1.15rem; max-width: 56ch; color: rgba(255,255,255,.88); margin: 0; }
.page-head .cta-row { margin-bottom: 0; }

.hero-home { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-home .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 65%; opacity: .38; }
.hero-home .hero-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14,26,36,.94) 25%, rgba(14,26,36,.55) 65%, rgba(42,140,212,.25)); }
.hero-home .wrap { position: relative; padding-top: 92px; padding-bottom: 84px; }
.hero-home h1 { color: #fff; max-width: 15ch; }
.hero-home h1 .hl { color: var(--blue-bright); }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.chip {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.22);
  color: #fff; border-radius: 999px; padding: 6px 15px; font-size: .86rem; font-weight: 600;
}

/* ---------- sections ---------- */
section.band { padding: 74px 0; }
section.band-tight { padding: 54px 0; }
.band-paper { background: var(--paper); }
.band-dark { background: var(--navy); color: #fff; }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p { color: rgba(255,255,255,.85); }
.band-dark a:not(.btn) { color: var(--blue-bright); }
.band-blue { background: var(--blue-deep); color: #fff; }
.band-blue h2 { color: #fff; }
.band-blue p { color: rgba(255,255,255,.9); }
.center { text-align: center; }
.center .cta-row { justify-content: center; }
.lead { font-size: 1.14rem; max-width: 68ch; }
.center .lead { margin-left: auto; margin-right: auto; }

/* card grids */
.grid { display: grid; gap: 22px; margin-top: 40px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid #e3eaef; border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.card { text-decoration: none; color: var(--ink); }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card .icon { width: 54px; height: 54px; margin-bottom: 16px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--blue-deep); font-size: .95rem; }
a.card:hover .more { color: var(--blue); }
.band-dark .card { background: var(--navy-2); border-color: rgba(255,255,255,.1); }
.band-dark .card h3 { color: #fff; }
.band-dark .card p { color: rgba(255,255,255,.75); }

/* inline heading icons (branded svg pack) */
.h3-icon { display: inline-block; width: 26px; height: 26px; vertical-align: -5px; margin-right: 9px; }

/* before / after pair */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 38px auto 0; }
.ba-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.ba-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ba-grid figcaption {
  font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  text-align: center; padding: 12px; color: var(--blue-deep);
}
@media (max-width: 640px) { .ba-grid { grid-template-columns: 1fr; } }

/* scroll reveal — key landing pages only (body.animate, set per-page in
   build.py). site.js adds .reveal/.in; without JS nothing is hidden. */
@media (prefers-reduced-motion: no-preference) {
  .animate .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
  .animate .reveal.in { opacity: 1; transform: none; }
  .animate .hero-home .wrap > * { animation: hero-in .7s ease backwards; }
  .animate .hero-home .wrap > *:nth-child(2) { animation-delay: .08s; }
  .animate .hero-home .wrap > *:nth-child(3) { animation-delay: .16s; }
  .animate .hero-home .wrap > *:nth-child(4) { animation-delay: .24s; }
  .animate .hero-home .wrap > *:nth-child(5) { animation-delay: .32s; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* blog cards */
.blog-card { padding: 0 0 24px; overflow: hidden; }
.blog-thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 18px; }
.blog-card h3, .blog-card p, .blog-card .more { padding: 0 24px; }
.post-img { margin: 30px 0; }
.post-img img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-img figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; }
.blog-date { font-size: .85rem; font-weight: 600; color: var(--blue-deep); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }

/* article body */
main h2 { margin-top: 1.6em; }
main h2:first-child { margin-top: 0; }

/* service detail rows */
.svc-list { display: grid; gap: 16px; margin-top: 36px; }
.svc-item {
  background: #fff; border: 1px solid #e3eaef; border-left: 5px solid var(--blue);
  border-radius: var(--radius-sm); padding: 22px 26px; box-shadow: var(--shadow);
}
.svc-item h3 { margin-bottom: .3em; }
.svc-item p { margin: 0; color: var(--ink-soft); }
.svc-item ul { margin: .6em 0 0; padding-left: 20px; color: var(--ink-soft); }

/* split (text + image) */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; margin-top: 20px; }
.split .photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.split .photo img { width: 100%; height: 100%; object-fit: cover; }
.split.flip .photo { order: -1; }

/* stat / trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.trust { text-align: center; padding: 10px; }
.trust strong { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--blue-deep); margin-bottom: 4px; }
.trust span { color: var(--ink-soft); font-size: .93rem; }
.band-dark .trust strong { color: var(--blue-bright); }
.band-dark .trust span { color: rgba(255,255,255,.75); }

/* towns grid */
.towns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.town { background: #fff; border: 1px solid #e3eaef; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.town h3 { color: var(--blue-deep); }
.town p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
a.town { display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border-left: 4px solid var(--blue); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.town:hover, a.town:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(14, 26, 36, .16); border-left-color: var(--yellow); }
a.town h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
a.town h3::after { content: "\2192"; font-size: 1.05rem; color: var(--blue); transition: transform .18s ease; }
a.town:hover h3::after { transform: translateX(4px); }
a.town .town-more { margin-top: auto; padding-top: 14px; font-weight: 700; font-size: .9rem; color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }


/* CTA band */
.cta-band { text-align: center; background-size: cover; background-position: center; }
.cta-band h2 { max-width: 26ch; margin-left: auto; margin-right: auto; }
.cta-band .hl-y { color: var(--yellow); }
.cta-band p { max-width: 58ch; margin: 12px auto 0; }
.cta-band .cta-row { justify-content: center; }
.cta-logo {
  width: 150px; height: 150px; margin: 0 auto 22px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .3));
}
.cta-rotate { display: block; min-height: 1.2em; transition: opacity .3s ease, transform .3s ease; }
.cta-rotate.is-out { opacity: 0; transform: translateY(10px); }
.cta-tagline { display: block; }
@media (max-width: 640px) {
  .cta-rotate { min-height: 2.3em; display: flex; align-items: center; justify-content: center; }
  .cta-logo { width: 110px; height: 110px; }
}

/* FAQ */
.faq { max-width: 820px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid #e3eaef; padding: 4px 0; }
.band-dark .faq details { border-color: rgba(255,255,255,.14); }
.faq summary { font-weight: 700; font-size: 1.05rem; padding: 14px 30px 14px 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--display); color: var(--blue); font-size: 1.2rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }
.band-dark .faq details p { color: rgba(255,255,255,.8); }

/* ---------- forms ---------- */
/* The Jobber snippet injects an iframe sized at load time; force it to track
   the panel width instead of the width it measured. */
.jobber-embed { min-height: 480px; width: 100%; }
.jobber-embed iframe {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  border: 0;
}
.form-panel {
  background: #fff; border: 1px solid #e3eaef; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 34px 34px 28px;
}
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; margin-top: 40px; }
.contact-info h3 { margin-top: 1.4em; }
.contact-info h3:first-child { margin-top: 0; }
.contact-big { font-family: var(--display); font-size: 1.7rem; }
.contact-big a { color: var(--ink); text-decoration: none; }
.contact-big a:hover { color: var(--blue); }

form.njm-form { display: grid; gap: 14px; }
form.njm-form label { font-weight: 600; font-size: .95rem; }
form.njm-form input[type="text"], form.njm-form input[type="email"],
form.njm-form input[type="tel"], form.njm-form textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--steel);
  border-radius: var(--radius-sm); font-family: var(--body); font-size: 1rem;
  background: var(--paper);
}
form.njm-form input:focus, form.njm-form textarea:focus,
.newsletter-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; display: none; }
.form-msg.ok { display: block; background: #e5f4e8; color: #1d5c2c; }
.form-msg.err { display: block; background: #fbeaea; color: #8c2320; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); margin-top: 0; }
.footer-newsletter {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
  padding-top: 52px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-newsletter h2 { color: #fff; font-size: 1.45rem; margin-bottom: .3em; }
.footer-newsletter p { margin: 0; font-size: .97rem; color: rgba(255,255,255,.75); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; }
/* Turnstile widget wraps to its own full-width row under the email + button.
   min-height matches the rendered widget so the footer doesn't shift on load. */
.newsletter-form .cf-turnstile { flex-basis: 100%; min-height: 65px; }
.newsletter-form input[type="email"] {
  flex: 1; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,.25); background: var(--navy-2);
  color: #fff; font-family: var(--body); font-size: 1rem; min-width: 0;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.45); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.footer-brand img { margin-bottom: 14px; }
.footer-brand p { font-size: .96rem; }
.footer-contact a { color: #fff; font-weight: 600; }
.footer-note { color: rgba(255,255,255,.55); font-size: .88rem; }
.footer-hours { font-size: .93rem; margin-top: 1.2em; }
.site-footer h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .13em; margin-bottom: 1em; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .97rem; }
.site-footer nav a:hover { color: var(--blue-bright); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding-top: 20px; padding-bottom: 26px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .88rem; color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.75); }

/* dev ribbon (shown by site.js on non-production hostnames) */
.dev-ribbon {
  position: fixed; z-index: 200; top: 14px; right: -44px; transform: rotate(38deg);
  background: var(--yellow); color: var(--ink); font-weight: 700; font-size: .78rem;
  letter-spacing: .1em; padding: 6px 52px; box-shadow: var(--shadow); pointer-events: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .towns { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-phone { display: none; }
}
@media (max-width: 820px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 28px; }
  .split.flip .photo { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-newsletter { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 900px) {
  .site-nav { position: static; }
  .nav-toggle {
    display: block; background: var(--ink); color: #fff; border: 0;
    font-family: var(--body); font-weight: 700; font-size: .9rem;
    padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  }
  .site-nav ul#nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid #e3eaef; box-shadow: var(--shadow-lg);
    flex-direction: column; gap: 0; padding: 10px 14px 16px;
  }
  .site-nav.open ul#nav-menu { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1.05rem; }
  .has-sub .sub { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 18px; }
  .header-cta .btn { display: none; }
  .call-fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--blue); color: #fff; box-shadow: var(--shadow-lg);
  }
  .call-fab svg { width: 26px; height: 26px; }
  section.band { padding: 54px 0; }
  .hero-home .wrap { padding-top: 64px; padding-bottom: 60px; }
  .page-head { padding: 54px 0 46px; }
  .grid-2, .grid-3, .grid-4, .towns, .trust-strip { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  /* keep the ribbon clear of the header/menu on small screens */
  .dev-ribbon { top: auto; right: auto; bottom: 26px; left: -48px; transform: rotate(38deg); }
}
