/* =====================================================================
   Mass Green Insulation — Global Stylesheet
   Modern recreation. No external dependencies (fast + secure).
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --green-900: #0f3d21;
  --green-800: #14562b;
  --green-700: #1b7a3d;
  --green-600: #22964b;
  --green-500: #2eb85c;
  --green-400: #57c878;
  --green-300: #8bd9a1;
  --green-100: #e4f5ea;
  --green-50:  #f2fbf5;

  --accent: #8bc34a;

  /* Neutrals */
  --ink-900: #0f1a13;
  --ink-700: #2b3a30;
  --ink-500: #566257;
  --ink-300: #8a968c;
  --line:    #e2e8e4;
  --bg:      #ffffff;
  --bg-soft: #f6f9f7;

  /* UI */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 19, .06), 0 1px 3px rgba(15, 26, 19, .08);
  --shadow-md: 0 6px 18px rgba(15, 26, 19, .08), 0 2px 6px rgba(15, 26, 19, .06);
  --shadow-lg: 0 20px 45px rgba(15, 26, 19, .14);

  --container: 1180px;
  --header-h: 76px;
  --header-h-top: 128px;   /* taller header while at the top of the page */
  --logo-h: 54px;
  --logo-h-top: 104px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 12px); }
body { overflow-x: clip; }
body {
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--green-700); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--green-600); }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--ink-500); }
:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--soft { background: var(--bg-soft); }
.section--green {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  color: #fff;
}
.section--green h2, .section--green h3 { color: #fff; }
.section--green p { color: rgba(255,255,255,.85); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section--green .eyebrow { color: #fff; background: rgba(255,255,255,.16); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.08rem; }

.lead { font-size: 1.15rem; color: var(--ink-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: .98rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-600); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--light { background: #fff; color: var(--green-800); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--green-800); }
.btn--ghost { background: transparent; color: var(--ink-900); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green-400); color: var(--green-700); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
/* Large header at page top; shrinks once .is-scrolled is set by main.js */
.site-header:not(.is-scrolled) { --header-h: var(--header-h-top); --logo-h: var(--logo-h-top); }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; transition: height .3s var(--ease); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; color: var(--ink-900); font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink-900); }
.brand__logo { height: var(--logo-h); width: auto; display: block; transition: height .3s var(--ease); }
/* Turn the green logo solid white for dark backgrounds (footer) */
.footer-brand .brand__logo { height: 44px; }
.brand__logo--invert { filter: brightness(0) invert(1); }
/* Legacy mark styles (kept for backward compatibility) */
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--green-600), var(--green-800));
  box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 23px; height: 23px; }
.brand small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .12em; color: var(--green-700); text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  color: var(--ink-700); font-weight: 600; font-size: .95rem;
  padding: 9px 13px; border-radius: 8px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-menu a:hover { background: var(--green-50); color: var(--green-700); }
.nav-menu a[aria-current="page"] { color: var(--green-700); background: var(--green-50); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-cta-mobile { display: none; }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > button {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink-700);
  background: none; border: 0; cursor: pointer;
  padding: 9px 13px; border-radius: 8px;
}
.has-dropdown > button:hover { background: var(--green-50); color: var(--green-700); }
.has-dropdown > button svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.has-dropdown[data-open="true"] > button svg { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px;
  min-width: 460px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.has-dropdown[data-open="true"] .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { padding: 9px 12px; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-700); }
.dropdown a:hover { background: var(--green-50); color: var(--green-700); }

/* Open the Services submenu on hover (desktop pointers only) */
@media (hover: hover) and (min-width: 993px) {
  /* invisible bridge across the gap so the menu stays open while the cursor travels to it */
  .has-dropdown::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
  .has-dropdown:hover > button,
  .has-dropdown:focus-within > button { background: var(--green-50); color: var(--green-700); }
  .has-dropdown:hover > button svg,
  .has-dropdown:focus-within > button svg { transform: rotate(180deg); }
}

/* Mobile toggle */
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--green-700); cursor: pointer; padding: 0; place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-soft); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(46,184,92,.12), transparent 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(20,86,43,.10), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center;
  padding: clamp(48px, 7vw, 88px) 0;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl { color: var(--green-700); }
.hero__lead { font-size: 1.18rem; max-width: 520px; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 22px; }
.hero__trust li { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .92rem; color: var(--ink-700); }
.hero__trust svg { width: 20px; height: 20px; color: var(--green-600); flex: none; }

