/* =========================================================
   TEMPE ROOFING REPAIR — DESIGN SYSTEM
   Swap the values below with your own brand tokens.
   ========================================================= */
:root {
  /* ---- Color ---- */
  --color-bg: #f7f5f1;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-ink: #101c2e;          /* deep navy — headings, dark surfaces */
  --color-ink-soft: #3d4a5c;      /* body text on light bg */
  --color-muted: #6b7789;         /* secondary text */
  --color-line: #e2ded4;          /* hairline borders */
  --color-primary: #101c2e;       /* navy */
  --color-primary-dark: #0a1220;
  --color-accent: #c1502e;        /* terracotta / roof-tile */
  --color-accent-dark: #a13e21;
  --color-accent-soft: #f4e2d8;
  --color-gold: #d9a441;          /* star ratings */
  --color-success: #3f7f5c;
  --color-on-primary: #f7f5f1;
  --color-on-accent: #ffffff;

  /* ---- Typography ---- */
  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.75rem;
  --lh-tight: 1.15;
  --lh-normal: 1.6;

  /* ---- Spacing scale ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6rem;

  /* ---- Radius ---- */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* ---- Shadow / motion ---- */
  --shadow-sm: 0 1px 3px rgba(16, 28, 46, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 28, 46, 0.12);
  --shadow-lg: 0 20px 48px rgba(16, 28, 46, 0.18);
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;

  /* ---- Layout ---- */
  --container-max: 1400px;
  --header-height: 84px;
}

/* =========================================================
   RESET
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-ink-soft);
  background: var(--color-bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: var(--lh-tight);
  margin: 0;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}

/* Focus states — WCAG AA visible focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-ink);
  color: var(--color-on-primary);
  padding: var(--space-xs) var(--space-md);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-3xl);
}

.section-alt {
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-line);
}

.section-dark {
  background: var(--color-ink);
  color: rgba(247, 245, 241, 0.82);
}

.section-dark h2,
.section-dark h3 {
  color: var(--color-on-primary);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}

.section-head h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-sm);
}

.section-head p {
  color: var(--color-muted);
  font-size: var(--fs-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.link-accent {
  color: var(--color-accent);
  font-weight: 600;
}

.lead-text {
  color: var(--color-muted);
  font-size: var(--fs-md);
  margin-block: var(--space-sm) var(--space-lg);
}

/* =========================================================
   LINK GRID (related services / other areas cross-links)
   ========================================================= */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.link-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--color-ink);
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.link-grid a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.link-grid a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.link-grid a:hover svg {
  transform: translateX(3px);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-accent:hover {
  background: var(--color-ink);
}

.hero-cta-row .btn-accent:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(247, 245, 241, 0.4);
  color: inherit;
}

.btn-outline:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-on-primary);
}

.btn-dark {
  background: var(--color-ink);
  color: var(--color-on-primary);
}

.btn-dark:hover {
  background: var(--color-accent);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: var(--fs-xs);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: var(--header-height);
  max-width: 100%;
  padding-inline: var(--space-xl);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-ink);
}

.brand-logo {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}

.brand-text-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-xs);
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-ink-soft);
  padding: var(--space-2xs) 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.main-nav a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-trigger .chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-trigger .chevron,
.nav-dropdown:focus-within .nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-panel--services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px var(--space-lg);
  width: 460px;
}

.nav-dropdown-panel--areas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px var(--space-lg);
  width: 300px;
}

.nav-dropdown-panel a {
  display: block;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-ink-soft);
  border-bottom: none;
  white-space: nowrap;
}

.nav-dropdown-panel a:hover {
  background: var(--color-bg);
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink);
}

.header-phone svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-ink);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--color-ink);
  color: rgba(247, 245, 241, 0.86);
  overflow: hidden;
  padding-block: var(--space-2xl) var(--space-3xl);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 28, 46, 0.97) 15%, rgba(16, 28, 46, 0.55) 60%), url("images/gallery/new-roof-installation-in-progress-in-tempe-az.webp") center/cover;
}

