/* ==========================================================================
   BMB Home Improvements LLC — site stylesheet
   ========================================================================== */

:root {
  --navy: #14283d;
  --navy-dark: #0c1826;
  --navy-mid: #1c3550;
  --amber: #c8792e;
  --amber-dark: #a8611f;
  --amber-darker: #8a4f19;
  --amber-light: #d99a44;
  --cream: #f7f4ee;
  --cream-dark: #efe9dc;
  --white: #ffffff;
  --ink: #22303c;
  --gray: #5b6570;
  --gray-light: #8a939b;
  --line: #e3ddd0;

  --font-head: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 30px -12px rgba(12, 24, 38, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(12, 24, 38, 0.2);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--gray); }
p:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--cream); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy p { color: #c7d1da; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .eyebrow, .hero-content .eyebrow { color: var(--amber-light); }
.section-alt .eyebrow { color: var(--amber-darker); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 10px;
}

.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber-dark); color: #fff; }
.btn-primary:hover { background: var(--amber-darker); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--cream); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; min-height: 44px; }

/* Top bar --------------------------------------------------------------- */
.top-bar { background: var(--navy-dark); color: #cfd8e0; font-size: 0.82rem; }
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px;
}
.top-bar-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #fff; }
.top-bar-phone svg { flex-shrink: 0; color: var(--amber-light); }
.top-bar-area { display: inline-flex; align-items: center; }
.top-bar-cta { color: var(--amber-light); font-weight: 600; }
.top-bar-cta:hover { text-decoration: underline; }

/* Header ------------------------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 500;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 20px;
}
.brand { flex-shrink: 0; }
.brand-logo { height: 104px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav ul { display: flex; gap: 26px; }
.primary-nav ul a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 2px;
}
.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; margin: 0 8px; background: var(--navy); border-radius: 2px; }

/* Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: var(--navy);
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(12,24,38,0.92) 20%, rgba(12,24,38,0.72) 48%, rgba(12,24,38,0.38) 78%);
}
.hero-inner { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 90px; }
.hero-content { max-width: 640px; }
.hero-content h1 { color: #fff; }
.hero-content p.lead { color: #dbe3ea; font-size: 1.15rem; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.hero-badges div { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; color: #eef2f5; }
.hero-badges svg { flex-shrink: 0; color: var(--amber-light); }

/* Value / trust strip --------------------------------------------------- */
.trust-strip { background: var(--cream); border-bottom: 1px solid var(--line); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item svg { color: var(--amber); flex-shrink: 0; }
.trust-item strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 0.95rem; }
.trust-item span { font-size: 0.82rem; color: var(--gray); }

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

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--cream-dark); }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-card:hover .thumb img { transform: scale(1.06); }
.service-card .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { flex: 1; }
.service-card .more { margin-top: 14px; font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--amber-dark); display: inline-flex; align-items: center; gap: 6px; }

/* Icon list ------------------------------------------------------------ */
.icon-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.icon-list li:last-child { margin-bottom: 0; }
.icon-list li > div { min-width: 0; overflow-wrap: anywhere; }
.icon-list svg { flex-shrink: 0; margin-top: 3px; color: var(--amber); }
.icon-list strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 0.98rem; }

