/* ==========================================================================
   Roof Killeen — Premium Design System
   Palette: Deep Navy #0A1F33, Charcoal #26313B, Strong Amber #F97316
   Typography: Archivo (headings) + Inter (body) via Google Fonts
   ========================================================================== */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base: #FAFAF7;
  --bg-white: #FFFFFF;
  --bg-tint: #EDF1F5;
  --bg-navy: #0A1F33;
  --bg-navy-deep: #071728;

  /* Text */
  --text-heading: #0A1F33;
  --text-body: #26313B;
  --text-muted: #5A6B78;
  --text-on-dark: #F0F4F8;
  --text-on-amber: #0A1F33;

  /* Accent */
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-soft: rgba(249, 115, 22, 0.08);
  --accent-border: rgba(249, 115, 22, 0.30);

  /* Borders & Shadows */
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --shadow-card: 0 10px 30px rgba(10, 31, 51, 0.08);
  --shadow-sm: 0 1px 3px rgba(10, 31, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 31, 51, 0.10);
  --shadow-lg: 0 20px 50px rgba(10, 31, 51, 0.14);
  --shadow-header: 0 2px 8px rgba(10, 31, 51, 0.06);
  --shadow-header-scroll: 0 4px 20px rgba(10, 31, 51, 0.12);

  /* Functional */
  --success: #15803D;
  --success-bg: #F0FDF4;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Layout */
  --container: 1200px;
  --section-pad: 96px;
  --section-pad-mobile: 56px;
  --side-pad: 24px;

  /* Typography */
  --font-heading: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--text-body);
  background-color: var(--bg-base);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile bottom bar spacing: strictly mobile <= 768px */
@media (max-width: 768px) {
  body {
    padding-bottom: 74px;
  }
}
@media (min-width: 769px) {
  body {
    padding-bottom: 0 !important;
  }
}

/* ── Accessibility ─────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--side-pad);
  background: var(--accent);
  color: var(--text-on-amber);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-heading);
}
.skip-link:focus {
  top: 12px;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.1rem);
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

p {
  margin-bottom: 1.15rem;
  max-width: 68ch;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-hover);
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.4rem;
}
li {
  margin-bottom: 0.5rem;
}

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-header);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-header-scroll);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-navy);
  border: 1px solid var(--border-dark);
  color: #FFFFFF;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 40px;
  min-width: 44px;
  transition: background 0.2s ease;
}
.nav-toggle:hover {
  background: var(--accent);
}

.main-nav {
  position: relative;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.nav-item {
  position: relative;
}

.nav-link, .dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-heading);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  min-height: 44px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover, .dropdown-trigger:hover {
  background: var(--bg-tint);
  color: var(--accent);
}

.dropdown-menu {
  display: none;
  list-style: none;
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: var(--bg-tint);
  border-radius: var(--radius-sm);
}
.nav-item.open > .dropdown-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
}
.dropdown-menu a {
  display: block;
  padding: 0.45rem 0.65rem;
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-menu a:hover {
  background: var(--bg-white);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.header-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-heading);
  border: 2px solid var(--text-heading);
  border-radius: var(--radius-md);
  text-decoration: none;
  min-height: 42px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.header-phone-btn:hover {
  background: var(--bg-navy);
  color: #FFFFFF;
}

/* Mobile Header Layout (<= 768px): Logo + Call button + Hamburger icon */
@media (max-width: 768px) {
  .header-inner {
    min-height: 56px;
    gap: 0.35rem;
    flex-wrap: nowrap !important;
  }
  .brand-logo {
    order: 1;
    max-width: 125px;
    flex-shrink: 0;
  }
  .brand-logo img {
    height: 26px;
    max-width: 100%;
    width: auto;
  }
  .header-actions {
    display: flex !important;
    order: 2;
    margin-left: auto;
    gap: 0.3rem;
    flex-shrink: 0;
  }
  .header-actions .btn-primary {
    display: none !important; /* Hide Free Inspection button in mobile header; bottom bar handles it */
  }
  .header-phone-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    font-size: 0 !important;
    min-height: 36px;
    border: 1.5px solid var(--accent);
    color: var(--text-heading);
    background: #FFFFFF;
    white-space: nowrap;
    border-radius: var(--radius-sm);
  }
  .header-phone-btn::before {
    content: "📞 Call";
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-heading);
  }
  .header-phone-btn:hover {
    background: var(--accent);
  }
  .header-phone-btn:hover::before {
    color: #FFFFFF;
  }
  .nav-toggle {
    display: inline-flex !important;
    order: 3;
    min-height: 34px;
    min-width: 38px;
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 0.2rem;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    padding: 1.25rem 1.5rem;
    max-height: 82vh;
    overflow-y: auto;
    z-index: 1050;
  }
  .main-nav.is-open {
    display: block !important;
  }
  .nav-list {
    flex-direction: column;
    gap: 0.35rem;
  }
  .nav-link, .dropdown-trigger {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.75rem 0.85rem;
    color: var(--text-heading);
    background: var(--bg-tint);
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: space-between;
  }
  .dropdown-menu {
    display: none;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin: 0.25rem 0 0.5rem;
  }
  .nav-item.open > .dropdown-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .dropdown-menu a {
    padding: 0.6rem 0.75rem;
    font-size: 0.92rem;
    border-radius: 6px;
  }
}

