/*
Theme Name:   MI Roofing Child
Theme URI:    https://miroofing.com
Description:  MI Roofing custom child theme for GeneratePress — premium,
              light-themed, conversion-focused design system for a modern
              roofing contractor site.
Author:       MI Roofing Web Team
Template:     generatepress
Version:      3.0.0
Tags:         roofing, contractor, modern, light, conversion
Text Domain:  mi-roofing-child
*/

@import url('../generatepress/style.css');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

/* ==========================================================================
   0) DESIGN TOKENS — light-theme palette (v3)
   ========================================================================== */
:root {
  --color-primary: #2C4A52;
  --color-primary-light: #3E6570;
  --color-primary-lighter: #5C8792;
  --color-primary-tint: #EAF1F2;

  --color-secondary: #C1502E;
  --color-secondary-dark: #9C3E22;
  --color-secondary-light: #D97952;

  --color-accent: #A9822F;
  --color-accent-light: #C7A45C;

  --color-bg: #FBFAF7;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F3F0E9;

  --color-text: #21262B;
  --color-text-soft: #4B535A;
  --color-muted: #6E7680;
  --color-muted-light: #97A0A8;
  --color-border: #E3DFD4;
  --color-white: #FFFFFF;

  --color-success-bg: #E9F5EC;
  --color-success-text: #1E7A44;
  --color-success-border: #BFE3CB;

  /* Alpha tokens (relative to text/surface colors — replaces ad-hoc rgba(white) usage) */
  --alpha-text-strong: 1;
  --alpha-text-medium: 0.82;
  --alpha-text-soft: 0.62;
  --alpha-surface-veil: 0.55;
  --alpha-border-soft: 0.14;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Oswald', sans-serif;

  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 20px;
  --space-md: 28px;
  --space-lg: 48px;
  --space-xl: 88px;
  --space-2xl: 128px;

  --radius-xs: 4px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(33, 38, 43, 0.05);
  --shadow-sm: 0 2px 10px rgba(33, 38, 43, 0.07);
  --shadow-md: 0 8px 24px rgba(33, 38, 43, 0.09);
  --shadow-lg: 0 20px 48px rgba(33, 38, 43, 0.12);
  --shadow-xl: 0 32px 80px rgba(33, 38, 43, 0.18);
  --shadow-cta: 0 14px 34px rgba(193, 80, 46, 0.30);
  --shadow-cta-hover: 0 20px 46px rgba(193, 80, 46, 0.40);
  --shadow-glow-accent: 0 0 0 1px rgba(169, 130, 47, 0.22), 0 12px 30px rgba(169, 130, 47, 0.16);

  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-base: 320ms;
  --duration-slow: 620ms;

  --max-width: 1240px;
  --max-width-narrow: 760px;
}

/* ==========================================================================
   1) RESET, BASE, LAYOUT OVERRIDES
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-soft);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--color-primary); color: var(--color-white); }

a { color: var(--color-primary); text-decoration: none; transition: color var(--duration-fast) ease; }
a:hover { color: var(--color-secondary); }

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

/* Force full-width, no-sidebar layout for every page — this theme is
   single-column by design regardless of GeneratePress's default sidebar setting. */
.site-content .content-area,
.site-main,
#primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-content #secondary,
.widget-area,
.sidebar {
  display: none !important;
}
.site-content .inside-article { padding: 0 !important; }
.entry-content > * { max-width: none; }
body.page .site-content { padding-top: 0; padding-bottom: 0; }

/* Every page ships its own hero block with its own H1 — hide GeneratePress's
   default page-title element so it never renders a second, unstyled heading
   above the custom hero. */
body.page .page-header,
body.page .entry-header,
body.page .page-title,
body.page .entry-title,
body.page .archive-title {
  display: none !important;
}

