/* Brazosport Pool Leak Detection, lakejacksonpoolleak.com
   Archetype: clean-clinical. White / cool-light / teal / navy / muted-blue.
   Libre Franklin (headings) + Public Sans (body) + IBM Plex Mono (readings).
   SUIT-style utilities (u-*) layered over existing element/[data-role] structure.
   CSS Grid auto-fit + container queries. Hairline borders, minimal shadow. */

:root {
  --paper: #ffffff;
  --cool: #f4f7f8;
  --ink: #10233b;
  --ink-soft: #3f5568;
  --teal: #0e7c86;
  --teal-deep: #0a5f67;
  --muted-blue: #7fa9b3;
  --hair: #dbe4e6;
  --max: 74rem;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 0.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: 0;
}
body[data-has-stickybar] { padding-bottom: 4rem; }

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

a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.u {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 1.12em;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease;
  padding-bottom: 0.05em;
  color: inherit;
}
.u:hover, .u:focus-visible { background-size: 100% 1px; text-decoration: none; }

em, .serif {
  font-family: "Libre Franklin", "Public Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
}

h1, h2, h3 {
  font-family: "Libre Franklin", "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.55em;
}
h1 { font-size: clamp(1.9rem, 1.55rem + 1.6vw, 2.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem); line-height: 1.2; }
h3 { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); }

p { margin: 0 0 1.1em; }

.mono, [data-role="caption"], [data-role="eyebrow"] {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}

hr, .hair { border: none; border-top: 1px solid var(--hair); margin: 0; }

/* ---------- utilities ---------- */
.u-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u-center { text-align: center; }

/* ---------- shell ---------- */
main { display: block; }
[data-shell] {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* ---------- header ---------- */
header[data-role="site-header"] {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hair);
}
header[data-role="site-header"] .nav-wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark span {
  font-family: "IBM Plex Mono", monospace;
  font-style: normal;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  color: var(--ink-soft);
  margin-top: 0.2em;
}
.brandmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  flex: none;
}

nav[data-role="links"] {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  flex-wrap: wrap;
}
nav[data-role="links"] a { white-space: nowrap; color: var(--ink); }

.header-phone {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--teal-deep) !important;
  white-space: nowrap;
}

@media (max-width: 900px) {
  nav[data-role="links"] a:not(.header-phone) { display: none; }
  header[data-role="site-header"] nav { justify-content: space-between; }
}

/* ---------- breadcrumbs ---------- */
[data-role="breadcrumbs"] { padding-block: 0.9rem 0; }
[data-role="breadcrumbs"] ol {
  list-style: none; display: flex; gap: 0.5em; flex-wrap: wrap;
  margin: 0; padding: 0; font-size: 0.78rem; letter-spacing: 0.03em;
  color: var(--ink-soft);
}
[data-role="breadcrumbs"] li:not(:last-child)::after { content: "/"; margin-left: 0.5em; color: var(--hair); }

/* ---------- hero ---------- */
section[data-role="hero"] {
  padding-block: clamp(2rem, 5vw, 3.4rem) clamp(2.2rem, 5vw, 3.6rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  container-type: inline-size;
}
section[data-role="hero"] .hero-copy { grid-column: 1; }
section[data-role="hero"] .hero-photo { grid-column: 2; grid-row: 1 / 3; align-self: start; }
section[data-role="hero"] .hero-line { grid-column: 1; }
.eyebrow { margin-bottom: 0.9rem; }
.hero-copy h1 { max-width: 16ch; }
.hero-copy p[data-role="differentiator"] { max-width: 42ch; font-size: 1.03rem; color: var(--ink-soft); }

.photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background:
    linear-gradient(0deg, transparent 24px, var(--hair) 25px),
    linear-gradient(90deg, transparent 24px, var(--hair) 25px),
    radial-gradient(120% 90% at 20% 0%, rgba(14,124,134,0.14), transparent 60%),
    linear-gradient(155deg, #eef4f5 0%, var(--cool) 60%, #e7eef0 100%);
  background-size: 26px 26px, 26px 26px, cover, cover;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(16,35,59,0.03);
}
.photo-wide { aspect-ratio: 21 / 9; }
.photo-square { aspect-ratio: 1 / 1; }
.photo[data-tone="clay"] {
  background:
    linear-gradient(0deg, transparent 24px, var(--hair) 25px),
    linear-gradient(90deg, transparent 24px, var(--hair) 25px),
    radial-gradient(120% 90% at 85% 100%, rgba(127,169,179,0.22), transparent 60%),
    linear-gradient(160deg, #eef2f3 0%, #e6edef 55%, #dfe8ea 100%);
  background-size: 26px 26px, 26px 26px, cover, cover;
}
.photo[data-tone="water"] {
  background:
    linear-gradient(0deg, transparent 24px, var(--hair) 25px),
    linear-gradient(90deg, transparent 24px, var(--hair) 25px),
    radial-gradient(130% 100% at 15% 10%, rgba(14,124,134,0.2), transparent 60%),
    linear-gradient(150deg, #eaf4f5 0%, #e2eef0 55%, #d9e9eb 100%);
  background-size: 26px 26px, 26px 26px, cover, cover;
}

section[data-role="hero"] .hero-line .serif {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cool);
  border: 1px solid var(--teal);
  border-radius: 2rem;
  padding: 0.55rem 1.05rem;
  margin: 0 0 0.9rem;
}
section[data-role="hero"] .hero-line .serif em {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-deep);
}

.cta-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.98rem;
  font-weight: 700;
}

