/* ============================================
   PlumbingSEO.agency — Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --trust-navy: #0F2A44;
  --plumbing-blue: #176B9A;
  --workwear-blue: #245B7A;
  --pin-red: #E94743;
  --pin-red-hover: #d63c38;
  --map-green: #74C9A7;
  --road-yellow: #F4D77A;
  --off-white: #FAFAF7;
  --steel-gray: #5A6470;
  --white: #FFFFFF;
  --light-gray: #E8EAED;
  --border-gray: #D1D5DB;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,42,68,0.08);
  --shadow-md: 0 4px 12px rgba(15,42,68,0.1);
  --shadow-lg: 0 8px 30px rgba(15,42,68,0.12);
  --shadow-xl: 0 16px 48px rgba(15,42,68,0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --header-height: 72px;
  --topbar-height: 40px;
}

/* --- Modern Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--trust-navy);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--plumbing-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--pin-red); }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--trust-navy);
}
h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); font-weight: 800; }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-2xl)); }
h4 { font-size: var(--text-lg); }
p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* --- Layout Utilities --- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-6); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding: var(--space-20) 0; }
.section--navy { background: var(--trust-navy); color: var(--off-white); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: var(--off-white); }
.section--navy p { color: rgba(250,250,247,0.85); }
.section--light { background: var(--white); }
.section--blue { background: linear-gradient(135deg, var(--trust-navy) 0%, var(--workwear-blue) 100%); color: var(--off-white); }
.section--blue h2, .section--blue h3 { color: var(--off-white); }
.section--blue p { color: rgba(250,250,247,0.85); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Top Bar --- */
.topbar {
  background: var(--trust-navy);
  color: rgba(250,250,247,0.8);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-6);
  text-align: center;
  position: relative;
  z-index: 1001;
  line-height: 1.4;
}
.topbar strong { color: var(--road-yellow); }
.topbar__close {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(250,250,247,0.5);
  font-size: var(--text-lg);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition-fast);
}
.topbar__close:hover { color: var(--off-white); }
.topbar.hidden { display: none; }

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-gray);
  transition: box-shadow var(--transition-base);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.header__logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.header__logo img { height: 44px; width: auto; }
.header__logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--trust-navy);
  line-height: 1.2;
}
.header__logo-text span { color: var(--pin-red); }

.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav__links { display: flex; align-items: center; gap: var(--space-6); }
.nav__link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--trust-navy);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-2) 0;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--pin-red);
  transition: width var(--transition-base);
}
.nav__link:hover, .nav__link.active { color: var(--pin-red); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: var(--space-2); }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--trust-navy);
  transition: var(--transition-base);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  padding: calc(var(--header-height) + var(--space-8)) var(--space-6) var(--space-8);
  transition: right var(--transition-base);
  box-shadow: var(--shadow-xl);
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav.open { right: 0; }
.mobile-nav__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--trust-navy);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--light-gray);
  display: block;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.mobile-nav__link:hover { color: var(--pin-red); }
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15,42,68,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.mobile-overlay.active { opacity: 1; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn--primary {
  background: var(--pin-red);
  color: var(--white);
  border-color: var(--pin-red);
  box-shadow: 0 4px 14px rgba(233,71,67,0.3);
}
.btn--primary:hover {
  background: var(--pin-red-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,71,67,0.4);
}
.btn--secondary {
  background: transparent;
  color: var(--trust-navy);
  border-color: var(--trust-navy);
}
.btn--secondary:hover {
  background: var(--trust-navy);
  color: var(--white);
  transform: translateY(-2px);
}
.btn--white {
  background: var(--white);
  color: var(--trust-navy);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--off-white);
  color: var(--pin-red);
  transform: translateY(-2px);
}
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline-white:hover {
  background: var(--white);
  color: var(--trust-navy);
  transform: translateY(-2px);
}
.btn--sm { font-size: var(--text-sm); padding: var(--space-3) var(--space-6); }
.btn--lg { font-size: var(--text-lg); padding: var(--space-5) var(--space-10); }
.btn svg { width: 18px; height: 18px; }