/* ==========================================================================
   2) TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1 { font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 3.85rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--color-text); }
h2 { font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.16; letter-spacing: -0.015em; }
h3 { font-weight: 700; font-size: clamp(1.3rem, 2.1vw, 1.55rem); line-height: 1.28; }
h4 { font-weight: 700; font-size: clamp(1.08rem, 1.6vw, 1.2rem); line-height: 1.35; }

p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.05vw, 1.09rem);
  line-height: 1.75;
  color: var(--color-text-soft);
  margin: 0 0 1.3rem;
}
p:last-child { margin-bottom: 0; }

ul, ol { color: var(--color-text-soft); line-height: 1.8; }

.lede {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  color: var(--color-muted);
  line-height: 1.6;
}

/* ==========================================================================
   3) LAYOUT PRIMITIVES
   ========================================================================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-width-narrow); margin: 0 auto; padding: 0 24px; }

.section-pad { padding: clamp(56px, 8vw, 112px) 0; }
.section-pad-sm { padding: clamp(40px, 5vw, 68px) 0; }

/* "Alt light section" — was a dark section in earlier versions; the whole
   site is light-themed now, so this is a warm-tinted variant used for
   visual separation between white sections, not a dark inversion. */
.section-dark {
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-primary-tint) 100%);
  color: var(--color-text-soft);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--color-text) !important; }
.section-dark p { color: var(--color-text-soft) !important; }
.section-dark a:not(.btn-primary):not(.btn-secondary):not(.btn-white) { color: var(--color-secondary-dark); }

.section-light { background: var(--color-bg); }
.section-white { background: var(--color-surface); }

/* CTA-accent section — the one deliberately saturated section on the site,
   used sparingly for emergency/urgent messaging. Text stays white (verified
   4.6–6.3:1 against the terracotta gradient below). */
