/*
Theme Name: ADU Ontario
Theme URI: https://aduontario.com/
Description: Custom child theme for ADU Ontario - Accessory Dwelling Unit planning, permitting, and construction across Ontario. Editable homepage, header, and footer. Self-hosted fonts, full-bleed hero, FAQ schema.
Author: BuyerGain
Author URI: https://buyergain.com
Template: twentytwentyfive
Version: 2.4.2
Text Domain: adu-ontario
*/

@layer base, components, utilities;

@layer base {

/* ============ SELF-HOSTED VARIABLE FONTS (no external CDN) ============ */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: normal;
  font-display: swap;
  src: url('assets/fonts/bricolage-grotesque-variable.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  font-display: swap;
  src: url('assets/fonts/hanken-grotesk-variable.woff2') format('woff2-variations');
}

:root {
  /* Colors - matched to ADU Ontario logo (cobalt blue + house green) */
  --primary: #0D5DAE;           /* Cobalt Blue - from "ADU" wordmark */
  --primary-rgb: 13, 93, 174;
  --primary-dark: #0A4885;      /* Deeper blue - hover */
  --primary-light: color-mix(in srgb, var(--primary) 10%, white);
  --accent: #1F9D52;            /* House Green */
  --accent-rgb: 31, 157, 82;
  --accent-dark: #177A3E;       /* Deep Green - hover */
  --accent-text: #157038;       /* Darkened green for 4.5:1 on white */
  --gold: #E0A12A;              /* Window gold - used sparingly */
  --brand-quaternary: #13283F;  /* Deep Navy */
  --dark-bg: #13283F;           /* Deep Navy - footer + dark bands */
  --text: #1C2A36;              /* Deep Slate */
  --text-secondary: #51606B;    /* WCAG AA compliant on white */
  --light-bg: #F4F8FB;          /* Cool off-white */
  --light-bg-2: #E8F1F8;        /* Soft blue tint */
  --white: #ffffff;
  --surface: #ffffff;
  --border: rgba(13, 93, 174, 0.12);
  --border-strong: rgba(13, 93, 174, 0.22);
  --shadow: rgba(var(--primary-rgb), 0.08);
  --shadow-md: rgba(var(--primary-rgb), 0.15);

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 128px;

  /* Layout */
  --container-width: 1200px;
  --section-padding: var(--space-2xl) var(--space-md);
  --card-padding: var(--space-md) var(--space-md) var(--space-lg);
  --card-radius: 12px;
  --btn-radius: 8px;

  /* Typography - fluid via clamp() */
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  --text-hero: clamp(2.4rem, 1.9rem + 2.5vw, 3.85rem);

  /* Motion */
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);

  /* Fonts - two self-hosted grotesque sans-serifs */
  --font-heading: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Prevent horizontal scroll from hero 100vw breakout */
html { overflow-x: hidden; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-text); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.018em;
  margin: 0;
}

h1 { font-size: var(--text-hero); line-height: 1.08; font-weight: 800; }
h2 { font-size: var(--text-2xl); line-height: 1.18; margin-bottom: var(--space-lg); padding-bottom: 4px; font-weight: 800; }
h3 { font-size: var(--text-xl); line-height: 1.4; margin-bottom: var(--space-sm); font-weight: 700; }

.wp-block-heading { font-family: var(--font-heading); color: var(--primary); }

p { margin: 0 0 var(--space-sm); }

/* Anchor scroll offset so fixed header doesn't cover section tops */
[id] { scroll-margin-top: 100px; }

}  /* end @layer base */

@layer components {

/* ============ CONTAINER ============ */
.adu-ontario-container,
.wp-block-group.adu-ontario-container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
  width: 100%;
  box-sizing: border-box;
}

/* ============ HEADER ============ */
/* Fixed transparent header. The OUTER template-part wrapper carries the fixed
   positioning; the inner .site-header stays in flow INSIDE it so the wrapper
   keeps a real height. (Fixing BOTH collapsed the wrapper to 0px, which dropped
   the <header> landmark from the box tree and failed header detection.) The
   wrapper is still out of flow, so the interior .content-wrap top offset that
   clears the header is unaffected. */