/* Smaller hero image on mobile: same crop/position, ~70% lighter file so the
   LCP element paints faster on phones (2026-08-12, PageSpeed Insights mobile
   LCP was 4.9s largely because of this background image). */
@media (max-width: 767px) {
  .hero::before {
    background-image: linear-gradient(120deg, rgba(16, 28, 46, 0.97) 15%, rgba(16, 28, 46, 0.55) 60%), url("images/gallery/new-roof-installation-in-progress-in-tempe-az-mobile.webp");
  }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-2xl);
  align-items: start;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-on-primary);
  background: rgba(247, 245, 241, 0.1);
  border: 1px solid rgba(247, 245, 241, 0.22);
  padding: var(--space-3xs) var(--space-sm);
  border-radius: var(--radius-pill);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  color: var(--color-gold);
}

.hero h1 {
  font-size: var(--fs-4xl);
  color: var(--color-on-primary);
  margin-bottom: var(--space-md);
  max-width: 15ch;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero-sub {
  font-size: var(--fs-md);
  max-width: 46ch;
  margin-bottom: var(--space-lg);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero-call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-on-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.hero-call:hover {
  color: var(--color-accent);
}

.hero-call svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  border-top: 1px solid rgba(247, 245, 241, 0.18);
  padding-top: var(--space-lg);
}

.hero-proof-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.hero-proof-item svg {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.hero-proof-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--color-on-primary);
}

.hero-proof-item span {
  font-size: var(--fs-xs);
  color: rgba(247, 245, 241, 0.65);
}

/* ---- Hero contact form card ---- */
.hero-form {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  color: var(--color-ink-soft);
}

.hero-form h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3xs);
}

.hero-form .form-note {
  font-size: var(--fs-xs);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.form-row {
  margin-bottom: var(--space-sm);
}

.form-row label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-3xs);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-ink);
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.form-disclaimer {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-ink);
  margin-top: var(--space-sm);
  text-align: center;
}

.form-disclaimer a {
  color: var(--color-ink);
}

.form-trust {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
  display: grid;
  gap: var(--space-3xs);
}

.form-trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--color-ink-soft);
}

.form-trust li::before {
  content: "\2713";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

/* =========================================================
   TRUST BAR
   ========================================================= */
.trust-bar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}

.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3xs);
  border-left: 1px solid var(--color-line);
  padding-inline: var(--space-sm);
}

.trust-item:first-child {
  border-left: none;
}

.trust-item .stars {
  display: flex;
  gap: 2px;
  color: var(--color-gold);
}

.trust-item .stars svg {
  width: 16px;
  height: 16px;
}

.trust-item strong {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  color: var(--color-ink);
}

.trust-item span {
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.trust-item small {
  font-size: 0.72rem;
  color: var(--color-muted);
  opacity: 0.8;
  line-height: 1.3;
  max-width: 15ch;
}

/* =========================================================
   SERVICES
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.services-category {
  margin-bottom: var(--space-2xl, 3rem);
}

.services-category-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.services-category-head h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-lg, 1.25rem);
  margin: 0;
}

.services-category-count {
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.service-card {
  position: relative;
  display: block;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.service-card.is-flagship {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.service-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 2;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.service-card-related {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.service-card-related a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-xl, 2.5rem);
}

.category-filter button {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.category-filter button:hover {
  border-color: var(--color-accent);
}

.category-filter button.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-card-img {
  margin: 0;
  background: var(--color-line);
}

.service-card-img img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.service-card-body {
  padding: var(--space-lg);
}

.service-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.service-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  font-size: var(--fs-md);
}

.service-card p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.services-more {
  margin-top: var(--space-xl);
  text-align: center;
}

/* =========================================================
   WHY CHOOSE US
   ========================================================= */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg) var(--space-xl);
}

.why-item {
  display: flex;
  gap: var(--space-md);
}

.why-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-icon svg {
  width: 22px;
  height: 22px;
}

.why-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-3xs);
}

.why-item p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

/* =========================================================
   CLUSTER HUB (related-cluster module on parent service pages)
   ========================================================= */
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.cluster-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.cluster-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.cluster-card-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cluster-card-icon svg {
  width: 22px;
  height: 22px;
}