.section-red {
  background: linear-gradient(120deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  color: var(--color-white) !important;
  position: relative;
}
.section-red h1, .section-red h2, .section-red h3 { color: var(--color-white) !important; }
.section-red p { color: rgba(255,255,255,0.92) !important; }
.section-red a:not(.btn-primary):not(.btn-secondary):not(.btn-white) { color: var(--color-white) !important; text-decoration: underline; }

.section-heading { text-align: center; max-width: 680px; margin: 0 auto var(--space-lg); }
.section-heading.align-left { text-align: left; margin: 0 0 var(--space-lg); }

.section-eyebrow {
  font-family: var(--font-accent);
  color: var(--color-secondary-dark);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-eyebrow::before {
  content: '';
  width: 22px; height: 2px;
  background: var(--color-secondary);
  display: inline-block;
}
.section-red .section-eyebrow { color: var(--color-white) !important; }
.section-red .section-eyebrow::before { background: var(--color-white); }

/* ==========================================================================
   4) BUTTONS
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-white,
.wp-block-button__link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  text-decoration: none !important;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), background var(--duration-fast) ease;
  position: relative;
  isolation: isolate;
}

.btn-primary, .wp-block-button__link {
  background: linear-gradient(135deg, var(--color-secondary-light), var(--color-secondary));
  color: var(--color-white) !important;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover, .wp-block-button__link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-cta-hover);
  color: var(--color-white) !important;
}
.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--color-primary) !important;
  border: 1.5px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white) !important;
  transform: translateY(-3px);
}
.section-red .btn-secondary {
  color: var(--color-white) !important;
  border-color: rgba(255,255,255,0.65);
}
.section-red .btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
  color: var(--color-white) !important;
}

.btn-white {
  background: var(--color-surface);
  color: var(--color-primary) !important;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.btn-white:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--color-secondary-dark) !important; }

.wp-block-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   5) GLASS / FROSTED SURFACES
   ========================================================================== */
.glass-card {
  background: rgba(255,255,255,var(--alpha-surface-veil));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md);
  color: var(--color-text) !important;
}
/* The one deliberately-dark surface on the site — reserved for cards placed
   directly over photographic backgrounds, not general section use. */
.glass-card-dark {
  background: rgba(33,38,43,0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  color: var(--color-white) !important;
}
.glass-card-dark h1, .glass-card-dark h2, .glass-card-dark h3, .glass-card-dark h4,
.glass-card-dark p { color: var(--color-white) !important; }

.glass-badge {
  background: rgba(44,74,82,0.08);
  border: 1px solid rgba(44,74,82,0.22);
  border-radius: var(--radius-full);
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  color: var(--color-primary) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-red .glass-badge {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.4);
  color: var(--color-white) !important;
}

/* ==========================================================================
   6) HERO
   ========================================================================== */
/* NOTE: inner pages ship their small hero as `<section class="hero-section-sm">`
   ALONE, without the base `.hero-section` class — so this selector list
   (rather than a `.hero-section.hero-section-sm` compound) is what actually
   makes every page's hero get the full treatment, not just the homepage's. */
.hero-section,
.hero-section-sm {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(169,130,47,0.08) 0%, transparent 40%),
    linear-gradient(155deg, var(--color-surface-alt) 0%, var(--color-primary-tint) 60%, var(--color-bg) 100%);
  overflow: hidden;
  padding: var(--space-2xl) 0 var(--space-xl);
}
.hero-section-sm {
  min-height: 44vh;
  padding: var(--space-xl) 0 var(--space-lg);
}
/* Inner-page heroes have no `.container` wrapper in the markup (h1/p sit
   directly inside the section) — simulate one on each direct child so the
   text column lines up with every other section's container width. */
.hero-section-sm > h1,
.hero-section-sm > p,
.hero-section-sm > .wp-block-buttons,
.hero-section-sm > .mi-breadcrumb {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
  box-sizing: border-box;
}
/* Full-bleed hero photo — a real <img>, not a CSS background-image, so it
   keeps meaningful alt text for SEO/accessibility while still behaving like
   a background via absolute positioning + object-fit. The overlay scrim
   sits above it and below .hero-content, guaranteeing text stays legible
   regardless of the photo's own contrast (same defense-in-depth pattern
   used for the color-cascade fix). Hover states never touch these two
   elements, so nothing can regress into an overlay-hides-text bug. */
.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(251,250,247,0.88) 0%, rgba(251,250,247,0.78) 45%, rgba(251,250,247,0.92) 100%);
  pointer-events: none;
}
.hero-particle {
  position: absolute;
  width: 5px; height: 5px;
  background: rgba(169,130,47,0.45);
  border-radius: 50%;
  animation: floatParticle linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes floatParticle {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* .hero-content is an optional wrapper some future content may use; most
   current pages have no such wrapper, so `.hero-section .container` (the
   wrapper that IS actually present, per Gutenberg markup) gets the same
   position/z-index/max-width treatment directly. Both are covered so
   neither markup pattern silently loses its "sit above the bg photo" fix. */
.hero-content,
.hero-section .container,
.hero-section-sm > h1,
.hero-section-sm > p,
.hero-section-sm > .wp-block-buttons,
.hero-section-sm > .mi-breadcrumb {
  position: relative;
  z-index: 3;
}
.hero-content { max-width: 760px; }
.hero-eyebrow { margin-bottom: var(--space-sm); }

/* Real content markup styles the H1 as a bare tag (no .hero-title class),
   so target both — `.hero-title` in case future content adds it, and the
   actual `h1`/`h2` that appears inside every hero today. */
.hero-section .hero-title,
.hero-section h1,
.hero-section-sm h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-text) !important;
  margin-bottom: 1.4rem;
  max-width: 900px;
}
.hero-section-sm h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); margin-left: auto; margin-right: auto; }
.hero-section .hero-title span.accent,
.hero-section h1 span.accent,
.hero-section-sm h1 span.accent {
  background: linear-gradient(120deg, var(--color-secondary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--color-secondary) !important;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero-section .hero-title span.accent,
  .hero-section h1 span.accent,
  .hero-section-sm h1 span.accent { color: transparent !important; }
}
.hero-section .hero-subtitle,
.hero-section .container > p:first-of-type,
.hero-section-sm > p:first-of-type {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--color-text-soft) !important;
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 2.4rem;
  font-family: var(--font-body);
}
.hero-section-sm > p:first-of-type { margin-left: auto; margin-right: auto; }
.hero-section .wp-block-buttons,
.hero-section-sm .wp-block-buttons { margin-bottom: 2.2rem; }
.hero-cta-group { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 2.2rem; }
.hero-trust-row {
  margin-top: 2.6rem;
  display: flex; gap: 2.2rem; flex-wrap: wrap;
  align-items: center;
}
.hero-section .hero-trust-item {
  display: flex; align-items: center; gap: 9px;
  color: var(--color-text-soft) !important;
  font-size: 0.9rem;
  font-weight: 500;
}
.hero-trust-item svg { color: var(--color-secondary) !important; flex-shrink: 0; }
.hero-phone-huge {
  font-family: var(--font-accent);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--color-secondary-dark) !important;
  text-decoration: none !important;
  display: inline-block;
  letter-spacing: 0.5px;
  transition: color var(--duration-fast) ease;
}
.hero-phone-huge:hover { color: var(--color-secondary) !important; }
.hero-stat-float {
  position: relative;
  margin-top: -36px;
  z-index: 4;
}
.mi-breadcrumb {
  color: var(--color-muted) !important;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
  position: relative;
  z-index: 3;
}
.mi-breadcrumb a { color: var(--color-text-soft) !important; text-decoration: none; }
.mi-breadcrumb a:hover { color: var(--color-secondary) !important; }