.wp-block-template-part:has(> .site-header),
header.wp-block-template-part {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
}
.site-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(19, 40, 63, 0.08);
  border-bottom-color: var(--border);
}
.site-header .adu-ontario-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  transition: min-height var(--transition);
}
.site-header.scrolled .adu-ontario-container { min-height: 72px; }

.site-logo,
.site-header .site-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-logo a { display: block; line-height: 0; }
.site-logo img,
.site-header .wp-block-site-logo img {
  height: 46px !important;
  width: auto !important;
  display: block;
  transition: height var(--transition);
}
.site-header.scrolled .site-logo img,
.site-header.scrolled .wp-block-site-logo img { height: 38px !important; }

/* blockGap:0 nav fix - MANDATORY */
.site-header .wp-block-navigation {
  --wp--style--block-gap: var(--space-lg) !important;
}
.site-header .wp-block-navigation__container {
  gap: var(--space-lg) !important;
  column-gap: var(--space-lg) !important;
  row-gap: var(--space-sm) !important;
  align-items: center;
}
.site-header .wp-block-navigation-item { margin: 0 !important; }

.site-header .wp-block-navigation-item a {
  position: relative;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  padding: 8px 0;
  transition: color var(--transition);
}
.site-header .wp-block-navigation-item a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition), left var(--transition);
}
.site-header .wp-block-navigation-item a:hover {
  color: var(--primary);
  background: transparent;
}
.site-header .wp-block-navigation-item a:hover::after {
  width: 100%;
  left: 0;
}

/* Header CTA button link (inside wp:navigation) */
.site-header .wp-block-navigation-item.header-cta > a,
.site-header .header-cta > a {
  background: var(--accent-dark) !important;  /* white text on #177A3E = 5.4:1 AA (was --accent #1F9D52 = 3.5:1 FAIL) */
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--btn-radius);
  font-size: 0.92rem !important;
  transition: all var(--transition);
}
.site-header .header-cta > a::after { display: none !important; }
.site-header .header-cta > a:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

/* Submenu / dropdown */
.site-header .wp-block-navigation__submenu-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 16px 40px rgba(19, 40, 63, 0.12);
  padding: var(--space-xs) 0;
  min-width: 240px;
}
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item a {
  padding: 10px var(--space-md);
  font-size: 0.95rem;
}
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item a::after { display: none; }
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item a:hover {
  background: var(--light-bg);
  color: var(--primary);
}

/* Mobile nav (WP handles hamburger natively) */
@media (max-width: 900px) {
  .site-header .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--white);
    padding-top: 100px;
  }
  .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    flex-direction: column;
    gap: var(--space-md) !important;
    align-items: flex-start;
  }
  .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    font-size: 1.15rem;
    color: var(--text);
  }
  .site-header .wp-block-navigation__responsive-container-open { color: var(--primary); }
  .site-header .wp-block-navigation__responsive-container-close { color: var(--primary); }
}

/* ============ HERO (full-bleed, image-driven LCP) ============ */
.section-hero,
.wp-block-group.section-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background-color: var(--primary);
  overflow: hidden;
  isolation: isolate;
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;   /* favours the ADU on tight crops */
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  /* Light, single-tone scrim - keeps headline legible, lets the photo breathe */
  background:
    linear-gradient(95deg,
      rgba(19, 40, 63, 0.62) 0%,
      rgba(19, 40, 63, 0.38) 30%,
      rgba(19, 40, 63, 0.12) 55%,
      transparent 75%),
    linear-gradient(to top, rgba(19, 40, 63, 0.28), transparent 22%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding: clamp(150px, 17vh, 210px) var(--space-md) clamp(96px, 12vh, 140px);
  box-sizing: border-box;
}
.hero-content { max-width: 720px; color: var(--white); }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-bottom: var(--space-md);
}
.hero-content h1 {
  color: var(--white);
  margin: 0 0 var(--space-md);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.hero-content h1 span { color: #6FD89A; }  /* light green - legible over the photo */
.hero-lead {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  line-height: 1.6;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.hero-hours {
  margin-top: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.hero-hours svg { color: var(--accent); flex: 0 0 auto; }
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: var(--accent-dark);
  color: var(--white);
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.hero-btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-btn-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.4);
}
.hero-btn-primary:hover::after { left: 100%; }
.hero-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
}
.hero-btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Hero scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-indicator svg { display: block; margin: 8px auto 0; }
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============ SECTION WRAPPERS ============ */
section.wp-block-group,
.wp-block-group[class*="section-"] {
  padding: var(--section-padding);
  position: relative;
}
/* Full-bleed colored bands edge-to-edge; inner container re-centers content.
   Hero keeps its own breakout; CTA stays a contained rounded card. */
section.wp-block-group[class*="section-"]:not(.section-hero):not(.section-cta) {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}
.section-head { text-align: center; margin-bottom: var(--space-lg); }
.section-label,
.wp-block-group p.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-sm);
}
.section-subtitle,
.wp-block-group p.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px;
}