.cluster-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-3xs);
}

.cluster-card p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin: 0;
}

/* =========================================================
   COMMON PROBLEMS
   ========================================================= */
.problems-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-2xl);
  align-items: start;
}

.problems-intro {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.problems-intro p {
  color: var(--color-muted);
  font-size: var(--fs-md);
  margin-block: var(--space-md) var(--space-lg);
}

.problems-img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
}

.problems-list {
  display: flex;
  flex-direction: column;
}

.problem-item {
  display: flex;
  gap: var(--space-md);
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}

.problem-item:first-child {
  padding-top: 0;
}

.problem-item:last-child {
  border-bottom: none;
}

.problem-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.problem-icon svg {
  width: 24px;
  height: 24px;
}

.problem-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-3xs);
}

.problem-item p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.problem-content {
  flex: 1;
  min-width: 0;
}

/* =========================================================
   BEFORE / AFTER GALLERY
   ========================================================= */
.ba-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(560px, 82vw);
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-sm);
}

.ba-scroller::-webkit-scrollbar {
  height: 8px;
}

.ba-scroller::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: var(--radius-pill);
}

.ba-card {
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ba-images figure {
  position: relative;
  margin: 0;
}

.ba-images img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.ba-tag {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-sm);
  color: var(--color-on-accent);
  background: rgba(16, 28, 46, 0.75);
}

.ba-tag.after {
  background: var(--color-accent);
}

.ba-caption {
  padding: var(--space-md);
}

.ba-caption h3 {
  font-size: var(--fs-sm);
  margin-bottom: var(--space-3xs);
}

.ba-caption p {
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.scroll-hint {
  font-size: var(--fs-xs);
  color: var(--color-muted);
  text-align: center;
}

/* =========================================================
   PROCESS TIMELINE
   ========================================================= */
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.process-step {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-inline: var(--space-md);
  border-left: 1px solid var(--color-line);
}

.process-step:first-child {
  border-left: none;
}

.process-step:nth-child(even) {
  flex-direction: column-reverse;
}

.process-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.process-step h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2xs);
}

.process-step p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  max-width: 24ch;
  margin-inline: auto;
}

.process-step-img {
  margin: 0;
}

.process-step:nth-child(even) .process-step-img {
  margin-bottom: var(--space-lg);
}

.process-step:nth-child(odd) .process-step-img {
  margin-top: var(--space-lg);
}

.process-step-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* =========================================================
   GALLERY
   ========================================================= */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-md);
}

.photo-gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.photo-gallery-item-large {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-base);
}

.photo-gallery-item:hover img {
  transform: scale(1.05);
}

.photo-gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-md);
  background: linear-gradient(0deg, rgba(16, 28, 46, 0.85), rgba(16, 28, 46, 0));
}

.photo-gallery-item figcaption h3 {
  font-size: var(--fs-sm);
  color: var(--color-on-primary);
  margin-bottom: 2px;
}

.photo-gallery-item figcaption span {
  font-size: var(--fs-xs);
  color: rgba(247, 245, 241, 0.75);
}

/* =========================================================
   SERVICE AREAS
   ========================================================= */
.areas-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.areas-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.area-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 500;
  color: var(--color-ink);
  padding-block: var(--space-2xs);
  border-bottom: 1px solid var(--color-line);
  text-decoration: none;
  transition: color 0.15s ease;
}

.area-chip:hover,
.area-chip:focus-visible {
  color: var(--color-accent);
}

.area-pill {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-accent-soft);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, transform 0.15s ease;
}

.area-pill:hover,
.area-pill:focus-visible {
  background: #ecd3c3;
  transform: translateY(-1px);
}

.area-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
}

.area-pill-icon svg {
  width: 16px;
  height: 16px;
}

.area-chip svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-md);
}

.map-frame iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

/* =========================================================
   CASE STUDY
   ========================================================= */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.case-study img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.case-study-body {
  padding: var(--space-2xl) var(--space-xl) var(--space-2xl) 0;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-block: var(--space-lg);
  padding-block: var(--space-md);
  border-block: 1px solid var(--color-line);
}