/* ==========================================================================
   7) SERVICE / FEATURE CARDS
   ========================================================================== */
.services-grid, .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-md);
}
.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  transition: transform var(--duration-base) var(--ease-spring), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lighter));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
  transition: transform var(--duration-base) var(--ease-spring);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(44,74,82,0.24);
}
.service-card:hover .service-icon { transform: rotate(-4deg) scale(1.08); }
.service-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; color: var(--color-text); }
.service-card p { font-size: 0.96rem; margin-bottom: 1rem; flex-grow: 1; }
.service-card-link {
  color: var(--color-secondary-dark);
  font-weight: 700;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--duration-fast) ease;
  margin-top: auto;
}
.service-card-link:hover { gap: 10px; color: var(--color-secondary); }

/* ==========================================================================
   8) STATS
   ========================================================================== */
.stats-section {
  background: linear-gradient(135deg, var(--color-primary-tint) 0%, var(--color-surface-alt) 100%);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-md); }
.stat-item { text-align: center; padding: var(--space-sm); }
.stat-number {
  font-family: var(--font-accent);
  font-size: clamp(2.8rem, 5.6vw, 4.4rem);
  font-weight: 600;
  color: var(--color-primary) !important;
  line-height: 1;
  display: inline-block;
}
.stat-plus { color: var(--color-secondary) !important; }
.stat-label {
  color: var(--color-text-soft) !important;
  font-size: 0.96rem;
  margin-top: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   9) TESTIMONIALS
   ========================================================================== */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.testimonial-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
  transition: box-shadow var(--duration-base) ease, transform var(--duration-base) ease;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.testimonial-card::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 6rem;
  color: var(--color-secondary);
  opacity: 0.1;
  position: absolute;
  top: 4px; left: 20px;
  line-height: 1;
}
.testimonial-stars { color: var(--color-accent); font-size: 1.1rem; margin-bottom: 1rem; letter-spacing: 2px; }
.testimonial-card p { font-style: italic; color: var(--color-text-soft); flex-grow: 1; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 1.4rem; }
.testimonial-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex; align-items: center; justify-content: center;
  color: var(--color-white); font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-heading);
}
.testimonial-author-info { min-width: 0; overflow-wrap: break-word; }
.testimonial-name { font-weight: 700; color: var(--color-primary); font-family: var(--font-heading); font-size: 0.95rem; min-width: 0; overflow-wrap: break-word; }
.testimonial-location { font-size: 0.83rem; color: var(--color-muted); }

/* ==========================================================================
   10) CTA BANNERS
   ========================================================================== */
.cta-banner {
  background: linear-gradient(120deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 2px, transparent 2px, transparent 14px);
  opacity: 0.3;
}
/* Light "alt" banner variant — used where a CTA needs to sit calmly between
   white sections rather than shout with the terracotta treatment. */