/* ============ INTRO BAND ============ */
.section-intro { background: var(--white); }
.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-2xl);
  align-items: center;
}
.intro-copy p { color: var(--text-secondary); font-size: var(--text-lg); line-height: 1.7; }
.intro-copy p:first-of-type { color: var(--text); }
.intro-aside {
  background: linear-gradient(160deg, var(--light-bg), var(--light-bg-2));
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: var(--space-lg);
}
.intro-aside h3 { color: var(--primary); margin-bottom: var(--space-md); font-size: 1.3rem; }
.intro-checklist { list-style: none; margin: 0; padding: 0; }
.intro-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
}
.intro-checklist li:last-child { margin-bottom: 0; }
.intro-checklist svg { color: var(--accent-text); flex: 0 0 auto; margin-top: 3px; }
@media (max-width: 880px) {
  .intro-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

/* ============ TRUST BAR ============ */
.section-trust {
  background: var(--white);
  padding: var(--space-xl) var(--space-md) !important;
  border-block: 1px solid var(--border);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  align-items: start;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.trust-icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  background: var(--light-bg);
  border-radius: 50%;
  color: var(--primary);
}
.trust-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 700;
}
.trust-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ============ SERVICES / CARD GRID ============ */
.section-services { background: var(--light-bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}
.service-card {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: calc(var(--space-lg) + 3px) var(--space-md) var(--space-lg);
  border: 1px solid var(--border);
  position: relative;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(19, 40, 63, 0.06);
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px var(--shadow-md);
  border-color: var(--border-strong);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--light-bg), var(--light-bg-2));
  border-radius: 14px;
  color: var(--primary);
  margin-bottom: var(--space-md);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
}
.service-card h3 { color: var(--primary); margin-bottom: var(--space-sm); }
.service-card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 0;
  line-height: 1.65;
}

/* Guides section - clickable guide cards reuse the service-card styling */
.section-guides { background: var(--white); }
.guide-card { text-decoration: none; display: block; }
.guide-card h3 { color: var(--primary); margin-bottom: var(--space-sm); }
.guide-card p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.guide-arrow {
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
  transition: transform var(--transition);
}
.guide-card:hover .guide-arrow { transform: translateX(4px); }

/* ============ WHY (DARK INSERT) ============ */
.section-why {
  background: linear-gradient(135deg, var(--primary) 0%, var(--brand-quaternary) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.section-why::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15), transparent 70%);
  pointer-events: none;
}
.section-why h2,
.section-why .wp-block-heading { color: var(--white) !important; }
.section-why .section-label { color: var(--accent); }
.section-why .section-subtitle { color: rgba(255, 255, 255, 0.85); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  position: relative;
}
.why-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--card-radius);
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.why-item:hover {
  transform: translateY(-5px);
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.08);
}
.why-item .why-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: rgba(var(--accent-rgb), 0.2);
  border-radius: 10px;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.why-item h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--white); }
.why-item p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}
.section-why .wp-block-buttons {
  margin-top: var(--space-2xl) !important;
  justify-content: center;
}

/* ============ PROCESS (numbered steps) ============ */
.section-process { background: var(--white); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  counter-reset: step;
  position: relative;
}
.process-step {
  position: relative;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  transition: all var(--transition);
}
.process-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px var(--shadow);
  border-color: var(--border-strong);
}
.process-step .step-num {
  counter-increment: step;
  position: absolute;
  top: -22px;
  left: var(--space-md);
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3);
}
.process-step .step-num::before { content: counter(step); }
.process-step h3 { font-size: 1.15rem; margin: 10px 0 8px; color: var(--primary); }
.process-step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ============ CITIES (SERVICE AREA) ============ */
.section-cities { background: var(--light-bg); }
.cities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-md);
  justify-content: center;
}
.industry-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.industry-tag svg { color: var(--accent-text); transition: color var(--transition); }
a.industry-tag:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
}
a.industry-tag:hover svg { color: var(--accent); }
span.industry-tag { cursor: default; }

