/* =========================================================
   GreenShield Heat Pumps - shared styles
   Mobile-first, plain CSS, no build step.
   ========================================================= */

:root {
  --brand:        #003e11;   /* primary brand green */
  --brand-hover:  #0a5c24;   /* lighter green for hovers */
  --brand-soft:   #e9f3ec;   /* pale green tint */
  --gold:         #e8a723;   /* review stars */
  --ink:          #16211a;   /* body text */
  --ink-soft:     #47554b;   /* secondary text */
  --line:         #dfe7e1;   /* hairlines / borders */
  --bg:           #ffffff;
  --bg-alt:       #f4f7f5;   /* alternating section background */
  --bg-card:      #f6f8f6;   /* card background */
  --bg-dark:      #122018;   /* footer / dark band */
  --max:          1160px;
  --radius:       12px;
  --shadow-card:  0 10px 26px rgba(18, 32, 24, .07);
  --font-head: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.22; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); margin-bottom: .6em; letter-spacing: -.015em; }
h3 { font-size: 1.18rem; margin-bottom: .35em; }
p  { margin-bottom: 1rem; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--brand-hover); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }
.img-rounded { border-radius: var(--radius); }

/* service cards with photo tops */
.card.card--service { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--service .card__img { width: 100%; height: 172px; object-fit: cover; display: block; }
.card--service .card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card--service .card__body a { margin-top: auto; padding-top: 10px; }

/* brand cards */
.grid.grid--brands { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
@media (max-width: 600px) { .grid.grid--brands { grid-template-columns: 1fr; } }
.brand-card img { height: 40px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; margin-bottom: 14px; }
.brand-card h3 { font-size: 1.08rem; }
.brand-card p { font-size: .92rem; margin-bottom: 0; }

/* in-content photos */
.content-img { border-radius: var(--radius); box-shadow: var(--shadow-card); width: 100%; height: auto; margin: 24px 0 4px; }
.split .img-rounded, .split .content-img { box-shadow: var(--shadow-card); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-head);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--brand-hover); text-decoration: none; box-shadow: 0 6px 18px rgba(0, 62, 17, .25); }
.btn--ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--lg { padding: 17px 34px; font-size: 1.03rem; }
.btn--white { background: #fff; color: var(--brand); }
.btn--white:hover { background: var(--brand-soft); color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 8px 20px; max-width: var(--max); margin: 0 auto;
}
.nav__logo { flex-shrink: 0; }
.nav__logo img { max-height: 64px; width: auto; }
@media (min-width: 992px) { .nav__logo img { max-height: 68px; } }
.nav__links { display: none; list-style: none; }
.nav__links a { color: var(--ink); font-weight: 600; font-size: .95rem; font-family: var(--font-head); }
.nav__links a:hover { color: var(--brand); text-decoration: none; }

.nav__call {
  background: var(--brand); color: #fff !important;
  padding: 11px 18px; border-radius: var(--radius); font-weight: 700;
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
}
.nav__call:hover { background: var(--brand-hover); text-decoration: none; }

/* pulsing availability dot */
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #3ddc6a; flex-shrink: 0; position: relative;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: rgba(61, 220, 106, .5);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.drop-toggle {
  background: none; border: 0; cursor: pointer; padding: 4px;
  display: inline-flex; align-items: center; color: var(--ink);
  vertical-align: middle;
}
.drop-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.has-dropdown.open > .drop-toggle svg,
.has-dropdown.open > a .drop-toggle svg { transform: rotate(180deg); }
.dropdown {
  display: none; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  min-width: 270px; padding: 8px 0; box-shadow: 0 14px 34px rgba(18, 32, 24, .12);
}
.dropdown a { display: block; padding: 10px 18px; font-size: .92rem; font-weight: 500; font-family: var(--font-body); }
.dropdown a:hover { background: var(--bg-alt); color: var(--brand); }