.cta-banner-dark {
  background: linear-gradient(120deg, var(--color-primary-tint) 0%, var(--color-surface-alt) 100%);
}
.cta-banner-dark h1, .cta-banner-dark h2, .cta-banner-dark h3 { color: var(--color-text) !important; }
.cta-banner-dark p, .cta-banner-dark .lede { color: var(--color-text-soft) !important; }
.cta-banner-content { position: relative; z-index: 2; }
.cta-banner h1, .cta-banner h2, .cta-banner h3 { color: var(--color-white) !important; margin-bottom: 0.7rem; }
.cta-banner p { color: rgba(255,255,255,0.92) !important; }
.cta-banner .lede { color: rgba(255,255,255,0.88) !important; margin-bottom: 2rem; }
.cta-banner-dark.cta-banner .lede,
.cta-banner-dark.cta-banner p { color: var(--color-text-soft) !important; }

/* ==========================================================================
   11) PROCESS STEPS
   ========================================================================== */
.process-step { display: flex; gap: 26px; align-items: flex-start; margin-bottom: 2.6rem; }
.process-step:last-of-type { margin-bottom: 0; }
.step-number {
  font-family: var(--font-accent);
  font-size: 3.4rem; font-weight: 600;
  color: var(--color-secondary); opacity: 0.22;
  line-height: 1; min-width: 76px;
  transition: opacity var(--duration-base);
}
.process-step:hover .step-number { opacity: 0.5; }
.step-connector {
  width: 2px; height: 52px;
  background: linear-gradient(180deg, var(--color-secondary), transparent);
  margin-left: 37px;
}

/* ==========================================================================
   12) FAQ ACCORDION
   ========================================================================== */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 22px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 700; color: var(--color-text);
  padding-right: 16px; font-family: var(--font-heading);
  font-size: 1.02rem;
  transition: color var(--duration-fast) ease;
}
.faq-question:hover { color: var(--color-secondary-dark); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.3s ease;
  color: var(--color-muted);
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 500px; padding-top: 16px; }
.faq-icon { transition: transform var(--duration-base) var(--ease-spring); color: var(--color-secondary); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ==========================================================================
   13) IMAGES
   ========================================================================== */
.img-rounded { border-radius: var(--radius-md); }
.img-shadow { box-shadow: var(--shadow-lg); }
.img-hover-zoom { overflow: hidden; border-radius: var(--radius-md); aspect-ratio: 4 / 3; }
.img-hover-zoom img {
  transition: transform 0.7s var(--ease-out);
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.img-hover-zoom:hover img { transform: scale(1.05); }
img.lazy { opacity: 0; transition: opacity 0.6s ease; }
img.lazy.loaded { opacity: 1; }

.wp-block-image { margin: 0 0 1.5rem; }
.wp-block-image img { border-radius: var(--radius-md); }
/* Content/photo images (not service-card icons) get a consistent box so
   varying source dimensions don't drive inconsistent row heights. */
.entry-content .wp-block-image img,
.testimonials-grid .wp-block-image img,
.cta-banner .wp-block-image img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}
/* Icon-style images inside service cards stay small and untouched by the
   photo aspect-ratio rule above — these represent icons, not photography. */
.service-card .wp-block-image {
  margin: 0 0 1.4rem;
  width: 58px;
}
.service-card .wp-block-image img {
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  width: 58px;
  height: 58px;
}

/* ==========================================================================
   14) BEFORE/AFTER SLIDER
   ========================================================================== */
.before-after-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: ew-resize;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}
.before-after-container img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.before-after-container .after-image { clip-path: inset(0 0 0 50%); }
.before-after-slider {
  position: absolute;
  top: 0; left: 50%;
  width: 3px; height: 100%;
  background: var(--color-white);
  z-index: 10;
  cursor: ew-resize;
  box-shadow: 0 0 12px rgba(33,38,43,0.25);
}
.slider-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  background: var(--color-secondary);
  border-radius: 50%;
  border: 3px solid var(--color-white);
  box-shadow: 0 4px 16px rgba(33,38,43,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-white);
}