/* ============ FAQ (native details/summary accordion) ============ */
.section-faq { background: var(--white); }
.faq-list {
  max-width: 820px;
  margin: var(--space-lg) auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(19, 40, 63, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px var(--shadow);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-chevron {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  color: var(--accent-text);
  transition: transform var(--transition);
}
.faq-item[open] summary .faq-chevron { transform: rotate(180deg); }
.faq-item .faq-answer {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}
.faq-item .faq-answer p { margin: 0; }
.faq-item summary:hover { color: var(--accent-text); }

/* ============ CTA / CONSULTATION STRIP ============ */
.section-cta {
  background: linear-gradient(135deg, var(--primary), var(--brand-quaternary));
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-2xl);   /* breathing room before the footer */
  border-radius: 16px;
}
.section-cta::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 140%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.12), transparent 60%);
  pointer-events: none;
}
.section-cta .adu-ontario-container { position: relative; }
.section-cta h2,
.section-cta .wp-block-heading {
  color: var(--white) !important;
  margin-bottom: var(--space-md);
}
.section-cta h2 span,
.section-cta .wp-block-heading em { color: var(--accent); font-style: normal; }
.section-cta p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  max-width: 660px;
  margin: 0 auto var(--space-lg);
}
.cta-hours {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-lg);
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}
.cta-hours svg { color: var(--accent); }
.section-cta .wp-block-buttons {
  margin-top: var(--space-lg) !important;
  justify-content: center;
}

/* Native wp:button with accent background from theme.json palette */
.wp-block-button__link.has-accent-background-color,
.has-accent-background-color.wp-block-button__link {
  background-color: var(--accent-dark) !important;   /* AA-compliant white text */
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.wp-block-button__link.has-accent-background-color:hover,
.has-accent-background-color.wp-block-button__link:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.4);
}

/* ============ SECTION DIVIDER ============ */
.section-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  pointer-events: none;
  overflow: hidden;
}
.section-divider svg { display: block; width: 100%; height: 80px; }

/* ============ FOOTER (native blocks: columns + lists + site-logo) ============ */
.site-footer,
footer.wp-block-template-part,
.wp-block-template-part:has(> .site-footer) {
  background: var(--dark-bg) !important;
  color: rgba(255, 255, 255, 0.78);
}
.site-footer {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: var(--space-2xl) 0 var(--space-lg) !important;
  box-sizing: border-box;
}
/* Center footer content at the site content width, with side gutters */
.site-footer > .wp-block-columns,
.site-footer > .footer-bottom {
  max-width: var(--container-width);
  margin-inline: auto !important;
  padding-inline: var(--space-md);
  box-sizing: border-box;
}
.site-footer .footer-grid {
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  align-items: flex-start;
}
@media (min-width: 782px) {
  .site-footer .footer-grid { flex-wrap: nowrap !important; }
}
.site-footer .footer-col { min-width: 0; }
.site-footer .wp-block-heading,
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-logo { margin-bottom: var(--space-md); }
.footer-logo img {
  filter: brightness(0) invert(1);
  height: auto;
}
.footer-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 var(--space-md);
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.7);
}
.footer-contact-line,
.footer-hours {
  font-size: 0.93rem;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
}
.footer-contact-line a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-contact-line a:hover { color: var(--accent); }
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li { margin-bottom: 10px; }
.footer-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--accent); }
.footer-service-area {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin: 0;
  max-width: 38ch;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  gap: 6px 20px;
}
.footer-bottom .footer-copy,
.footer-bottom .footer-legal {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom .footer-legal a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-bottom .footer-legal a:hover { color: var(--accent); }
@media (max-width: 781px) {
  .site-footer .footer-grid { gap: var(--space-lg); }
  .site-footer .footer-col { text-align: left; }
}

/* ============ SKIP LINK ============ */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: var(--space-sm);
  z-index: 10000;
  background: var(--accent);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--btn-radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-to-content:focus { left: var(--space-sm); color: var(--white); }

/* ============ 404 / PAGE / SINGLE templates ============ */
.content-wrap {
  padding: calc(var(--space-2xl) + 90px) var(--space-md) var(--space-2xl);
  max-width: 820px;
  margin: 0 auto;
}
.content-wrap .wp-block-post-title,
.content-wrap h1 { margin-bottom: var(--space-md); }
.content-wrap .wp-block-post-date {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
  display: block;
}
.error-404-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ============ CONTENT IMAGE WHITESPACE (all pages & posts) ============ */
.wp-block-post-content .wp-block-image,
.content-wrap .wp-block-image,
.wp-block-post-content > figure,
.content-wrap > figure {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.wp-block-post-content .wp-block-image:first-child,
.content-wrap .wp-block-image:first-child { margin-top: 0; }
.wp-block-post-content .wp-block-image img,
.content-wrap .wp-block-image img { border-radius: 10px; }

/* ============ POST AUTHOR BOX ============ */
.adu-author-box {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.adu-author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 2px 12px var(--shadow);
}
.adu-author-meta { min-width: 0; }
.adu-author-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  margin-bottom: 3px;
}
.adu-author-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.adu-author-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 0;
}
.adu-author-detail {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.adu-author-detail svg { color: var(--primary); flex: 0 0 auto; }
.adu-author-detail a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition); }
.adu-author-detail a:hover { color: var(--primary); }
.adu-author-bio {
  margin: 14px 0 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
@media (max-width: 540px) {
  .adu-author-box { flex-direction: column; gap: var(--space-sm); }
}

}  /* end @layer components */