.case-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-accent);
}

.case-stats span {
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.case-quote {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--color-ink);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.case-attrib {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-ink);
}

.case-attrib span {
  display: block;
  font-weight: 400;
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

/* =========================================================
   REVIEWS
   ========================================================= */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.review-stars {
  display: flex;
  gap: 2px;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.review-stars svg {
  width: 16px;
  height: 16px;
}

.review-card p.quote {
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  margin-bottom: var(--space-md);
}

.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  flex-shrink: 0;
}

.review-author strong {
  display: block;
  color: var(--color-ink);
}

.review-author span {
  color: var(--color-muted);
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-2xl);
  align-items: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
}

.faq-media {
  position: relative;
  min-height: 460px;
}

.faq-img {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.faq-img-1 {
  width: 78%;
  height: 340px;
  top: 0;
  left: 0;
}

.faq-img-2 {
  width: 62%;
  height: 280px;
  bottom: 0;
  right: 0;
  border: 6px solid var(--color-bg-alt);
}

.faq-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-xs);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-md);
}

.faq-badge svg {
  width: 16px;
  height: 16px;
}

.faq-content h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-sm);
}

.faq-content > p {
  color: var(--color-ink-soft);
  font-size: var(--fs-md);
  margin-bottom: var(--space-lg);
}

.faq-list {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-list--standalone {
  max-width: 780px;
  margin-inline: auto;
}

.faq-item {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.faq-item summary .icon svg {
  width: 14px;
  height: 14px;
}

.faq-item[open] summary .icon {
  transform: rotate(180deg);
}

.faq-item p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin-top: var(--space-sm);
}

.faq-footnote {
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  margin-top: var(--space-lg);
}

.faq-footnote a {
  color: var(--color-accent);
  font-weight: 600;
}

/* =========================================================
   FINAL CTA
   ========================================================= */
.final-cta {
  position: relative;
  padding-block: var(--space-3xl);
  color: var(--color-on-primary);
  text-align: center;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 28, 46, 0.9), rgba(16, 28, 46, 0.94)), url("images/gallery/a-monsoon-dust-storm-haboob-rolling-into-a-phoenix-area-neighborhood-n.webp") center/cover;
}

.final-cta-inner {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
}

.final-cta h2 {
  font-size: var(--fs-2xl);
  color: var(--color-on-primary);
  margin-bottom: var(--space-sm);
}

.final-cta p {
  font-size: var(--fs-md);
  margin-bottom: var(--space-lg);
  opacity: 0.85;
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(247, 245, 241, 0.7);
  padding-block: var(--space-2xl) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(247, 245, 241, 0.12);
}

.footer-brand .brand {
  color: var(--color-on-primary);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: var(--fs-sm);
  max-width: 32ch;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(247, 245, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--color-on-primary);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-col address {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  font-size: var(--fs-xs);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-md);
}

/* =========================================================
   NAV ACTIVE STATE
   ========================================================= */
.main-nav a[aria-current="page"] {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* =========================================================
   PAGE HERO (interior pages)
   ========================================================= */
.page-hero {
  position: relative;
  background: var(--color-ink);
  color: rgba(247, 245, 241, 0.86);
  overflow: hidden;
  padding-block: var(--space-2xl);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 28, 46, 0.96) 25%, rgba(16, 28, 46, 0.6) 100%), var(--page-hero-img) center/cover;
}

/* Smaller page-hero image on mobile, same pattern as the homepage hero fix
   (2026-08-12): each .page-hero--X variant now also sets --page-hero-img-mobile
   alongside --page-hero-img, so this one override covers all interior pages. */
@media (max-width: 767px) {
  .page-hero::before {
    background: linear-gradient(120deg, rgba(16, 28, 46, 0.96) 25%, rgba(16, 28, 46, 0.6) 100%), var(--page-hero-img-mobile) center/cover;
  }
}

