:root {
  --bg: #f6f9fc; --bg-alt: #eaf1f8; --surface: #ffffff; --surface-2: #f1f5fa;
  --text: #0b1b2e; --muted: #53657a; --line: #dbe5ef;
  --brand: #2563eb; --brand-2: #06b6d4; --brand-ink: #ffffff;
  --ok: #059669; --warn: #d97706;
  --radius: 18px; --shadow: 0 10px 30px -12px rgba(15, 40, 80, .25);
  --glass: rgba(255, 255, 255, .7);
}
:root[data-theme="dark"] {
  --bg: #0b1220; --bg-alt: #0f1930; --surface: #131f38; --surface-2: #1a2847;
  --text: #eaf1fb; --muted: #9bb0c9; --line: #263754;
  --brand: #4f8dff; --brand-2: #22d3ee; --brand-ink: #06101f;
  --ok: #34d399; --warn: #fbbf24;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --glass: rgba(19, 31, 56, .7);
  --logo-bg: #fff; --logo-pad: 4px 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --bg-alt: #0f1930; --surface: #131f38; --surface-2: #1a2847;
    --text: #eaf1fb; --muted: #9bb0c9; --line: #263754;
    --brand: #4f8dff; --brand-2: #22d3ee; --brand-ink: #06101f;
    --ok: #34d399; --warn: #fbbf24;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --glass: rgba(19, 31, 56, .7);
    --logo-bg: #fff; --logo-pad: 4px 10px;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); }
.sub, .lead { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin: 0 0 1.6rem; }
.lead { font-size: 1.15rem; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, calc((100vw - 1120px) / 2)); padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; }
.brand img { height: 52px; width: auto; }
.logo-pill { background: var(--logo-bg, transparent); border-radius: 12px; padding: var(--logo-pad, 0); }
.hero-logo { height: clamp(96px, 16vw, 130px); width: auto; margin-bottom: 14px; }
.brand span { font-size: .95rem; line-height: 1.1; max-width: 12ch; }
@media (min-width: 520px) { .brand span { max-width: none; font-size: 1.02rem; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .95rem; transition: .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.tools { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: transform .15s, background .2s, border-color .2s;
}
.chip:hover { border-color: var(--brand); transform: translateY(-1px); }
@media (max-width: 860px) { .nav { display: none; } .tools { margin-left: auto; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit;
  font-weight: 700; padding: 14px 24px; border-radius: 14px; transition: transform .15s, box-shadow .25s, background .2s;
}
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 24px -10px var(--brand); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px var(--brand); }
.btn.primary:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand); transform: translateY(-2px); }
.btn.block { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 7vw, 80px); }
.hero-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: float 14s ease-in-out infinite; }
.hero-bg span:nth-child(1) { width: 360px; height: 360px; background: var(--brand); top: -80px; left: -60px; }
.hero-bg span:nth-child(2) { width: 300px; height: 300px; background: var(--brand-2); right: -60px; top: 40px; animation-delay: -5s; }
.hero-bg span:nth-child(3) { width: 240px; height: 240px; background: #7c3aed; bottom: -80px; left: 40%; animation-delay: -9s; opacity: .2; }
@keyframes float { 50% { transform: translate(30px, -24px) scale(1.08); } }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--brand); margin-bottom: 14px; }
h1 { background: linear-gradient(120deg, var(--text) 30%, var(--brand) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 22px; }
.stats { display: flex; gap: 8px 18px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.stats li::before { content: "✓ "; color: var(--ok); }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 10px; box-shadow: var(--shadow); transform: rotate(1.5deg); transition: transform .4s; }
.hero-card:hover { transform: rotate(0) scale(1.02); }

/* sections */
.sec { padding: clamp(44px, 7vw, 88px) 0; }
.sec.alt { background: var(--bg-alt); }

/* cards with pointer spotlight */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  --mx: 50%; --my: 50%; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; transition: transform .25s, border-color .25s, box-shadow .25s; cursor: default;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%);
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; border-radius: 14px; margin-bottom: 14px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.card .price { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.card .price b { color: var(--text); font-size: 1.15rem; }
.plans .card .big { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* before / after slider */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.gitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.gitem figcaption { padding: 10px 6px 4px; font-weight: 700; }
.ba { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; --pos: 50%; user-select: none; touch-action: pan-y; }
.ba .layer { position: absolute; inset: 0; background-size: cover; background-position: center; display: grid; place-items: end start; padding: 12px; }
.ba .before { background-image: var(--img-before); }
.ba .after { background-image: var(--img-after); clip-path: inset(0 0 0 var(--pos)); }
.ba .ph-before { background: radial-gradient(circle at 20% 30%, #6b5b3e 0 12%, transparent 13%), radial-gradient(circle at 70% 60%, #4d4a3f 0 16%, transparent 17%), radial-gradient(circle at 40% 80%, #5d6a46 0 10%, transparent 11%), linear-gradient(135deg, #7a7466, #4f4b42); }
.ba .ph-after { background: linear-gradient(135deg, #dfe9f2, #bcd0e2 60%, #a8c4de); }
.ba .tag { position: absolute; bottom: 10px; padding: 4px 10px; font-size: .75rem; font-weight: 700; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.ba .tag.b { left: 10px; } .ba .tag.a { right: 10px; }
.ba .note { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: .7rem; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; white-space: nowrap; }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; }
.ba .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0b1b2e; display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* panels & forms */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.fld { display: block; border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.fld > span, .fld > legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
input.bad, textarea.bad { border-color: #dc2626; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: .2s; }
.checks label:hover { border-color: var(--brand); }
.checks input { width: 18px; height: 18px; accent-color: var(--brand); }
.checks em { margin-left: auto; font-style: normal; color: var(--muted); font-size: .9rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); margin-bottom: 8px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.hp { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }
.msg { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.msg.ok { color: var(--ok); } .msg.err { color: #dc2626; }

/* estimate */
.est-grid { display: grid; grid-template-columns: 420px 1fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .est-grid { grid-template-columns: 1fr; } }
.result { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--brand-2) 12%, var(--surface))); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 4px 0 8px; }
.res-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.res-price { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; transition: transform .25s; }
.res-price.bump { transform: scale(1.06); }
.res-sub { color: var(--muted); font-size: .9rem; }
.lines { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.lines li { display: flex; justify-content: space-between; gap: 10px; }
.note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }

/* map */
.mapbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.map-tools { display: grid; gap: 10px; margin-bottom: 10px; }
.search { display: flex; gap: 8px; }
.search input { padding: 10px 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; font-size: .88rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: .2s; }
.seg button:hover { border-color: var(--brand); }
.seg button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.map { height: 460px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.zone-map { height: 420px; border: 1px solid var(--line); }
@media (max-width: 600px) { .map { height: 380px; } }
.map-info { padding: 10px 4px 2px; }
.hint { margin: 0; color: var(--muted); font-size: .9rem; }
.dist { margin: 4px 0 0; font-weight: 700; }
.dist.in { color: var(--ok); } .dist.out { color: var(--warn); }
.maplibregl-ctrl-attrib { font-size: 10px; }

.pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.pin.base { background: #f59e0b; }
.vtx { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }

/* conditions */
.cond-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .cond-grid { grid-template-columns: 1fr; } }
.water { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 18%, var(--surface)), var(--surface)); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 46px; position: relative; transition: transform .2s, border-color .2s; }
.checklist li:hover { transform: translateX(4px); border-color: var(--brand); }
.checklist li::before { content: "✓"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }

/* contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.c-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-weight: 600; transition: .25s; }
a.c-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.c-card b { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.c-card.static span { font-weight: 600; }

.foot { text-align: center; padding: 28px 16px 90px; color: var(--muted); font-size: .9rem; }
.wa-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .6); transition: transform .2s; }
.wa-fab:hover { transform: scale(1.08); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
