/* =========================================================
   Clarity Pool & Spa
   Brand: navy #0B2A4A, aqua #1CB5C8, Poppins
   ========================================================= */

:root {
  /* Brand */
  --navy: #0B2A4A;
  --navy-deep: #071D34;
  --aqua: #1CB5C8;
  --aqua-soft: #8FE0EA;
  --teal: #13707F;          /* aqua that passes contrast as text on white */
  --mist: #E8F6F9;

  /* Semantic */
  --bg: #FFFFFF;
  --bg-alt: #F4F9FB;
  --ink: var(--navy);
  --ink-muted: #46596E;
  --line: #D6E7EC;
  --on-dark: #FFFFFF;
  --on-dark-muted: #B9CBDA;
  --focus: #1CB5C8;

  /* Type */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h3: 1.2rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 5vw, 5rem);

  /* Space & shape */
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(11, 42, 74, .06), 0 8px 24px rgba(11, 42, 74, .08);
  --shadow-lg: 0 2px 4px rgba(11, 42, 74, .06), 0 24px 48px rgba(11, 42, 74, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

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

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 12px -6px 0 -2px var(--aqua); margin-right: 8px; }
.eyebrow-light { color: var(--aqua-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.5rem;
  font: 600 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--aqua); color: var(--navy); }
.btn-primary:hover { background: #3CC6D6; box-shadow: 0 8px 20px rgba(28, 181, 200, .35); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-deep); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .06); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .14); }
.btn-ghost-dark { color: var(--navy); border-color: var(--navy); background: #fff; }
.btn-sm { min-height: 44px; padding: .6rem 1.15rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: #fff;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.site-header.is-solid, .site-header.menu-open { background: rgba(255, 255, 255, .97); color: var(--navy); box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(11, 42, 74, .06); backdrop-filter: blur(8px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; max-width: 1320px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand-mark { width: 38px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; }
.brand-sub { font-size: .62rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; margin-top: .3rem; color: var(--aqua-soft); }
.is-solid .brand-sub, .menu-open .brand-sub { color: var(--teal); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 2rem; }
.nav ul { display: flex; gap: 1.35rem; }
.nav a { white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding-block: .5rem; }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--aqua); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav ul a:hover::after { transform: scaleX(1); }
.nav-phone { font-weight: 600 !important; }
.header-actions { display: flex; align-items: center; gap: .75rem; }

.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 10px; border-radius: 10px; }
.menu-toggle span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle span + span { margin-top: 6px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 860px); display: flex; align-items: center; color: #fff; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; z-index: -2; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(7, 29, 52, .55) 0%, rgba(7, 29, 52, .15) 35%, rgba(7, 29, 52, .55) 65%, rgba(7, 29, 52, .92) 100%),
  linear-gradient(90deg, rgba(7, 29, 52, .55) 0%, rgba(7, 29, 52, 0) 70%); }
/* Equal space above and below, measured from under the fixed header, so content sits in the visual middle */
.hero-content { padding-top: calc(var(--header-h) + clamp(2rem, 5vh, 3.5rem)); padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.hero h1 { max-width: 12ch; margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--aqua); }
.hero-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); max-width: 40rem; color: #E3EEF5; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.5rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; font-size: var(--fs-sm); font-weight: 500; color: #DCE8F0; }
.hero-points li { display: inline-flex; align-items: center; gap: .55rem; }
.hero-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); }

