/* ============================================================
   Trenchless Sewer Repair — North Huntingdon PA
   Premium, mobile-first, editorial product-design system
   ============================================================ */

:root {
  /* Color language — underground infrastructure + renewal */
  --ink: #0f1419;
  --ink-soft: #1c232b;
  --slate: #2a3441;
  --slate-mid: #3d4a5c;
  --muted: #5c6b7a;
  --fog: #8b9aab;
  --cloud: #e8eef4;
  --paper: #f7f9fb;
  --white: #ffffff;
  --teal: #1a7a6d;
  --teal-deep: #0f5c52;
  --teal-soft: #d4ebe7;
  --amber: #c47a2c;
  --amber-soft: #f5e6d3;
  --border: #d1dae3;
  --focus: #1a7a6d;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --max-w: 72rem;
  --max-w-narrow: 40rem;
  --radius: 0.5rem;
  --radius-lg: 0.875rem;
  --header-h: 3.75rem;
  --sticky-cta-h: 3.5rem;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration: 0.22s;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--teal); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
button, .btn {
  font-family: inherit;
  cursor: pointer;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 3.5vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.25rem); }
p { margin: 0 0 var(--space-4); color: var(--slate); }
.lead { font-size: 1.125rem; line-height: 1.55; color: var(--slate-mid); }
.meta {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-6); }
}
.section {
  padding-block: var(--space-7);
}
@media (min-width: 768px) {
  .section { padding-block: var(--space-8); }
}
.section--tight { padding-block: var(--space-6); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-4);
}
.logo {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 11rem;
}
.logo span { display: block; font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  min-height: 44px;
}
.phone-link:hover { background: var(--cloud); color: var(--ink); }
.phone-link svg { flex-shrink: 0; }

/* Mobile nav toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 0;
}
.nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-1);
}
.nav-desktop a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--ink);
  background: var(--cloud);
}
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  .logo { max-width: none; }
}

/* Mobile menu */
.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--paper);
  z-index: 99;
  padding: var(--space-5) var(--space-4);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease);
  overflow-y: auto;
  visibility: hidden;
}
.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}
.nav-mobile a {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
}
.nav-mobile a[aria-current="page"] { color: var(--teal-deep); }
.nav-mobile .phone-block {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.nav-mobile .phone-block a {
  border: none;
  padding: 0;
  font-size: 1.25rem;
  color: var(--teal-deep);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 48px;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn--primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--white);
}
.btn--secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
}
.btn--secondary:hover {
  background: var(--cloud);
  color: var(--ink);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--cloud); }
.btn--block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  padding-block: var(--space-6) var(--space-7);
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { padding-block: var(--space-8) var(--space-9); }
}
.hero-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--space-8);
  }
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: var(--space-3);
}
.hero-label::before {
  content: "";
  width: 1.25rem;
  height: 2px;
  background: var(--teal);
}
.hero h1 { margin-bottom: var(--space-4); }
.hero .lead { margin-bottom: var(--space-5); max-width: 36ch; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.875rem;
  color: var(--muted);
}
.hero-meta strong { color: var(--slate); font-weight: 500; }
.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--slate);
  aspect-ratio: 4 / 3;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-visual-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: linear-gradient(transparent, rgba(15,20,25,0.75));
  color: var(--white);
  font-size: 0.8125rem;
}

/* Cards / info blocks */
.card-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.info-card h3 { margin-bottom: var(--space-2); }
.info-card p:last-child { margin-bottom: 0; }

/* Split sections */
.split {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
  }
  .split--reverse > *:first-child { order: 2; }
}
.split-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--slate);
  aspect-ratio: 4 / 3;
}
.split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Process steps */
.steps {
  display: grid;
  gap: var(--space-5);
  counter-reset: step;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
.step {
  position: relative;
  padding-left: var(--space-6);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.02em;
}
.step h3 { margin-bottom: var(--space-2); }

/* FAQ */
.faq-list { display: grid; gap: var(--space-3); }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: var(--space-4) var(--space-5);
  min-height: 56px;
  cursor: pointer;
}
.faq-trigger:hover { background: var(--paper); }
.faq-trigger svg {
  flex-shrink: 0;
  transition: transform var(--duration) var(--ease);
}
.faq-item[open] .faq-trigger svg { transform: rotate(180deg); }
.faq-panel {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--slate);
}
.faq-panel p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--fog); max-width: 36ch; margin-inline: auto; }
.cta-band .btn--primary {
  background: var(--teal);
  border-color: var(--teal);
  margin-top: var(--space-4);
}
.cta-band .btn--primary:hover {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal-soft);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.contact-card h2 { font-size: 1.125rem; margin-bottom: var(--space-4); }
.contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: var(--space-4);
}
.contact-row:last-child { margin-bottom: 0; }
.contact-row .label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.contact-row a, .contact-row span { font-size: 1.0625rem; color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-row a:hover { color: var(--teal-deep); }

/* Footer */
.site-footer {
  background: var(--ink-soft);
  color: var(--fog);
  padding-block: var(--space-7) var(--space-6);
  margin-top: var(--space-8);
}
.footer-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}
.footer-brand { font-weight: 600; color: var(--white); margin-bottom: var(--space-2); }
.footer-nav { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-nav a {
  color: var(--fog);
  text-decoration: none;
  font-size: 0.9375rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--slate);
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
}

/* Sticky mobile CTA */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--ink);
  padding: 0.75rem var(--space-4);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.sticky-cta .btn {
  width: 100%;
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
@media (max-width: 899px) {
  .sticky-cta { display: block; }
  body { padding-bottom: calc(var(--sticky-cta-h) + env(safe-area-inset-bottom, 0)); }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--space-6); }
.bg-white { background: var(--white); }
.border-top { border-top: 1px solid var(--border); }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 500; color: var(--ink); width: 32%; }
@media (max-width: 639px) {
  .compare-table { font-size: 0.8125rem; }
  .compare-table th, .compare-table td { padding: var(--space-2) var(--space-3); }
}

/* Page title band */
.page-header {
  padding-block: var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.page-header .meta { margin-bottom: var(--space-2); }
.page-header h1 { margin-bottom: var(--space-3); }
.page-header .lead { max-width: 42ch; margin-bottom: 0; }

/* Prose content */
.prose { max-width: var(--max-w-narrow); }
.prose h2 { margin-top: var(--space-6); }
.prose ul, .prose ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
  color: var(--slate);
}
.prose li { margin-bottom: 0.35rem; }

/* Image credit / caption */
.img-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: var(--space-2);
}