/* ============================================
   IMMACULATE POOLS — Design System
   Palette pulled directly from the brand logo.
   ============================================ */

:root {
  /* Color tokens — sampled from logo */
  --navy: #005b8d;
  --navy-deep: #003f61;
  --sky: #25aae7;
  --sky-soft: #7fcdf0;
  --ink: #0a2f42;
  --bg: #f7fbfd;
  --pale: #eaf6fb;
  --line: #d9e7ee;
  --white: #ffffff;

  /* Type */
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Rhythm */
  --container: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 63, 97, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 63, 97, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-deep);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 700; }

p { color: #35586b; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--sky);
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--sky);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(37, 170, 231, 0.35);
}
.btn-primary:hover { background: var(--navy); box-shadow: 0 10px 28px rgba(0, 91, 141, 0.35); }

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-block { width: 100%; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 251, 253, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 48px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.96rem;
}

.nav-links a { color: var(--navy-deep); position: relative; padding: 4px 0; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%; height: 2px;
  background: var(--sky);
  transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy-deep);
  margin: 6px 0;
  transition: 0.25s ease;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero h1 { margin-bottom: 22px; }
.hero h1 .accent { color: var(--sky); }

.hero-lede {
  font-size: 1.15rem;
  color: #35586b;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg { width: 100%; height: 100%; }

.hero-logo {
  width: 78%;
  max-width: 360px;
  animation: fade-in-scale 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.wave-path {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-wave 2.2s cubic-bezier(0.65, 0, 0.35, 1) forwards 0.3s;
}
.wave-path.delay { animation-delay: 0.6s; }

@keyframes draw-wave {
  to { stroke-dashoffset: 0; }
}

.ring {
  animation: fade-in-scale 1s ease forwards 0.1s;
  opacity: 0;
  transform-origin: center;
}
@keyframes fade-in-scale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Trust strip */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy-deep);
}
.trust-item svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--sky); }

/* ============ SECTIONS ============ */
section { padding: 88px 0; }
.section-pale { background: var(--pale); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.05rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy);
  display: block;
}
.stat-card .label {
  font-size: 0.86rem;
  color: #547a8f;
  font-weight: 600;
}
.about-copy p + p { margin-top: 16px; }
.founder-note {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 3px solid var(--sky);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--navy-deep);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--sky-soft);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--navy);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 0.96rem; }
.service-card a.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--sky);
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.why-item .num { font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; color: var(--sky); letter-spacing: 0.08em; margin-bottom: 10px; display: block; }
.why-item h3 { margin-bottom: 10px; font-size: 1.12rem; }
.why-item p { font-size: 0.94rem; }
.cert-grid { grid-template-columns: repeat(3, 1fr); }

/* Service area */
.area-panel {
  background: var(--navy-deep);
  border-radius: 24px;
  padding: 60px;
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.area-panel h2, .area-panel .eyebrow { color: var(--white); }
.area-panel .eyebrow { color: var(--sky-soft); }
.area-panel .eyebrow::before { background: var(--sky-soft); }
.area-panel p { color: #bcdcee; }
.area-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.area-list li {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  gap: 10px;
}
.area-list li svg { width: 16px; height: 16px; color: var(--sky-soft); flex-shrink: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--sky) 130%);
  border-radius: 24px;
  padding: 60px;
  text-align: center;
  color: var(--white);
}
.cta-band h2 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: #eaf6fb; max-width: 50ch; margin: 0 auto 30px; }
.cta-band .btn-primary { background: var(--white); color: var(--navy); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--pale); }
.cta-band .btn-outline { border-color: rgba(255,255,255,0.6); color: var(--white); }
.cta-band .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-deep);
  color: #bcdcee;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 42px; margin-bottom: 14px; background: #fff; padding: 8px 16px; border-radius: 10px; }
.footer-brand p { color: #8fb9d1; font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.94rem; color: #bcdcee; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--white); }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.social-row a:hover { background: var(--sky); }
.social-row svg { width: 17px; height: 17px; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 0.85rem; color: #7ba6c1; }
.legal-links a { color: #7ba6c1; text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover { color: var(--white); }

/* ============ PAGE HEADER (interior pages) ============ */
.page-hero {
  padding: 64px 0 56px;
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero p.lede {
  max-width: 60ch;
  margin: 18px auto 0;
  font-size: 1.08rem;
}

/* ============ FORM ============ */
.quote-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.quote-side { position: sticky; top: 110px; }
.quote-side ul { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.quote-side li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.96rem; color: #35586b; }
.quote-side li svg { width: 20px; height: 20px; color: var(--sky); flex-shrink: 0; margin-top: 2px; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--navy-deep);
}
.field .hint { font-weight: 400; color: #7ba6c1; font-size: 0.8rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(37, 170, 231, 0.14);
}

.file-drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-drop:hover { border-color: var(--sky); background: var(--pale); }
.file-drop svg { width: 30px; height: 30px; color: var(--sky); margin: 0 auto 10px; }
.file-drop .file-list { margin-top: 10px; font-size: 0.85rem; color: var(--navy); font-weight: 600; }
.file-drop input[type="file"] { display: none; }

/* ============ BLOG ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-img {
  height: 190px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  display: flex; align-items: center; justify-content: center;
}
.blog-card-img svg { width: 46px; height: 46px; color: rgba(255,255,255,0.9); }
.blog-card-body { padding: 26px; }
.blog-meta { font-size: 0.8rem; color: #7ba6c1; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.02em; }
.blog-card h3 { margin-bottom: 10px; }
.blog-card p { font-size: 0.94rem; }
.blog-card .read-more { display: inline-flex; gap: 6px; margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--sky); }

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 0 100px;
}
.article h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 18px; }
.article .blog-meta { margin-bottom: 30px; }
.article p { font-size: 1.06rem; margin-bottom: 20px; }
.article h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.article ul, .article ol { color: #35586b; padding-left: 22px; margin-bottom: 20px; }
.article li { margin-bottom: 10px; font-size: 1.02rem; }
.article-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--pale);
  border-radius: var(--radius);
  text-align: center;
}

/* ============ PLACEHOLDER MARKER ============ */
[data-placeholder] {
  background: linear-gradient(90deg, #fff4d6, #fff4d6);
  padding: 1px 6px;
  border-radius: 4px;
  box-decoration-break: clone;
}

/* Town pills + map (service area page) */
.town-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.town-pill {
  display: block;
  text-align: center;
  padding: 16px 20px;
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--navy-deep);
  transition: background 0.18s ease, transform 0.18s ease;
}
.town-pill:hover { background: var(--sky-soft); transform: translateY(-2px); }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-embed iframe { display: block; }

@media (max-width: 720px) {
  .town-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; margin: 0 auto; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: 1fr; }
  .area-panel { grid-template-columns: 1fr; padding: 44px 30px; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .header-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .services-grid, .why-grid { grid-template-columns: 1fr; }
  .trust-strip .container { justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  section { padding: 60px 0; }
  .cta-band, .area-panel { padding: 40px 24px; border-radius: 18px; }
}

/* Mobile nav drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  padding: 100px 30px 30px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy-deep); }
.mobile-drawer .btn { margin-top: 10px; }
.drawer-close {
  position: absolute;
  top: 24px; right: 28px;
  background: none; border: none; cursor: pointer;
}
