/* Plumb Perfect — Professional Plumbing Services
   Static HTML Site — Daedalus Design
   Mobile-first, WCAG 2.1 AA compliant */

/* ===== CSS Custom Properties ===== */
:root {
  --primary: #1a5276;
  --primary-dark: #0e3a55;
  --primary-light: #2980b9;
  --accent: #e74c3c;
  --accent-hover: #c0392b;
  --gold: #f39c12;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-grey: #ecf0f1;
  --mid-grey: #bdc3c7;
  --dark-grey: #7f8c8d;
  --text: #2c3e50;
  --text-light: #555555;
  --success: #27ae60;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
a:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; border-radius: 2px; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p { margin-bottom: 1rem; }

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header & Navigation ===== */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.header-top a { color: var(--white); }
.header-top a:hover { color: var(--gold); }
.header-contact { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.header-contact span { display: flex; align-items: center; gap: 0.35rem; }
.nav-main {
  background: var(--white);
  padding: 0.75rem 0;
}
.nav-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.site-logo:hover { color: var(--primary-dark); }
.site-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--primary);
  color: var(--white);
}
.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.25rem !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1.25rem; font-size: clamp(2.2rem, 5vw, 3.2rem); }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 540px; }
.hero-badges {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}
.hero-badge .badge-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image-placeholder {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border: 2px solid rgba(255,255,255,0.1);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--primary); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover { background: #e67e22; border-color: #e67e22; color: var(--white); }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== Section Styling ===== */
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--off-white);
}
.section-dark {
  background: var(--primary);
  color: var(--white);
}
.section-dark h2,
.section-dark h3 { color: var(--white); }
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header p {
  max-width: 600px;
  margin: 1rem auto 0;
  color: var(--text-light);
  font-size: 1.1rem;
}
.section-dark .section-header p { color: rgba(255,255,255,0.8); }
.section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--white);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* ===== Service Cards ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--light-grey);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--white);
}
.service-card h3 { margin-bottom: 0.75rem; }
.service-card p { color: var(--text-light); margin-bottom: 1.25rem; }
.service-card .btn { font-size: 0.9rem; padding: 0.6rem 1.25rem; }

/* ===== Features / Why Choose Us ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.feature-item {
  text-align: center;
  padding: 2rem 1.5rem;
}
.feature-icon {
  width: 72px;
  height: 72px;
  background: var(--off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  color: var(--primary);
  border: 2px solid var(--light-grey);
}
.feature-item h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.feature-item p { color: var(--text-light); font-size: 0.95rem; }

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-grey);
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--primary-light);
  opacity: 0.2;
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-stars {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.15em;
}
.testimonial-text {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.testimonial-author {
  font-weight: 600;
  color: var(--primary-dark);
}
.testimonial-location {
  font-size: 0.85rem;
  color: var(--dark-grey);
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #c0392b 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-phone {
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.cta-phone a { color: var(--white); }

/* ===== Contact Form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info { padding: 2rem 0; }
.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-item h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.contact-item p { margin-bottom: 0; color: var(--text-light); }
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-grey);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.95rem;
}
.form-group label .required {
  color: var(--accent);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== Service Areas ===== */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.area-item {
  background: var(--white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-grey);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all var(--transition);
}
.area-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

/* ===== Trust Signals ===== */
.trust-bar {
  background: var(--off-white);
  padding: 2rem 0;
  border-top: 1px solid var(--light-grey);
  border-bottom: 1px solid var(--light-grey);
}
.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.trust-item .trust-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-header p { font-size: 1.1rem; opacity: 0.85; max-width: 600px; margin: 0 auto; }
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}
.breadcrumb a { color: var(--white); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .separator { opacity: 0.5; }

/* ===== Content Pages ===== */
.content-section {
  padding: 4rem 0;
}
.content-section .container {
  max-width: 900px;
}
.content-section h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-grey);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.content-section ul, .content-section ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.content-section li {
  margin-bottom: 0.5rem;
  list-style: disc;
}
.content-section ol li { list-style: decimal; }

/* ===== Map ===== */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}
.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { margin-top: 1rem; font-size: 0.95rem; line-height: 1.6; }
.footer-brand .site-logo { color: var(--white); margin-bottom: 0.5rem; }
.footer-col h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gold);
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul a {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.footer-col ul a:hover { color: var(--gold); padding-left: 0.25rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--gold); }

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: var(--white);
  padding: 1.25rem 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.active { transform: translateY(0); }
.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner p { font-size: 0.9rem; margin-bottom: 0; flex: 1; }
.cookie-banner a { color: var(--gold); }
.cookie-buttons { display: flex; gap: 0.75rem; }
.cookie-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.cookie-accept {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.cookie-accept:hover { background: #219a52; }
.cookie-decline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.cookie-decline:hover { border-color: var(--white); }

/* ===== Emergency Banner ===== */
.emergency-strip {
  background: var(--accent);
  color: var(--white);
  padding: 0.6rem 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.emergency-strip a { color: var(--white); text-decoration: underline; }

/* ===== Before/After Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--light-grey);
}
.gallery-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--light-grey), var(--mid-grey));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-grey);
  font-size: 0.9rem;
}
.gallery-caption {
  padding: 1rem 1.25rem;
}
.gallery-caption h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.gallery-caption p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0; }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.stat-item .stat-label {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-badges { justify-content: center; }
  .hero-image { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    gap: 0.25rem;
  }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; width: 100%; }
  .header-top { display: none; }
  .section { padding: 3rem 0; }
  .services-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .trust-items { gap: 1.5rem; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { padding: 3rem 0; }
  .page-header { padding: 3rem 0; }
  .contact-form { padding: 1.5rem; }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .cookie-banner, .cta-banner { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