/* Pulse animation for CTA — smooth breathing feel */
.btn--pulse { animation: pulse-glow 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(233,71,67,0.28), 0 0 0 0 rgba(233,71,67,0);
    transform: translateY(0) scale(1);
  }
  50% {
    box-shadow: 0 6px 28px rgba(233,71,67,0.52), 0 0 0 6px rgba(233,71,67,0.08);
    transform: translateY(-1px) scale(1.012);
  }
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: all var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, rgba(23,107,154,0.1), rgba(23,107,154,0.05));
}
.card__icon svg { width: 28px; height: 28px; color: var(--plumbing-blue); }
.card__icon--red { background: linear-gradient(135deg, rgba(233,71,67,0.1), rgba(233,71,67,0.05)); }
.card__icon--red svg { color: var(--pin-red); }
.card__icon--green { background: linear-gradient(135deg, rgba(116,201,167,0.1), rgba(116,201,167,0.05)); }
.card__icon--green svg { color: var(--map-green); }
.card__title { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.card__text { color: var(--steel-gray); font-size: var(--text-sm); line-height: 1.6; }

/* --- Section Headers --- */
.section-header { margin-bottom: var(--space-12); }
.section-header__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--plumbing-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}
.section-header__label svg { width: 16px; height: 16px; }
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { font-size: var(--text-lg); color: var(--steel-gray); max-width: 640px; }
.section-header.text-center p { margin-left: auto; margin-right: auto; }

/* --- Forms --- */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--trust-navy);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--white);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--plumbing-blue);
  box-shadow: 0 0 0 3px rgba(23,107,154,0.15);
}
.form-input.error, .form-textarea.error { border-color: var(--pin-red); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-error { font-size: var(--text-xs); color: var(--pin-red); margin-top: var(--space-1); display: none; }
.form-error.visible { display: block; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.form-success {
  background: linear-gradient(135deg, rgba(116,201,167,0.15), rgba(116,201,167,0.05));
  border: 1px solid var(--map-green);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  display: none;
}
.form-success.visible { display: block; }
.form-success h3 { color: var(--trust-navy); margin-bottom: var(--space-3); }
.form-success p { color: var(--steel-gray); }

/* --- CTA Callout Box --- */
.cta-box {
  background: linear-gradient(135deg, var(--trust-navy) 0%, var(--workwear-blue) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--off-white);
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(233,71,67,0.08);
}
.cta-box h2, .cta-box h3 { color: var(--off-white); margin-bottom: var(--space-4); }
.cta-box p { color: rgba(250,250,247,0.8); font-size: var(--text-lg); margin-bottom: var(--space-8); max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-box .btn { position: relative; z-index: 1; }

/* --- Inline Blog CTA --- */
.inline-cta {
  background: linear-gradient(135deg, rgba(23,107,154,0.08), rgba(23,107,154,0.03));
  border-left: 4px solid var(--plumbing-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6);
  margin: var(--space-8) 0;
}
.inline-cta p { color: var(--trust-navy); font-weight: 500; margin-bottom: var(--space-4); }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--trust-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  transition: background var(--transition-fast);
}
.faq-question:hover { background: rgba(23,107,154,0.03); }
.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--plumbing-blue);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.faq-answer__inner {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--steel-gray);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--trust-navy);
  color: rgba(250,250,247,0.7);
  padding: var(--space-16) 0 var(--space-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.footer__brand p { font-size: var(--text-sm); line-height: 1.7; margin-top: var(--space-4); }
.footer__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-5);
}
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__link {
  color: rgba(250,250,247,0.6);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer__link:hover { color: var(--road-yellow); }
.footer__bottom {
  border-top: 1px solid rgba(250,250,247,0.1);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__bottom a { color: rgba(250,250,247,0.5); }
.footer__bottom a:hover { color: var(--road-yellow); }

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--steel-gray);
}
.breadcrumbs a { color: var(--plumbing-blue); }
.breadcrumbs span { margin: 0 var(--space-2); color: var(--border-gray); }

/* --- Grid Helpers --- */
.grid { display: grid; gap: var(--space-8); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* --- Focus & Accessibility --- */
:focus-visible {
  outline: 3px solid var(--plumbing-blue);
  outline-offset: 3px;
  border-radius: 3px;
}
.btn:focus-visible {
  outline: 3px solid var(--pin-red);
  outline-offset: 3px;
}
.nav__link:focus-visible,
.footer__link:focus-visible,
.mobile-nav__link:focus-visible {
  outline: 2px solid var(--plumbing-blue);
  outline-offset: 4px;
  border-radius: 2px;
}
.topbar__close:focus-visible {
  outline: 2px solid rgba(250,250,247,0.7);
  outline-offset: 3px;
  border-radius: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .section { padding: var(--space-12) 0; }
  .nav__links { display: none; }
  .nav .btn { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; text-align: center; }
  .cta-box { padding: var(--space-8) var(--space-6); }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .btn { width: 100%; text-align: center; }
  .btn--sm { width: auto; }
}