/* mobile nav */
.nav__toggle {
  display: block; background: none; border: 0; font-size: 1.7rem;
  cursor: pointer; color: var(--ink); padding: 6px 10px; line-height: 1;
}
@media (max-width: 991px) {
  .nav__links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px; box-shadow: 0 18px 30px rgba(18, 32, 24, .12);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav__links li { padding: 10px 0; border-bottom: 1px solid var(--bg-alt); }
  .nav__links li:last-child { border-bottom: 0; padding-top: 14px; }
  .has-dropdown > a { display: flex; justify-content: flex-start; align-items: center; gap: 8px; width: 100%; }
  .dropdown { position: static; box-shadow: none; border: 0; min-width: 0; padding: 6px 0 0 14px; }
  .has-dropdown.open .dropdown { display: block; }
}
@media (min-width: 992px) {
  .nav__toggle { display: none; }
  .nav__links { display: flex; align-items: center; gap: 24px; }
  .dropdown { position: absolute; top: 100%; left: 0; }
  .has-dropdown::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
  .has-dropdown:hover .dropdown,
  .has-dropdown.open .dropdown,
  .has-dropdown:focus-within .dropdown { display: block; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: var(--bg-dark); }
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .hero__video { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero__video { display: none; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 24, 13, .62), rgba(7, 24, 13, .8)); z-index: 1; }
.hero__inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 72px 20px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 700; font-family: var(--font-head); color: #8fe3a8; }
.hero h1 { color: #fff; margin: 10px 0 16px; max-width: 26ch; text-wrap: balance; }
.hero__inner > p { text-wrap: pretty; }
.hero p { color: rgba(255, 255, 255, .92); font-size: 1.12rem; max-width: 52ch; }
.hero__cta { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .btn--ghost { color: #fff; border-color: #fff; }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@media (min-width: 768px) { .hero__inner { padding: 96px 20px; } }

/* centered variant for heroes without a background image */
.hero--center { text-align: center; }
.hero--center h1 { margin-left: auto; margin-right: auto; }
.hero--center p { margin-left: auto; margin-right: auto; }
.hero--center .hero__cta { justify-content: center; }
.hero--center .stars--left { justify-content: center; }

/* slim page hero */
.page-hero {
  background: linear-gradient(135deg, #06240f 0%, var(--brand) 55%, #0b5a24 100%);
  color: #fff; text-align: center; padding: 52px 20px 56px;
}
.page-hero h1 { color: #fff; margin: 0 auto 12px; max-width: 24ch; text-wrap: balance; }
.page-hero p { color: rgba(255, 255, 255, .92); max-width: 60ch; margin: 0 auto 4px; font-size: 1.08rem; text-wrap: pretty; }
.page-hero .btn-row { justify-content: center; margin-top: 22px; }
.page-hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 700; font-family: var(--font-head); color: #8fe3a8; margin-bottom: 10px; }

/* gold stars */
.stars { display: flex; gap: 4px; justify-content: center; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.stars svg { width: 22px; height: 22px; fill: var(--gold); }
.stars--left { justify-content: flex-start; }
.stars__label { color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .98rem; margin-left: 8px; }

/* ---------- trust badge band ---------- */
.badge-band { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0; }
.badge-band__grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.badge {
  display: flex; align-items: center; gap: 13px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem; color: var(--ink);
}
.badge__icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.badge__icon svg { width: 24px; height: 24px; }
@media (min-width: 600px)  { .badge-band__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px)  { .badge-band__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.section--alt { background: var(--bg-alt); }
.section__lead { max-width: 100%; }
.center { text-align: center; }
.center .section__lead { margin: 0 auto; }
@media (min-width: 768px) { .section { padding: 66px 0; } }

/* two-column split */
.split { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
/* when a split stacks on mobile, show the form before the copy */
@media (max-width: 799px) { .split .form-card { order: -1; } }
/* on desktop, keep the form in view while the copy scrolls */
@media (min-width: 800px) { .split .form-card { position: sticky; top: 100px; } }

/* content + sticky sidebar */
.layout-sticky { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: start; }
@media (min-width: 992px) { .layout-sticky { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; } }
.sticky-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-card);
}
@media (min-width: 992px) { .sticky-card { position: sticky; top: 92px; } }
.sticky-card h2, .sticky-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.sticky-card ul { list-style: none; margin: 0 0 18px; }
.sticky-card li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.sticky-card li svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--brand); margin-top: 3px; }
.sticky-card .btn { width: 100%; }
.sticky-card .sticky-card__call { margin-top: 10px; text-align: center; font-size: .95rem; }

/* feature / why-us grid */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: box-shadow .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-card); border-color: #c9d6cc; }
.section--alt .card { background: #fff; }
.card h3 { margin-bottom: .4em; }
.card a { font-weight: 600; font-family: var(--font-head); }

/* service / area link list */
.linklist { display: grid; grid-template-columns: 1fr; gap: 12px; list-style: none; }
@media (min-width: 500px) { .linklist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px) { .linklist { grid-template-columns: repeat(3, 1fr); } }
.linklist a {
  display: block; padding: 14px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-card); color: var(--ink);
  font-weight: 600; font-family: var(--font-head); font-size: .95rem;
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.section--alt .linklist a { background: #fff; }
.linklist a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; box-shadow: var(--shadow-card); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .96rem; }
th { background: var(--bg-alt); font-family: var(--font-head); font-weight: 700; color: var(--ink); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq details { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; margin-bottom: 12px; }
.section--alt .faq details { background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); font-size: 1.04rem; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
/* questions are h3 for document outline; render them like plain summary text */
.faq summary h3 { display: inline; font-size: inherit; font-weight: inherit; font-family: inherit; line-height: inherit; color: inherit; margin: 0; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding-bottom: 16px; margin-bottom: 0; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, #06240f 0%, var(--brand) 55%, #0b5a24 100%); color: #fff; text-align: center; padding: 56px 20px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 62ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 22px; }

/* ---------- forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-card); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); font-family: var(--font-head); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); }
.field textarea { min-height: 130px; resize: vertical; }

/* map embed */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- breadcrumbs (silo bar above footer) ---------- */
.breadcrumbs { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 16px 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "\203A"; color: var(--ink-soft); }
.breadcrumbs a { color: var(--brand); font-weight: 600; }
.breadcrumbs span[aria-current] { color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-dark); color: rgba(255, 255, 255, .82); padding: 56px 0 28px; }
.footer-heading { display: block; color: #fff; margin-bottom: 14px; font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (min-width: 992px)  { .footer-grid { grid-template-columns: 1.35fr 1.1fr 1fr 1.15fr; gap: 36px; } }
.site-footer p { color: rgba(255, 255, 255, .74); font-size: .95rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255, 255, 255, .82); font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-logo { max-height: 44px; width: auto; margin-bottom: 14px; border-radius: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 40px; padding-top: 20px;
  font-size: .87rem; color: rgba(255, 255, 255, .6);
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between;
}
.footer-bottom a { color: rgba(255, 255, 255, .7); font-size: .87rem; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom__links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- sticky mobile call button ---------- */
.mobile-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s ease;
}
.mobile-call.visible { transform: translateY(0); }
.mobile-call a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-family: var(--font-head);
  padding: 14px; border-radius: var(--radius); font-size: 1.05rem;
}
.mobile-call a:hover { background: var(--brand-hover); text-decoration: none; }
.mobile-call svg { width: 20px; height: 20px; }
@media (min-width: 992px) { .mobile-call { display: none; } }

/* phone link - stable hook for call tracking */
.wc-phone { font-weight: 700; }

/* 404 */
.error-hero { text-align: center; padding: 80px 20px; }
.error-hero .error-code { font-family: var(--font-head); font-weight: 800; font-size: clamp(4rem, 12vw, 7rem); color: var(--brand); line-height: 1; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
