/* =========================================================
   Rankin Homes · Reverse Osmosis
   ========================================================= */
:root {
  --abyss: #020b14;
  --deep: #04182a;
  --deep-2: #072640;
  --ink: #eaf7ff;
  --ink-2: #b9d3e4;
  --muted: #7f9db3;
  --line: rgba(160, 220, 255, 0.14);
  --line-2: rgba(160, 220, 255, 0.24);
  --aqua: #5fe3ff;
  --aqua-2: #2b9bff;
  --glow: rgba(95, 227, 255, 0.45);

  --clear: #f2fbff;
  --clear-2: #dff3fc;
  --navy: #06233b;
  --navy-2: #335a74;

  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }
p { margin: 0; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--aqua); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

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

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: var(--h); padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14.5px; }
.btn-lg { --h: 58px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary {
  color: #022033;
  background: linear-gradient(180deg, #b6f6ff 0%, #5fe3ff 45%, #2fb6ff 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 10px 30px -8px var(--glow), 0 0 40px -10px var(--glow);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 4.5s var(--ease) infinite;
}
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 16px 40px -10px var(--glow), 0 0 60px -8px var(--glow); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,.04); border-color: var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(160,220,255,.4); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--aqua);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 0 var(--glow); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95,227,255,.6); } 70% { box-shadow: 0 0 0 12px rgba(95,227,255,0); } 100% { box-shadow: 0 0 0 0 rgba(95,227,255,0); } }

.section-title { font-size: clamp(34px, 5.4vw, 72px); }
.section-sub { color: var(--muted); margin-top: 14px; font-size: 18px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transform: none; transition: opacity .4s; } }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 var(--gutter);
  transition: background-color .4s, backdrop-filter .4s, height .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  height: 62px;
  background: rgba(2, 11, 20, .62);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav.is-light { background: rgba(242, 251, 255, .78); border-bottom-color: rgba(6,35,59,.1); color: var(--navy); }