/* Desktop Header Layout (min-width: 769px) — unchanged desktop nav */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
  .main-nav {
    display: block !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }
  .nav-link, .dropdown-trigger {
    width: auto;
    padding: 0.5rem 0.8rem;
    gap: 0.3rem;
  }
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 520px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    border-radius: var(--radius-md);
    z-index: 1100;
  }
  .dropdown-menu.cities-menu {
    min-width: 320px;
  }
  .nav-item:hover > .dropdown-menu,
  .nav-item:focus-within > .dropdown-menu,
  .nav-item.open > .dropdown-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem 0.6rem;
  }
  .header-actions {
    display: flex !important;
  }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 48px;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn-primary {
  background-color: var(--accent);
  color: var(--text-on-amber);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--text-on-amber);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--bg-navy);
  border-color: var(--bg-navy);
}
.btn-secondary:hover {
  background-color: var(--bg-navy);
  color: #FFFFFF;
}

.btn-outline-light {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline-light:hover {
  background-color: #FFFFFF;
  color: var(--bg-navy);
}

.btn-white {
  background: #FFFFFF;
  color: var(--bg-navy);
  border-color: #FFFFFF;
}
.btn-white:hover {
  background: var(--bg-tint);
  border-color: var(--bg-tint);
}

/* ── Breadcrumbs ───────────────────────────────────────────── */
.breadcrumbs {
  background: var(--bg-tint);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  font-size: 0.85rem;
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.breadcrumbs li {
  margin: 0;
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Hero Section (photo-based) ────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: #FFFFFF;
  background-color: var(--bg-navy);
}

/* Plain hero for pages without a photo (Contact, Privacy, Terms, Disclaimer) */
.hero--plain {
  background: linear-gradient(135deg, #0A1F33 0%, #0E2A44 100%);
  min-height: 0;
}
.hero.hero--plain {
  background: linear-gradient(135deg, #0A1F33 0%, #0E2A44 100%) !important;
  min-height: 0 !important;
  padding: 3.25rem 0;
  display: block;
}
.hero--plain .container {
  max-width: var(--container);
}
.hero--plain .hero-content {
  padding: 0;
  max-width: 800px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg img {
    animation: kenBurns 14s ease-in-out infinite alternate;
  }
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 31, 51, 0.82) 0%,
    rgba(10, 31, 51, 0.62) 50%,
    rgba(10, 31, 51, 0.72) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--section-pad-mobile) 0;
  max-width: 700px;
}
@media (min-width: 768px) {
  .hero-content {
    padding: var(--section-pad) 0;
  }
}

.hero .eyebrow {
  color: var(--accent);
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.35);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.hero h1 {
  color: #FFFFFF;
}

.hero-lead {
  font-size: 1.15rem;
  color: #D1D9E0;
  margin-bottom: 1.8rem;
  max-width: 60ch;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0;
}

/* ── Trust Strip ───────────────────────────────────────────── */
.trust-strip {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}
.trust-strip-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-heading);
  white-space: nowrap;
}
.trust-strip-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: var(--section-pad-mobile) 0;
}
@media (min-width: 768px) {
  .section {
    padding: var(--section-pad) 0;
  }
}

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

