/* ==========================================================================
   SAN DIEGO POOLMAN: SHARED STYLESHEET
   One file for every page. Edit colors, fonts and spacing in section 1 and
   the whole site updates.

   CONTENTS
   1. Design tokens        6. Cards and grids       11. Page sections
   2. Base                 7. FAQ accordion         12. Footer
   3. Utilities            8. Trust and proof       13. Mobile call bar
   4. Buttons              9. Quote form            14. Authoring helpers
   5. Header and menu     10. Heroes
   ========================================================================== */


/* 1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Colors. Orange is for call and quote buttons only. */
  --navy: #0B2545;
  --blue: #0F6FB5;
  --aqua: #2EC4D6;
  --orange: #F26B21;
  --orange-hover: #F7803A;
  --sky: #EAF6FB;
  --cloud: #F4F7FA;
  --fog: #D9E2EC;
  --slate: #475569;
  --white: #FFFFFF;
  --field-border: #64748B;       /* 4.8:1 on white (meets the 3:1 minimum for form fields) */

  /* Fonts (fallbacks keep text readable while web fonts load) */
  --font-heading: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', Arial, system-ui, sans-serif;

  /* Spacing: everything is a multiple of 8px */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 32px;
  --space-xl: 64px;
  --space-xxl: 96px;

  /* Shape */
  --radius: 12px;
  --radius-card: 16px;
  --shadow: 0 4px 20px rgba(11, 37, 69, 0.08);

  /* Layout */
  --container: 1200px;
  --measure: 680px;
  --mobile-bar-height: 76px;
}


/* 2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;      /* keeps anchor targets clear of the sticky header */
}

body {
  margin: 0;
  padding-bottom: var(--mobile-bar-height);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0 0 var(--space-s);
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--navy);
  text-wrap: balance;            /* avoids one-word last lines in headlines */
}
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); font-weight: 700; }

p { margin: 0 0 var(--space-s); }
a { color: var(--blue); }
a:hover { color: var(--navy); }

/* Focus ring: blue on light backgrounds (5.3:1), aqua on dark ones */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible,
.page-hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible { outline-color: var(--aqua); }
.form :focus-visible { outline-color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* 3. UTILITIES AND LAYOUT
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.section { padding-block: var(--space-xl); }
.section--tint { background: var(--cloud); }
.section__intro { max-width: var(--measure); margin-bottom: var(--space-l); }
.section__intro p { font-size: 1.125rem; }

.prose { max-width: var(--measure); font-size: 1.125rem; }
.prose p:last-child { margin-bottom: 0; }

.split { display: grid; gap: var(--space-l); align-items: start; }

.skip-link {
  position: absolute; left: var(--space-s); top: -100px; z-index: 100;
  padding: 12px 20px; border-radius: var(--radius);
  background: var(--navy); color: var(--white);
}
.skip-link:focus { top: var(--space-s); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (min-width: 768px) { .section { padding-block: var(--space-xxl); } }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-xl); } }


/* 4. BUTTONS (orange = calls and quotes only)
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 52px; padding: 0 28px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { background: var(--orange-hover); color: var(--navy); }

.btn--secondary { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn--secondary:hover { background: var(--sky); color: var(--blue); }

.btn--on-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn--on-dark:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }

.btn--small { min-height: 48px; padding: 0 20px; font-size: 1rem; }


/* 5. HEADER AND MENU
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--fog); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); min-height: 72px; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-m); }

.logo {
  display: inline-flex; align-items: center; gap: 0.28em; min-height: 44px;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.375rem;
  letter-spacing: -0.01em; color: var(--navy); text-decoration: none;
}
.logo span { color: var(--blue); }

/* Desktop navigation */
.site-nav { display: none; }
.site-nav ul { display: flex; gap: var(--space-l); list-style: none; margin: 0; padding: 0; }
.site-nav a { padding: var(--space-xs) 0; color: var(--navy); font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }

.header-phone { display: none; font-weight: 600; color: var(--navy); text-decoration: none; }
.header-phone:hover { color: var(--blue); }

/* Phone menu (a <details> element, so it works without JavaScript) */
.menu summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px;
  border-radius: var(--radius); font-weight: 600; color: var(--navy); cursor: pointer; list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 24px; height: 24px; }
.menu[open] nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--fog); box-shadow: var(--shadow);
}
.menu ul { list-style: none; margin: 0; padding: 8px 20px 16px; }
.menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--fog); color: var(--navy); font-weight: 600; text-decoration: none; }
.menu li:last-child a { border-bottom: 0; }
.menu a[aria-current="page"] { color: var(--blue); }