/* ---------- About ---------- */
/* Short teaser after Services: photo on the left, a few lines and a button on the right (stacks on phones) */
.about-grid { display: grid; grid-template-columns: 1.45fr 1fr; align-items: center; gap: clamp(2.5rem, 4vw, 3.75rem); }
.about-copy { max-width: 32rem; }
.about-copy .btn { margin-top: .75rem; }
.about-media { position: relative; margin: 0; }
/* Photo switcher: slides stack and crossfade; arrows + click + swipe change them */
.gallery { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--navy); }
.js .gallery { cursor: pointer; touch-action: pan-y; }
.gallery-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s var(--ease); }
.about-media .gallery { aspect-ratio: 3 / 2; }
.about-media .gallery-slide { object-position: center 80%; }
.gallery-tall { aspect-ratio: 4 / 5; } /* service page sidebar switcher */
.detail-gallery { margin: 0; }
.gallery-slide.is-active { opacity: 1; }
.gallery-controls {
  position: absolute; left: .75rem; top: .75rem; display: flex; align-items: center; gap: .15rem; padding: .2rem;
  background: rgba(7, 29, 52, .78); border-radius: 999px; color: #fff; cursor: default;
}
.gallery-controls[hidden] { display: none; }
.gallery-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer; transition: background-color .2s var(--ease);
}
.gallery-btn:hover { background: rgba(255, 255, 255, .14); }
.gallery-btn:active { background: rgba(255, 255, 255, .24); }
.gallery-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.gallery-count { min-width: 2.6rem; text-align: center; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.about-badge {
  position: absolute; right: -1rem; bottom: -1.5rem; display: flex; align-items: center; gap: .8rem;
  max-width: 15rem; padding: 1rem 1.2rem; background: var(--navy); color: #fff; border-radius: var(--radius);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.45; box-shadow: var(--shadow-lg);
}
.about-badge svg { width: 34px; height: 38px; flex: none; }
.about-copy > p { color: var(--ink-muted); font-size: var(--fs-lg); }
.check-list { display: grid; gap: 1.1rem; margin: 1.75rem 0 2.25rem; }
.check-list li { display: flex; gap: .9rem; color: var(--ink-muted); }
.check-list strong { color: var(--ink); font-weight: 600; }
.check-list .icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--mist); color: var(--teal); stroke-width: 3; margin-top: .1rem; }