/* Service detail (services.php) sections ------------------------------- */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; padding-top: 64px; padding-bottom: 64px; border-bottom: 1px solid var(--line); }
.service-detail.is-last { border-bottom: none; }
.service-detail.reverse .service-detail-media { order: 2; }
.service-detail.reverse .service-detail-copy { order: 1; }
.service-detail-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.service-detail-media .mini-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; align-items: start; }
.service-detail-media .mini-grid > img { align-self: center; }
.service-detail-media .mini-grid.even { grid-template-columns: 1fr 1fr; }
.service-detail-media .mini-grid .stack { display: grid; gap: 8px; }
.service-detail-media img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4/3.2; display: block; }
.service-detail-media > img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/11; }
.service-detail-copy .tag { display: inline-block; background: var(--cream-dark); color: var(--navy); font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.service-detail-copy ul { margin: 20px 0 26px; }

/* Before / after -------------------------------------------------------- */
.before-after { margin-top: 32px; }
.before-after-label { font-family: var(--font-head); font-weight: 700; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy); display: block; margin-bottom: 12px; }
.before-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.before-after-grid figure { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.before-after-grid img { width: 100%; height: auto; display: block; }
.before-after-grid figcaption { position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.before-after-grid figure.after figcaption { background: var(--amber-dark); }
/* A single finished-project photo instead of a before/after pair */
.before-after.is-single .before-after-label, .before-after.is-centered .before-after-label { text-align: center; }
/* Tall, narrow photos: keep the side-by-side pair from getting taller than a screen */
.before-after-grid.tall { max-width: 760px; margin: 0 auto; }
/* Wide panoramas: stack before over after so each photo stays large */
.before-after-grid.stacked { grid-template-columns: minmax(0, 900px); justify-content: center; }
.before-after-grid.single { grid-template-columns: minmax(0, 560px); justify-content: center; }
.before-after-grid.single.wide { grid-template-columns: minmax(0, 900px); }

/* Gallery ---------------------------------------------------------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter-btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--amber); color: var(--amber-dark); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--cream-dark); aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(to top, rgba(12,24,38,0.85), rgba(12,24,38,0));
  color: #fff; font-size: 0.82rem; font-family: var(--font-head); font-weight: 600;
  opacity: 0; transform: translateY(6px);
  transition: all 0.2s ease;
}
.gallery-item:hover .cap { opacity: 1; transform: translateY(0); }

.lightbox {
  position: fixed; inset: 0; background: rgba(9,16,26,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 84vh; border-radius: 6px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.lightbox-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #dbe3ea; font-family: var(--font-head); font-size: 0.9rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; border-radius: 50%; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.3rem;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* CTA band ------------------------------------------------------------ */
.cta-band { background: var(--navy); color: #fff; padding: 52px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #c7d1da; }
.cta-band-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Footer ------------------------------------------------------------- */
.site-footer { background: var(--navy-dark); color: #b9c3cc; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 40px;
}
.footer-logo { height: 86px; width: auto; margin-bottom: 16px; }
.footer-brand p { color: #93a0aa; font-size: 0.92rem; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: #dbe3ea; font-weight: 600; font-size: 0.88rem; }
.footer-social:hover { color: var(--amber-light); }
.footer-col h3 { color: #fff; font-size: 0.95rem; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 11px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--amber-light); }
.footer-hours { color: #93a0aa; font-size: 0.86rem; margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom p { color: #93a0aa; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; font-size: 0.8rem; flex-wrap: wrap; }

/* Forms ------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 46px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); min-width: 0; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--amber); background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 0.92rem; }
.alert-success { background: #e7f5ea; color: #1f6d33; border: 1px solid #bfe3c8; }
.alert-error { background: #fbeaea; color: #a52626; border: 1px solid #f1c3c3; }

.contact-info-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 34px; }
.contact-info-card h3 { color: #fff; }
.contact-info-card .icon-list svg { color: var(--amber-light); }
.contact-info-card .icon-list strong { color: #fff; }
.contact-info-card .icon-list span, .contact-info-card .icon-list a { color: #c7d1da; }
.map-embed { border-radius: var(--radius); overflow: hidden; margin-top: 22px; border: 1px solid rgba(255,255,255,0.15); }
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; filter: grayscale(0.15); }

/* Value cards -------------------------------------------------------- */
.value-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.value-card .ic {
  width: 46px; height: 46px; border-radius: 10px; background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center; color: var(--amber-dark); margin-bottom: 16px;
}
.value-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.value-card p { font-size: 0.92rem; }

/* About page -------------------------------------------------------- */
.about-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 54px; align-items: center; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow-sm); width: 100%; aspect-ratio: 4/3.4; object-fit: cover; }
.stat-row { display: flex; gap: 36px; margin-top: 30px; flex-wrap: wrap; }
.stat-row div strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--navy); }
.stat-row div span { font-size: 0.85rem; color: var(--gray); }

/* Misc ---------------------------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; }
.divider.container { margin: 0 auto; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Stagger the reveal of grid/list children so they cascade in rather than pop together */
.grid-3 .reveal:nth-child(2), .grid-2 .reveal:nth-child(2), .trust-grid .reveal:nth-child(2),
.gallery-grid .reveal:nth-child(2n), .icon-list .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid-3 .reveal:nth-child(3), .trust-grid .reveal:nth-child(3),
.gallery-grid .reveal:nth-child(3n+3), .icon-list .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid-3 .reveal:nth-child(4), .trust-grid .reveal:nth-child(4),
.gallery-grid .reveal:nth-child(3n+1):nth-child(n+4) { transition-delay: 0.24s; }
.grid-3 .reveal:nth-child(5), .icon-list .reveal:nth-child(4) { transition-delay: 0.32s; }
.grid-3 .reveal:nth-child(6), .icon-list .reveal:nth-child(5) { transition-delay: 0.4s; }

/* Hero entrance --------------------------------------------------------- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content .eyebrow, .hero-content h1, .hero-content p.lead, .hero-content .hero-actions, .hero-content .hero-badges {
  opacity: 0;
  animation: heroFadeUp 0.7s ease forwards;
}
.hero-content .eyebrow { animation-delay: 0.05s; }
.hero-content h1 { animation-delay: 0.15s; }
.hero-content p.lead { animation-delay: 0.3s; }
.hero-content .hero-actions { animation-delay: 0.45s; }
.hero-content .hero-badges { animation-delay: 0.6s; }

/* Primary hero CTA gets a slow, subtle attention pulse — animates only
   transform/opacity (compositor-only) via a ring pseudo-element rather than
   box-shadow, which forces a main-thread repaint on every frame. */
@keyframes ctaPulseRing {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes ctaPulseRingWide {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.05, 1.3); opacity: 0; }
}
.hero-actions .btn-primary { position: relative; }
.hero-actions .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--amber);
  opacity: 0;
  animation: ctaPulseRing 2.6s ease-out 1.4s infinite;
  pointer-events: none;
}
.hero-actions .btn-primary:hover::after { animation-play-state: paused; }