@container (max-width: 40rem) {
  section[data-role="hero"] { grid-template-columns: 1fr; }
  section[data-role="hero"] .hero-photo { grid-column: 1; grid-row: auto; order: -1; max-width: 11rem; }
}

/* ---------- long gap ---------- */
[data-role="gap"] { height: clamp(1.4rem, 5vw, 3.2rem); }

/* ---------- statement photo ---------- */
section[data-role="statement-photo"] .photo { aspect-ratio: 16 / 6; }
section[data-role="statement-photo"] { padding-block: clamp(0.5rem, 2vw, 1.2rem); }
section[data-role="statement-photo"] figcaption { margin-top: 0.7rem; }

/* ---------- philosophy ---------- */
section[data-role="philosophy"] { padding-block: clamp(2rem, 5vw, 3.5rem); max-width: 48rem; }
section[data-role="philosophy"] p {
  line-height: 1.75;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  color: var(--ink-soft);
}
section[data-role="philosophy"] p em { color: var(--ink); }

/* ---------- selected work / grid ---------- */
section[data-role="selected-work"] { padding-block: clamp(1.5rem, 4vw, 3rem); container-type: inline-size; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  margin-top: clamp(1.2rem, 3vw, 2rem);
}
.work-grid figcaption { margin-top: 0.6rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.work-grid figcaption a { font-weight: 700; color: var(--ink); }

/* ---------- process statement ---------- */
section[data-role="process-statement"] {
  padding-block: clamp(2.2rem, 5vw, 3.6rem);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: var(--cool);
  text-align: center;
}
section[data-role="process-statement"] p {
  font-family: "Libre Franklin", sans-serif;
  font-weight: 800;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  letter-spacing: 0.01em;
  color: var(--ink);
  max-width: 26ch;
  margin: 0 auto;
}

/* ---------- trust ---------- */
section[data-role="trust"] { padding-block: clamp(1.8rem, 4vw, 3rem); }
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 3vw, 1.8rem);
}
.trust-row--four { grid-template-columns: repeat(4, 1fr); }
.trust-row div { padding-top: 0.9rem; border-top: 2px solid var(--teal); }
.trust-row h3 { margin-bottom: 0.3em; }
.trust-row h3::before { content: "\2713"; color: var(--teal); margin-right: 0.4em; }
.trust-row p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.95rem; }

/* ---------- quote / form ---------- */
section[data-role="quote"] {
  padding-block: clamp(2.2rem, 5vw, 3.6rem);
  background: var(--cool);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
section[data-role="quote"] .quote-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
}
form[data-role="lead-form"] {
  display: grid; gap: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.field { position: relative; }
.field label {
  display: block; font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft); font-weight: 700;
  margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--hair);
  background: var(--paper);
  padding: 0.65rem 0.7rem;
  font: inherit;
  color: var(--ink);
  border-radius: 0.35rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal);
}
.field textarea { resize: vertical; min-height: 4.2rem; }

button[data-role="submit"], .btn-outline {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
  border-radius: 0.4rem;
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: fit-content;
  transition: background 0.2s ease;
}
button[data-role="submit"]:hover { background: var(--teal-deep); }
.btn-outline { background: transparent; color: var(--teal-deep); }
.btn-outline:hover { background: var(--paper); }

.quote-side { align-self: start; }
.quote-side .mono { display: block; margin-bottom: 0.5rem; }

/* ---------- FAQ ---------- */
section[data-role="faq"] { padding-block: clamp(1.6rem, 4vw, 2.8rem); }
details {
  border: 1px solid var(--hair);
  border-radius: 0.5rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  background: var(--paper);
}
summary {
  cursor: pointer;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.2rem;
  color: var(--teal-deep);
  flex-shrink: 0;
}
details[open] summary::after { content: "\2212"; }
details p { margin-top: 0.8rem; color: var(--ink-soft); }

/* ---------- generic content sections ---------- */
section[data-role="section"] { padding-block: clamp(1.6rem, 4vw, 2.6rem); }
section[data-role="section"] + section[data-role="section"] { border-top: 1px solid var(--hair); }

.two-col { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.4rem, 4vw, 2.6rem); }

.u-tableWrap { overflow-x: auto; }
table[data-role="pricing"] { width: 100%; border-collapse: collapse; margin-block: 1.3rem; min-width: 34rem; }
table[data-role="pricing"] th, table[data-role="pricing"] td {
  text-align: left; padding: 0.75rem 0.6rem; border-top: 1px solid var(--hair); font-size: 0.94rem;
}
table[data-role="pricing"] thead th {
  border-top: none; color: var(--ink-soft); font-weight: 700; font-size: 0.74rem;
  letter-spacing: 0.06em; text-transform: uppercase; font-family: "IBM Plex Mono", monospace;
}
table[data-role="pricing"] td:nth-child(2) { font-family: "IBM Plex Mono", monospace; color: var(--teal-deep); font-weight: 700; white-space: nowrap; }
table[data-role="pricing"] tr:last-child td { border-bottom: 1px solid var(--hair); }