/* The sticky bottom bar already carries the quote button on phones */
@media (max-width: 899px) { .site-header__actions .btn { display: none; } }
@media (min-width: 900px) {
  .site-nav { display: block; }
  .header-phone { display: inline; }
  .menu { display: none; }
}


/* 6. CARDS AND GRIDS
   ========================================================================== */
.cards { display: grid; gap: var(--space-l); }
.cards__more { margin-top: var(--space-l); font-weight: 600; }

.card {
  display: flex; flex-direction: column; padding: var(--space-l);
  background: var(--white); border: 1px solid var(--fog); border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--space-m);
  border-radius: 14px; background: var(--sky); color: var(--blue);
}
.card__icon svg { width: 28px; height: 28px; }
.card p { flex: 1; }
.card .btn { align-self: flex-start; margin-top: var(--space-xs); }
.card__more { margin: var(--space-s) 0 0; font-weight: 600; }

/* Text-only column grids: features, local conditions, values */
.features, .local, .values { display: grid; gap: var(--space-l); }
.features__list, .local, .values { list-style: none; margin: 0; padding: 0; }
.features__list { display: grid; gap: var(--space-l); }
.features__list h3, .local h3, .values h3 { margin-bottom: var(--space-xs); }
.features__list p, .local p, .values p { margin: 0; }

/* Pill links: cities, jump links */
.nearby, .jump ul, .areas { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-s); list-style: none; margin: 0; padding: 0; }
.nearby a, .jump a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  background: var(--white); border: 1px solid var(--fog); border-radius: 999px;
  color: var(--navy); font-weight: 600; text-decoration: none;
}
.nearby a:hover, .jump a:hover { border-color: var(--blue); color: var(--blue); }
.jump { padding-block: var(--space-m); background: var(--sky); }

.areas { gap: var(--space-xs); }
.areas li { border-radius: 999px; background: var(--sky); font-weight: 500; }
.areas li:hover { background: var(--white); outline: 1px solid var(--blue); }
.areas a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; color: var(--navy); text-decoration: none; }
.areas a:hover { color: var(--blue); }

/* Text links that sit on their own line need a taller tap area */
.cards__more a, .card__more a { display: inline-block; padding: 12px 0; }

@media (min-width: 700px)  { .values { grid-template-columns: 1fr 1fr; gap: var(--space-l) var(--space-xl); } }
@media (min-width: 800px)  {
  .cards, .local { grid-template-columns: repeat(3, 1fr); }
  .local { gap: var(--space-xl); }
}
@media (min-width: 900px)  {
  .features { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-xl); align-items: start; }
  .features__list { grid-template-columns: 1fr 1fr; gap: var(--space-l) var(--space-xl); }
}
@media (min-width: 1000px) { .values { grid-template-columns: repeat(3, 1fr); } }


/* 7. FAQ ACCORDION (works without JavaScript)
   ========================================================================== */
.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--fog); }
.faq summary {
  position: relative; padding: var(--space-m) 40px var(--space-m) 0;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; color: var(--navy);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.75rem; font-weight: 400; line-height: 1; color: var(--blue);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding-bottom: var(--space-m); }

/* Services page: one FAQ group per service */
.faq-group { display: grid; gap: var(--space-s); padding-block: var(--space-l); border-top: 1px solid var(--fog); }
.faq-group:first-of-type { border-top: 0; padding-top: 0; }
.faq-group h3 { margin: 0; }
@media (min-width: 900px) { .faq-group { grid-template-columns: 0.7fr 1.3fr; gap: var(--space-xl); } }


/* 8. TRUST AND PROOF
   ========================================================================== */
