/* ============================================================
   Cape Coral Pool Restoration — Design System
   Palette: deep teal water, coral accent, warm sand neutrals
   Type: Source Serif 4 (display) + Inter (body) + IBM Plex Mono (data)
   Signature: depth-gradient rule (shallow aqua -> deep teal) used
   as a section marker, echoing the actual color shift of pool
   water from shallow to deep end. Subtle lanai-screen mesh
   texture on alternating sections nods to the screened pool
   cages present in nearly every SWFL backyard photo on this site.
   ============================================================ */

:root {
  --ink: #16302e;
  --deep-teal: #0b4f4a;
  --deep-teal-2: #0e625c;
  --lagoon: #2e9c93;
  --lagoon-light: #7fd1c6;
  --coral: #c84824;
  --coral-dark: #a53a1b;
  --sand: #faf6ee;
  --foam: #eaf6f3;
  --white: #ffffff;
  --line: rgba(11, 79, 74, 0.14);
  --shadow: 0 12px 32px -16px rgba(11, 79, 74, 0.35);
  --shadow-sm: 0 4px 14px -6px rgba(11, 79, 74, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --depth-gradient: linear-gradient(90deg, var(--lagoon-light) 0%, var(--lagoon) 45%, var(--deep-teal) 100%);
}

@font-face { font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, serif;
  font-optical-sizing: auto;
  color: var(--deep-teal);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 560; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 1.1em; }
a { color: var(--deep-teal-2); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; }
img { max-width: 100%; display: block; height: auto; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; position: relative; }
.section--tight { padding: 48px 0; }
.section--foam { background: var(--foam); }
.section--sand { background: var(--sand); }
.section--deep { background: var(--deep-teal); color: var(--white); }
.section--deep h2, .section--deep h3 { color: var(--white); }

/* Signature: lanai-mesh texture — a faint diagonal grid echoing a
   screened pool enclosure, applied only to alternating sections */
.mesh-bg {
  background-image:
    repeating-linear-gradient(58deg, rgba(11,79,74,0.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-58deg, rgba(11,79,74,0.05) 0 1px, transparent 1px 34px);
}
.section--deep.mesh-bg {
  background-image:
    repeating-linear-gradient(58deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 34px);
}

/* Depth-gradient rule — the site's recurring signature mark */
.depth-rule {
  height: 4px;
  width: 72px;
  background: var(--depth-gradient);
  border-radius: 4px;
  margin: 0 0 18px;
}
.depth-rule--center { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: 1280px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--deep-teal);
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.15;
}
.brand svg { flex-shrink: 0; }
.brand .brand-tag { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-dark); }

.main-nav { display: none; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; position: relative; }
.main-nav a:hover { color: var(--deep-teal); }
.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 260px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 0.92rem; }
.dropdown a:hover { background: var(--foam); }