/* Quote card */
.quote-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 30px;
}
.quote-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.quote-card > p { font-size: .95rem; margin-bottom: 20px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .85rem; font-weight: 700; color: var(--ink-700); margin-bottom: 6px; }
.field label .req { color: #d64545; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink-900);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #d64545; }
.field .error { display: none; color: #c23636; font-size: .8rem; font-weight: 600; margin-top: 5px; }
.field input[aria-invalid="true"] ~ .error,
.field select[aria-invalid="true"] ~ .error,
.field textarea[aria-invalid="true"] ~ .error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-size: .8rem; color: var(--ink-500); margin-top: 12px; text-align: center; }

.form-success {
  display: none;
  background: var(--green-50); border: 1.5px solid var(--green-300);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.form-success svg { width: 46px; height: 46px; color: var(--green-600); margin: 0 auto 10px; }
.form-success h3 { color: var(--green-800); margin-bottom: 4px; }
.form-success.show { display: block; }
.form-success.show + form { display: none; }
/* Anti-spam trap: hidden from people, visible to bots (see send.php). */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 4px 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fdecec; color: #a12727; font-size: .88rem; font-weight: 600; }
.form-error[hidden] { display: none; }
.field input[type="file"][aria-invalid="true"] { border-color: #d64545; }

/* ---------- Feature / cards grid ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-200, #cdeed7); }
.card__icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .95rem; }

/* Service card variant */
/* Photo tiles (home services) */
.service-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.service-tile { position: relative; aspect-ratio: 1; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; }
.service-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.service-tile::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.42); transition: background .3s var(--ease); }
.service-tile span { position: relative; z-index: 1; padding: 0 12px 22px; color: #fff; font-weight: 700; font-size: 1.08rem; line-height: 1.35; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.service-tile:hover img { transform: scale(1.06); }
.service-tile:hover::after { background: rgba(0,0,0,.25); }
.service-tile:hover span { color: #fff; }
.service-tiles__cta { text-align: center; margin-top: 34px; }
.service-tiles__cta p { max-width: 860px; margin: 0 auto 26px; font-size: 1.08rem; }
@media (max-width: 1024px) { .service-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .service-tiles { grid-template-columns: repeat(2, 1fr); } .service-tile span { font-size: .95rem; padding-bottom: 16px; } }
.service-card { display: flex; flex-direction: column; }
.service-card .tag {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--green-700);
  background: var(--green-100); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.service-card__link { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.service-card__link svg { width: 16px; height: 16px; transition: transform .16s var(--ease); }
.service-card:hover .service-card__link svg { transform: translateX(3px); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat .num { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; color: #fff; }
.stat .label { font-size: .9rem; color: rgba(255,255,255,.82); font-weight: 600; }

/* ---------- Split / media ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.media-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  background: var(--green-100); aspect-ratio: 4/3;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.check-list svg { width: 22px; height: 22px; color: var(--green-600); flex: none; margin-top: 2px; }
.check-list strong { color: var(--ink-900); display: block; }
.check-list span { font-size: .95rem; color: var(--ink-500); }

/* ---------- Reviews ---------- */
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.review-card .stars { display: flex; gap: 2px; color: #f5a623; margin-bottom: 14px; }
.review-card .stars svg { width: 19px; height: 19px; }
.review-card blockquote { font-size: 1.02rem; color: var(--ink-700); margin-bottom: 18px; }
.review-card .who { display: flex; align-items: center; gap: 12px; }
.review-card .who .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--green-600); color: #fff; display: grid; place-items: center; font-weight: 800; }
.review-card .who strong { display: block; color: var(--ink-900); font-size: .95rem; }
.review-card .who span { font-size: .82rem; color: var(--ink-500); }

/* Reviews page: summary + masonry list of Google reviews */
.reviews-summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  padding: 24px 28px; margin-bottom: 32px;
  background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius);
}
.reviews-summary__score { display: flex; align-items: center; gap: 16px; }
.reviews-summary__score strong { font-size: 3rem; line-height: 1; color: var(--ink-900); letter-spacing: -.03em; }
.reviews-summary__score .stars { display: flex; gap: 2px; color: #f5a623; margin-bottom: 4px; }
.reviews-summary__score .stars svg { width: 22px; height: 22px; }
.reviews-summary__score span { font-size: .95rem; color: var(--ink-700); font-weight: 600; }
.reviews-list { columns: 3 320px; column-gap: 22px; }
.reviews-list .review-card { break-inside: avoid; margin-bottom: 22px; }
.reviews-list.is-collapsed .review-card.is-extra { display: none; }
.reviews-more { text-align: center; margin-top: 8px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid figure {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  background: var(--green-100); box-shadow: var(--shadow-sm);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(15,26,19,.8));
  color: #fff; font-weight: 700; font-size: .9rem;
}

/* ---------- Photo hero (home + service pages) ---------- */
.hero--photo { position: relative; background-size: cover; background-position: center; }
.hero--photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(15,61,33,.92) 0%, rgba(20,86,43,.82) 45%, rgba(34,150,75,.55) 100%);
}
.hero--photo .hero__inner { position: relative; z-index: 1; }
.hero--photo h1, .hero--photo .hero__lead { color: #fff; }
.hero--photo .hero__lead { color: rgba(255,255,255,.92); }
.hero--photo .eyebrow { color: #fff; background: rgba(255,255,255,.16); }
.hero--photo .hero__trust li { color: #fff; }
.hero--photo .hero__trust svg { color: var(--green-300); }
.hero--photo .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero--photo .btn--ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; padding: clamp(46px, 7vw, 80px) 0; }
.page-hero--photo { position: relative; background-size: cover; background-position: center; }
.page-hero--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(15,61,33,.90), rgba(34,150,75,.66)); }
.page-hero--photo .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.88); font-size: 1.12rem; max-width: 620px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.9); font-weight: 600; }
.breadcrumb a:hover { color: #fff; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { max-width: 560px; margin: 0 auto 26px; font-size: 1.1rem; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card .avatar-lg {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--green-500), var(--green-800));
}
.team-card h2 { font-size: 1.1rem; margin-bottom: 2px; }
.team-card .role { color: var(--green-700); font-weight: 700; font-size: .88rem; }

