/* ================================================================
   JOHN PLUMBING — Design System CSS
   Water-blue brand | Premium plumbing company aesthetics
================================================================ */

/* ── Global mobile overflow fix ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }

/* ── Typography ── */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  scroll-behavior: smooth;
  color: #1e293b;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* ================================================================
   BRAND COLORS & TOKENS
================================================================ */
:root {
  --jp-blue-deep:   #03172b;
  --jp-blue-dark:   #04243f;
  --jp-blue-mid:    #0369a1;
  --jp-blue-brand:  #0284c7;
  --jp-blue-sky:    #38bdf8;
  --jp-blue-light:  #bae6fd;
  --jp-cyan:        #06b6d4;
}

/* ================================================================
   HERO SECTION
================================================================ */
.jp-hero {
  min-height: 100vh;
}

/* Hero gradient text */
.jp-text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 40%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.jp-text-gradient-light {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Emergency card glassmorphism */
.jp-card {
  background: rgba(3, 23, 43, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Water shimmer at hero bottom */
.jp-water-shimmer {
  background: linear-gradient(to top, rgba(255,255,255,0.06) 0%, transparent 100%);
}

/* Issue selector buttons in hero card */
.iss-btn {
  background: rgba(8, 47, 73, 0.4);
  border-color: rgba(14, 165, 233, 0.25);
  color: rgba(255,255,255,0.75);
  transition: all 0.2s ease;
}
.iss-btn:hover, .iss-btn.active {
  background: rgba(3, 105, 161, 0.3);
  border-color: #38bdf8;
  color: white;
}

/* Trust bar border fix */
.jp-hero-trust-bar {
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* ================================================================
   BUTTONS
================================================================ */
.jp-btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.4), 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}
.jp-btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.55), 0 4px 12px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.jp-btn-primary:active {
  transform: scale(0.98);
}

.jp-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(255,255,255,0.85);
  transition: all 0.2s ease;
}
.jp-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255,255,255,0.35);
  color: white;
}

.jp-btn-outline {
  border: 2px solid #0284c7;
  color: #0284c7;
  background: transparent;
  transition: all 0.2s ease;
}
.jp-btn-outline:hover {
  background: #0284c7;
  color: white;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

/* ================================================================
   STATS BAR
================================================================ */
.jp-stat-item {
  padding: 1rem;
}
.jp-stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 900;
  color: #0284c7;
  line-height: 1;
  margin-bottom: 0.375rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.jp-stat-num.jp-stat-visible {
  opacity: 1;
  transform: translateY(0);
}
.jp-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

/* ================================================================
   TYPOGRAPHY TOKENS
================================================================ */
.jp-overline {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #0284c7;
  margin-bottom: 0.75rem;
}
.jp-overline-light {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #38bdf8;
  margin-bottom: 0.75rem;
}
.jp-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.jp-section-title-light {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.jp-section-sub {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.7;
}
.jp-section-sub-light {
  font-size: 1rem;
  color: rgba(186,230,253,0.6);
  line-height: 1.7;
}

/* ================================================================
   SERVICE CARDS
================================================================ */
.jp-service-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  text-decoration: none;
}
.jp-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.15), 0 8px 24px rgba(0,0,0,0.08);
  border-color: #bae6fd;
}
.jp-service-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #e2e8f0;
}
.jp-service-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,23,43,0.5) 0%, transparent 60%);
}
.jp-service-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}
.jp-service-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.jp-service-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.jp-service-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.jp-service-link {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.jp-service-card:hover .jp-service-link {
  color: #0369a1;
}

/* ================================================================
   PROCESS / HOW IT WORKS
================================================================ */
.jp-process-section {
  background: #03172b;
  background: linear-gradient(160deg, #04243f 0%, #03172b 40%, #062542 70%, #051e35 100%);
  position: relative;
}
.jp-dots-bg {
  background-image: radial-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
}
.jp-gradient-line {
  background: linear-gradient(90deg, transparent, #0ea5e9, #06b6d4, transparent);
}
.jp-step-card {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}
.jp-step-card:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(56, 189, 248, 0.2);
}
.jp-step-card--active {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.2) !important;
}
.jp-step-number {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0369a1, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.1), 0 8px 24px rgba(2,132,199,0.3);
}
.jp-step-number--active {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  box-shadow: 0 0 0 8px rgba(14, 165, 233, 0.15), 0 8px 32px rgba(14, 165, 233, 0.5);
  animation: jp-pulse 2.5s ease-in-out infinite;
}
.jp-step-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================================================
   ABOUT SECTION