@layer utilities {

/* ============ FADE-IN ON SCROLL ============ */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

/* ============ FOCUS VISIBLE ============ */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
summary:focus:not(:focus-visible) { outline: none; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in-section { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ BELOW-FOLD PERFORMANCE ============ */
.section-intro,
.section-services,
.section-why,
.section-process,
.section-cities,
.section-faq,
.section-cta {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

}  /* end @layer utilities */

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .site-footer .footer-grid { gap: var(--space-lg); }
}

@media (max-width: 600px) {
  .site-header .adu-ontario-container { min-height: 72px; }
  .site-logo img,
  .site-header .wp-block-site-logo img { height: 40px !important; }
  .section-hero { min-height: 86vh; }
  .hero-inner { padding-top: 130px; padding-bottom: var(--space-2xl); }
  .hero-cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-cta-row .hero-btn-primary,
  .hero-cta-row .hero-btn-outline { width: 100%; justify-content: center; }
  section.wp-block-group,
  .wp-block-group[class*="section-"] { padding: var(--space-xl) var(--space-md); }
  h2 { margin-bottom: var(--space-md); }
  .faq-item summary { font-size: 1.02rem; }
}

/* ===================================================================
   Fix cycle v2.4.0 (2026-07-10) - fix-site audit remediation
   Unlayered + !important so it beats TT5's unlayered global styles
   (theme.json blockGap:0 emits an unlayered `.is-layout-flow > *`
   margin reset; the parent root line-height reads ~1.4 on the live DOM).
   =================================================================== */

/* Hero image hard cap: the layered `.hero-img{position:absolute}` rule
   can be dropped by LiteSpeed UCSS, letting the 1280px image render in
   flow and overflow mobile by ~890px (verify FAIL). Pin the <picture>
   to fill the hero and cap widths so it can never overflow the viewport. */
.section-hero,
.section-hero picture,
.section-hero img { max-width: 100%; }
.section-hero picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.section-hero .hero-img { max-width: 100%; object-fit: cover; }

/* Entry-content reading rhythm - posts + interior pages ONLY. Scoped to
   .post-prose (added to page.html / single.html post-content) so the
   homepage, which shares .entry-content, is untouched. Fixes verify's
   1.4 line-height, ~114-char measure, and 0px paragraph gaps on the
   About/Contact/guide pages and posts. Title + prose share one column
   so they stay left-aligned. */
main.content-wrap > .wp-block-post-title,
main.content-wrap > .post-prose { max-width: 46rem; margin-inline: auto !important; }
/* Interior/reading H1: moderate size (not the hero clamp) so it sits in the
   reading column and short page titles stay on one line. */
main.content-wrap > .wp-block-post-title {
  font-size: clamp(2rem, 1.55rem + 1.6vw, 2.75rem) !important;
  line-height: 1.15 !important;
  margin-bottom: 1.5rem !important;
  padding-top: var(--space-lg);
}
.post-prose { font-size: 1.1875rem; line-height: 1.85; color: var(--text); }
.post-prose :is(p, .wp-block-paragraph) { margin: 0 0 1.6em !important; }
.post-prose :is(p, .wp-block-paragraph):last-child { margin-bottom: 0 !important; }
.post-prose :is(h2, h2.wp-block-heading) { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem) !important; line-height: 1.2 !important; margin: 3.25rem 0 1.25rem !important; }
.post-prose :is(h3, h3.wp-block-heading) { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.6rem) !important; line-height: 1.3 !important; margin: 2.5rem 0 1rem !important; }
.post-prose :is(h4, h4.wp-block-heading) { font-size: 1.2rem !important; margin: 2rem 0 .85rem !important; }
.post-prose :is(ul, ol, .wp-block-list) { margin: 0 0 1.75rem !important; padding-left: 1.4em; }
.post-prose li { margin-bottom: .6rem !important; line-height: 1.7; }
.post-prose :is(figure, .wp-block-image) { margin: 3rem auto !important; display: block; }
.post-prose :is(figure, .wp-block-image) img { border-radius: 10px; }
.post-prose figcaption { text-align: center; color: var(--text-secondary); font-size: .95rem; margin-top: .85rem !important; font-style: italic; }
.post-prose :is(blockquote, .wp-block-quote) { margin: 3rem 0 !important; padding: 1.5rem 2rem !important; border-left: 4px solid var(--accent) !important; background: var(--light-bg) !important; border-radius: 0 var(--card-radius) var(--card-radius) 0 !important; font-style: italic; }
.post-prose :is(table, .wp-block-table) { margin: 3rem 0 !important; width: 100%; border-collapse: collapse; }
.post-prose :is(th, td) { padding: 18px 22px !important; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.post-prose th { background: var(--light-bg); font-family: var(--font-heading); font-weight: 600; }
.post-prose :is(hr, .wp-block-separator) { margin: 3.5rem auto !important; border: 0; height: 1px; background: var(--border); max-width: 200px; }
.post-prose :is(p, li, td) a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.post-prose.is-layout-flow > * { margin-block-start: revert; margin-block-end: revert; }

/* Contact Form 7 submit: raise the touch target above the WCAG 2.2 24px
   minimum (verify measured 58x21 on mobile). Plugin output, themed here. */
input.wpcf7-submit,
.wpcf7-submit {
  min-height: 44px;
  padding: 12px 30px;
  background: var(--accent-dark);
  color: var(--white);
  border: 0;
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
input.wpcf7-submit:hover,
.wpcf7-submit:hover { background: var(--primary); }

/* ===================================================================
   Fix cycle v2.4.1 (2026-07-10) - accent CTA button contrast
   =================================================================== */
/* WP emits the preset `.has-accent-background-color{background:var(
   --wp--preset--color--accent)!important}` UNLAYERED (#1F9D52). That beats
   the equivalent override in @layer components, so the #why / #consultation
   CTAs rendered white-on-#1F9D52 = 3.5:1 (FAIL). Re-assert accent-dark here,
   unlayered and at higher specificity, so white text hits 5.4:1 AA. Also
   pin the header nav CTA the same way. */
a.wp-block-button__link.has-accent-background-color,
.wp-block-button__link.has-accent-background-color {
  background-color: var(--accent-dark) !important;
  color: var(--white) !important;
}
a.wp-block-button__link.has-accent-background-color:hover,
.wp-block-button__link.has-accent-background-color:hover {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}
.site-header .wp-block-navigation-item.header-cta > a,
.site-header .header-cta > a {
  background-color: var(--accent-dark) !important;
  color: var(--white) !important;
}

/* ===================================================================
   Fix cycle v2.4.2 (2026-07-10) - hero scroll indicator contrast
   =================================================================== */
/* The hero "Scroll" cue is an <a>; TT5's unlayered link color beat the
   layered .scroll-indicator rule, rendering it black on the hero (3.19:1).
   Re-assert the intended light color unlayered. */
.scroll-indicator,
a.scroll-indicator:link,
a.scroll-indicator:visited,
.scroll-indicator svg { color: rgba(255, 255, 255, 0.85) !important; }