/* ---------- Contact ---------- */
.contact-info li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-info .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; flex: none; }
.contact-info .ic svg { width: 22px; height: 22px; }
.contact-info strong { display: block; color: var(--ink-900); font-size: .95rem; margin-bottom: 2px; }
.contact-info a, .contact-info span { color: var(--ink-500); font-size: .95rem; }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 320px; }
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.72); padding: 64px 0 28px; }
.site-footer h2 { color: #fff; font-size: .95rem; margin-bottom: 16px; letter-spacing: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand small { color: var(--green-300); }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .92rem; max-width: 300px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul a { color: rgba(255,255,255,.72); font-size: .92rem; }
.site-footer ul a:hover { color: var(--green-300); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .92rem; }
.footer-contact svg { width: 18px; height: 18px; color: var(--green-400); flex: none; margin-top: 2px; }
.footer-contact a { color: rgba(255,255,255,.72); }
.footer-contact a:hover { color: var(--green-300); }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.social a { transition: transform .2s var(--ease), filter .2s var(--ease); }
.social a:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.1); }
/* Official brand colors */
.social a[aria-label="Facebook"] { background: #1877F2; }
.social a[aria-label="Instagram"] { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.social svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ---------- Data sheet chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: .9rem; font-weight: 600; color: var(--ink-700);
}
.chip svg { width: 16px; height: 16px; color: var(--green-600); flex: none; }
a.chip { text-decoration: none; transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
a.chip:hover { border-color: var(--green-400); color: var(--green-700); background: var(--green-50); }

/* ---------- Benefit groups (service pages) ---------- */
.benefit-group { margin-bottom: 20px; }
.benefit-group h4 { color: var(--green-700); font-size: 1rem; margin-bottom: 8px; }
.benefit-group ul li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 7px; font-size: .96rem; color: var(--ink-500); }
.benefit-group ul svg { width: 19px; height: 19px; color: var(--green-600); flex: none; margin-top: 2px; }

/* Green highlight line */
.highlight-line {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green-100); color: var(--green-800);
  font-weight: 700; padding: 12px 20px; border-radius: 12px; margin: 6px 0 18px;
}
.highlight-line svg { width: 20px; height: 20px; color: var(--green-600); flex: none; }

/* Team bio + photo */
.team-card .bio { font-size: .88rem; color: var(--ink-500); margin-top: 8px; }
.team-card { text-align: left; }
.team-card .avatar-lg { margin: 0 0 16px; }
.team-card { overflow: hidden; }
.team-card .photo {
  display: block; width: calc(100% + 52px); max-width: none; aspect-ratio: 1/1;
  object-fit: cover; object-position: top center;
  margin: -26px -26px 18px; border-radius: 0; background: var(--green-100);
}

