/* ==========================================================================
   ABO Pool & Spa — site styles
   Palette: Pacific deep, pool blue, shallow aqua, bright white, California sun
   ========================================================================== */

:root {
  --pacific: #0b3b5c;      /* deep water, headings, footer */
  --pool: #1583bd;         /* primary blue, buttons, links */
  --pool-dark: #0f6a9b;    /* button hover */
  --aqua: #8fd8ec;         /* light accents on dark */
  --shallow: #eaf7fb;      /* tinted section background */
  --white: #ffffff;
  --sun: #f6b73c;          /* sparingly: the sun mark, focus ring */
  --ink: #12304a;          /* body text */
  --muted: #4e6a80;        /* secondary text */
  --line: #d3e6ef;         /* borders */

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
  --radius-lg: 22px;
  --radius-sm: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--pacific);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--pool); }
a:hover { color: var(--pool-dark); }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--pacific);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--pool); color: var(--white); }
.btn-primary:hover { background: var(--pool-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--pacific); }
.btn-light:hover { background: var(--shallow); color: var(--pacific); }
.btn-outline-light { border-color: rgba(255,255,255,0.7); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--pacific);
}
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.nav a:not(.btn):hover,
.nav a[aria-current="page"] { color: var(--pool); }
.nav .btn { padding: 0.65rem 1.2rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  color: var(--pacific);
  cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; justify-content: center; }
}

/* ---------- Hero: the water ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(170deg, #1d9bd6 0%, #1583bd 40%, #0b4f7d 100%);
  isolation: isolate;
}
.caustics {
  position: absolute;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
}
.caustics svg { width: 100%; height: 100%; }
.caustics .layer { position: absolute; inset: 0; mix-blend-mode: screen; }
.caustics .layer-a { opacity: 0.55; animation: drift-a 26s ease-in-out infinite alternate; }
.caustics .layer-b { opacity: 0.35; animation: drift-b 34s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(4%, 3%, 0) scale(1.04); } }
@keyframes drift-b { to { transform: translate3d(-5%, -2%, 0) scale(1.06) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) {
  .caustics .layer { animation: none; }
}

.hero-inner {
  padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(5rem, 10vw, 7.5rem);
  max-width: 760px;
}
.hero h1 { color: var(--white); margin-bottom: 0.35em; }
.hero-lede {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  max-width: 34em;
  color: rgba(255,255,255,0.92);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-areas {
  margin-top: 2.5rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  list-style: none;
}
.hero-areas li { display: flex; align-items: center; gap: 0.5rem; }
.hero-areas svg { width: 18px; height: 18px; color: var(--aqua); }

/* waterline edge between hero and page */
.waterline { display: block; width: 100%; height: 48px; margin-top: -47px; position: relative; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--shallow); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head p { color: var(--muted); font-size: 1.2rem; }

/* Services: two big panels */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--white);
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--shallow);
  color: var(--pool);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}
.service-icon svg { width: 30px; height: 30px; }
.service h3 { font-size: 1.55rem; }
.service > p { color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.checklist li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2rem;
  border-top: 1px solid var(--line);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.95rem;
  width: 1.05rem;
  height: 1.05rem;
  background: var(--pool);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* schedule options strip */
.schedules {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
}
.schedule { padding: 1.5rem 1.75rem; }
.schedule + .schedule { border-left: 1px solid var(--line); }
.schedule h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.schedule p { color: var(--muted); margin: 0; font-size: 1rem; }

/* How it works (a real sequence, so numbers earn their place) */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 4.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--pacific);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: 3.75rem;
  right: -1.75rem;
  border-top: 2px dashed var(--aqua);
}
.steps p { color: var(--muted); }

/* Why us + quote factors split */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.reasons { list-style: none; padding: 0; margin: 0; }
.reasons li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.reasons li:last-child { border-bottom: 1px solid var(--line); }
.reasons svg { width: 30px; height: 30px; color: var(--pool); margin-top: 0.2rem; }
.reasons h3 { margin-bottom: 0.2em; font-size: 1.15rem; }
.reasons p { margin: 0; color: var(--muted); }