.page-hero--about {
  --page-hero-img: url("images/gallery/roofer-and-homeowner-reviewing-the-completed-roof-repair-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/roofer-and-homeowner-reviewing-the-completed-roof-repair-in-tempe-az-mobile.webp");
}

.page-hero--services {
  --page-hero-img: url("images/gallery/roofer-working-safely-at-height-on-a-residential-roof-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/roofer-working-safely-at-height-on-a-residential-roof-in-tempe-az-mobile.webp");
}

.page-hero--emergency {
  --page-hero-img: url("images/gallery/roofing-crew-truck-arriving-on-site-for-an-emergency-repair-in-tempe-a.webp");
  --page-hero-img-mobile: url("images/gallery/roofing-crew-truck-arriving-on-site-for-an-emergency-repair-in-tempe-a-mobile.webp");
}

.page-hero--leak {
  --page-hero-img: url("images/gallery/roofer-tracing-a-roof-leak-to-its-source-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/roofer-tracing-a-roof-leak-to-its-source-in-tempe-az-mobile.webp");
}

.page-hero--tile {
  --page-hero-img: url("images/gallery/roofer-installing-new-clay-tile-roofing-on-a-home-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/roofer-installing-new-clay-tile-roofing-on-a-home-in-tempe-az-mobile.webp");
}

.page-hero--inspection {
  --page-hero-img: url("images/gallery/preventive-roof-inspection-ahead-of-monsoon-season-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/preventive-roof-inspection-ahead-of-monsoon-season-in-tempe-az-mobile.webp");
}

.page-hero--coating {
  --page-hero-img: url("images/gallery/spray-polyurethane-foam-application-the-same-material-used-for-foam-ro.webp");
  --page-hero-img-mobile: url("images/gallery/spray-polyurethane-foam-application-the-same-material-used-for-foam-ro-mobile.webp");
}

.page-hero--flat {
  --page-hero-img: url("images/gallery/flat-roof-after-seam-repair-and-recoating-in-chandler-az.webp");
  --page-hero-img-mobile: url("images/gallery/flat-roof-after-seam-repair-and-recoating-in-chandler-az-mobile.webp");
}

.page-hero--foam {
  --page-hero-img: url("images/gallery/new-spray-foam-roofing-system-installed-on-a-tempe-az-building.webp");
  --page-hero-img-mobile: url("images/gallery/new-spray-foam-roofing-system-installed-on-a-tempe-az-building-mobile.webp");
}

.page-hero--commercial {
  --page-hero-img: url("images/gallery/commercial-building-rooftop-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/commercial-building-rooftop-in-tempe-az-mobile.webp");
}

.page-hero--gutter {
  --page-hero-img: url("images/gallery/repaired-rain-gutter-along-a-roofline-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/repaired-rain-gutter-along-a-roofline-in-tempe-az-mobile.webp");
}

.page-hero--storm {
  --page-hero-img: url("images/gallery/monsoon-storm-damage-assessment-on-an-arizona-roof.webp");
  --page-hero-img-mobile: url("images/gallery/monsoon-storm-damage-assessment-on-an-arizona-roof-mobile.webp");
}

.page-hero--shingle {
  --page-hero-img: url("images/gallery/new-shingle-roof-installation-in-scottsdale-az.webp");
  --page-hero-img-mobile: url("images/gallery/new-shingle-roof-installation-in-scottsdale-az-mobile.webp");
}

.page-hero--metal {
  --page-hero-img: url("images/gallery/standing-seam-metal-roof-panel-repair-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/standing-seam-metal-roof-panel-repair-in-tempe-az-mobile.webp");
}

.page-hero--replacement {
  --page-hero-img: url("images/gallery/completed-roof-replacement-on-a-home-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/completed-roof-replacement-on-a-home-in-tempe-az-mobile.webp");
}

.page-hero--areas {
  --page-hero-img: url("images/gallery/east-valley-arizona-neighborhoods-served-by-tempe-roofing-repair.webp");
  --page-hero-img-mobile: url("images/gallery/east-valley-arizona-neighborhoods-served-by-tempe-roofing-repair-mobile.webp");
}