.section-tint {
  background: var(--bg-tint);
}

.section-navy {
  background: var(--bg-navy);
  color: var(--text-on-dark);
}
.section-navy h2, .section-navy h3, .section-navy h4 {
  color: #FFFFFF;
}
.section-navy p, .section-navy li {
  color: #CBD5E1;
}
.section-navy .eyebrow {
  color: var(--accent);
}

.section-header {
  max-width: 760px;
  margin-bottom: 2.5rem;
}
.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.card h3 a {
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.2s ease;
}
.card h3 a:hover {
  color: var(--accent);
}

.card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.5rem;
  transition: gap 0.2s ease;
}
.card-link:hover {
  gap: 0.55rem;
  text-decoration: underline;
}

/* Card image frame */
.card-img {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  margin: -1.75rem -1.75rem 1.25rem -1.75rem;
  aspect-ratio: 16 / 10;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover .card-img img {
    transform: scale(1.04);
  }
}

/* ── Split Layout ──────────────────────────────────────────── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 992px) {
  .split-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ── Prose / Content ───────────────────────────────────────── */
.prose {
  max-width: 68ch;
}
.prose h2 {
  margin-top: 2.2rem;
  padding-top: 0.5rem;
}
.prose h3 {
  margin-top: 1.6rem;
}

.answer-box {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
}
.answer-box strong {
  color: var(--text-heading);
}

/* Blog prose */
.blog-prose {
  max-width: 70ch;
  margin: 0 auto;
}
.blog-prose h2 {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
.blog-prose h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}
.blog-prose p {
  line-height: 1.8;
}
.blog-prose img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-white);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}
table.data-table th {
  background: var(--bg-navy);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.9rem 1rem;
}
table.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table tr:nth-child(even) td {
  background: var(--bg-tint);
}

/* ── Process Steps ─────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}
.step-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-amber);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ── Project Photos Grid ───────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: var(--shadow-card);
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .project-card:hover img {
    transform: scale(1.04);
  }
}
.project-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(10,31,51,0.85), transparent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-white);
  color: var(--text-body);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.form-card h2, .form-card h3 {
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}
.form-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 540px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}
.form-control {
  width: 100%;
  padding: 0.72rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-heading);
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 46px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.form-control:focus {
  background: var(--bg-white);
  border-color: var(--accent);
}
textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

#thank-you,
.form-thankyou {
  display: none;
  background: #F0FDF4 !important;
  border: 2px solid #15803D !important;
  color: #14532D !important;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  text-align: center;
  scroll-margin-top: 100px;
  scroll-margin-bottom: 120px;
}
.form-thankyou h3,
#thank-you h3 {
  color: #14532D !important;
  font-weight: 800;
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 0.6rem;
}
.form-thankyou p,
#thank-you p {
  color: #166534 !important;
  font-size: 0.98rem;
  line-height: 1.55;
}
.form-thankyou a,
#thank-you a {
  color: #15803D !important;
  font-weight: 800;
  text-decoration: underline;
}
#thank-you:target,
.form-thankyou.active,
.form-thankyou[data-active="true"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.form-card:has(#thank-you:target) .inspection-form,
.form-card:has(.form-thankyou.active) .inspection-form {
  display: none !important;
}
.form-card:has(#thank-you:target) > h3:first-child,
.form-card:has(#thank-you:target) > .form-sub,
.form-card:has(.form-thankyou.active) > h3:first-child,
.form-card:has(.form-thankyou.active) > .form-sub {
  display: none !important;
}

/* ── Form Validation & Feedback ────────────────────────────── */
.form-error-banner {
  background: #FEF2F2;
  border: 2px solid #EF4444;
  color: #991B1B;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}
.form-error-banner strong {
  display: block;
  font-weight: 700;
  color: #B91C1C;
}
.form-error-banner ul {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}
.form-error-banner li {
  margin-top: 0.2rem;
}
.form-control.has-error {
  border-color: #EF4444 !important;
  background-color: #FFF5F5 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

/* ── FAQ Accordion ─────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 880px;
}
details.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
details.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  min-height: 48px;
  transition: background 0.15s ease;
}
details.faq-item summary:hover {
  background: var(--bg-tint);
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.25s ease;
}
details.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}
.faq-body {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-body);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
/* Smooth FAQ height animation via max-height */
details.faq-item .faq-body {
  overflow: hidden;
}

/* ── Neighborhood Pills ────────────────────────────────────── */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}
.pill-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-heading);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0;
}