/* ==========================================================================
   15) HEADER / NAVIGATION
   ========================================================================== */
/* Explicit height, matching header_settings.header_height (70px) /
   mobile_header_height (60px) in generatepress-settings.json — a
   belt-and-suspenders guarantee so header rendering can't drift between
   pages regardless of how GeneratePress itself computes it. */
.site-header, #masthead {
  background: rgba(243,240,233,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration-base) ease;
  min-height: 70px;
  display: flex;
  align-items: center;
}
.header-scrolled { box-shadow: var(--shadow-md); }
@media (max-width: 768px) {
  .site-header, #masthead { min-height: 60px; }
}

/* Real GeneratePress markup (confirmed via parent theme source):
     #masthead > .inside-header > .site-branding-container / .site-branding
     #masthead > .inside-header > nav#site-navigation.main-navigation
       > .inside-navigation
         > button.menu-toggle (contains an svg icon + span.mobile-menu text label)
         > div.main-nav#primary-menu > ul.menu > li.menu-item > a
           > (if has children) button.dropdown-menu-toggle, ul.sub-menu
   The previous `.mobile-nav-toggle` / off-canvas `.mobile-menu` panel
   selectors below never matched anything real — `.mobile-menu` is actually
   a small text label ("Menu") inside the hamburger button, not a panel.
   Everything here targets the real classes instead. */

/* Spacing/alignment only — deliberately not setting `display`/`justify-content`
   here so GeneratePress's own header-layout system (grid or flex, chosen by
   the `header_layout_setting` Customizer option) keeps controlling branding
   vs. nav placement; we just want consistent vertical centering and gap. */
.inside-header {
  align-items: center;
  gap: var(--space-md);
}

.site-branding .site-title,
.site-branding .site-title a,
.site-branding .site-description,
.site-header .site-title,
.site-header .site-title a,
#masthead .site-title,
#masthead .site-title a {
  color: var(--color-text) !important;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.site-branding .site-title a:hover,
.site-header .site-title a:hover { color: var(--color-secondary-dark) !important; }
.site-branding .site-description { color: var(--color-muted) !important; font-size: 0.8rem; font-weight: 500; }

.main-navigation { display: flex; align-items: center; }
.inside-navigation { display: flex; align-items: center; gap: var(--space-sm); }

.main-nav ul.menu,
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav .menu-item { position: relative; }

.main-nav a, .main-navigation a,
#masthead .main-nav-container a {
  color: var(--color-text) !important;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 0.86rem; text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  transition: color var(--duration-fast) ease;
  position: relative;
}
.main-nav a:hover, .main-navigation a:hover,
#masthead .main-nav-container a:hover { color: var(--color-secondary-dark) !important; }

/* Animated underline on hover + current-page indicator (WordPress core
   classes `.current-menu-item` / `.current_page_item`, applied automatically
   to whichever nav link matches the page being viewed). */
.main-nav > ul > .menu-item > a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-out);
}
.main-nav > ul > .menu-item > a:hover::after { transform: scaleX(1); }
.main-nav > ul > .current-menu-item > a,
.main-nav > ul > .current_page_item > a {
  color: var(--color-secondary-dark) !important;
}
.main-nav > ul > .current-menu-item > a::after,
.main-nav > ul > .current_page_item > a::after {
  background: var(--color-secondary-dark);
  transform: scaleX(1);
}

/* Dropdown arrow on items with children (pure-CSS chevron, no icon-font
   dependency) + the small click/tap toggle button GP renders for touch. */
.menu-item-has-children > a::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--duration-fast) ease;
  opacity: 0.7;
}
.menu-item-has-children:hover > a::before { transform: rotate(225deg) translateY(2px); }
.dropdown-menu-toggle {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px 8px;
}

