/* Pete's Plumbing — main stylesheet (Phase 4a Design System)
   No brand colors/fonts were provided in intake, so this palette and
   typography were derived independently. System font stack used
   deliberately (no webfont network requests, no render-blocking, no
   font-display juggling needed). Replace --color-* variables once the
   client provides real brand colors.
   Modernization pass: spacing/depth/typography-pairing/full-bleed-section
   baseline applied per the updated Phase 4a quality bar — see
   pipeline/phase-04a-design-system.md Task 1. */

:root {
  /* Color palette */
  --color-primary: #14497D;       /* deep trust blue — header, buttons, links */
  --color-primary-dark: #0D3459;
  --color-accent: #B3410C;        /* rust/burnt orange — secondary CTA, highlights */
  --color-accent-dark: #8C3309;
  --color-text: #1F2937;          /* near-black slate body text */
  --color-text-muted: #4B5563;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F7FA;        /* light section stripe */
  --color-border: #E2E8F0;
  --color-success: #2E7D32;

  /* Typography */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-base: 1rem;
  --fs-sm: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-h1: clamp(2.25rem, 4.5vw, 3.25rem);
  --fs-h2: clamp(1.625rem, 3.2vw, 2.125rem);
  --fs-h3: 1.375rem;
  --fs-h4: 1.125rem;
  --measure: 68ch;

  /* Layout */
  --container-max: 1280px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(3.5rem, 6vw, 5.5rem);
  --radius: 10px;
  --radius-lg: 14px;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(13, 52, 89, 0.06), 0 1px 3px rgba(13, 52, 89, 0.08);
  --shadow-md: 0 4px 12px rgba(13, 52, 89, 0.08), 0 2px 4px rgba(13, 52, 89, 0.06);
  --shadow-lg: 0 12px 28px rgba(13, 52, 89, 0.12), 0 4px 8px rgba(13, 52, 89, 0.06);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: underline; }
a:hover { text-decoration: none; }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-primary-dark);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); font-weight: 700; }
p { margin: 0 0 var(--space-2); max-width: var(--measure); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Header / Nav */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2) clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.site-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
  text-decoration: none;
}
ul.site-nav {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--color-primary); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-secondary {
  background: var(--color-accent);
  color: #fff;
}
.btn-secondary:hover { background: var(--color-accent-dark); text-decoration: none; }
.header-cta { padding: 0.65rem 1.3rem; white-space: nowrap; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, #EEF2F7 100%);
  padding: var(--space-6) 0;
}
.hero-inner { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.hero h1 { margin-bottom: var(--space-2); }
.hero-subheadline { font-size: var(--fs-lg); color: var(--color-text-muted); max-width: 640px; }
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-3) 0; }
.hero-image {
  margin-top: var(--space-3);
  max-width: 720px;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  aspect-ratio: 1200 / 630;
  box-shadow: var(--shadow-lg);
}
.content-image {
  margin: var(--space-3) 0;
  max-width: 640px;
}
.content-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}
.content-image figcaption {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
  list-style: none;
  padding: 0;
}
.trust-badges li {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Decorative check mark, purely visual — not content, so no alt text needed */
.trust-badges li::before {
  content: "";
  flex: none;
  width: 1.1em;
  height: 1.1em;
  background-color: var(--color-accent);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / contain no-repeat;
  border-radius: 50%;
}

/* Sections */
main { display: block; }
section { padding: var(--space-6) 0; }
.section-alt { background: var(--color-bg-alt); }
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-4) 0;
  box-shadow: var(--shadow-lg);
}
.cta-banner .btn-primary { background: #fff; color: var(--color-primary); }
.cta-banner .btn-primary:hover { background: var(--color-bg-alt); }

/* Table of contents */
.toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.toc ul { margin: 0; }

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: var(--space-1); }
/* Homepage premium feature sections: full-width, alternating image/text,
   one per priority category/service — a mini landing-page block, not a
   card. */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
.feature-split.feature-reverse .feature-image { order: 2; }
.feature-split.feature-reverse .feature-text { order: 1; }
.feature-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}
.feature-text h2 { margin-bottom: var(--space-2); }
.feature-text .btn { margin-top: var(--space-1); }
@media (max-width: 720px) {
  .feature-split, .feature-split.feature-reverse {
    grid-template-columns: 1fr;
  }
  .feature-split.feature-reverse .feature-image,
  .feature-split.feature-reverse .feature-text {
    order: unset;
  }
}
/* Services hub card grids: "Learn More" repeats sitewide as a UI
   convention (like the CTA buttons it borrows its btn/anchor-uniqueness
   exemption from), styled here as a lightweight text link instead of a
   filled button so a page with many cards doesn't read as a wall of
   buttons. */
.card-more-link.btn {
  display: inline-block;
  margin-top: var(--space-1);
  padding: 0;
  background: none;
  color: var(--color-primary);
  border: none;
  box-shadow: none;
  font-weight: 600;
  text-decoration: underline;
}
.card-more-link.btn:hover {
  background: none;
  color: var(--color-primary-dark);
  transform: none;
  box-shadow: none;
}

/* FAQ */
#faq .faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}
#faq .faq-item h3 { font-size: var(--fs-h4); margin-bottom: var(--space-1); }
#faq .faq-item p { margin: 0; color: var(--color-text-muted); }

/* Breadcrumbs */
.breadcrumbs { font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.breadcrumbs a { color: var(--color-text-muted); }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: #E5E9F0;
  margin-top: var(--space-6);
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4) clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3);
}
.site-footer a { color: #E5E9F0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-business-name { font-weight: 800; font-size: 1.125rem; color: #fff; letter-spacing: -0.01em; }
.footer-col-title { font-weight: 700; color: #fff; margin-bottom: var(--space-1); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-areas li { display: inline; }
.footer-areas li::after { content: ", "; }
.footer-areas li:last-child::after { content: ""; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  padding: var(--space-2);
  font-size: var(--fs-sm);
}

/* 404 */
.error-404 { max-width: var(--container-max); margin: var(--space-6) auto; padding: 0 clamp(1rem, 3vw, 2rem); text-align: center; }

/* Responsive */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  ul.site-nav { gap: var(--space-2); flex-wrap: wrap; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preference for hover lift/transition treatments */
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .site-nav a { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