ol[data-role="process"], ol[data-role="steps"] {
  padding-left: 0; list-style: none; counter-reset: step;
  display: grid; gap: 1.2rem; margin: 1.3rem 0;
}
ol[data-role="process"] li, ol[data-role="steps"] li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem;
  padding-bottom: 1.2rem; border-bottom: 1px solid var(--hair);
}
ol[data-role="process"] li:last-child, ol[data-role="steps"] li:last-child { border-bottom: none; padding-bottom: 0; }
ol[data-role="process"] li::before, ol[data-role="steps"] li::before {
  content: counter(step);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--teal);
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
ol[data-role="process"] li h3, ol[data-role="steps"] li h3 { margin-bottom: 0.25em; }
ol[data-role="process"] li p, ol[data-role="steps"] li p { margin-bottom: 0; color: var(--ink-soft); }

ul[data-role="area-list"] {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.6rem 1.5rem; list-style: none; padding: 0; margin: 1.4rem 0;
}
ul[data-role="area-list"] li { border-top: 2px solid var(--teal); padding-top: 0.55rem; }

.limit-note {
  border-left: 3px solid var(--muted-blue);
  background: var(--cool);
  padding: 0.75rem 1rem;
  border-radius: 0 0.4rem 0.4rem 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* ---------- footer ---------- */
footer[data-role="site-footer"] {
  padding-block: clamp(2.4rem, 6vw, 4rem) clamp(1.6rem, 4vw, 2.4rem);
  border-top: 1px solid var(--hair);
  margin-top: clamp(1.6rem, 4vw, 3rem);
  background: var(--ink);
  color: #c3d2da;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: clamp(1.4rem, 4vw, 2.2rem); }
.footer-grid h3.wordmark { margin-bottom: 0.5rem; color: #fff; }
.footer-grid .wordmark span { color: #9db3bd; }
.footer-grid .brandmark { background: var(--teal); }
.footer-grid nav { display: grid; gap: 0.5rem; font-size: 0.9rem; }
.footer-grid nav a { color: #c3d2da; }
.footer-grid nav a:hover { color: #fff; }
.footer-grid nav span.mono { color: #7fa9b3; }
.footer-grid p { color: #a9bbc4; font-size: 0.9rem; }
.footer-grid a { color: #c3d2da; }
footer[data-role="site-footer"] .legal {
  margin-top: clamp(2rem, 5vw, 3.2rem);
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: #7f93a1;
}

/* ---------- sticky mobile bar ---------- */
.sticky-bar { display: none; }
@media (max-width: 900px) {
  .sticky-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    height: 3.6rem;
    box-shadow: 0 -2px 10px rgba(16,35,59,0.15);
  }
  .sticky-bar a {
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 800; min-height: 48px;
  }
  .sticky-bar a[data-variant="call"] { background: var(--teal); color: #fff; }
  .sticky-bar a[data-variant="quote"] { background: var(--paper); color: var(--ink); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  section[data-role="hero"] { grid-template-columns: 1fr; }
  section[data-role="hero"] .hero-photo { grid-column: 1; grid-row: auto; order: -1; max-width: 12rem; margin-bottom: 0.4rem; }
  section[data-role="hero"] .hero-line { grid-column: 1; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-row, .trust-row--four { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section[data-role="quote"] .quote-grid { grid-template-columns: 1fr; }
  ul[data-role="area-list"] { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.28rem; }
}
@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
  .trust-row, .trust-row--four { grid-template-columns: 1fr; }
  ul[data-role="area-list"] { grid-template-columns: 1fr; }
}

/* ---------- focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal-deep); outline-offset: 2px;
}

/* ---------- dark mode (soft support, clinical theme stays legible) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1c28; --cool: #142633; --ink: #eaf1f3; --ink-soft: #a9c0c9;
    --hair: #24404c; --teal: #26a1ac; --teal-deep: #4ecbd6; --muted-blue: #7fa9b3;
  }
  header[data-role="site-header"] { background: rgba(15,28,40,0.92); }
  .field input, .field select, .field textarea, details, form[data-role="lead-form"] { background: #101f2b; }
}
:root[data-theme="dark"] {
  --paper: #0f1c28; --cool: #142633; --ink: #eaf1f3; --ink-soft: #a9c0c9;
  --hair: #24404c; --teal: #26a1ac; --teal-deep: #4ecbd6; --muted-blue: #7fa9b3;
}
:root[data-theme="light"] {
  --paper: #ffffff; --cool: #f4f7f8; --ink: #10233b; --ink-soft: #3f5568;
  --hair: #dbe4e6; --teal: #0e7c86; --teal-deep: #0a5f67; --muted-blue: #7fa9b3;
}