.trust { padding-block: var(--space-m); background: var(--sky); }
.trust__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m) var(--space-s); list-style: none; margin: 0; padding: 0; }
.trust__item { display: flex; align-items: center; gap: 12px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.trust__item svg { width: 28px; height: 28px; flex: none; color: var(--blue); }
.trust__item small { display: block; font-size: 0.875rem; font-weight: 500; color: var(--slate); }

.trust-list { display: grid; gap: var(--space-m); max-width: 820px; list-style: none; margin: 0; padding: 0; }
.trust-list li { display: flex; gap: var(--space-s); align-items: flex-start; }
.trust-list svg { width: 28px; height: 28px; flex: none; margin-top: 2px; color: var(--blue); }
.trust-list strong { color: var(--navy); }

@media (min-width: 900px) { .trust__list { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }


/* 9. QUOTE FORM
   ========================================================================== */
.form { padding: var(--space-l); background: var(--white); color: var(--slate); border-radius: var(--radius-card); }
.form h3 { margin-bottom: var(--space-m); }
.form .btn { width: 100%; }
.form__note { margin: var(--space-s) 0 0; font-size: 0.9375rem; text-align: center; }

.field { margin-bottom: var(--space-m); }
.field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: inherit; color: var(--navy); background: var(--white);
  border: 1px solid var(--field-border); border-radius: var(--radius);
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }

.field--row { display: grid; gap: var(--space-m); margin-bottom: var(--space-m); }
.field--row .field { margin-bottom: 0; }
@media (min-width: 600px) { .field--row { grid-template-columns: 1fr 1fr; } }

.trap { position: absolute; left: -9999px; }   /* spam trap: real visitors never see it */


/* 10. HEROES
   Home page uses .hero, every other page uses .page-hero. They share styling.
   ========================================================================== */
.hero, .page-hero {
  position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(160deg, var(--navy) 0%, #0D3A6B 100%);
}
.hero { padding-top: var(--space-xl); }
.page-hero { padding-block: var(--space-xl) 120px; }
.hero h1, .page-hero h1 { color: var(--white); }
.page-hero h1 { max-width: 15em; }

.hero__lead, .page-hero__lead { font-size: 1.1875rem; color: #D6E6F5; }
.hero__lead { max-width: 34em; }
.page-hero__lead { max-width: 36em; }

.hero__actions, .page-hero__actions { display: flex; flex-direction: column; gap: var(--space-s); margin-top: var(--space-m); }
.hero__note, .page-hero__note { margin: var(--space-m) 0 0; font-size: 0.9375rem; color: #B8D0E6; }

.hero__wave, .page-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.hero__wave svg, .page-hero__wave svg { width: 100%; height: 72px; }

.hero__grid { display: grid; gap: var(--space-l); align-items: center; padding-bottom: 120px; }
.hero__visual { display: none; }

/* Decorative "water" panel (pure CSS and SVG, no image files) */
.water {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 28px;
  background: linear-gradient(180deg, #2EC4D6 0%, #0F6FB5 70%, #0B4F8A 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.water svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.water__overlay {
  position: absolute; left: var(--space-m); right: var(--space-m); bottom: var(--space-m);
}
.water__logo {
  display: block; width: 100%; height: auto; margin-bottom: var(--space-s);
}
.water__badge {
  padding: var(--space-s) var(--space-m); border-radius: var(--radius-card);
  background: var(--white); color: var(--navy); box-shadow: var(--shadow);
  font-family: var(--font-heading); font-weight: 700; line-height: 1.3;
}
.water__badge small { display: block; margin-top: 2px; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--slate); }

@media (min-width: 600px) {
  .hero__actions, .page-hero__actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .hero { padding-top: var(--space-xxl); }
  .page-hero { padding-block: var(--space-xxl) 150px; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--space-xl); padding-bottom: 150px; }
  .hero__visual { display: block; }
}


/* 11. PAGE SECTIONS
   ========================================================================== */

/* Breadcrumb */
.crumbs { background: var(--sky); font-size: 0.9375rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--slate); }
.crumbs a { display: inline-block; padding: 13px 4px; }
.crumbs [aria-current="page"] { font-weight: 600; color: var(--navy); }

/* Services page: one block per service */
.service { display: grid; gap: var(--space-l); align-items: start; }
.service__name { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-s); font-weight: 600; color: var(--blue); }
.service__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--sky); color: var(--blue); }
.service__icon svg { width: 26px; height: 26px; }
.service__lead { max-width: var(--measure); font-size: 1.125rem; }
.service__actions { display: flex; flex-direction: column; gap: var(--space-s); margin-top: var(--space-m); }
.service__note { margin: var(--space-s) 0 0; font-size: 0.9375rem; }