.sub-menu {
  background: var(--color-surface) !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  border-top: 3px solid var(--color-secondary);
  min-width: 230px;
  padding: 10px 0;
  list-style: none;
  margin: 0;
}
.sub-menu a {
  color: var(--color-text) !important;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 20px;
  display: block;
}
.sub-menu a::after { display: none; }
.sub-menu a:hover { color: var(--color-secondary-dark) !important; background: var(--color-bg); }
.sub-menu .menu-item-has-children > a::before { transform: rotate(-45deg); float: right; margin-top: 4px; }
.sub-menu .menu-item-has-children:hover > a::before { transform: rotate(135deg); }

.nav-phone {
  color: var(--color-secondary-dark) !important;
  font-family: var(--font-accent);
  font-size: 1.25rem; letter-spacing: 0.5px;
  text-decoration: none !important;
  font-weight: 500;
}
.nav-phone:hover { color: var(--color-secondary) !important; }

/* Mobile hamburger toggle — CSS-drawn icon (independent of whichever icon
   option is set in the GP Customizer), morphs into an X when the nav is
   open (GeneratePress's own script toggles `.toggled` on `.main-navigation`
   and shows/hides `.main-nav` — no custom JS needed on our side). */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  position: relative;
  flex-shrink: 0;
}
.menu-toggle svg { display: none; }
.menu-toggle .mobile-menu { position: static !important; height: auto !important; width: auto !important; }
.menu-toggle .mobile-menu:not(:empty) { display: none; }
.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span.gp-icon {
  content: '';
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease, top var(--duration-fast) ease;
}
.menu-toggle::before { top: 14px; }
.menu-toggle::after { top: 24px; }
.main-navigation.toggled .menu-toggle::before { top: 19px; transform: rotate(45deg); }
.main-navigation.toggled .menu-toggle::after { top: 19px; transform: rotate(-45deg); }

.main-navigation.toggled .main-nav {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  /* Anchors to #masthead (position: sticky counts as a positioned ancestor)
     so the panel drops full-width below the header instead of squeezing
     into the flex row next to the hamburger button. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}
.main-navigation.toggled .main-nav ul.menu,
.main-navigation.toggled .main-nav > ul {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: var(--space-2xs) 0;
}
.main-navigation.toggled .main-nav a {
  padding: 14px var(--space-md);
  width: 100%;
  justify-content: flex-start;
}
.main-navigation.toggled .main-nav > ul > .menu-item > a::after { display: none; }
.main-navigation.toggled .sub-menu {
  box-shadow: none;
  border-top: none;
  border-radius: 0;
  background: var(--color-bg) !important;
  padding-left: var(--space-sm);
}

/* ==========================================================================
   16) FOOTER
   ========================================================================== */
.site-footer, #colophon {
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-primary-tint) 100%);
  color: var(--color-text-soft) !important;
  border-top: 1px solid var(--color-border);
}
.footer-top { padding: var(--space-xl) 0 var(--space-lg); }
.footer-logo-area .tagline { color: var(--color-muted) !important; font-size: 0.9rem; margin-top: 0.6rem; }
.footer-heading {
  color: var(--color-secondary-dark) !important;
  font-family: var(--font-accent);
  text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.82rem; margin-bottom: 1.5rem; font-weight: 600;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: var(--color-text-soft) !important; text-decoration: none; transition: color var(--duration-fast), padding-left var(--duration-fast); font-size: 0.94rem; }
.footer-links a:hover { color: var(--color-secondary-dark) !important; padding-left: 6px; }
.footer-contact-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.footer-contact-item, .footer-contact-item * { color: var(--color-text-soft) !important; }
.footer-contact-icon { color: var(--color-secondary) !important; margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 26px 0; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 0.86rem;
  color: var(--color-muted) !important;
}
.footer-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--color-text-soft) !important;
}

/* ==========================================================================
   17) SCROLL ANIMATIONS
   ========================================================================== */