/* Reviews section with photo background */
.section--reviews-photo { position: relative; background-size: cover; background-position: center; }
.section--reviews-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(15,26,19,.86), rgba(15,61,33,.8)); }
.section--reviews-photo .container { position: relative; z-index: 1; }
.section--reviews-photo .section-head h2, .section--reviews-photo .eyebrow { color: #fff; }
.section--reviews-photo .eyebrow { background: rgba(255,255,255,.16); }

/* Hero highlight trio on service pages */
.hero-trio { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }
.hero-trio li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.95); }
.hero-trio svg { width: 18px; height: 18px; flex: none; }

/* ---------- Scroll video (image sequence, homepage) ----------
   Headline on top, video frames in a large rounded card below.
   .scroll-video--animated (set by assets/js/scroll-video.js) makes the
   section taller and pins the stage with position: sticky while frames play. */
.scroll-video { --sv-screens: 1.2; position: relative; background: #f5f5f7; }
.scroll-video--animated { height: calc(100vh * (1 + var(--sv-screens))); }
@supports (height: 100svh) {
  .scroll-video--animated { height: calc(100svh * (1 + var(--sv-screens))); }
}
.scroll-video__stage {
  display: flex; flex-direction: column;
  height: 100vh;
  padding-top: var(--header-h);
  overflow: hidden;
}
@supports (height: 100svh) { .scroll-video__stage { height: 100svh; } }
.scroll-video--animated .scroll-video__stage { position: sticky; top: 0; }

.scroll-video__copy {
  flex: none;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(8px, 1.6vh, 16px);
  padding: clamp(14px, 3vh, 32px) 22px clamp(14px, 2.6vh, 26px);
  text-align: center;
}
.scroll-video__eyebrow {
  margin-bottom: 0;
  font-size: clamp(.8125rem, 1.4vw, .9375rem); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-700);
}
.scroll-video__title {
  max-width: 22ch; margin-inline: auto;
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.05;
  color: var(--ink-900);
}
.scroll-video__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.scroll-video__actions .btn { min-width: 200px; justify-content: center; }