.page-hero--areas-hub {
  --page-hero-img: url("images/gallery/residential-neighborhood-rooftops-in-the-phoenix-east-valley-part-of-t.webp");
  --page-hero-img-mobile: url("images/gallery/residential-neighborhood-rooftops-in-the-phoenix-east-valley-part-of-t-mobile.webp");
}

.page-hero--tempe-city {
  --page-hero-img: url("images/landmarks/historic-hayden-house-the-oldest-building-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/landmarks/historic-hayden-house-the-oldest-building-in-tempe-az-mobile.webp");
}

.page-hero--mesa-city {
  --page-hero-img: url("images/landmarks/historic-residential-home-in-mesa-az.webp");
  --page-hero-img-mobile: url("images/landmarks/historic-residential-home-in-mesa-az-mobile.webp");
}

.page-hero--chandler-city {
  --page-hero-img: url("images/landmarks/historic-home-in-downtown-chandler-az.webp");
  --page-hero-img-mobile: url("images/landmarks/historic-home-in-downtown-chandler-az-mobile.webp");
}

.page-hero--scottsdale-city {
  --page-hero-img: url("images/landmarks/historic-residential-home-in-scottsdale-az.webp");
  --page-hero-img-mobile: url("images/landmarks/historic-residential-home-in-scottsdale-az-mobile.webp");
}

.page-hero--phoenix-city {
  --page-hero-img: url("images/gallery/mid-century-residential-home-in-phoenix-az.webp");
  --page-hero-img-mobile: url("images/gallery/mid-century-residential-home-in-phoenix-az-mobile.webp");
}

.page-hero--gilbert-city {
  --page-hero-img: url("images/landmarks/historic-bank-of-gilbert-building-az-built-1917.webp");
  --page-hero-img-mobile: url("images/landmarks/historic-bank-of-gilbert-building-az-built-1917-mobile.webp");
}

.page-hero--ahwatukee-city {
  --page-hero-img: url("images/landmarks/south-mountain-trail-near-ahwatukee-az.webp");
  --page-hero-img-mobile: url("images/landmarks/south-mountain-trail-near-ahwatukee-az-mobile.webp");
}

.page-hero--guadalupe-city {
  --page-hero-img: url("images/landmarks/guadalupe-az-town-hall.webp");
  --page-hero-img-mobile: url("images/landmarks/guadalupe-az-town-hall-mobile.webp");
}

.page-hero--gallery {
  --page-hero-img: url("images/gallery/before-after-roof-repair-tempe-az-jpg-2.webp");
  --page-hero-img-mobile: url("images/gallery/before-after-roof-repair-tempe-az-jpg-2-mobile.webp");
}

.page-hero--blog {
  --page-hero-img: url("images/blog/roof-replacement-process-tempe.webp");
  --page-hero-img-mobile: url("images/blog/roof-replacement-process-tempe-mobile.webp");
}

.page-hero--contact {
  --page-hero-img: url("images/gallery/contractor-writing-an-itemized-roof-repair-estimate-in-tempe-az.webp");
  --page-hero-img-mobile: url("images/gallery/contractor-writing-an-itemized-roof-repair-estimate-in-tempe-az-mobile.webp");
}

.page-hero--monsoon-guide {
  --page-hero-img: url("images/gallery/a-monsoon-dust-storm-haboob-rolling-into-a-phoenix-area-neighborhood-n.webp");
  --page-hero-img-mobile: url("images/gallery/a-monsoon-dust-storm-haboob-rolling-into-a-phoenix-area-neighborhood-n-mobile.webp");
}

.page-hero-inner {
  position: relative;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-xs);
  color: rgba(247, 245, 241, 0.6);
  margin-bottom: var(--space-md);
}

.breadcrumb a {
  color: rgba(247, 245, 241, 0.8);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
}

.page-hero h1 {
  font-size: var(--fs-3xl);
  color: var(--color-on-primary);
  max-width: 20ch;
  margin-bottom: var(--space-sm);
}