.nav.is-light .nav-links a, .nav.is-light .nav-phone { color: var(--navy-2); }
.nav.is-light .brand b { color: var(--aqua-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.brand b { font-weight: 400; font-family: var(--serif); font-style: italic; font-size: 1.14em; margin-left: 3px; color: var(--aqua); letter-spacing: 0; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark path:first-child { fill: var(--aqua); filter: drop-shadow(0 0 8px var(--glow)); }
.brand-shine { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.6; stroke-linecap: round; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-phone { color: var(--ink-2); text-decoration: none; font: 500 14px/1 var(--mono); }
.nav-phone:hover { color: var(--aqua); }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.nav-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--aqua-2), var(--aqua)); box-shadow: 0 0 10px var(--glow); }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .nav { height: 62px; gap: 12px; }
  .nav-phone { display: none; }
  .brand { font-size: 17px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  overflow: clip;
  background:
    radial-gradient(120% 80% at 50% 0%, #0d4a6f 0%, #052338 45%, var(--abyss) 100%);
  isolation: isolate;
}
.hero-bg, .hero-lens { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-lens { z-index: 1; pointer-events: none; }
.hero::after { /* bottom fade into next section */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: -1;
  background: linear-gradient(180deg, transparent, var(--abyss));
}
.hero-inner {
  position: relative; z-index: 2; pointer-events: none;
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 120px var(--gutter) 140px;
}
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-title { margin: 22px 0 26px; font-size: clamp(52px, 10.4vw, 156px); line-height: .92; letter-spacing: -0.045em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title .serif { font-size: 1.04em; }
.hero-title .serif > span { color: transparent; background: linear-gradient(100deg, #e9fbff 10%, #7fe9ff 45%, #2fa4ff 90%); -webkit-background-clip: text; background-clip: text; padding-right: .08em; }
.js .hero-title .line > span { transform: translateY(105%); animation: rise 1.25s var(--ease) forwards; }
.js .hero-title .line:nth-child(2) > span { animation-delay: .18s; }
@keyframes rise { to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .hero-title .line > span { animation: none; transform: none; } }
.lede { max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero .reveal { transition-delay: .5s; }
.hero .cta-row.reveal { transition-delay: .65s; }

.hero-hint {
  position: absolute; z-index: 3; left: 0; top: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  background: rgba(2, 11, 20, .55); border: 1px solid var(--line-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .6s;
  will-change: transform;
}
.hero-hint.show { opacity: 1; }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: #ff5fa2; box-shadow: 0 0 10px #ff5fa2; }
.no-js .hero-hint, html:not(.js) .hero-hint { display: none; }

.scroll-cue {
  position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--aqua), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: -2px; top: -10px; width: 5px; height: 10px; border-radius: 3px; background: #fff; animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { transform: translateY(60px); } }

@media (max-width: 700px) {
  .hero { align-items: flex-end; }
  .hero-inner { padding: 110px var(--gutter) 120px; }
  .cta-row .btn { width: 100%; }
  .scroll-cue { display: none; }
  .hero-hint { display: none; }
}

/* =========================================================
   MICROSCOPE (pinned)
   ========================================================= */
.scope { position: relative; background: var(--abyss); }
.js .scope { height: 600vh; }
.scope-sticky {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
  max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter);
}
.js .scope-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.scope-stage { position: relative; height: min(86vh, 860px); height: min(86svh, 860px); }
#scope { width: 100%; height: 100%; }
.hud { position: absolute; display: flex; flex-direction: column; gap: 5px; font-family: var(--mono); pointer-events: none; }
.hud-k { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hud-v { font-size: 14px; color: var(--ink); }
.hud-tl { left: 4%; top: 9%; }
.hud-tr { right: 4%; top: 9%; text-align: right; }
.hud-tr .hud-v { font-size: 22px; color: var(--aqua); text-shadow: 0 0 16px var(--glow); }
.hud-bl { left: 4%; bottom: 12%; }

.scope-cards { position: relative; min-height: 420px; }
.scard {
  max-width: 470px; padding: 34px 34px 30px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 50, 78, .55), rgba(4, 22, 38, .55));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
html:not(.js) .scard { margin: 24px 0; }
.js .scard {
  position: absolute; left: 0; top: 50%; width: 100%;
  opacity: 0; transform: translateY(calc(-50% + 40px)) scale(.98); pointer-events: none;
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.js .scard.is-active { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.js .scard.is-past { transform: translateY(calc(-50% - 40px)) scale(.98); }
.scard h2 { font-size: clamp(40px, 4.6vw, 64px); margin: 14px 0 18px; }
.scard h3 { font-size: clamp(32px, 3.4vw, 46px); margin: 14px 0 16px; color: var(--c, var(--ink)); text-shadow: 0 0 40px color-mix(in srgb, var(--c, #fff) 35%, transparent); }
.scard p { color: var(--ink-2); }
.scard-tag { display: inline-flex; align-items: center; gap: 9px; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted) !important; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.scard-why { margin-top: 14px; font-size: 15.5px; padding-left: 14px; border-left: 2px solid var(--c, var(--aqua)); }
.scard-why b { color: var(--ink); font-weight: 600; }
.scard-fix {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-2);
  font: 500 13.5px/1.3 var(--mono); color: var(--aqua) !important;
}
.scard-fix span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 6px; }
.scard-scroll { margin-top: 26px; display: flex; align-items: center; gap: 12px; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted) !important; }
.scard-scroll i { width: 40px; height: 1px; background: linear-gradient(90deg, var(--aqua), transparent); }
.scard-final .btn { margin-top: 26px; }

.scope-rail {
  position: absolute; right: calc(var(--gutter) - 6px); top: 50%; transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
}
html:not(.js) .scope-rail { display: none; }
.scope-rail button {
  position: relative; display: block; width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer;
}
.scope-rail button::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--c, var(--ink-2)); opacity: .35;
  transition: transform .4s var(--ease), opacity .3s, box-shadow .3s;
}
.scope-rail button.is-active::before { opacity: 1; transform: translate(-50%, -50%) scale(1.6); box-shadow: 0 0 12px var(--c, var(--aqua)); }
.scope-rail button.is-seen::before { opacity: .8; }
.scope-rail span {
  position: absolute; right: 30px; top: 50%; transform: translate(6px, -50%); white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none;
}
.scope-rail button:hover span, .scope-rail button:focus-visible span, .scope-rail button.is-active span { opacity: 1; transform: translate(0, -50%); }

@media (max-width: 900px) {
  .scope-sticky { grid-template-columns: 1fr; grid-template-rows: 46% 54%; align-items: stretch; padding-top: 62px; padding-bottom: 68px; }
  .scope-stage { height: 100%; }
  .hud-tl, .hud-bl { display: none; }
  .hud-tr { top: 4%; right: 2%; }
  .hud-tr .hud-v { font-size: 18px; }
  .scope-cards { min-height: 0; }
  .js .scard { top: 0; transform: translateY(30px); padding: 22px 22px 20px; max-width: none; }
  .js .scard.is-active { transform: none; }
  .js .scard.is-past { transform: translateY(-30px); }
  .scard h2 { font-size: 34px; margin: 10px 0 12px; }
  .scard h3 { font-size: 30px; margin: 10px 0 10px; }
  .scard p { font-size: 15.5px; }
  .scard-why { font-size: 14px; margin-top: 10px; }
  .scard-fix { margin-top: 14px; padding-top: 12px; }
  .scard-scroll { margin-top: 16px; }
  .scard-final .btn { margin-top: 16px; }
  .scope-rail { display: none; }
  .scard-why { display: none; }
}

/* =========================================================
   FACTS
   ========================================================= */
.facts { position: relative; padding: clamp(100px, 14vw, 180px) 0 clamp(80px, 10vw, 140px); background: linear-gradient(180deg, var(--abyss), var(--deep)); }
.facts .section-title { max-width: 980px; }
.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 56px; }
.fact {
  position: relative; padding: 34px 30px 30px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 70, 105, .35), rgba(4, 22, 38, .4));
  border: 1px solid var(--line);
}
.fact::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: radial-gradient(400px 180px at 0% 0%, rgba(95,227,255,.14), transparent 60%); pointer-events: none; }
.fact:nth-child(2) { transition-delay: .1s; }
.fact:nth-child(3) { transition-delay: .2s; }
.fact-num { font-size: clamp(64px, 8vw, 112px); font-weight: 800; letter-spacing: -0.05em; line-height: .9; background: linear-gradient(180deg, #fff, #7fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact-num small { font-size: .34em; letter-spacing: 0; margin-left: 6px; font-weight: 600; }
.fact-word { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; font-size: clamp(54px, 6.4vw, 92px); }
.fact-label { margin-top: 18px; color: var(--ink-2); max-width: 32ch; }
.source { margin-top: 28px; font-size: 14px; color: var(--muted); max-width: 760px; }
@media (max-width: 860px) { .fact-grid { grid-template-columns: 1fr; } }

/* =========================================================
   RO PIPELINE (pinned)
   ========================================================= */
.ro { position: relative; background: radial-gradient(90% 60% at 50% 45%, #0a3557 0%, var(--deep) 60%); }
.js .ro { height: 360vh; }
.ro-sticky {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  max-width: 1400px; margin: 0 auto; padding: 100px var(--gutter) 40px; gap: 10px;
}
.js .ro-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
html:not(.js) .ro-canvas-wrap { height: 360px; }
.ro-head { text-align: center; }
.ro-head h2 { font-size: clamp(34px, 5vw, 68px); margin-top: 14px; }
.ro-canvas-wrap { position: relative; min-height: 0; }
#roCanvas { width: 100%; height: 100%; }
.ro-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ro-steps li {
  padding: 18px 18px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  opacity: .45; transition: opacity .5s, border-color .5s, background-color .5s, transform .6s var(--ease);
}
.ro-steps li.is-active { opacity: 1; border-color: rgba(95,227,255,.5); background: rgba(95,227,255,.07); transform: translateY(-4px); box-shadow: 0 20px 50px -24px var(--glow); }
.ro-steps li.is-done { opacity: .75; }
.ro-n { font: 500 12px/1 var(--mono); color: var(--aqua); letter-spacing: .1em; }
.ro-steps h3 { font-size: 18px; letter-spacing: -0.015em; margin: 10px 0 8px; line-height: 1.15; }
.ro-steps h3 small { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); vertical-align: middle; margin-left: 4px; }
.ro-steps p { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 900px) {
  .ro-sticky { padding: 80px var(--gutter) 78px; }
  .ro-head h2 { font-size: 32px; }
  .ro-head h2 .serif { display: block; }
  .ro-steps { grid-template-columns: 1fr; position: relative; min-height: 172px; }
  .js .ro-steps li { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(16px); pointer-events: none; }
  .js .ro-steps li.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .ro-steps h3 { font-size: 22px; }
  .ro-steps p { font-size: 15.5px; }
}

/* =========================================================
   COMPARE
   ========================================================= */
.compare { position: relative; padding: clamp(100px, 12vw, 160px) 0 clamp(80px, 10vw, 120px); background: linear-gradient(180deg, var(--deep) 0%, #0a3150 70%, #1d5a7f 100%); }
.compare-head { text-align: center; margin-bottom: 44px; }
.compare-head .section-title { margin-top: 14px; }
.cmp {
  position: relative; height: clamp(420px, 62vw, 640px); border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px -40px rgba(0,0,0,.7);
  background: #04182a;
  user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
#cmpCanvas { width: 100%; height: 100%; }
.cmp-label {
  position: absolute; top: 20px; z-index: 2; padding: 9px 14px; border-radius: 999px;
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em;
  background: rgba(2, 11, 20, .55); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none;
}
.cmp-label-l { left: 20px; color: #f1e3b3; }
.cmp-label-r { right: 20px; color: var(--aqua); }
.cmp-handle {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: rgba(255,255,255,.9); box-shadow: 0 0 20px rgba(255,255,255,.6); pointer-events: none;
}
.cmp-handle span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: var(--navy); font-weight: 700; letter-spacing: 2px; font-size: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 8px rgba(255,255,255,.15);
}
.cmp { cursor: ew-resize; }
.cmp-range { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.cmp:has(.cmp-range:focus-visible) .cmp-handle span { outline: 3px solid var(--aqua); outline-offset: 3px; }

.tds { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 36px; flex-wrap: wrap; }
.tds-meter { width: min(320px, 100%); padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(2, 11, 20, .35); }
.tds-k { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.tds-v { font-size: 46px; font-weight: 800; letter-spacing: -0.04em; margin: 10px 0 12px; color: #f1e3b3; font-variant-numeric: tabular-nums; }
.tds-v small { font-size: 15px; font-weight: 600; letter-spacing: 0; margin-left: 6px; color: var(--muted); }
.tds-clean .tds-v { color: var(--aqua); text-shadow: 0 0 24px var(--glow); }
.tds-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.tds-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #f1e3b3, #e0a85a); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s var(--ease) .3s; }
.tds-clean .tds-bar i { background: linear-gradient(90deg, #7fe9ff, var(--aqua-2)); }
.tds.in .tds-bar i, html:not(.js) .tds-bar i { transform: none; }
.tds-arrow { font-size: 28px; color: var(--aqua); }
.fineprint { margin: 22px auto 0; max-width: 640px; text-align: center; font-size: 13.5px; color: var(--ink-2); opacity: .8; }
@media (max-width: 700px) { .tds-arrow { transform: rotate(90deg); } .cmp-label { top: 14px; font-size: 10.5px; padding: 8px 10px; } .cmp-label-l { left: 12px; } .cmp-label-r { right: 12px; } }

/* =========================================================
   FREE WATER TEST (light, "clean side")
   ========================================================= */
.test {
  position: relative; color: var(--navy);
  padding: clamp(110px, 12vw, 170px) 0 clamp(90px, 10vw, 140px);
  background:
    radial-gradient(70% 50% at 85% 0%, rgba(95,227,255,.35), transparent 70%),
    linear-gradient(180deg, #1d5a7f 0%, #8fd0ec 9%, var(--clear-2) 20%, var(--clear) 40%);
}
.test-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 90px); align-items: start; }
.eyebrow-dark { color: #0f7fb8; }
.eyebrow-dark .pulse { background: #12a7e8; }
.test h2 { font-size: clamp(42px, 6vw, 86px); margin: 20px 0 22px; letter-spacing: -0.04em; }
.test h2 .serif { color: #0f8fd0; }
.test-lede { font-size: 19px; color: var(--navy-2); max-width: 520px; }
.test-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 22px; }
.test-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.test-steps li > span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 600 16px/1 var(--mono); color: #fff; background: linear-gradient(160deg, #3cc8f5, #1478c8); box-shadow: 0 10px 24px -10px rgba(20,120,200,.7); }
.test-steps b { font-size: 18.5px; letter-spacing: -0.015em; }
.test-steps p { color: var(--navy-2); font-size: 15.5px; margin-top: 3px; }
.test-call { margin-top: 36px; font-size: 16px; color: var(--navy-2); }
.test-call a { color: var(--navy); font-weight: 700; text-decoration-color: rgba(15,143,208,.5); text-underline-offset: 4px; }

.form-card {
  position: relative;
  padding: clamp(24px, 3vw, 38px);
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(6,35,59,.08);
  box-shadow: 0 40px 100px -40px rgba(10, 70, 120, .45), 0 2px 0 rgba(255,255,255,.9) inset;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.form-card::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 30px;
  background: conic-gradient(from var(--ang, 0deg), #5fe3ff, #2b9bff, #b6f6ff, #5fe3ff);
  filter: blur(18px); opacity: .45; animation: spin 10s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }
.form-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.form-k { font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #0f7fb8; }
.form-steps { display: none; }
form fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
form legend { font-weight: 600; font-size: 15.5px; margin-bottom: 10px; padding: 0; }
form legend small, .field label small { font-weight: 500; color: var(--navy-2); opacity: .75; font-size: 13px; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; color: var(--navy-2);
  background: #fff; border: 1px solid rgba(6,35,59,.14);
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.chip:hover span { border-color: rgba(15,127,184,.5); }
.chip input:checked + span { background: #e3f6fe; border-color: #12a7e8; color: var(--navy); box-shadow: 0 0 0 3px rgba(18,167,232,.15); }
.chip input[type=checkbox]:checked + span::before { content: "✓"; font-weight: 700; color: #0f8fd0; }
.chip input:focus-visible + span { outline: 2px solid #12a7e8; outline-offset: 2px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; margin-bottom: 22px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 7px; }
.field input {
  width: 100%; height: 50px; padding: 0 15px; border-radius: 14px;
  font: 500 16px/1 var(--sans); color: var(--navy);
  background: #fff; border: 1px solid rgba(6,35,59,.16);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: #12a7e8; box-shadow: 0 0 0 4px rgba(18,167,232,.16); }
.field .err { display: none; color: #c2324a; font-size: 13px; margin-top: 6px; font-weight: 500; }
.field.invalid input { border-color: #e0566d; box-shadow: 0 0 0 4px rgba(224,86,109,.12); }
.field.invalid .err { display: block; }
.form-card .btn-primary { margin-top: 4px; }
.form-card .btn[disabled] { opacity: .7; cursor: progress; }
.form-note { margin-top: 14px; font-size: 13.5px; color: var(--navy-2); text-align: center; }
.form-note a { color: var(--navy); font-weight: 600; }
.form-success { text-align: center; padding: 40px 10px; }
.form-success:focus { outline: none; }
.form-success h3 { font-size: 34px; margin: 22px 0 12px; letter-spacing: -0.03em; }
.form-success p { color: var(--navy-2); }
.check { width: 84px; height: 84px; margin: 0 auto; }
.check circle { fill: none; stroke: #12a7e8; stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .8s var(--ease) forwards; }
.check path { fill: none; stroke: #0f8fd0; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
  .test-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
  .chip span { height: 38px; padding: 0 13px; font-size: 14px; }
}

/* =========================================================
   FAQ
   ========================================================= */
.faq { background: var(--clear); color: var(--navy); padding: 40px 0 clamp(90px, 10vw, 140px); }
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); }
.faq .section-title { font-size: clamp(38px, 5vw, 64px); }
.faq .section-title .serif { color: #0f8fd0; }
.faq-list { border-top: 1px solid rgba(6,35,59,.12); }
.faq details { border-bottom: 1px solid rgba(6,35,59,.12); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 24px 48px 24px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background:
    linear-gradient(#0f8fd0, #0f8fd0) center / 10px 2px no-repeat,
    linear-gradient(#0f8fd0, #0f8fd0) center / 2px 10px no-repeat,
    #e3f6fe;
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--navy-2); max-width: 62ch; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } .faq summary { font-size: 17.5px; } }

/* =========================================================
   FINAL CTA
   ========================================================= */
.final {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(120px, 16vw, 220px) 0;
  background: radial-gradient(80% 90% at 50% 100%, #0e5a86 0%, #05233a 55%, var(--abyss) 100%);
  isolation: isolate;
}
#finalCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.final h2 { font-size: clamp(54px, 9vw, 140px); letter-spacing: -0.05em; line-height: .92; }
.final h2 .serif { color: transparent; background: linear-gradient(100deg, #e9fbff, #5fe3ff 60%, #2fa4ff); -webkit-background-clip: text; background-clip: text; padding-right: .06em; }
.final p { margin: 26px auto 38px; max-width: 520px; color: var(--ink-2); font-size: 19px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--abyss); border-top: 1px solid var(--line); padding: 40px 0 120px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; }
.footer-tag { color: var(--muted); font-size: 15px; }
.footer-meta { margin-left: auto; font: 500 14px/1.4 var(--mono); color: var(--ink-2); }
.footer-meta a { text-decoration: none; }
.footer-copy { width: 100%; color: var(--muted); font-size: 13px; opacity: .7; }
@media (min-width: 761px) { .footer { padding-bottom: 40px; } }

/* =========================================================
   MOBILE STICKY CTA
   ========================================================= */
.mobile-cta {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(2, 11, 20, .85) 40%);
  transform: translateY(110%); transition: transform .5s var(--ease);
  display: none;
}
.mobile-cta.show { transform: none; }
@media (max-width: 760px) { .mobile-cta { display: block; } }

/* =========================================================
   PINNED-SECTION CONTROLS (Next / Back / Skip)
   ========================================================= */
.pin-nav {
  position: absolute; z-index: 5; bottom: 28px; right: calc(var(--gutter) + 34px);
  display: flex; align-items: center; gap: 18px;
}
html:not(.js) .pin-nav { display: none; }
.pin-skip { font: 500 13px/1 var(--mono); letter-spacing: .06em; color: var(--ink-2); text-decoration: none; padding: 12px 6px; }
.pin-skip:hover { color: var(--aqua); }
.pin-ctrl {
  display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(2, 11, 20, .6); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pin-btn {
  height: 42px; min-width: 42px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--sans); color: var(--ink); background: rgba(255,255,255,.06);
  transition: background-color .2s, opacity .2s;
}
.pin-btn:hover { background: rgba(255,255,255,.12); }
.pin-btn[disabled] { opacity: .35; cursor: default; }
.pin-next { background: var(--aqua); color: #022033; padding: 0 18px; }
.pin-next:hover { background: #8aecff; }
.pin-count { min-width: 52px; text-align: center; font: 500 13px/1 var(--mono); color: var(--muted); }
.pin-count b { color: var(--ink); font-weight: 500; }
.ro .pin-nav { right: auto; left: 50%; transform: translateX(-50%); bottom: 22px; }
.js .ro-sticky { padding-bottom: 92px; }
@media (max-width: 900px) {
  .pin-nav, .ro .pin-nav { left: 16px; right: 16px; bottom: 12px; transform: none; justify-content: space-between; }
  .js .ro-sticky { padding-bottom: 78px; }
}

/* =========================================================
   MOBILE MENU
   ========================================================= */
.menu-btn {
  display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.04); cursor: pointer; position: relative; color: inherit;
}
.menu-btn i { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn i:first-child { top: 16px; }
.menu-btn i:last-child { top: 24px; }
.menu-btn[aria-expanded="true"] i:first-child { top: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-child { top: 20px; transform: rotate(-45deg); }
.nav.is-light .menu-btn { border-color: rgba(6,35,59,.18); }
.menu {
  position: fixed; z-index: 49; inset: 62px 0 auto 0;
  padding: 18px var(--gutter) 26px;
  background: rgba(2, 11, 20, .97); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.menu nav { display: flex; flex-direction: column; margin-bottom: 18px; }
.menu nav a { padding: 15px 2px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; border-bottom: 1px solid var(--line); }
.menu-phone { display: block; text-align: center; margin-top: 14px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
@media (max-width: 980px) { .menu-btn { display: block; } }
@media (min-width: 981px) { .menu { display: none; } }
@media (max-width: 380px) { .nav .btn-sm { padding: 0 12px; font-size: 14px; } }

@media (max-width: 900px) and (max-height: 740px) {
  .scope-sticky { grid-template-rows: 42% 58%; }
  .js .scard { padding: 18px 18px 16px; }
  .scard h2 { font-size: 30px; margin: 8px 0 10px; }
  .scard h3 { font-size: 27px; margin: 8px 0 8px; }
  .scard p { font-size: 14.5px; line-height: 1.5; }
  .scard-fix { margin-top: 10px; padding-top: 10px; }
  .scard-final .btn { margin-top: 12px; }
}
