/* X-Ray Pools — landing page and legal pages.
 *
 * Quiet luxury: Instrument Serif speaks softly in the headlines, Manrope
 * explains in the body.
 * The page alternates night (black) and day (pool-plaster white) as you scroll,
 * with one yellow moment near the end. The yellow line running down the left
 * side is the dye: it follows the scroll the way dye follows the water. */

:root {
  /* Quiet luxury: charcoal, sand, a gold that reads as yellow, and stone. */
  --black: #0e0e0c;
  --yellow: #e3b422;
  --dye: #c99a12;
  --plaster: #f3eee5;
  --paper: #fbf9f5;
  --stone: #8a8578;
  --mute-dark: #bdb6a8;
  --mute-light: #6a655b;
  --rule-dark: rgba(243, 238, 229, 0.16);
  --rule-light: rgba(14, 14, 12, 0.14);

  --bg: var(--black);
  --fg: #ffffff;
  --mute: var(--mute-dark);
  --rule: var(--rule-dark);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --gutter: clamp(20px, 6vw, 96px);
  --measure: 34rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: dark;
}

/* Each section paints its own day or night, so its copy is always right for
 * its background. Sections rise over the one before like sheets, which is
 * where the night-to-day change happens. The header takes the colours of the
 * section beneath it (site.js sets <html data-theme>). */
[data-theme="dark"] {
  --bg: var(--black);
  --fg: #ffffff;
  --mute: var(--mute-dark);
  --rule: var(--rule-dark);
}
[data-theme="light"] {
  --bg: var(--plaster);
  --fg: var(--black);
  --mute: var(--mute-light);
  --rule: var(--rule-light);
  color-scheme: light;
}
[data-theme="yellow"] {
  --bg: var(--yellow);
  --fg: var(--black);
  --mute: #3d3a2a;
  --rule: rgba(0, 0, 0, 0.2);
  color-scheme: light;
}
main[data-theme],
main [data-theme] {
  background: var(--bg);
  color: var(--fg);
}
/* Sheets: every section after the hero overlaps the previous one slightly and
 * rounds its top corners, so the page turns rather than cuts. */
main > [data-theme]:not(.hero),
main > .pin-spacer {
  margin-top: -40px;
  border-radius: 40px 40px 0 0;
}
main > .pin-spacer > [data-theme] {
  border-radius: 40px 40px 0 0;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.7s var(--ease), color 0.7s var(--ease);
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}
:root[data-theme="yellow"] :focus-visible,
:root[data-theme="light"] :focus-visible {
  outline-color: var(--black);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  left: 8px;
}

/* ---------- Type: a serif that speaks softly, a sans that explains ---------- */

.display,
h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1;
  text-wrap: balance;
}
h3 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.08rem, 1.2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.display {
  font-size: clamp(3.2rem, 7.6vw, 7.6rem);
  line-height: 0.95;
}
h2 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}
h2 em,
.display em {
  font-style: italic;
  color: var(--yellow);
}

.lede {
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  font-size: clamp(1.125rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--mute);
}

p {
  max-width: var(--measure);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 2px solid currentColor;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--solid {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}
.btn--solid:hover {
  background: #edc445;
  border-color: #edc445;
}
.btn--ghost {
  background: transparent;
  color: inherit;
}
.btn--ink {
  background: var(--black);
  border-color: var(--black);
  color: var(--yellow);
}
.btn--ink:hover {
  background: #26251f;
  border-color: #26251f;
}
.btn svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px var(--gutter);
  color: var(--fg);
  transition: background-color 0.4s, color 0.4s, transform 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.is-hidden {
  transform: translateY(-100%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand img {
  width: clamp(76px, 7vw, 108px);
  height: auto;
  border-radius: 14px;
  background: var(--black);
  padding: 5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
}
.nav a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.85;
}
.nav a:not(.btn):hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav .btn {
  min-height: 44px;
  padding: 0.55em 1.2em;
}
@media (max-width: 760px) {
  .nav a:not(.btn) {
    display: none;
  }
  .brand span {
    display: none;
  }
}

/* ---------- Sections ---------- */

main {
  position: relative;
}

.section {
  position: relative;
  padding: clamp(88px, 11vw, 148px) var(--gutter);
}
.section--tight {
  padding-top: clamp(64px, 8vw, 110px);
  padding-bottom: clamp(64px, 8vw, 110px);
}
.wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}


/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 150px var(--gutter) clamp(48px, 8vw, 96px);
  overflow: hidden;
  color: #fff;
  background: var(--black);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Darker on the left, where the headline sits over the bright house. */
  background:
    linear-gradient(90deg, rgba(8, 8, 6, 0.72) 0%, rgba(8, 8, 6, 0.45) 38%, rgba(8, 8, 6, 0) 68%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.88) 100%);
}
.hero .wrap {
  width: 100%;
}
.hero__title {
  max-width: 1100px;
  font-size: clamp(3rem, 6vw, 6.4rem);
}
.hero__kicker {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--yellow);
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.hero__title .line > span {
  display: inline-block;
}
.hero__title .line:last-child {
  color: var(--yellow);
  font-style: italic;
}
.hero .lede {
  color: rgba(255, 255, 255, 0.86);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}