/* Sticky header gains a shadow once the page scrolls */
.site-header { transition: box-shadow 0.25s ease; }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

/* Animated nav underline ------------------------------------------------- */
.primary-nav ul a { position: relative; }
.primary-nav ul a::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -2px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.primary-nav ul a:hover::after, .primary-nav ul a.active::after { transform: scaleX(1); }
.primary-nav ul a:hover, .primary-nav ul a.active { color: var(--amber-dark); }

/* Hover lift for card-style elements ------------------------------------ */
.value-card, .trust-item, .contact-info-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trust-item:hover svg, .value-card:hover .ic svg { transform: scale(1.12); }
.trust-item svg, .value-card .ic svg { transition: transform 0.25s ease; }

/* Animated stat counters ------------------------------------------------- */
.stat-row div strong { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-content .eyebrow, .hero-content h1, .hero-content p.lead, .hero-content .hero-actions, .hero-content .hero-badges {
    animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero-actions .btn-primary::after { animation: none !important; opacity: 0 !important; }
  * { scroll-behavior: auto !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .about-hero { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail, .service-detail.reverse { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 44px; }
  .service-detail.reverse .service-detail-media, .service-detail.reverse .service-detail-copy { order: initial; }

  /* Below 900px and above the 760px mobile-nav cutoff, the full horizontal nav
     is still showing (no hamburger yet) but has less room to work with — tighten
     it so it fits without ever squishing the logo (.brand has flex-shrink: 0). */
  .brand-logo { height: 84px; }
  .primary-nav { gap: 16px; }
  .primary-nav ul { gap: 16px; }
  .primary-nav ul a { font-size: 0.88rem; }
  .nav-cta { padding: 11px 16px; font-size: 0.85rem; }
}

@media (max-width: 760px) {
  .hero-actions .btn-primary::after { animation-name: ctaPulseRingWide; }
  .top-bar-inner { padding-top: 0; padding-bottom: 0; }
  .top-bar-phone, .top-bar-cta { display: inline-flex; align-items: center; min-height: 44px; }
  .top-bar-area { display: none; }
  .brand-logo { height: 78px; }
  .service-detail-media .mini-grid,
  .service-detail-media .mini-grid.even { grid-template-columns: 1fr; }
  .primary-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); height: 100vh;
    background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 90px 28px 28px; gap: 28px; transform: translateX(100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, visibility 0s linear 0.25s;
    box-shadow: none; overflow-y: auto; visibility: hidden;
  }
  .primary-nav.open {
    transform: translateX(0); box-shadow: -18px 0 40px rgba(0,0,0,0.18); visibility: visible;
    transition: transform 0.25s ease, box-shadow 0.25s ease, visibility 0s;
  }
  .primary-nav ul { flex-direction: column; gap: 4px; }
  .primary-nav ul a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .nav-cta { width: 100%; justify-content: center; }

  .hero { min-height: 0; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; }
  .hero-media img { object-position: 75% 50%; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .field-row { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 24px; }
  .footer-bottom-inner { flex-direction: column; }
  section { padding: 52px 0; }
}

@media (max-width: 480px) {
  .form-card, .contact-info-card { padding: 22px; }
  .footer-contact a { overflow-wrap: anywhere; }
  .before-after-grid { gap: 10px; }
  .before-after-grid figcaption { top: 8px; left: 8px; padding: 4px 10px; }
  .lightbox { padding: 30px 8px; }
  .lightbox img { max-width: calc(100vw - 140px); }
  .lightbox-close, .lightbox-prev, .lightbox-next { width: 44px; height: 44px; }
  .lightbox-close { top: 10px; right: 8px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}
