/* Crystal Pools: site styles */
:root {
  --ink: #0A3A44;          /* deep end */
  --ink-soft: #3E5F66;
  --water: #2A9DA6;        /* pool water */
  --water-light: #8FD3D4;
  --tile: #1E4F8C;         /* waterline tile */
  --plaster: #F5F8F7;      /* white plaster */
  --coping: #DCD5C6;       /* limestone coping */
  --sand: #EEE8DA;
  --sun: #F2B544;
  --white: #FFFFFF;
  --radius-sm: 4px;
  --radius-lg: 14px;
  --wrap: 1140px;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--tile); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Type */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 66ch; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 58ch; }

/* Tile band: the waterline tile row, used as a divider */
.tileband {
  height: 10px;
  background:
    repeating-linear-gradient(90deg,
      var(--tile) 0 18px, var(--plaster) 18px 20px,
      var(--water) 20px 38px, var(--plaster) 38px 40px);
}

/* Header */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.25rem; line-height: 1; }
.brand-name small { display: block; font-family: var(--body); font-stretch: 100%; font-weight: 400; font-size: 0.75rem; color: var(--ink-soft); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--tile); text-decoration: underline; }
.phone-btn {
  background: var(--sun); color: var(--ink) !important; text-decoration: none !important;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; white-space: nowrap;
}
.phone-btn:hover { background: #E9A62C; }
.menu-btn { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 6px 10px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; border-bottom: 3px solid var(--tile); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--sand); }
  .nav .phone-btn { margin-top: 14px; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn { display: inline-block; padding: 14px 22px; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; border: 2px solid var(--ink); font-size: 1rem; cursor: pointer; font-family: var(--body); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--tile); border-color: var(--tile); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Hero */
.hero { background: var(--white); padding: 56px 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: end; }
.hero-copy { padding-bottom: 64px; }
.hero-art { margin-bottom: -2px; }
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding-bottom: 8px; }
}

/* Cross-section drawing */
.xsec .water { transform-origin: 50% 100%; transform-box: fill-box; animation: fill 1.6s cubic-bezier(.2,.7,.2,1) .2s both; }
.xsec .label { font: 600 15px var(--body); fill: var(--ink); }
.xsec .leader { stroke: var(--ink); stroke-width: 1; fill: none; }
@keyframes fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .xsec .water { animation: none; } }

/* Page head (inner pages) */
.page-head { background: var(--white); padding: 52px 0 40px; }
.crumbs { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--ink-soft); }

/* Sections */
.section { padding: 72px 0; }
.section-white { background: var(--white); }
.section-sand { background: var(--sand); }
.section-ink { background: var(--ink); color: var(--plaster); }
.section-ink h2, .section-ink h3 { color: var(--white); }
.section-ink a { color: var(--water-light); }
.section-ink p { color: #D6E6E6; }

/* Facts row under hero */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--sand); }
.facts > div { padding: 26px 24px 28px; border-left: 1px solid #D3CBB8; }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font-family: var(--display); font-stretch: 125%; font-size: 1.05rem; margin-bottom: 4px; }
.facts p { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-left: 0; border-top: 1px solid #D3CBB8; padding-left: 0; }
  .facts > div:first-child { border-top: 0; }
}

/* Services list: rows, not cards */
.services { border-top: 2px solid var(--ink); margin-top: 28px; }
.service-row { display: grid; grid-template-columns: 240px 1fr auto; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--coping); text-decoration: none; color: var(--ink); }
.service-row h3 { margin: 0; font-size: 1.4rem; }
.service-row p { margin: 0; color: var(--ink-soft); }
.service-row .go { font-weight: 700; color: var(--tile); white-space: nowrap; }
.service-row:hover h3 { color: var(--tile); }
@media (max-width: 760px) { .service-row { grid-template-columns: 1fr; gap: 6px; } }

/* Build steps: a real sequence, so numbered */
.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.steps li { counter-increment: step; padding: 22px 0 24px 58px; position: relative; border-top: 1px solid rgba(255,255,255,.18); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 20px;
  width: 40px; height: 40px; display: grid; place-items: center;
  font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.1rem;
  background: var(--water); color: var(--ink); border-radius: 50%;
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; font-size: 0.98rem; }
.section-white .steps li, .section-sand .steps li { border-top-color: var(--coping); }
.section-white .steps li::before { background: var(--ink); color: var(--white); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }

/* Two column helpers */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split-wide { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; gap: 32px; } }

/* Grouped lists */
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 32px; }
.groups.two { grid-template-columns: repeat(2, 1fr); }
.group h3 { padding-bottom: 10px; border-bottom: 3px solid var(--water); }
.group ul { list-style: none; padding: 0; margin: 0; }
.group li { padding: 10px 0; border-bottom: 1px solid var(--coping); }
.group li strong { display: block; }
.group li span { color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 860px) { .groups, .groups.two { grid-template-columns: 1fr; gap: 28px; } }

/* Pull quote */
.quote { margin: 0; padding: 28px 0 0; border-top: 2px solid var(--ink); }
.quote p { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.3; max-width: 30ch; }
.quote footer { color: var(--ink-soft); }

/* Area */
.counties { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.counties li { background: var(--white); border: 2px solid var(--ink); padding: 8px 16px; border-radius: 999px; font-weight: 700; }

/* Note box */
.note { background: var(--white); border-left: 6px solid var(--sun); padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note p:last-child { margin-bottom: 0; }

/* Form */
.form { background: var(--white); color: var(--ink); padding: 28px; border-radius: var(--radius-lg); border-top: 10px solid var(--tile); }
.form h2, .form h3 { color: var(--ink); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 2px solid #B9C8C9; border-radius: var(--radius-sm); background: var(--plaster);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--tile); outline: none; background: var(--white); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: #1F6B3A; }
.form-status.err { color: #A23B1E; }
.form small { color: var(--ink-soft); display: block; margin-top: 10px; }
.section-ink .form a { color: var(--tile); }

/* Contact details */
.details { list-style: none; padding: 0; margin: 0; }
.details li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.section-white .details li, .page-body .details li { border-bottom-color: var(--coping); }
.details strong { display: block; font-size: 0.9rem; opacity: .8; }
.details a { font-weight: 700; font-size: 1.1rem; }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius-lg); margin-top: 24px; }

/* CTA band */
.cta-band { background: var(--water); padding: 48px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.cta-band h2 { margin: 0; color: var(--ink); max-width: 22ch; }

/* Footer */
.site-footer { background: var(--ink); color: #C9DCDD; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: 1.05rem; color: var(--white); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