/* ---------- Services ---------- */
.services { background: var(--bg-alt); }
.section-head { max-width: 40rem; margin: 0 auto 3rem; text-align: center; }
.section-head > p:last-child { color: var(--ink-muted); font-size: var(--fs-lg); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.service-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .service-img img { transform: scale(1.05); }
.service-body { padding: 1.4rem 1.4rem 1.6rem; }
/* Whole card is one link: the title's link stretches over the card (one tab stop, one link for screen readers) */
.service-card { position: relative; cursor: pointer; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.service-card:has(.card-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.service-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.service-body h3 { text-wrap: balance; }
.card-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: 1rem; font-size: .95rem; font-weight: 600; color: var(--teal); }
.card-more .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.service-card:hover .card-more .icon { transform: translateX(4px); }
.service-card:hover .card-link { color: var(--teal); }
.service-body h3 { margin-bottom: .5rem; }
.service-body p { color: var(--ink-muted); font-size: .95rem; margin: 0; }

.seasonal {
  margin-top: 1.5rem; display: flex; align-items: center; gap: 1.5rem;
  padding: 1.75rem 2rem; border-radius: var(--radius-lg); background: var(--navy); color: #fff;
  background-image: radial-gradient(circle at 100% 0%, rgba(28, 181, 200, .25), transparent 45%);
}
.seasonal-icon { width: 52px; height: 52px; flex: none; padding: 12px; border-radius: 50%; background: rgba(28, 181, 200, .15); color: var(--aqua); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.seasonal-copy { flex: 1; }
.seasonal-copy h3 { margin-bottom: .3rem; }
.seasonal-copy p { margin: 0; color: var(--on-dark-muted); }

/* ---------- Process ---------- */
.process { position: relative; isolation: isolate; overflow: hidden; }
.process-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.process::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(11, 42, 74, .9) 0%, rgba(11, 42, 74, .55) 55%, rgba(19, 112, 127, .35) 100%); }
.process-inner { display: flex; }
.process-card { width: 100%; max-width: 40rem; background: #fff; border-radius: var(--radius-lg); padding: clamp(1.75rem, 4vw, 3rem); box-shadow: var(--shadow-lg); }
.steps { counter-reset: step; display: grid; gap: 1.6rem; margin: 1.5rem 0 2.25rem; position: relative; }
.steps li { display: flex; gap: 1.1rem; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: -1.2rem; width: 2px; background: linear-gradient(var(--aqua), var(--line)); }
.step-num { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; }
.steps h3 { margin: .45rem 0 .3rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-muted); font-size: .95rem; }

/* ---------- Areas ---------- */
.areas-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.areas-copy > p { color: var(--ink-muted); font-size: var(--fs-lg); }
.area-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1.75rem; }
.area-list li { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; background: #fff; }
.area-list li::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 4px var(--mist); }
.area-list li:first-child { background: var(--navy); color: #fff; border-color: var(--navy); }
.area-list li:first-child::before { box-shadow: 0 0 0 4px rgba(28, 181, 200, .25); }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--mist); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Home: request form ---------- */
.home-quote { background: var(--navy); color: #fff; background-image: radial-gradient(ellipse at 100% 0%, rgba(28, 181, 200, .22), transparent 50%); }
.home-quote-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.home-quote-copy > p { color: var(--on-dark-muted); font-size: var(--fs-lg); }
.home-quote-phone { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; margin-top: .5rem; color: #fff; font-weight: 500; text-decoration: none; }
.home-quote-phone .icon { color: var(--aqua); }
.home-quote-phone:hover { color: var(--aqua); }

/* ---------- FAQ ---------- */
.faq { background: var(--bg-alt); }
.faq-inner { max-width: 860px; }
.faq-list { display: grid; gap: .75rem; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.faq-list details[open] { border-color: var(--aqua); box-shadow: var(--shadow); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 56px; padding: 1.1rem 1.4rem; font-weight: 600; font-size: 1.02rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313707F' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .25s var(--ease), background-color .2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); background-color: var(--aqua); }
.faq-list details p { padding: 0 1.4rem 1.3rem; margin: 0; color: var(--ink-muted); }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: #fff; background-image: radial-gradient(ellipse at 0% 100%, rgba(28, 181, 200, .22), transparent 50%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-copy > p { color: var(--on-dark-muted); font-size: var(--fs-lg); }
.contact-list { display: grid; gap: 1rem; margin-top: 2rem; }
.contact-list li { display: flex; align-items: center; gap: .85rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-list .icon { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--aqua); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--aqua); }

.quote-form { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-lg); display: grid; gap: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-size: .9rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem .95rem;
  font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2A4A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--aqua); background-color: #fff; box-shadow: 0 0 0 4px rgba(28, 181, 200, .2); }
.field [aria-invalid="true"] { border-color: #C2362B; }
.field-error { margin: 0; color: #B3261E; font-size: .85rem; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-size: .95rem; font-weight: 500; min-height: 1.4em; }
.form-status.is-success { color: var(--teal); }
.form-status.is-error { color: #B3261E; }
.quote-form button[disabled] { opacity: .7; cursor: progress; }

/* ---------- Inner pages ---------- */
.nav ul a[aria-current="page"]::after, .nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Contact page: "Say Hello" */
.hello {
  padding: calc(var(--header-h) + clamp(2rem, 5vw, 3.5rem)) 0 var(--section-y);
  background: var(--navy); color: #fff;
  background-image: radial-gradient(ellipse at 100% 0%, rgba(28, 181, 200, .22), transparent 50%), radial-gradient(ellipse at 0% 100%, rgba(28, 181, 200, .12), transparent 45%);
}
.hello-title { text-align: center; font-size: clamp(2.3rem, 1.4rem + 4vw, 4.25rem); margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.hello-title .accent { color: var(--aqua); }
.hello-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
.hello-media { margin: 0; height: 100%; min-height: 560px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.hello-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

.hello-card { background: #FBFCFD; color: var(--ink); border-radius: 26px; padding: clamp(1.75rem, 4vw, 3rem); box-shadow: 0 30px 60px rgba(0, 0, 0, .25); }
.step-form-title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); margin-bottom: 1.25rem; }
.step-progress { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.step-bar { height: 6px; border-radius: 999px; background: var(--line); transition: background-color .3s var(--ease); }
.step-bar.is-active { background: var(--aqua); }
.step-label { font-size: var(--fs-sm); font-weight: 600; color: var(--teal); margin-bottom: 1.5rem; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 1rem; }
.step[hidden] { display: none; }
.step:not([hidden]) { animation: step-in .35s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.pill-field { position: relative; display: grid; gap: .35rem; }
.pill-label { padding-left: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.pill-label .optional { font-weight: 400; color: var(--ink-muted); }
.pill-field input, .pill-field select, .pill-field textarea {
  width: 100%; min-height: 58px; padding: 0 1.4rem;
  font: 400 1.05rem/1.4 var(--font); color: var(--ink);
  background: #E2EEF3; border: 2px solid transparent; border-radius: 999px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.pill-field textarea { padding: 1rem 1.4rem; min-height: 130px; border-radius: 24px; resize: vertical; }
.pill-field ::placeholder { color: #4B6075; opacity: 1; }
.pill-field input:focus, .pill-field select:focus, .pill-field textarea:focus { outline: none; background: #fff; border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(28, 181, 200, .2); }
.pill-field [aria-invalid="true"] { border-color: #C2362B; background: #FDF1F0; }
.pill-input { position: relative; }
.pill-field-icon .icon { position: absolute; left: 1.3rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-muted); pointer-events: none; }
.pill-field-icon input { padding-left: 3.3rem; }
.pill-select select { appearance: none; cursor: pointer; padding-right: 3rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2A4A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.3rem center; background-size: 20px; }
.pill-select select:invalid { color: #4B6075; }
.pill-field .field-error { padding-left: 1.4rem; }

.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; }
.step-actions .btn-primary { min-width: 160px; }
.step[data-step="1"] .step-actions { justify-content: flex-start; }
.btn-text { background: transparent; color: var(--ink); padding-inline: .5rem; }
.btn-text:hover { color: var(--teal); }
.step-form .form-status { margin-top: 1rem; }
.step-form .form-status:empty { display: none; }
.step-form button[disabled] { opacity: .7; cursor: progress; }

/* Home page: ways to reach us */
.way-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.way-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; min-width: 0; }
.way-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); color: var(--teal); margin-bottom: 1rem; }
.way-card h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.way-card p { color: var(--ink-muted); font-size: .95rem; margin-bottom: 1rem; }
.way-link { margin-top: auto; font-weight: 600; color: var(--teal); text-decoration: none; overflow-wrap: anywhere; display: inline-flex; min-height: 44px; align-items: center; }
.way-link:hover { color: var(--navy); text-decoration: underline; }

.next-row { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.next-row h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.next-steps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: next; }
.next-steps-list li { display: flex; gap: .8rem; align-items: flex-start; color: var(--on-dark-muted); font-size: .95rem; }
.next-steps-list .step-num { width: 34px; height: 34px; font-size: .9rem; background: var(--aqua); color: var(--navy); }

/* ---------- Service detail pages ---------- */
.page-hero {
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 6vw, 4rem);
  background: var(--navy); color: #fff;
  background-image: radial-gradient(ellipse at 100% 0%, rgba(28, 181, 200, .25), transparent 55%);
}
.page-hero h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); margin-bottom: .75rem; }
.page-lead { max-width: 40rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: #DCE8F0; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: var(--fs-sm); color: var(--on-dark-muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--aqua-soft); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.detail-copy h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); }
.detail-copy h2:not(:first-child) { margin-top: 2.5rem; }
.detail-copy > p { color: var(--ink-muted); font-size: var(--fs-lg); }
.detail-list { margin: 1.25rem 0 0; }
.detail-list li { align-items: flex-start; }
.detail-side { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.detail-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.detail-img-tall { aspect-ratio: 4 / 5; } /* shows a portrait photo uncropped */
.side-cta { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 1.75rem; text-align: center; background-image: radial-gradient(circle at 100% 0%, rgba(28, 181, 200, .25), transparent 50%); }
.side-cta-title { font-size: 1.3rem; font-weight: 600; margin-bottom: .35rem; }
.side-cta p { color: var(--on-dark-muted); }
.side-cta strong { color: var(--aqua); }
.side-cta-phone { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: .5rem; color: #fff; font-weight: 500; text-decoration: none; }
.side-cta-phone:hover { color: var(--aqua); }

.other-services { background: var(--bg-alt); }
.other-services h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin-bottom: 1.5rem; }
.other-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.other-link {
  display: flex; align-items: center; gap: 1rem; min-height: 88px; padding: .75rem 1.1rem .75rem .75rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.other-link img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.other-link span { flex: 1; }
.other-link .icon { color: var(--teal); transition: transform .2s var(--ease); }
.other-link:hover { border-color: var(--aqua); box-shadow: var(--shadow); transform: translateY(-2px); }
.other-link:hover .icon { transform: translateX(3px); }

@media (max-width: 900px) {
  .detail-grid, .other-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* Four service cards: 4 across on wide screens, 2x2 below ~1180px, 1 column on phones */
@media (max-width: 1180px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Services overview page ---------- */
.service-grid-wide { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.service-grid-wide .service-img { aspect-ratio: 4 / 3; }
.service-grid-wide .service-body { padding: 1.6rem 1.75rem 1.75rem; }
.service-grid-wide .service-body h3 { font-size: 1.35rem; }
.service-grid-wide .service-body p { font-size: 1rem; }
.services-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; margin-top: 3rem; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.services-cta h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); margin-bottom: .35rem; }
.services-cta p { color: var(--ink-muted); margin: 0; max-width: 36rem; }
.services-cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 760px) {
  .service-grid-wide { grid-template-columns: 1fr; }
  .services-cta-actions, .services-cta-actions .btn { width: 100%; }
}

/* ---------- About Us page ---------- */
.owner-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.owner-grid-flip { grid-template-columns: 1.1fr .9fr; }
.owner-photo { margin: 0; }
.owner-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--navy); }
.owner-copy h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); }
.owner-copy > p { color: var(--ink-muted); font-size: var(--fs-lg); }
.owner-proof { margin-top: 1.75rem; }
.owner-expect { background: var(--bg-alt); }
.about-cta { background: var(--navy); color: #fff; padding-block: clamp(3rem, 6vw, 4.5rem); background-image: radial-gradient(ellipse at 100% 0%, rgba(28, 181, 200, .22), transparent 50%); }
.about-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; }
.about-cta h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: .35rem; }
.about-cta p { margin: 0; color: var(--on-dark-muted); font-size: var(--fs-lg); }
.about-cta strong { color: var(--aqua); }
.about-cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 900px) {
  .owner-grid, .owner-grid-flip { grid-template-columns: 1fr; }
  .owner-photo { max-width: 460px; }
  .owner-grid-flip .owner-photo { order: -1; }
}
@media (max-width: 640px) {
  .about-cta-actions, .about-cta-actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark-muted); padding-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.brand-light { color: #fff; }
.footer-tag { margin-top: 1rem; color: var(--aqua-soft); font-weight: 500; }
.footer-col h3 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a { text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--aqua); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Mobile quick bar ---------- */
.mobile-bar { display: none; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
/* Collapse the header menu before its seven links, phone and button stop fitting on one line (~1150px) */
@media (max-width: 1180px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; color: var(--navy); padding: .5rem var(--gutter) 1.5rem; box-shadow: 0 12px 24px rgba(11, 42, 74, .12);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: flex; align-items: center; min-height: 52px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav ul a::after { display: none; }
  .nav-phone { border-bottom: 0 !important; color: var(--teal); }
  .menu-toggle { display: block; }
  .header-actions { margin-left: auto; }
  .nav a[aria-current="page"], .nav a[aria-current="true"] { color: var(--teal); }
}

@media (max-width: 1080px) {
}

@media (max-width: 900px) {
  .about-grid, .areas-grid, .contact-grid, .hello-grid, .home-quote-grid { grid-template-columns: 1fr; }

  .way-grid, .next-steps-list { grid-template-columns: 1fr; }
  .next-row { grid-template-columns: 1fr; }
  .hello-media { min-height: 0; aspect-ratio: 4 / 3; }
  /* Tablets and phones: photo runs to the screen edges and goes square (taller) */
  .about-media .gallery { margin-inline: calc(var(--gutter) * -1); aspect-ratio: 1 / 1; border-radius: 0; box-shadow: none; }
  .about-media .gallery-slide { object-position: 50% 50%; }
  .about-media .gallery-slide:nth-child(2) { object-position: 66% 50%; } /* keeps Cameron in frame on the right */
  .about-badge { right: 1rem; bottom: -2.5rem; }
  .about-copy { margin-top: 2.5rem; }
  .seasonal { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .header-cta { display: none; }
  .brand-mark { width: 32px; height: 36px; }
  .brand-name { font-size: 1.25rem; }
  .hero { min-height: 92svh; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .service-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hello-card { padding: 1.5rem 1.25rem; }
  .pill-field input, .pill-field select, .pill-field textarea { font-size: 1rem; padding-inline: 1.1rem; }
  .pill-field-icon .icon { left: 1rem; }
  .pill-field-icon input { padding-left: 2.8rem; }
  .area-list { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 76px; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: .6rem;
    position: fixed; inset: auto 0 0; z-index: 40;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); box-shadow: 0 -1px 0 var(--line), 0 -8px 20px rgba(11, 42, 74, .08);
    transform: translateY(110%); transition: transform .3s var(--ease);
  }
  .mobile-bar.is-visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Home contact section head */
.contact-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.contact-head > div { max-width: 36rem; }
.contact-head p:last-child { color: var(--on-dark-muted); font-size: var(--fs-lg); margin: 0; }


/* ---------- Services dropdown ----------
   "Services" stays a real link; the chevron button opens the list (click/tap/keyboard),
   and on mouse devices hovering also opens it. Phones show the list expanded in the menu. */
.has-sub { position: relative; }
.sub-head { display: flex; align-items: center; }
.sub-toggle {
  display: inline-grid; place-items: center; width: 28px; height: 44px; margin-left: .1rem; padding: 0;
  background: transparent; border: 0; border-radius: 8px; color: inherit; cursor: pointer;
}
.sub-toggle .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.has-sub.is-open .sub-toggle .icon { transform: rotate(180deg); }
.nav .sub-menu { display: grid; gap: 2px; }
.nav .sub-menu a[href]::after { display: none; }

@media (min-width: 1181px) {
  .nav > ul { align-items: center; }
  .sub-menu {
    position: absolute; top: calc(100% + .5rem); left: -1rem; z-index: 60; min-width: 270px; padding: .5rem;
    background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s;
  }
  /* Invisible bridge so the mouse can travel from "Services" down to the panel without it closing */
  .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -.75rem; height: .75rem; }
  .has-sub.is-open .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  @media (hover: hover) {
    .has-sub:hover .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
    .has-sub:hover .sub-toggle .icon { transform: rotate(180deg); }
  }
  .nav .sub-menu a {
    display: flex; align-items: center; min-height: 44px; padding: .55rem .85rem; border-radius: 8px;
    font-size: .95rem; font-weight: 500; color: var(--navy); white-space: nowrap;
  }
  .nav .sub-menu a:hover, .nav .sub-menu a:focus-visible { background: var(--mist); color: var(--teal); }
  .nav .sub-menu a[aria-current="page"] { color: var(--teal); background: var(--mist); }
  .sub-all { margin-top: .25rem; padding-top: .3rem; border-top: 1px solid var(--line); }
  .nav .sub-all a { color: var(--teal); font-weight: 600; }
}

@media (max-width: 1180px) {
  .nav { max-height: calc(100svh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
  .sub-toggle { display: none; }
  .sub-head a { flex: 1; }
  .nav .sub-menu { gap: 0; padding-left: 1rem; border-left: 2px solid var(--mist); margin: .25rem 0 .25rem .25rem; }
  .nav .sub-menu a { min-height: 46px; font-size: .98rem; font-weight: 500; color: var(--ink-muted); }
  .nav .sub-menu a[aria-current="page"] { color: var(--teal); }
  .nav .sub-menu li:last-child a { border-bottom: 0; }
  .nav .sub-all a { color: var(--teal); font-weight: 600; }
}

/* Full-screen success message after a quote request is sent */
.success-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: var(--gutter, 1rem); border: 0;
  display: grid; place-items: center;
  background: rgba(7, 29, 52, .97); color: #fff;
  animation: success-fade .3s ease-out;
}
.success-dialog:not([open]) { display: none; }
.success-dialog::backdrop { background: transparent; }
.success-card { max-width: 30rem; text-align: center; }
.success-icon {
  display: inline-grid; place-items: center; width: 88px; height: 88px; margin-bottom: 1.5rem;
  border-radius: 50%; background: var(--aqua); color: var(--navy);
  animation: success-pop .45s cubic-bezier(.2, .9, .3, 1.3);
}
.success-icon svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-card h2 { color: #fff; font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 .75rem; }
.success-card p { color: #DCE8F0; font-size: 1.15rem; margin: 0 0 2rem; }
.success-card .btn { min-width: 10rem; }
@keyframes success-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes success-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .success-dialog, .success-icon { animation: none; } }
/* "Most Popular" highlight on the Spa Detail card */
.service-card-featured { box-shadow: 0 0 0 3px var(--aqua), var(--shadow-lg); }
.service-card-featured:hover { box-shadow: 0 0 0 3px var(--aqua), var(--shadow-lg); }
.service-card-featured .service-img { position: relative; }
.card-badge {
  position: absolute; top: .85rem; left: .85rem; z-index: 1;
  padding: .4rem .85rem; border-radius: 999px;
  background: var(--aqua); color: var(--navy);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(7, 29, 52, .3);
}
/* Pool Cover Cleaning photo: show more of the water, not just the steps */
img[src$="pool-cover.jpg"] { object-position: center 35%; }
/* Customer portal link (Skimmer): only in the phone/tablet menu; computers use the footer link */
.nav-portal { display: none; }
@media (max-width: 1180px) {
  .nav .nav-portal { display: flex; min-height: 44px; border-bottom: 0; font-size: .95rem; color: var(--ink-muted); }
}