.hero__area {
  margin: 2.5rem 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- The dye line ---------- */

.dye {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.dye path {
  fill: none;
  stroke: var(--dye);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dye .dye__drop {
  fill: var(--dye);
}
@media (max-width: 900px) {
  .dye {
    display: none;
  }
}

/* ---------- Statement ---------- */

.statement {
  max-width: 22ch;
  font-size: clamp(2rem, 5vw, 4.4rem);
}
.statement .w {
  transition: opacity 0.2s;
}
html.js .statement .w {
  opacity: 0.18;
}
html.js .statement .w.is-on {
  opacity: 1;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin: clamp(56px, 8vw, 110px) 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  border-top: 2px solid var(--fg);
  padding-top: 1.1rem;
}
.facts p {
  margin: 0.5rem 0 0;
  color: var(--mute);
}
@media (max-width: 760px) {
  .facts {
    grid-template-columns: 1fr;
  }
}

/* ---------- Dye test feature ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.feature__media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.feature__media img {
  width: 100%;
  height: 118%;
  object-fit: cover;
}
.feature--flip {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.feature__text p {
  color: var(--mute);
}
.feature__text p + p {
  margin-top: 1rem;
}
.feature__text h2 + p {
  margin-top: 1.5rem;
}
.checklist {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.checklist li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px var(--fg);
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .feature,
  .feature--flip {
    grid-template-columns: 1fr;
  }
  .feature__media {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Underwater gallery (pinned, horizontal) ---------- */

.gallery {
  position: relative;
  padding: clamp(96px, 12vw, 160px) 0 clamp(72px, 10vw, 140px);
  overflow: hidden;
}
.gallery__head {
  padding: 0 var(--gutter);
  max-width: calc(1280px + 2 * var(--gutter));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  flex-wrap: wrap;
}
.gallery__head p {
  margin: 0;
  color: var(--mute);
}
.gallery__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(40px, 6vw, 72px);
  padding: 0 var(--gutter);
  width: max-content;
}
.tile-card {
  position: relative;
  width: clamp(260px, 28vw, 400px);
  flex: none;
  margin: 0;
}
/* While pinned, the whole gallery has to fit one screen: heading, photos and
 * captions. The photo is 4:5, so its width follows the height that is left. */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .gallery {
    min-height: 100vh;
    padding-top: clamp(96px, 12vh, 132px);
    padding-bottom: 32px;
  }
  .gallery__track {
    margin-top: clamp(24px, 4vh, 48px);
  }
  .tile-card {
    width: clamp(220px, calc((100vh - 490px) * 0.8), 400px);
  }
}
.tile-card__img {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #d9dedb;
}
.tile-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.tile-card:hover .tile-card__img img {
  transform: scale(1.04);
}
.tile-card figcaption {
  padding: 1.1rem 0.25rem 0;
}
.tile-card figcaption p {
  margin: 0.4rem 0 0;
  color: var(--mute);
  font-size: 0.98rem;
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .gallery__track {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    scrollbar-width: none;
  }
  .gallery__track::-webkit-scrollbar {
    display: none;
  }
  .tile-card {
    scroll-snap-align: start;
    width: min(78vw, 360px);
  }
}

/* ---------- Steps (a real sequence) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin: clamp(48px, 7vw, 96px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 4.5rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: 3.75rem;
  right: -1rem;
  height: 2px;
  background: var(--rule);
}
.steps li:last-child::after {
  display: none;
}
.steps p {
  margin: 0.6rem 0 0;
  color: var(--mute);
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .steps li:nth-child(2)::after {
    display: none;
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .steps li::after {
    display: none;
  }
}

/* ---------- CTA ---------- */

.cta {
  text-align: left;
}
.cta .display {
  max-width: 14ch;
}
.cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2.25rem;
}
.cta__note {
  margin-top: 1.5rem;
  color: var(--mute);
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--dye);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 0 12px 12px 0;
  color: var(--fg) !important;
}

