/* ============================================
   Glendale Pool Repair & Leaks — Stylesheet
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1e3a5f;
  --navy-light: #2a4f7a;
  --navy-dark: #152a45;
  --gold: #d4a017;
  --gold-light: #e8b94a;
  --gold-pale: #fdf3d7;
  --bg: #f8f6f2;
  --bg-warm: #f3efe8;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #5a6c7d;
  --text-muted: #8a9bab;
  --border: #e8e4dc;
  --shadow-sm: 0 1px 3px rgba(30,58,95,.06), 0 1px 2px rgba(30,58,95,.04);
  --shadow-md: 0 4px 16px rgba(30,58,95,.08), 0 2px 4px rgba(30,58,95,.04);
  --shadow-lg: 0 12px 40px rgba(30,58,95,.12), 0 4px 12px rgba(30,58,95,.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(.4, 0, .2, 1);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-size: .875rem;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 560px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.75rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,160,23,.3);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248,246,242,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
  padding: 1rem 0;
}

.site-header.scrolled {
  background: rgba(255,255,255,.95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
  color: var(--navy);
}

.logo-text {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.logo-icon {
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}

.main-nav a {
  padding: .5rem .875rem;
  border-radius: var(--radius-xl);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.main-nav a:hover {
  color: var(--navy);
  background: rgba(30,58,95,.06);
}

.nav-cta {
  background: var(--gold) !important;
  color: var(--navy-dark) !important;
  font-weight: 600 !important;
  margin-left: .5rem;
}

.nav-cta:hover {
  background: var(--gold-light) !important;
  color: var(--navy-dark) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: all var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--navy);
  left: 0;
  transition: all var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 1.5rem 6rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #1e3a5f 0%,
    #2a5298 35%,
    #4a90d9 55%,
    #7ec8e3 75%,
    #b8e6f0 100%
  );
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image: radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px),
                     radial-gradient(circle at 75% 75%, #fff 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  padding: .5rem 1.25rem;
  border-radius: var(--radius-xl);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.75rem;
  animation: fadeInDown .8s ease both;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.15;
  animation: fadeInDown .8s .1s ease both;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInDown .8s .2s ease both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInDown .8s .3s ease both;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeInDown .8s .4s ease both;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.9);
  font-size: .875rem;
  font-weight: 500;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}

/* ---------- Services ---------- */
.services {
  padding: 6rem 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-pale);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .625rem;
  color: var(--navy);
}

.service-card p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---------- Why Us ---------- */
.why-us {
  padding: 6rem 0;
  background: var(--white);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.why-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.why-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.why-stat {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-size: .8125rem;
  color: var(--text-light);
  font-weight: 500;
}

.why-content .section-title {
  text-align: left;
}

.why-intro {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.why-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.why-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-pale);
  border-radius: 50%;
  margin-top: 2px;
}

.why-feature strong {
  display: block;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .25rem;
}

.why-feature p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ---------- Process ---------- */
.process {
  padding: 6rem 0;
  background: var(--bg);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.process-step {
  text-align: center;
  position: relative;
}

.step-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--border);
  line-height: 1;
  margin-bottom: .5rem;
  position: relative;
  z-index: 1;
}

.step-content h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .625rem;
  color: var(--navy);
}

.step-content p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 280px;
  margin: 0 auto;
}

.step-content a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(212,160,23,.3);
  text-underline-offset: 3px;
}

.step-content a:hover {
  text-decoration-color: var(--gold);
}

.step-connector {
  display: none;
}

/* ---------- Testimonials ---------- */
.testimonials {
  padding: 6rem 0;
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  position: relative;
  transition: all var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--gold);
  opacity: .4;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
}

.testimonial-text {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.author-name {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
}

.author-location {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  position: relative;
  padding: 5rem 1.5rem;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cta-gradient {
  background: linear-gradient(
    135deg,
    var(--navy-dark) 0%,
    var(--navy) 50%,
    var(--navy-light) 100%
  );
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-text {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Contact ---------- */
.contact {
  padding: 6rem 0;
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info .section-title {
  text-align: left;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.contact-item strong {
  display: block;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: .25rem;
}

.contact-item p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.contact-item a {
  color: var(--text-light);
}

.contact-item a:hover {
  color: var(--gold);
}

/* ---------- Form ---------- */
.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.contact-form h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .375rem;
}

.form-note {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .375rem;
  letter-spacing: .02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(212,160,23,.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-success {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: #16a34a;
}

.form-success svg {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand p {
  font-size: .9rem;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}

.logo-light .logo-text {
  color: var(--white);
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-links ul,
.footer-contact ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.footer-links a,
.footer-contact a,
.footer-contact li {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: color var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
  font-size: .8125rem;
  color: rgba(255,255,255,.4);
}

/* ---------- Animations ---------- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 5rem 1.5rem 2rem;
    transition: right var(--transition);
    z-index: 100;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
  }

  .main-nav a {
    padding: .875rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-cta {
    margin-left: 0 !important;
    margin-top: .5rem;
    text-align: center;
    justify-content: center;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 99;
  }

  .mobile-overlay.active {
    display: block;
  }

  .hero {
    padding: 7rem 1.25rem 5rem;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    gap: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-image {
    order: -1;
  }

  .why-content .section-title {
    text-align: center;
  }

  .why-intro {
    text-align: center;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-info .section-title {
    text-align: center;
  }

  .contact-intro {
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 6rem 1rem 4rem;
  }

  .services,
  .why-us,
  .process,
  .testimonials,
  .contact {
    padding: 4rem 0;
  }

  .service-card {
    padding: 1.5rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .step-number {
    font-size: 3rem;
  }
}