.page-hero p {
  font-size: var(--fs-md);
  max-width: 56ch;
  margin-bottom: var(--space-lg);
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* =========================================================
   SPLIT BLOCK (image + text, reusable two-column)
   ========================================================= */
.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.split-block.reverse {
  direction: rtl;
}

.split-block.reverse > * {
  direction: ltr;
}

.split-block img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.split-block figure {
  margin: 0;
}

.split-block figcaption {
  margin-top: var(--space-2xs);
  font-size: var(--fs-xs);
  color: var(--color-muted);
  text-align: center;
}

.split-block .kicker {
  margin-bottom: var(--space-sm);
}

.split-block h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md);
}

.split-block p {
  color: var(--color-ink-soft);
  font-size: var(--fs-md);
  margin-bottom: var(--space-md);
}

.split-block p:last-of-type {
  margin-bottom: var(--space-lg);
}

/* =========================================================
   TIMELINE (About milestones)
   ========================================================= */
.timeline {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding-left: var(--space-2xl);
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 8px;
  width: 2px;
  background: var(--color-line);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: calc(-1 * var(--space-2xl) + 3px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-2xs);
}

.timeline-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2xs);
}

.timeline-item p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

/* =========================================================
   COMPARISON TABLE (Services: repair vs replacement)
   ========================================================= */
.comparison-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.comparison-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--color-line);
}

.comparison-table thead th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  background: var(--color-bg);
}

.comparison-table tbody th {
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table td {
  color: var(--color-muted);
}

.comparison-table .col-highlight {
  background: var(--color-accent-soft);
  color: var(--color-ink);
  font-weight: 600;
}

.comparison-table .icon-yes {
  color: var(--color-success);
}

.comparison-table .icon-no {
  color: var(--color-muted);
}

/* =========================================================
   BLOG GRID
   ========================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.blog-tag {
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-sm);
}

.blog-card p {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  flex: 1;
}

.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-accent);
}

.blog-readmore svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.blog-card:hover .blog-readmore svg {
  transform: translateX(4px);
}

/* =========================================================
   BLOG POST / ARTICLE BODY
   ========================================================= */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-2xl);
  align-items: start;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

.post-tag {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-xs);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
}

.post-hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.post-hero-img img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-body {
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--color-ink-soft);
  max-width: 68ch;
}

.post-body h2 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-size: var(--fs-xl);
  margin: var(--space-xl) 0 var(--space-sm);
  line-height: var(--lh-tight);
}

.post-body h3 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-size: var(--fs-lg);
  margin: var(--space-lg) 0 var(--space-2xs);
}

.post-body p {
  margin: 0 0 var(--space-md);
}

.post-body ul,
.post-body ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.post-body li {
  margin: 0;
}

.post-body blockquote {
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--color-ink);
}

.post-body img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

.post-body figcaption {
  font-size: var(--fs-xs);
  color: var(--color-muted);
  margin-top: -0.75rem;
  margin-bottom: var(--space-md);
}

.post-inline-cta {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.post-inline-cta p {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
}

.post-sidebar {
  position: sticky;
  top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.post-sidebar-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.post-sidebar-card h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  margin: 0 0 var(--space-xs);
  color: var(--color-ink);
}

.post-sidebar-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.post-sidebar-card a {
  color: var(--color-ink-soft);
  font-size: var(--fs-sm);
}

.post-sidebar-card a:hover {
  color: var(--color-accent);
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    position: static;
  }
}

/* =========================================================
   AREA GRID
   ========================================================= */
.area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.area-card {
  display: block;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
}

.area-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.area-card:hover img {
  transform: scale(1.06);
}

.area-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 28, 46, 0.88), rgba(16, 28, 46, 0.05));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

.area-card-overlay h3 {
  font-size: var(--fs-md);
  color: var(--color-on-primary);
  margin-bottom: 2px;
}