/* ---------- Estimate request ---------- */

.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.cta__intro .display {
  font-size: clamp(2.6rem, 5.6vw, 5.4rem);
}
.cta__intro .cta__note {
  max-width: 30rem;
}
@media (max-width: 960px) {
  .cta__grid {
    grid-template-columns: 1fr;
  }
}

.quote {
  background: var(--paper);
  color: var(--black);
  border-radius: 28px;
  padding: clamp(24px, 3.5vw, 40px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
}
.quote__title {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.quote__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
@media (max-width: 560px) {
  .quote__grid {
    grid-template-columns: 1fr;
  }
}
.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field--wide {
  grid-column: 1 / -1;
}
.field label,
.field legend {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0;
}
.optional {
  font-weight: 400;
  color: var(--mute-light);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7em 0.9em;
  font: inherit;
  font-size: 1rem;
  color: var(--black);
  background: var(--plaster);
  border: 1.5px solid transparent;
  border-radius: 12px;
  transition: border-color 0.2s, background-color 0.2s;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--black);
  background: #fff;
}
.field__error {
  display: none;
  margin: 0;
  font-size: 0.88rem;
  color: #a3231f;
}
.field.is-invalid input {
  border-color: #a3231f;
  background: #fff;
}
.field.is-invalid .field__error {
  display: block;
}
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.choice label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.5em 1em;
  border-radius: 999px;
  background: var(--plaster);
  font-weight: 600;
  cursor: pointer;
}
.choice input {
  accent-color: var(--black);
  width: 1.05em;
  height: 1.05em;
  min-height: 0;
  margin: 0;
}
.choice label:has(input:checked) {
  background: var(--black);
  color: var(--yellow);
}
.choice label:has(input:checked) input {
  accent-color: var(--yellow);
}
.choice label:has(input:focus-visible) {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.quote__submit {
  width: 100%;
  justify-content: center;
  margin-top: 1.5rem;
  cursor: pointer;
}
.quote__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.quote__consent {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--mute-light);
}
.quote__status {
  margin: 0.9rem 0 0;
  font-weight: 600;
}
.quote__status:empty {
  display: none;
}
.quote__status.is-error {
  color: #a3231f;
}
.quote__done h3 {
  font-size: 1.6rem;
}
.quote__done p {
  margin: 0.75rem 0 0;
  color: var(--mute-light);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--black);
  color: #fff;
  padding: clamp(56px, 8vw, 96px) var(--gutter) 32px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.site-footer img {
  width: 120px;
  height: auto;
}
.site-footer p {
  margin: 1rem 0 0;
  color: var(--mute-dark);
  max-width: 28rem;
}
.site-footer h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer__base {
  max-width: 1280px;
  margin: 56px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--mute-dark);
}
@media (max-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 170px var(--gutter) 110px;
}
.legal .wrap {
  max-width: 46rem;
}
.legal h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}
.legal .updated {
  margin: 1rem 0 3rem;
  color: var(--mute);
}
.legal h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin: 2.75rem 0 0.75rem;
}
.legal p,
.legal li {
  max-width: 42rem;
  color: #2a2a27;
}
.legal ul {
  padding-left: 1.2rem;
}
.legal li + li {
  margin-top: 0.4rem;
}

/* ---------- Motion preferences ---------- */

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

.feature__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.75rem;
}


/* ---------- Certainty, not guesswork (photo + three points) ---------- */

.intro-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}
.intro-band__media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.intro-band__media img {
  width: 100%;
  height: 118%;
  object-fit: cover;
}
.intro-band__lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.08rem, 1.25vw, 1.2rem);
  color: var(--mute);
}
.intro-band__points {
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.intro-band__points li {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.4em;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--mute);
}
.intro-band__points .n {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--fg);
}
@media (max-width: 900px) {
  .intro-band__grid {
    grid-template-columns: 1fr;
  }
}

/* On sand, the bright gold is too faint for words; a deeper gold keeps the
   same voice at a readable contrast. */
[data-theme="light"] h2 em,
[data-theme="light"] .display em {
  color: #9c7400;
}
[data-theme="yellow"] h2 em,
[data-theme="yellow"] .display em {
  color: var(--black);
}
.quote__title {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