.quote-panel {
  background: var(--pacific);
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.quote-panel h2 { color: var(--white); font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.quote-factors {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.quote-factors li {
  border: 1px solid rgba(143,216,236,0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--white);
  font-size: 1rem;
}
.quote-factors span {
  display: block;
  font-weight: 400;
  color: var(--aqua);
  font-size: 0.92rem;
}

/* Service area */
.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.area {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border-top: 5px solid var(--pool);
}
.area:nth-child(2) { border-top-color: var(--aqua); }
.area:nth-child(3) { border-top-color: var(--pacific); }
.area h3 { font-size: 1.4rem; }
.area p { color: var(--muted); font-size: 1rem; margin: 0; }
.area-note { margin-top: 2rem; color: var(--muted); }

/* Testimonials (placeholders) */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.review {
  margin: 0;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.review blockquote { margin: 0 0 1.25rem; font-size: 1.1rem; }
.review figcaption { font-weight: 600; color: var(--pacific); }
.review figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; }
.stars { display: flex; gap: 2px; color: var(--sun); margin-bottom: 1rem; }
.stars svg { width: 18px; height: 18px; }

/* Closing call to action */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1583bd, #0b3b5c);
  color: var(--white);
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  isolation: isolate;
}
.cta-band .caustics { opacity: 0.6; }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-inner h2 { color: var(--white); margin-bottom: 0.25em; }
.cta-inner p { margin: 0; color: rgba(255,255,255,0.9); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #072a42;
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 2rem;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer .brand { color: var(--white); }
.site-footer .brand-name small { color: var(--aqua); }
.site-footer h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Contact page ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(170deg, #1d9bd6 0%, #1583bd 45%, #0b4f7d 100%);
  isolation: isolate;
}
.page-hero .hero-inner { padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(4rem, 8vw, 5.5rem); }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 4.5vw, 3.4rem); }

.contact-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 18px 40px -24px rgba(11,59,92,0.35);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend {
  font-weight: 600;
  color: var(--pacific);
  font-size: 1rem;
  padding: 0;
}
.field .optional { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #bcd6e2;
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pool);
  box-shadow: 0 0 0 4px rgba(21,131,189,0.18);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c2412d; }
.field-error { color: #b23a26; font-size: 0.92rem; min-height: 0; }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.2rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-block;
  padding: 0.6rem 1.05rem;
  border: 1.5px solid #bcd6e2;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.choice input:checked + span { background: var(--pool); border-color: var(--pool); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.form-actions .btn { font-size: 1.05rem; padding: 1rem 1.9rem; }
.form-actions .btn[disabled] { opacity: 0.65; cursor: progress; }
.form-note { font-size: 0.92rem; color: var(--muted); margin: 0; }

.form-status {
  display: none;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.form-status.is-success { display: block; background: #e6f7ee; color: #145c36; border: 1px solid #a9dcc0; }
.form-status.is-error { display: block; background: #fdecea; color: #8e2a1c; border: 1px solid #f1b8ae; }

.contact-aside h2 { font-size: 1.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list svg { width: 24px; height: 24px; color: var(--pool); margin-top: 0.15rem; }
.contact-list strong { display: block; color: var(--pacific); }
.contact-list a { text-decoration: none; font-weight: 600; }
.aside-note {
  background: var(--shallow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-size: 1rem;
}
.aside-note p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split, .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .services, .areas, .steps { grid-template-columns: 1fr; }
  .steps { gap: 2rem; }
  .steps li:not(:last-child)::after { display: none; }
  .schedules { grid-template-columns: 1fr; }
  .schedule + .schedule { border-left: 0; border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .quote-factors { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; justify-content: center; }
}

/* Phone buttons: vanity number on top, dialable digits underneath */
.btn-phone span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-phone small { font-family: var(--font-body); font-weight: 500; font-size: 0.82rem; opacity: 0.85; }
@media (max-width: 520px) { .btn-phone span { text-align: center; } }

/* Header logo image */
.brand-logo { height: 62px; width: auto; display: block; }
.site-header .header-inner { min-height: 82px; }
@media (max-width: 520px) { .brand-logo { height: 52px; } .site-header .header-inner { min-height: 72px; } }

/* Footer logo image (dark-background version) */
.footer-logo { height: 76px; width: auto; display: block; }

/* Playful one-liner under the one-time cleaning option */
.schedule .schedule-quip { margin-top: 0.6rem; font-weight: 600; font-size: 1rem; }
.schedule .schedule-quip a { color: var(--pool); text-decoration: none; }
.schedule .schedule-quip a:hover { text-decoration: underline; }

/* Footer tagline + description */
.site-footer .footer-tagline {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.01em; color: var(--white); margin: 1.1rem 0 0.35rem;
}
.site-footer .footer-blurb { font-size: 0.95rem; color: rgba(255,255,255,0.72); margin: 0; }