/* ── CTA Band (navy) ──────────────────────────────────────── */
.cta-band {
  background: var(--bg-navy);
  padding: var(--section-pad-mobile) 0;
  text-align: center;
  color: #FFFFFF;
}
@media (min-width: 768px) {
  .cta-band {
    padding: 64px 0;
  }
}
.cta-band h2 {
  color: #FFFFFF;
}
.cta-band p {
  color: #CBD5E1;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.cta-band .btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-navy);
  color: #CBD5E1;
  padding: 4.5rem 0 2.5rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }
}
.site-footer h3, .site-footer h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.footer-brand-blurb {
  font-size: 0.9rem;
  color: #94A3B8;
  margin-bottom: 1.25rem;
  max-width: 32ch;
}
.footer-contact-line {
  margin-bottom: 0.4rem;
}
.footer-contact-line strong {
  color: #E2E8F0;
}
.footer-contact-line a {
  text-decoration: none;
}
.footer-location {
  font-size: 0.85rem;
  color: #94A3B8;
  margin-top: 1rem;
  font-style: italic;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.4rem;
}
.footer-links a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: #94A3B8;
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-legal-links a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-legal-links a:hover {
  color: #FFFFFF;
}

/* ── Mobile Sticky Bottom Bar (Mobile ONLY <= 768px) ──────── */
.mobile-sticky-bar {
  display: none;
}
@media (max-width: 768px) {
  .mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-navy);
    border-top: 2px solid var(--accent);
    padding: 0.5rem 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  }
  .mobile-sticky-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 46px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
  }
  .mobile-btn-call {
    background: #FFFFFF;
    color: var(--bg-navy);
  }
  .mobile-btn-inspect {
    background: var(--accent);
    color: var(--text-on-amber);
  }
  /* Ensure form submit button & thank-you are never overlapped by mobile sticky bar */
  body {
    padding-bottom: 95px !important;
  }
  .form-card,
  #bottom-inspection-form {
    margin-bottom: 3rem !important;
    scroll-margin-bottom: 130px !important;
    padding-bottom: 2rem !important;
  }
  .inspection-form button[type="submit"] {
    scroll-margin-bottom: 140px !important;
    margin-bottom: 1rem !important;
  }
  .form-thankyou {
    scroll-margin-bottom: 130px !important;
    margin-bottom: 1.5rem !important;
  }
}

@media (min-width: 769px) {
  .mobile-sticky-bar {
    display: none !important;
  }
}

/* ── Scroll Reveal Animation ───────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  /* Staggered children */
  .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
  .reveal-stagger > .reveal:nth-child(2) { transition-delay: 70ms; }
  .reveal-stagger > .reveal:nth-child(3) { transition-delay: 140ms; }
  .reveal-stagger > .reveal:nth-child(4) { transition-delay: 210ms; }
  .reveal-stagger > .reveal:nth-child(5) { transition-delay: 280ms; }
  .reveal-stagger > .reveal:nth-child(6) { transition-delay: 350ms; }
  .reveal-stagger > .reveal:nth-child(7) { transition-delay: 420ms; }
  .reveal-stagger > .reveal:nth-child(8) { transition-delay: 490ms; }
  .reveal-stagger > .reveal:nth-child(9) { transition-delay: 560ms; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-amber { color: var(--accent); }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Prevent wrapping in header */
.nav-link, .dropdown-trigger, .header-actions .btn, .brand-logo, .header-phone-btn {
  white-space: nowrap;
}

/* ── Image utility ─────────────────────────────────────────── */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Service-area block ────────────────────────────────────── */
.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.areas-list li {
  margin: 0;
}
.areas-list a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.areas-list a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --side-pad: 16px;
  }
  h1 {
    font-size: clamp(2rem, 6vw, 2.6rem);
  }
  .card-grid, .card-grid-3, .card-grid-4, .project-grid, .steps-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-group {
    flex-direction: column;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
}
