/* ==========================================================================
   Elevated Pool Care — shared stylesheet
   Mobile-first, WCAG 2.2 AA contrast, no framework, no build step.
   ========================================================================== */

:root {
  --navy: #0a3d62;        /* headings, footer */
  --blue: #0b6db6;        /* brand blue (AA on white for large text/icons) */
  --blue-dark: #075a96;   /* link/hover, AA on white */
  --aqua: #34c6e0;        /* decorative only — never text on white */
  --ink: #16324a;         /* body text */
  --slate: #48627a;       /* secondary text, AA on white */
  --bg: #f3f9fd;          /* tinted section background */
  --white: #ffffff;
  --line: #dcebf5;
  --cta: #b34700;         /* warm CTA — 4.7:1 with white text */
  --cta-dark: #933a00;
  --shadow: 0 10px 30px rgba(10, 61, 98, .10);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem;
}
h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.22; color: var(--navy); }
p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.35rem; }
li { margin-bottom: .45rem; }
a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; height: auto; }
strong { color: var(--navy); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-block; background: var(--cta); color: #fff !important;
  padding: 14px 28px; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; font-size: 1.02rem;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--cta-dark); transform: translateY(-2px); }
.btn-blue { background: var(--blue-dark); }
.btn-blue:hover { background: var(--navy); }
.btn-ghost { background: transparent; border: 2px solid #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.16); }

/* ============================ Header ============================ */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 12px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.18rem;
  color: var(--navy); text-decoration: none;
}
.logo svg { flex: none; }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; }
.nav-links li { margin: 0; }
.nav-links a { font-weight: 500; color: var(--ink); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--blue-dark); }
.nav-links .btn { color: #fff; padding: 11px 22px; }
.nav-phone { font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; }
.menu-toggle {
  display: none; background: none; border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 10px; cursor: pointer; color: var(--navy);
}

/* ============================ Hero ============================ */
.hero {
  position: relative; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(52,198,224,.28), transparent 60%),
    linear-gradient(150deg, #0a3d62 0%, #0b5e97 55%, #0b76c4 100%);
  padding: 88px 0 96px; overflow: hidden;
}
.hero .eyebrow { color: #9fe3f2; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.3rem); max-width: 800px; margin-bottom: 18px; }
.hero .lead { font-size: 1.22rem; max-width: 640px; color: #dcf1fb; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; color: #b9e2f5; font-size: .95rem; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; pointer-events: none; }
.hero-wave svg { display: block; width: 100%; height: 60px; }

/* Trust bar */
.trustbar { background: var(--white); border-bottom: 1px solid var(--line); }
.trustbar-row {
  display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center;
  padding: 18px 0; color: var(--slate); font-weight: 500; font-size: .98rem;
}
.trustbar-row span { display: inline-flex; align-items: center; gap: 8px; }
.trustbar-row svg { color: var(--blue); }

/* ============================ Sections ============================ */
section { padding: 76px 0; }
section.tint { background: var(--bg); }
.section-head { max-width: 660px; margin: 0 auto 46px; text-align: center; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-block; color: var(--blue-dark); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; margin-bottom: 8px;
}
.section-head h2, h2.title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--slate); font-size: 1.05rem; }

/* Cards */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.grid.cols-2 { grid-template-columns: 1fr; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow);
  transition: transform .18s ease; display: block; text-decoration: none; color: var(--ink);
}
a.card:hover { transform: translateY(-5px); color: var(--ink); }
.card .ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--aqua), var(--blue)); margin-bottom: 16px;
}
.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { color: var(--slate); font-size: .97rem; margin-bottom: 10px; }
.card .more { font-weight: 600; color: var(--blue-dark); font-size: .95rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: relative; }
.step .num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-family: 'Poppins'; font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--slate); font-size: .97rem; margin: 0; }

/* Checklist */
.checklist { list-style: none; margin-left: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.checklist svg { flex: none; margin-top: 5px; color: var(--blue); }

/* Two-column feature */
.split { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
.panel {
  background: linear-gradient(135deg, var(--blue-dark), var(--navy));
  border-radius: 20px; padding: 38px; color: #fff; box-shadow: var(--shadow);
}
.panel h3 { color: #fff; font-size: 1.35rem; margin-bottom: 16px; }
.panel .checklist li { color: #e3f4fc; }
.panel .checklist svg { color: var(--aqua); }

/* Stats */
.stats { display: flex; gap: 34px; margin-top: 22px; flex-wrap: wrap; }
.stat .num { font-family: 'Poppins'; font-weight: 700; font-size: 1.9rem; color: var(--blue-dark); }
.stat .lbl { color: var(--slate); font-size: .9rem; }

/* Reviews */
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.review .starrow { color: #b34700; letter-spacing: 2px; margin-bottom: 10px; font-size: 1.05rem; }
.review p { color: var(--ink); font-size: .99rem; }
.review .who { color: var(--slate); font-size: .9rem; font-weight: 600; }
.placeholder-note {
  border: 2px dashed var(--blue); border-radius: var(--radius); padding: 18px 22px;
  color: var(--slate); background: #f6fbff; font-size: .95rem;
}

/* FAQ */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--navy); padding: 14px 0;
  font-family: 'Poppins'; font-size: 1.02rem; list-style: none; position: relative; padding-right: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--blue); font-family: 'Inter';
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--slate); padding-bottom: 16px; margin: 0; }

/* Service area chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin-left: 0; }
.chips a {
  display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; font-weight: 600; color: var(--blue-dark); text-decoration: none; box-shadow: var(--shadow);
}
.chips a:hover { border-color: var(--blue); color: var(--navy); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--blue-dark), var(--navy));
  color: #fff; text-align: center; padding: 64px 0;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 12px; }
.cta-band p { color: #cfe9f8; max-width: 560px; margin: 0 auto 26px; }

/* Breadcrumbs */
.crumbs { padding: 18px 0 0; font-size: .9rem; color: var(--slate); }
.crumbs ol { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--slate); }

/* Article/long-form */
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.prose ul, .prose ol { margin-bottom: 1.2rem; }

/* Forms */
form.quote { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; color: var(--navy); }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid #b4cddd; border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #fbfdff; transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border: 2px solid var(--blue); background: #fff; }
textarea { resize: vertical; min-height: 110px; }
form .btn { width: 100%; margin-top: 6px; }

/* Contact info */
.contact-item { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.contact-item .ico { width: 44px; height: 44px; border-radius: 12px; background: #e3f2fb; display: grid; place-items: center; flex: none; }
.contact-item .lbl { font-size: .82rem; color: var(--slate); }
.contact-item .val { font-weight: 600; color: var(--ink); }
.contact-item .val a { color: var(--ink); text-decoration: none; }

/* ============================ Footer ============================ */
footer.site { background: var(--navy); color: #cfe6f5; padding: 54px 0 30px; font-size: .96rem; }
footer.site a { color: #cfe6f5; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 34px; }
.foot-grid h3 { color: #fff; font-size: 1.02rem; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin-left: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot .logo { color: #fff; margin-bottom: 12px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: #8fb6d1; font-size: .88rem; }

/* Sticky mobile call button */
.call-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: none; align-items: center; gap: 8px;
  background: var(--cta); color: #fff !important; text-decoration: none;
  padding: 14px 20px; border-radius: 999px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

/* ============================ Responsive ============================ */
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (min-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 18px 22px; gap: 16px; align-items: flex-start;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .nav-phone { display: none; }
  .call-fab { display: inline-flex; }
  section { padding: 58px 0; }
  .hero { padding: 64px 0 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, a.card { transition: none; }
}