[data-animate] { opacity: 0; transform: translateY(36px); transition: none; }
[data-animate].animated {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
[data-animate="fade-left"] { transform: translateX(-36px); }
[data-animate="fade-right"] { transform: translateX(36px); }
[data-animate="fade-left"].animated,
[data-animate="fade-right"].animated { transform: translateX(0); opacity: 1; }
[data-animate="zoom"] { transform: scale(0.92); }
[data-animate="zoom"].animated { transform: scale(1); opacity: 1; }
[data-delay="100"] { transition-delay: 0.08s; }
[data-delay="200"] { transition-delay: 0.16s; }
[data-delay="300"] { transition-delay: 0.24s; }
[data-delay="400"] { transition-delay: 0.32s; }
[data-delay="500"] { transition-delay: 0.4s; }

/* ==========================================================================
   18) EMERGENCY FLOAT BUTTON
   ========================================================================== */
.emergency-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: linear-gradient(135deg, var(--color-secondary-light), var(--color-secondary-dark));
  color: var(--color-white) !important; padding: 15px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-cta);
  font-family: var(--font-heading); font-weight: 700;
  font-size: 0.86rem; letter-spacing: 0.01em;
  animation: emergencyPulse 2.2s ease-in-out infinite;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none !important;
}
.emergency-float:hover { color: var(--color-white) !important; }
@keyframes emergencyPulse {
  0%, 100% { box-shadow: var(--shadow-cta); }
  50%       { box-shadow: var(--shadow-cta-hover), 0 0 0 10px rgba(193,80,46,0.12); }
}

#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   19) FORMS
   ========================================================================== */
.mi-form-group { margin-bottom: var(--space-sm); }
.mi-form-group label { display: block; font-weight: 600; color: var(--color-primary); margin-bottom: 7px; font-family: var(--font-heading); font-size: 0.88rem; }
.mi-form-group input,
.mi-form-group select,
.mi-form-group textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.mi-form-group input:focus,
.mi-form-group select:focus,
.mi-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(44,74,82,0.12);
}
.mi-form-group.error input,
.mi-form-group.error textarea { border-color: var(--color-secondary); }
.mi-form-error {
  color: var(--color-secondary-dark);
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
  font-weight: 500;
}
.mi-form-success {
  display: flex; align-items: center; gap: 12px;
  background: var(--color-success-bg); color: var(--color-success-text) !important;
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  border: 1px solid var(--color-success-border);
  font-weight: 500;
}
.mi-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ==========================================================================
   20) MISC COMPONENTS
   ========================================================================== */
.city-pill {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 9px 20px;
  font-weight: 600;
  color: var(--color-primary) !important;
  font-size: 0.88rem;
  margin: 4px;
  transition: all var(--duration-fast) ease;
}
.city-pill:hover { border-color: var(--color-secondary); color: var(--color-secondary-dark) !important; transform: translateY(-2px); }
.section-dark .city-pill,
.section-red .city-pill {
  background: rgba(255,255,255,0.9);
  border-color: var(--color-border);
  color: var(--color-primary) !important;
}

/* ==========================================================================
   21) RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .section-pad { padding: 64px 0; }
  .hero-section { min-height: 78vh; padding: 120px 0 72px; }
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  /* Hide only the dropdown list container by default, not `.main-navigation`
     itself — the nav wrapper must stay visible so the hamburger button
     renders. It reappears via `.toggled` (GeneratePress's own script adds
     this class to `.main-navigation` on click; no custom JS needed here). */
  .main-navigation .main-nav { display: none; }
  .main-navigation.toggled .main-nav { display: block; }
  .section-pad { padding: 48px 0; }
  .hero-section { min-height: auto; padding: 100px 0 56px; }
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .hero-trust-row { gap: 1.2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .process-step { flex-direction: column; gap: 10px; }
  .step-connector { display: none; }
  .footer-top { padding: 56px 0 36px; }
  .cta-banner { padding: var(--space-lg) 0; }
  .service-card { padding: var(--space-sm); min-height: 0; }
  .testimonial-card { padding: var(--space-sm); min-height: 0; }
  .stat-item { padding: var(--space-2xs); }
}
@media (max-width: 480px) {
  .emergency-float span { display: none; }
  .emergency-float { padding: 16px; border-radius: 50%; }
  .container, .container-narrow { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
