:root {
  --brand: #0e63c4;
  --brand-dark: #0a4a97;
  --brand-2: #12aecb;
  --bg: #eef4fb;
  --text: #14212e;
  --muted: #5b6b7a;
  --card: #ffffff;
  --line: #d9e3ef;
  --ok: #1a8f4d;
  --err: #c22f2f;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(16, 45, 85, .10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
footer.site { margin-top: auto; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 900px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 640px; }

/* ---------- HEADER / NAV ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.2rem; font-weight: 800; color: var(--brand-dark); letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.logo small { font-weight: 600; color: var(--muted); font-size: .68rem; letter-spacing: .5px; }
nav.main { display: flex; align-items: center; gap: 6px; }
nav.main a {
  color: var(--text); padding: 8px 12px; border-radius: 10px; font-size: .95rem; font-weight: 600;
}
nav.main a:hover { background: #eaf1fb; }
nav.main a.active { color: var(--brand-dark); background: #e2ecfb; }
nav.main a.cta { background: var(--brand); color: #fff; }
nav.main a.cta:hover { background: var(--brand-dark); }

.burger { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--brand-dark); }

@media (max-width: 640px) {
  .burger { display: block; }
  nav.main {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 18px 14px; display: none; box-shadow: var(--shadow);
  }
  nav.main.open { display: flex; }
  header.site .container { position: relative; }
}

/* ---------- HERO ---------- */
.hero-wrap { background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--brand-2)); color: #fff; }
.hero { text-align: center; padding: 54px 0 46px; }
.hero .badge { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  padding: 5px 14px; border-radius: 999px; font-size: .82rem; margin-bottom: 16px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin-bottom: 12px; }
.hero p { color: #e6f0ff; font-size: 1.06rem; max-width: 560px; margin: 0 auto; }
.hero .actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 24px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; border: 0; }
.btn.primary { background: #fff; color: var(--brand-dark); }
.btn.primary:hover { background: #eaf2ff; }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn.ghost:hover { background: rgba(255,255,255,.24); }
.phone-big { display: inline-block; margin-top: 6px; font-size: 1.35rem; font-weight: 800; color: #fff; }

/* ---------- SECTIONS ---------- */
section { padding: 34px 0; }
.section-title { text-align: center; margin-bottom: 24px; }
.section-title h2 { font-size: 1.55rem; }
.section-title p { color: var(--muted); margin-top: 6px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin: 22px 0;
}
.card h2 { font-size: 1.25rem; margin-bottom: 16px; }
.card h3 { margin: 16px 0 8px; font-size: 1.05rem; }
.lead { font-size: 1.05rem; color: var(--text); }
.prose p { margin-bottom: 12px; color: #2a3947; }
.prose ul { margin: 10px 0 14px 20px; }
.prose li { margin-bottom: 6px; }

/* service cards */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.svc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.svc img { height: 190px; object-fit: cover; width: 100%; }
.svc .body { padding: 18px; }
.svc h3 { margin-bottom: 6px; font-size: 1.15rem; color: var(--brand-dark); }
.svc p { color: var(--muted); font-size: .95rem; }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature .ic { font-size: 1.6rem; }
.feature b { display: block; margin: 6px 0 4px; }
.feature span { color: var(--muted); font-size: .92rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; counter-reset: s; }
.step { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -12px; left: 18px;
  width: 34px; height: 34px; background: var(--brand); color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; }
.step b { display: block; margin: 10px 0 4px; }
.step span { color: var(--muted); font-size: .9rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.gallery figure { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { height: 220px; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 12px 16px; color: var(--muted); font-size: .92rem; }

/* contacts */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.contact-item { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.contact-item .ic { font-size: 1.5rem; }
.contact-item b { display: block; margin: 6px 0 2px; }
.contact-item a, .contact-item span { color: var(--text); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.chip { background: #e2ecfb; color: var(--brand-dark); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }

/* ---------- FORMS (shared with cabinet) ---------- */
label { display: block; font-weight: 600; font-size: 1rem; margin: 16px 0 6px; }
input, select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1.08rem; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.hint { font-size: .9rem; color: var(--muted); margin-top: 4px; }

.service-toggle { display: flex; gap: 10px; }
.service-toggle input { display: none; }
.service-toggle label {
  flex: 1; text-align: center; margin: 0; padding: 16px 8px; font-size: 1.1rem;
  border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700;
}
.service-toggle input:checked + label { border-color: var(--brand); background: #e8f1fc; color: var(--brand-dark); }
#svc-water:checked + label, #o-water:checked + label {
  border-color: var(--brand); background: var(--brand); color: #fff; }
#svc-septic:checked + label, #o-septic:checked + label {
  border-color: var(--ok); background: var(--ok); color: #fff; }

/* автозаполнение адреса */
.addr-field { position: relative; }
.addr-suggest {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 10px 10px; box-shadow: var(--shadow); max-height: 240px; overflow: auto;
}
.addr-item { padding: 11px 14px; cursor: pointer; font-size: 1rem; border-top: 1px solid #eef2f7; }
.addr-item:first-child { border-top: 0; }
.addr-item:hover { background: #eaf1fb; }

button.submit {
  width: 100%; margin-top: 22px; padding: 15px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
button.submit:hover { background: var(--brand-dark); }
button.submit:disabled { background: #9db8d4; cursor: wait; }

.msg { display: none; margin-top: 16px; padding: 14px; border-radius: 10px; font-weight: 600; }
.msg.ok { display: block; background: #e5f6ec; color: var(--ok); }
.msg.err { display: block; background: #fdeaea; color: var(--err); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- CABINET ---------- */
.tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.tabs button { flex:1; padding:12px 8px; border:2px solid var(--line); background:#fff;
  border-radius:10px; font-weight:600; cursor:pointer; color:var(--text); }
.tabs button.active { border-color:var(--brand); background:#e8f1fc; color:var(--brand-dark); }
.list-item { border:1px solid var(--line); border-radius:10px; padding:14px; margin-bottom:10px; }
.list-item .row { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.list-item b { display:block; }
.list-item .muted { color:var(--muted); font-size:.88rem; }
.btn-sm { padding:8px 12px; border:1px solid var(--line); background:#fff; border-radius:8px;
  cursor:pointer; font-size:.85rem; font-weight:600; color:var(--brand-dark); white-space:nowrap; }
.btn-sm.danger { color:var(--err); border-color:#f0c9c9; }
.btn-sm.primary { background:var(--brand); color:#fff; border-color:var(--brand); }
.pick { border:2px solid var(--line); border-radius:10px; padding:12px; margin-bottom:8px;
  cursor:pointer; font-weight:600; }
.pick.sel { border-color:var(--brand); background:#e8f1fc; color:var(--brand-dark); }
.hidden { display:none !important; }
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.addr-actions { display:flex; gap:6px; }
.muted { color: var(--muted); }

/* ---------- FOOTER ---------- */
footer.site { background: #0b2237; color: #c6d5e6; padding: 34px 0 26px; margin-top: 20px; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 22px; }
footer.site h4 { color: #fff; margin-bottom: 10px; font-size: 1rem; }
footer.site a { color: #c6d5e6; }
footer.site a:hover { color: #fff; }
footer.site .bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding-top: 16px; font-size: .85rem; color: #8ea4bb; text-align: center; }