.header-cta { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: "Inter", sans-serif;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.btn-coral { background: var(--coral); color: var(--white); box-shadow: 0 10px 24px -10px rgba(243,113,75,0.55); }
.btn-coral:hover { background: var(--coral-dark); }
.btn-outline { background: transparent; color: var(--deep-teal); border-color: var(--deep-teal); }
.btn-outline:hover { background: var(--deep-teal); color: var(--white); }
.btn-white { background: var(--white); color: var(--deep-teal); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  height: calc(100vh - 76px);
  height: calc(100dvh - 76px);
  background: var(--sand);
  z-index: 55;
  overflow-y: auto;
  padding: 24px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 15px 4px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.05rem; }
.mobile-nav .sub-list { padding-left: 12px; }
.mobile-nav .sub-list a { font-size: 0.95rem; color: var(--deep-teal-2); padding: 11px 4px; }
.mobile-nav .mobile-cta { margin-top: 22px; }

body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
/* .hero establishes the box; .hero-media is an absolutely positioned
   background layer so .hero-inner's content overlays on top of it
   rather than flowing below it in normal document flow. */
.hero { position: relative; color: var(--white); overflow: hidden; min-height: 460px; display: flex; align-items: center; }
.hero--short { min-height: 340px; }
.hero--tall { min-height: 620px; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media picture, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(11,48,46,0.86) 0%, rgba(11,48,46,0.56) 42%, rgba(11,48,46,0.16) 75%);
}
.hero-inner { position: relative; z-index: 2; padding: 48px 0; width: 100%; }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero p.lead { font-size: 1.15rem; max-width: 48ch; color: rgba(255,255,255,0.94); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-note { margin-top: 18px; font-size: 0.86rem; color: rgba(255,255,255,0.82); }
.page-hero .hero-inner { padding: 68px 0; }
.page-hero h1 { max-width: 22ch; }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.85); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.5); }
.breadcrumb span[aria-hidden] { margin: 0 6px; opacity: 0.6; }
.breadcrumb--on-light { color: var(--deep-teal-2); }
.breadcrumb--on-light .breadcrumb { color: var(--deep-teal-2); }
.breadcrumb--on-light .breadcrumb a { color: var(--deep-teal-2); border-bottom-color: rgba(11,79,74,0.35); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-img { aspect-ratio: 16/10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin-bottom: 2px; }
.card-body p { margin-bottom: 0; color: #3c534f; font-size: 0.96rem; flex: 1; }
.card-link { margin-top: 12px; font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--coral-dark); display: inline-flex; align-items: center; gap: 6px; }

.icon-card { padding: 26px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.icon-card .icn { width: 46px; height: 46px; border-radius: 12px; background: var(--foam); color: var(--deep-teal); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }

.two-col { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Buttons row / CTA banner ---------- */
.cta-banner {
  background: var(--deep-teal);
  color: var(--white);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,0.88); max-width: 56ch; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.form-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 30px; }
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 620px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 6px; color: var(--deep-teal); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px rgba(46,156,147,0.18); }
.form-note { font-size: 0.82rem; color: #5a6f6c; margin-top: 10px; }
.form-success { display: none; padding: 34px 28px; border-radius: 14px; background: var(--foam); border: 1px solid var(--lagoon-light); color: var(--deep-teal); text-align: center; }
.form-success.is-visible { display: block; }
.form-success:focus { outline: none; }
.form-success-icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--lagoon);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.form-success-title { font-family: "Source Serif 4", serif; font-size: 1.45rem; font-weight: 600; margin: 0 0 8px; color: var(--deep-teal); }
.form-success-body { margin: 0 auto 14px; font-weight: 400; font-size: 0.98rem; color: #3c534f; max-width: 44ch; }
.form-success-links { margin: 0; font-size: 0.9rem; color: #4d635f; }
.form-error { display: none; padding: 14px; border-radius: 10px; background: #fdece7; border: 1px solid #f3b6a3; color: #9a3418; font-size: 0.9rem; margin-top: 14px; }
.form-error.is-visible { display: block; }

/* ---------- Tools: cost estimator & symptom checker ---------- */
.tool-panel {
  background: var(--foam);
  border: 1px solid var(--lagoon-light);
  border-radius: 22px;
  padding: 32px;
}
.tool-panel .form-row { margin-bottom: 18px; }
.tool-result {
  margin-top: 22px;
  padding: 22px;
  border-radius: 14px;
  background: var(--white);
  border: 1px dashed var(--lagoon);
  display: none;
}
.tool-result.is-visible { display: block; }
.tool-result .range { font-family: "IBM Plex Mono", monospace; font-size: 1.9rem; color: var(--deep-teal); font-weight: 600; }
.tool-result .range-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--coral-dark); font-weight: 700; margin-bottom: 6px; }
.tool-disclaimer { font-size: 0.8rem; color: #5a6f6c; margin-top: 14px; }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { margin-bottom: 12px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); cursor: pointer; }
.check-item input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--lagoon); }
.check-item span { font-size: 0.96rem; }

/* ---------- Comparison table ---------- */
.compare-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
table.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--white); }
table.compare-table th, table.compare-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
table.compare-table thead th {
  background: var(--deep-teal);
  color: var(--white);
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 1.02rem;
  border-bottom: none;
}
table.compare-table thead th:first-child { border-top-left-radius: var(--radius); }
table.compare-table thead th:last-child { border-top-right-radius: var(--radius); }
table.compare-table tbody th { font-weight: 600; color: var(--deep-teal); background: var(--foam); white-space: nowrap; }
table.compare-table tbody tr:last-child td, table.compare-table tbody tr:last-child th { border-bottom: none; }

/* ---------- Process steps ---------- */
.step {
  display: grid;
  gap: 22px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
@media (min-width: 780px) { .step { grid-template-columns: 90px 1fr 1fr; } }
.step-num { font-family: "Source Serif 4", serif; font-size: 2.4rem; color: var(--lagoon-light); font-weight: 600; }
.step img { border-radius: var(--radius); box-shadow: var(--shadow-sm); aspect-ratio: 4/3; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq-item summary { cursor: pointer; padding: 16px 4px; font-weight: 600; font-family: "Source Serif 4", serif; font-size: 1.08rem; color: var(--deep-teal); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--coral); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 4px 18px; color: #3c534f; }

/* ---------- Signs / symptom cards ---------- */
.symptom-card { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.symptom-card img { aspect-ratio: 1/1; object-fit: cover; }
.symptom-card .card-body h3 { font-size: 1.05rem; }

/* ---------- Location list ---------- */
.location-pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.location-pill-list a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--foam);
  color: var(--deep-teal);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--lagoon-light);
}
.location-pill-list a:hover { background: var(--lagoon-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 56px 0 26px; }
.footer-grid { display: grid; gap: 34px; margin-bottom: 40px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { color: var(--white); font-size: 0.98rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--lagoon-light); }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.68); max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 22px; font-size: 0.8rem; color: rgba(255,255,255,0.55); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-disclosure { margin: 14px 0 0; font-size: 0.74rem; line-height: 1.5; color: rgba(255,255,255,0.42); max-width: 78ch; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  box-shadow: 0 -8px 24px -12px rgba(11,79,74,0.35);
  display: flex;
  gap: 10px;
}
.sticky-cta .btn { flex: 1; }
@media (min-width: 860px) { .sticky-cta { display: none; } }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: #4d635f; }
.section-head { max-width: 68ch; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; }
.badge-row .badge { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--deep-teal); font-weight: 600; }
.badge-row .badge svg { color: var(--coral); flex-shrink: 0; }
.spacer-64 { height: 64px; }
main { display: block; padding-bottom: 0; }
@media (max-width: 859px) { body { padding-bottom: 70px; } }

@media (min-width: 860px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}