================================================================ */
.jp-about-img-frame {
  aspect-ratio: 4/3;
}
.jp-accent-card {
  min-width: 220px;
}
.jp-accent-icon {
  background: linear-gradient(135deg, #0369a1, #06b6d4);
}
.jp-why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.jp-why-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ================================================================
   REVIEWS
================================================================ */
.jp-reviews-section {
  background: #03172b;
  background: linear-gradient(160deg, #03172b 0%, #062542 50%, #04243f 100%);
}
.jp-review-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
}
.jp-review-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateY(-4px);
}
.jp-review-card--featured {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.1);
}

/* ================================================================
   MAP SECTION
================================================================ */
.jp-map-container {
  background: #04243f;
  background: linear-gradient(160deg, #04243f 0%, #03172b 100%);
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 25px 80px rgba(3, 23, 43, 0.3), 0 0 0 1px rgba(14,165,233,0.08);
}

/* ================================================================
   FAQ
================================================================ */
.jp-faq-section {
  background: #f8fafc;
}
.jp-faq-item {
  border-radius: 1rem;
  border: 1.5px solid #e2e8f0;
  background: white;
  overflow: hidden;
  transition: all 0.25s ease;
}
.jp-faq-item.jp-faq-open {
  border-color: #bae6fd;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.1);
}
.jp-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  gap: 1rem;
}
.jp-faq-trigger:hover {
  color: #0284c7;
}
.jp-faq-open .jp-faq-trigger {
  color: #0284c7;
}
.jp-faq-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #64748b;
  transition: all 0.25s;
}
.jp-faq-open .jp-faq-icon {
  background: #eff6ff;
  border-color: #bae6fd;
  color: #0284c7;
}
.jp-faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.75;
}
.jp-faq-open .jp-faq-answer {
  display: block;
}

/* ================================================================
   FINAL CTA BANNER
================================================================ */
.jp-cta-banner {
  background: #03172b;
  background: linear-gradient(160deg, #03172b 0%, #04243f 50%, #062542 100%);
}

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes jp-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes jp-pulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(14,165,233,0.15), 0 8px 32px rgba(14,165,233,0.5); }
  50%       { box-shadow: 0 0 0 16px rgba(14,165,233,0.05), 0 8px 40px rgba(14,165,233,0.3); }
}
@keyframes jp-water-glow {
  0%   { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.animate-jp-float  { animation: jp-float 6s ease-in-out infinite; }
.animate-jp-pulse  { animation: jp-pulse 3s ease-in-out infinite; }
.animate-jp-glow   { animation: jp-water-glow 2.5s infinite; }

/* ================================================================
   WAVE SEPARATOR (legacy compat)
================================================================ */
.wave-separator {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 0;
}

/* ================================================================
   HEADER SCROLL SHADOW
================================================================ */
.header-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ================================================================
   US MAP OVERRIDES — Blue brand theme
================================================================ */
.state-path {
  fill: #0c4a6e;
  stroke: #0ea5e9;
  stroke-width: 0.5;
  transition: fill 0.2s ease;
  cursor: pointer;
}
.state-path:hover {
  fill: #0284c7;
}
.state-label {
  fill: #bae6fd;
  font-size: 7px;
  font-weight: 700;
  pointer-events: none;
  font-family: 'Outfit', sans-serif;
}

/* ================================================================
   RESPONSIVE HELPERS
================================================================ */
@media (max-width: 768px) {
  .jp-about-img-frame {
    aspect-ratio: 16/9;
  }
  .jp-accent-card {
    position: static !important;
    margin-top: 1rem;
  }
}

/* ================================================================
   SERVICE DETAIL PAGE STYLES
================================================================ */

/* Feature list item */
.jp-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.jp-feature-item:hover {
  border-color: #bae6fd;
  box-shadow: 0 4px 20px rgba(14,165,233,0.08);
}
.jp-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg,#0369a1,#0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Warning/alert box */
.jp-alert-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}
.jp-alert-box--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* Step number for service pages */
.jp-svc-step {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg,#0369a1,#0ea5e9);
  color: white;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(3,105,161,0.3);
}

/* Service FAQ accordion */
.jp-svc-faq {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.jp-svc-faq[open] {
  box-shadow: 0 4px 20px rgba(14,165,233,0.08);
  border-color: #bae6fd;
}
.jp-svc-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 1.5rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  gap: 1rem;
}
.jp-svc-faq summary::-webkit-details-marker { display: none; }
.jp-svc-faq summary .faq-icon {
  transition: transform 0.25s;
  flex-shrink: 0;
  color: #0ea5e9;
}
.jp-svc-faq[open] summary .faq-icon { transform: rotate(180deg); }
.jp-svc-faq .faq-body {
  padding: 0 1.5rem 1.25rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.75;
  border-top: 1px solid #f1f5f9;
}

/* Sticky call strip for service pages (mobile) */
.jp-sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(3,23,43,0.97);
  border-top: 1px solid rgba(14,165,233,0.2);
  backdrop-filter: blur(12px);
}
@media (min-width: 768px) {
  .jp-sticky-cta { display: none; }
}