.area-card-overlay span {
  font-size: var(--fs-xs);
  color: rgba(247, 245, 241, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.area-card-overlay span svg {
  width: 13px;
  height: 13px;
  transition: transform var(--transition-fast);
}

.area-card:hover .area-card-overlay span svg {
  transform: translateX(3px);
}

/* =========================================================
   CONTACT LAYOUT
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.contact-form-card h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2xs);
}

.contact-form-card > p {
  color: var(--color-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-lg);
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-sidebar-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.contact-info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-icon svg {
  width: 22px;
  height: 22px;
}

.contact-info-card h3 {
  font-size: var(--fs-sm);
  margin-bottom: var(--space-3xs);
}

.contact-info-card p,
.contact-info-card a {
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

.contact-info-card a:hover {
  color: var(--color-accent);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-line);
}

.contact-map iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-form {
    max-width: 520px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-bar .container {
    grid-template-columns: repeat(3, 1fr);
    row-gap: var(--space-md);
  }

  .trust-item:nth-child(4) {
    border-left: none;
  }

  .process-rail {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-xl);
  }

  .process-step:nth-child(3) {
    border-left: none;
  }

  .photo-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .areas-layout {
    grid-template-columns: 1fr;
  }

  .problems-layout {
    grid-template-columns: 1fr;
  }

  .problems-intro {
    position: static;
  }

  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study-body {
    padding: 0 var(--space-xl) var(--space-2xl);
  }

  .case-study img {
    min-height: 260px;
  }

  .faq-panel {
    grid-template-columns: 1fr;
    padding: var(--space-xl);
  }

  .faq-media {
    min-height: 340px;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: var(--space-xl);
  }

  .split-block {
    grid-template-columns: 1fr;
  }

  .split-block.reverse {
    direction: ltr;
  }

  .split-block img {
    height: 320px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .link-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --fs-4xl: 2.5rem;
    --fs-3xl: 2.1rem;
    --fs-2xl: 1.75rem;
  }

  .site-header {
    border-bottom: 3px solid var(--color-accent);
  }

  .header-inner {
    position: relative;
    padding-inline: var(--space-md);
    gap: var(--space-sm);
  }

  .main-nav,
  .header-phone,
  .brand-text-sub {
    display: none;
  }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-xs);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .main-nav.is-open .nav-dropdown-panel {
    display: none;
  }

  .header-actions .btn-accent {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand-logo {
    height: 48px;
  }

  .services-grid,
  .why-grid,
  .reviews-grid,
  .areas-list,
  .cluster-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item:nth-child(3) {
    border-left: none;
  }

  .faq-panel {
    padding: var(--space-lg);
  }

  .faq-media {
    min-height: 260px;
  }

  .faq-img-1 {
    height: 220px;
  }

  .faq-img-2 {
    height: 170px;
  }

  .process-rail {
    grid-template-columns: 1fr;
  }

  .process-step,
  .process-step:nth-child(3) {
    border-left: none;
  }

  .photo-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .photo-gallery-item-large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .process-step:nth-child(even) {
    flex-direction: column;
  }

  .process-step:nth-child(even) .process-step-img {
    margin-bottom: 0;
    margin-top: var(--space-lg);
  }

  .ba-images {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-study-body {
    padding: 0 var(--space-md) var(--space-xl);
  }

  .final-cta-actions {
    flex-direction: column;
  }

  .final-cta-actions .btn {
    width: 100%;
  }

  .page-hero h1 {
    font-size: var(--fs-2xl);
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .area-grid {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: var(--space-xl);
  }

  .timeline-item::before {
    left: calc(-1 * var(--space-xl) + 3px);
  }

  .contact-form-card {
    padding: var(--space-lg);
  }
}

/* ============ IMAGE CREDITS PAGE (added 2026-09-11) ============ */
.image-credits {
  max-width: 80ch;
}

.image-credits .ic-list {
  list-style: none;
  padding-left: 0;
  gap: var(--space-md);
}

.image-credits .ic-list li {
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-line);
  line-height: 1.5;
}

.image-credits .ic-title {
  font-weight: 600;
  color: var(--color-ink);
}

.image-credits .ic-mod {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--fs-xs);
  color: var(--color-muted);
}

.image-credits .ic-updated {
  margin-top: var(--space-lg);
  font-size: var(--fs-xs);
  color: var(--color-muted);
}