.scroll-video__media {
  position: relative;
  flex: 1; min-height: 0;
  width: calc(100% - 44px); max-width: 1400px;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.scroll-video__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.scroll-video__hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.scroll-video__hint::after {
  content: ""; width: 1px; height: 28px;
  background: linear-gradient(to bottom, #fff, transparent);
  animation: sv-hint 1.8s var(--ease) infinite;
}
.scroll-video:not(.scroll-video--animated) .scroll-video__hint { display: none; }
@keyframes sv-hint {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 560px) {
  .scroll-video__actions .btn { min-width: 0; padding-inline: 18px; font-size: .9375rem; }
  .scroll-video__media { width: calc(100% - 32px); margin-bottom: 16px; }
}

/* ---------- Foam story (image sequence, homepage) ----------
   Pure white so the frames blend into the page; the canvas also fades
   its image edges into white (assets/js/scroll-sequence.js, `feather`).
   .story--animated (set by assets/js/foam-story.js) makes the section
   taller and pins the stage with position: sticky while frames play. */
.story { --story-screens: 2; position: relative; background: #fff; }
.story--animated { height: calc(100vh * (1 + var(--story-screens))); }
@supports (height: 100svh) {
  .story--animated { height: calc(100svh * (1 + var(--story-screens))); }
}
.story__stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  width: 100%; max-width: 1320px;
  margin-inline: auto;
  padding: clamp(56px, 8vw, 100px) 22px;
}
.story--animated .story__stage {
  position: sticky; top: 0;
  height: 100vh;
  padding: calc(var(--header-h) + 16px) 22px clamp(48px, 9vh, 96px);
}
@supports (height: 100svh) {
  .story--animated .story__stage { height: 100svh; }
}
.story__media { position: relative; aspect-ratio: 16 / 9; }
.story--animated .story__media { aspect-ratio: auto; height: min(72vh, 680px); }
.story__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story__title { font-size: clamp(1.75rem, 2.6vw, 2.4rem); }
.story__text { margin-top: 20px; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.5; }
.story__text--strong { color: var(--ink-900); font-weight: 500; }
.story__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 20px; }
.story__cta a:not(.btn) { font-weight: 600; }

/* Mobile: canvas on top, text below. */
@media (max-width: 833px) {
  .story__stage { grid-template-columns: 1fr; align-content: center; gap: 12px; text-align: center; }
  .story--animated .story__stage { padding-top: calc(var(--header-h) + 8px); }
  .story--animated .story__media { height: 36vh; }
  .story__title { font-size: clamp(1.625rem, 6.4vw, 2.25rem); }
  .story__text { margin-top: 12px; font-size: 1rem; }
  .story__cta { align-items: center; gap: 12px; margin-top: 12px; }
  .story .eyebrow { margin-bottom: 6px; }
}
@media (max-width: 833px) and (max-height: 760px) {
  .story--animated .story__media { height: 26vh; }
  .story__cta .btn { padding-block: 10px; }
  .story__title { font-size: 1.5rem; }
  .story__text { margin-top: 8px; font-size: .9375rem; line-height: 1.45; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hide-mobile { }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Responsive ---------- *
   Standard breakpoints:
   1024px  large tablet / small laptop  (hero stacks, 4-col -> 3-col)
    992px  nav collapses to hamburger
    768px  tablet portrait  (grids -> 2-col, split stacks)
    480px  phone  (everything single column)
   ------------------------------------------------------------------ */

/* Phones: the quote form shows right away, without the reveal fade-in. */
@media (max-width: 768px) {
  .quote-card.reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .nav-toggle { display: grid; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 18px 22px; box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .28s var(--ease); z-index: 90;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav-menu[data-open="true"] { transform: translateY(0); }
  .nav-menu > li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 14px; font-size: 1rem; }
  .has-dropdown { width: 100%; }
  .has-dropdown > button { width: 100%; justify-content: space-between; font-size: 1rem; padding: 12px 14px; }
  .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; box-shadow: none; border: 0; border-left: 2px solid var(--green-100);
    border-radius: 0; margin: 2px 0 6px 14px; padding: 2px 0;
    display: none; grid-template-columns: 1fr;
  }
  .has-dropdown[data-open="true"] .dropdown { display: grid; transform: none; }
  .nav-actions > .btn { display: none; }
  .nav-cta-mobile { display: block; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
  .nav-cta-mobile .btn { width: 100%; padding-block: 14px; }
}

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-split { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section-head { margin-bottom: 34px; }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; --header-h-top: 96px; --logo-h: 42px; --logo-h-top: 74px; }
  .footer-brand .brand__logo { height: 38px; }
  .nav-toggle { width: 42px; height: 42px; }
  body { font-size: 16px; }
  .container { padding-inline: 16px; }
  .section { padding: 46px 0; }
  .grid--2, .grid--3, .grid--4, .stats, .gallery-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .cta-band .btn-row { flex-direction: column; }
  .cta-band .btn-row .btn { width: 100%; }
  .highlight-line { width: 100%; }
  .breadcrumb { flex-wrap: wrap; }
  .team-card { text-align: center; }
}

/* Hero / section background images (moved out of inline styles for CSP) */
.bg-cellulose { background-image: url(../img/hero/cellulose-900.webp); }
.bg-fiberglass { background-image: url(../img/hero/fiberglass-900.webp); }
.bg-fireproofing { background-image: url(../img/hero/fireproofing-900.webp); }
.bg-home { background-image: url(../img/hero/home-900.webp); }
.bg-reviews-bg { background-image: url(../img/misc/reviews-bg-900.webp); }
.bg-rockwool { background-image: url(../img/hero/rockwool-900.webp); }
.bg-spray-foam { background-image: url(../img/hero/spray-foam-900.webp); }
.bg-waterproofing { background-image: url(../img/hero/waterproofing-900.webp); }
@media (min-width: 901px) {
  .bg-home { background-image: url(../img/hero/home.webp); }
  .bg-cellulose { background-image: url(../img/hero/cellulose.webp); }
  .bg-fiberglass { background-image: url(../img/hero/fiberglass.webp); }
  .bg-fireproofing { background-image: url(../img/hero/fireproofing.webp); }
  .bg-rockwool { background-image: url(../img/hero/rockwool.webp); }
  .bg-spray-foam { background-image: url(../img/hero/spray-foam.webp); }
  .bg-waterproofing { background-image: url(../img/hero/waterproofing.webp); }
  .bg-reviews-bg { background-image: url(../img/misc/reviews-bg.webp); }
}