.facts { margin: 0; padding: var(--space-l); background: var(--white); border: 1px solid var(--fog); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.facts dt { margin-bottom: 6px; font-family: var(--font-heading); font-weight: 700; color: var(--navy); }
.facts dd { margin: 0 0 var(--space-m); }
.facts dd:last-child { margin-bottom: 0; }
.facts .outcome { font-size: 1.125rem; font-weight: 500; color: var(--navy); }

@media (min-width: 600px) { .service__actions { flex-direction: row; flex-wrap: wrap; } }
@media (min-width: 900px) {
  .service { grid-template-columns: 1.15fr 0.85fr; gap: var(--space-xl); }
  .service--flip { grid-template-columns: 0.85fr 1.15fr; }
  .service--flip .service__main { order: 2; }   /* alternate sides for visual rhythm */
}

/* Pillar page: warning signs and numbered steps */
.signs { display: grid; gap: 12px; list-style: none; margin: 0 0 var(--space-m); padding: 0; }
.signs li { position: relative; padding-left: 36px; }
.signs li::before {
  content: "!"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--sky); color: var(--blue);
  font-size: 0.9375rem; font-weight: 800; line-height: 24px; text-align: center;
}
.steps { counter-reset: step; display: grid; gap: var(--space-m); list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding-left: 52px; }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white);
  font-family: var(--font-heading); font-weight: 700; line-height: 36px; text-align: center;
}
.steps strong { color: var(--navy); }

/* Why Us page */
.story { display: grid; gap: var(--space-l); }
.story__body { max-width: var(--measure); font-size: 1.125rem; }
.story__body p:last-child { margin-bottom: 0; }
.story__pull { font-weight: 600; color: var(--navy); }
.mission h2 { max-width: 16em; margin-bottom: var(--space-m); font-size: clamp(1.75rem, 3.5vw + 1rem, 3rem); }
.mission p { max-width: var(--measure); margin: 0; font-size: 1.1875rem; }

.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; overflow: hidden; background: var(--white); border: 1px solid var(--fog); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.compare th, .compare td { padding: var(--space-s) var(--space-m); border-bottom: 1px solid var(--fog); text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--font-heading); font-size: 1.0625rem; color: var(--navy); background: var(--cloud); }
.compare thead th:last-child { color: var(--blue); background: var(--sky); }
.compare tbody td:last-child { font-weight: 600; color: var(--navy); background: #F7FCFE; }
.compare tbody tr:last-child td { border-bottom: 0; }

@media (min-width: 900px) { .story { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-xl); align-items: start; } }

/* Closing call to action */
.cta { background: var(--navy); color: #D6E6F5; }
.cta h2 { color: var(--white); }
.cta__grid { display: grid; gap: var(--space-xl); }
.cta__areas { margin-top: var(--space-m); font-size: 0.9375rem; color: #B8D0E6; }
.cta__phone {
  display: inline-block; margin-top: var(--space-s);
  font-family: var(--font-heading); font-weight: 800; font-size: 1.75rem; color: var(--white); text-decoration: none;
}
.cta__phone:hover { color: var(--aqua); }
.cta__proof { display: grid; gap: var(--space-xs); list-style: none; margin: var(--space-m) 0 0; padding: 0; }
.cta__proof li { display: flex; gap: 12px; align-items: flex-start; }
.cta__proof svg { width: 22px; height: 22px; flex: none; margin-top: 3px; color: var(--aqua); }
.cta__proof + .cta__phone { margin-top: var(--space-m); }

@media (min-width: 900px) { .cta__grid { grid-template-columns: 1fr 1fr; align-items: center; } }


/* 12. FOOTER
   ========================================================================== */
.site-footer { padding-block: var(--space-xl) var(--space-l); background: #071A31; color: #B8C7D9; font-size: 0.9375rem; }
.site-footer a { display: inline-block; padding: 10px 0; color: #D6E6F5; }
.site-footer a:hover { color: var(--aqua); }
.site-footer h2 { margin-bottom: var(--space-s); font-size: 1rem; color: var(--white); }
.site-footer ul { display: grid; list-style: none; margin: 0; padding: 0; }
.site-footer .logo { color: var(--white); }
.site-footer .logo span { color: var(--aqua); }
.footer__grid { display: grid; gap: var(--space-l); }
.footer__legal { margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid rgba(255, 255, 255, 0.14); }

@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }


/* 13. MOBILE CALL BAR (phones only)
   ========================================================================== */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--white); border-top: 1px solid var(--fog); box-shadow: 0 -4px 20px rgba(11, 37, 69, 0.1);
}
.mobile-bar .btn { padding: 0 12px; }

@media (min-width: 768px) {
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}


/* 14. AUTHORING HELPERS
   ========================================================================== */
/* Highlights placeholder text you still need to replace. Delete the class when done. */
