/* БурГрад — основные стили. Один селектор — одна строка деклараций. Префикс .bg- */

/* ---------- Шрифты ---------- */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-var.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("../fonts/commissioner-var.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

/* ---------- Токены: тема «День» по умолчанию ---------- */
:root { --navy: oklch(27.5% .072 258); --orange: oklch(66% .19 42); --orange-ink: oklch(56% .18 40); --accent-btn: oklch(56% .19 39); --accent-btn-hover: oklch(51% .18 38); --water: oklch(67% .11 222); --water-deep: oklch(48% .09 228); --sand: oklch(84% .07 80); --loam: oklch(64% .09 60); --clay: oklch(46% .07 50); --soil: oklch(36% .05 55); --bg: oklch(98.4% .004 258); --surface: oklch(99.6% .002 258); --surface-2: oklch(95.6% .01 258); --ink: oklch(25% .06 258); --ink-2: oklch(45% .035 258); --line: oklch(89% .014 258); --on-accent: oklch(99% .004 80); --sky: oklch(95% .02 230); --shadow: 0 1px 2px oklch(25% .06 258 / .06), 0 12px 32px -12px oklch(25% .06 258 / .18); --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px; --space-4xl: 96px; --sec: clamp(56px, 8vw, 112px); --wrap: 1280px; --ease: cubic-bezier(.22, 1, .36, 1); --f-display: "Unbounded", "Arial Black", sans-serif; --f-text: "Commissioner", "Segoe UI", system-ui, sans-serif; }
[data-theme="night"] { --bg: oklch(19% .045 258); --surface: oklch(23% .05 258); --surface-2: oklch(27% .052 258); --ink: oklch(95% .012 258); --ink-2: oklch(76% .03 258); --line: oklch(34% .05 258); --sky: oklch(24% .05 258); --sand: oklch(62% .06 80); --loam: oklch(50% .07 60); --clay: oklch(38% .06 50); --soil: oklch(30% .04 55); --shadow: 0 1px 2px oklch(0% 0 0 / .3), 0 16px 40px -16px oklch(0% 0 0 / .6); }
[data-theme="sand"] { --bg: oklch(96.2% .02 82); --surface: oklch(98.6% .011 82); --surface-2: oklch(93% .026 78); --ink: oklch(26% .045 50); --ink-2: oklch(45% .04 55); --line: oklch(86% .03 75); --sky: oklch(94% .03 85); --navy: oklch(30% .05 50); --on-accent: oklch(99% .004 80); }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--f-text); font-feature-settings: "tnum" 0; transition: background-color .4s var(--ease), color .4s var(--ease); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.bg-wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.bg-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bg-skip { position: absolute; left: 16px; top: -64px; z-index: 200; padding: 12px 18px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; transition: top .2s var(--ease); }
.bg-skip:focus { top: 12px; }
main:focus { outline: none; }
.bg-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Типографика ---------- */
.bg-h1 { font: 800 clamp(34px, 5.4vw, 72px)/1.02 var(--f-display); letter-spacing: -.02em; margin: 0 0 var(--space-lg); text-wrap: balance; }
.bg-h1 em { font-style: normal; color: var(--orange); }
.bg-h2 { font: 750 clamp(26px, 3.4vw, 44px)/1.08 var(--f-display); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.bg-h3 { font: 700 clamp(20px, 2vw, 26px)/1.2 var(--f-display); margin: 0 0 var(--space-md); }
.bg-lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 38ch; margin: 0 0 var(--space-xl); }
.bg-sub { color: var(--ink-2); max-width: 52ch; margin: var(--space-sm) 0 0; }
.bg-kicker { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 var(--space-lg); }
.bg-depth-tag { white-space: nowrap; flex: none; font: 700 13px/1 var(--f-display); letter-spacing: 0; text-transform: none; padding: 6px 8px; border-radius: var(--r-sm); background: var(--navy); color: oklch(97% .01 258); font-variant-numeric: tabular-nums; }
.bg-sec-head { display: grid; gap: var(--space-sm); margin-bottom: var(--space-2xl); }

/* ---------- Кнопки ---------- */
.bg-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); min-height: 52px; padding: 0 26px; border-radius: var(--r-md); border: 2px solid transparent; font: 650 16px/1 var(--f-text); text-decoration: none; transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease); }
.bg-btn--accent { background: var(--accent-btn); color: var(--on-accent); }
.bg-btn--accent:hover { background: var(--accent-btn-hover); transform: translateY(-2px); }
.bg-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.bg-btn--ghost:hover { border-color: var(--ink); }
.bg-btn:active { transform: translateY(0) scale(.98); }

/* ---------- Служебная строка ---------- */
.bg-topline { background: var(--navy); color: oklch(92% .02 258); font-size: 14px; }
.bg-topline__in { display: flex; align-items: center; gap: var(--space-lg); min-height: 40px; }
.bg-city { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: inherit; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 4px; }
.bg-topline__note { opacity: .8; }
.bg-theme { margin-left: auto; display: flex; gap: 6px; padding: 3px; border-radius: 99px; background: oklch(100% 0 0 / .08); }
.bg-theme button { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; background: none; display: grid; place-items: center; }
.bg-theme i { width: 16px; height: 16px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 2px oklch(100% 0 0 / .35); }
.bg-theme [data-theme-set="day"] i { background: linear-gradient(135deg, oklch(98% .005 258) 50%, oklch(66% .19 42) 50%); }
.bg-theme [data-theme-set="sand"] i { background: linear-gradient(135deg, oklch(90% .05 82) 50%, oklch(46% .07 50) 50%); }
.bg-theme [data-theme-set="night"] i { background: linear-gradient(135deg, oklch(22% .05 258) 50%, oklch(67% .11 222) 50%); }
.bg-theme [aria-checked="true"] { background: oklch(100% 0 0 / .18); }

/* ---------- Шапка (обычная, не плавает) ---------- */
.bg-head { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.bg-head__in { display: flex; align-items: center; gap: var(--space-lg); min-height: 84px; }
.bg-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.bg-logo__mark { width: 52px; height: 52px; }
.bg-logo__word { display: grid; line-height: 1; }
.bg-logo__name { font: 800 24px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.bg-logo__name b { font-weight: inherit; color: var(--ink); }
.bg-logo__name em { font-style: normal; color: var(--orange); }
.bg-logo__word small { font: 600 9.5px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 7px; }
.bg-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.bg-nav__btn, .bg-nav__link { white-space: nowrap; background: none; border: 0; padding: 10px 10px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; text-decoration: none; position: relative; }
.bg-nav__btn::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease); }
.bg-nav__btn[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.bg-nav__btn:hover, .bg-nav__link:hover, .bg-nav__btn[aria-expanded="true"] { background: var(--surface-2); }
.bg-head__contact { display: flex; align-items: center; gap: var(--space-md); }
.bg-phone { font: 700 18px/1 var(--f-display); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bg-mes { display: flex; gap: 6px; }
.bg-mes a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform .25s var(--ease); }
.bg-mes a:hover { transform: translateY(-2px); }
.bg-mes img { width: 26px; height: 26px; }
.bg-burger { display: none; width: 48px; height: 48px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); padding: 0; place-content: center; gap: 5px; }
.bg-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Мега-меню: строки по глубине ---------- */
.bg-mega { position: absolute; inset: 100% 0 auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); animation: bg-drop .35s var(--ease); }
.bg-mega__in { padding: var(--space-xl) 0; display: grid; grid-template-columns: 260px 1fr; gap: var(--space-xl); }
.bg-mega__cap { font: 750 26px/1.1 var(--f-display); margin: 0; }
.bg-mega__cap span { display: block; margin-top: 10px; font: 600 14px/1 var(--f-text); color: var(--ink-2); }
.bg-mega__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px var(--space-lg); }
.bg-mega__list a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: 12px 0; border-bottom: 1px dashed var(--line); text-decoration: none; transition: color .2s, padding .3s var(--ease); }
.bg-mega__list a:hover { color: var(--orange-ink); padding-left: 6px; }
.bg-mega__list span { color: var(--ink-2); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes bg-drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Первый экран ---------- */
.bg-hero { position: relative; overflow: hidden; background: radial-gradient(60% 70% at 85% 30%, color-mix(in oklch, var(--water) 12%, transparent), transparent 70%), var(--bg); }
.bg-hero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--space-2xl); align-items: center; padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 96px); }
.bg-hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.bg-hero__facts { list-style: none; margin: 0; padding: var(--space-lg) 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--space-xl); border-top: 1px solid var(--line); }
.bg-hero__facts li { display: grid; gap: 6px; }
.bg-hero__facts b { font: 800 28px/1 var(--f-display); }
.bg-hero__facts span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.bg-section { margin: 0; position: relative; }
.bg-section__svg { width: 100%; height: auto; display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--sky); box-shadow: var(--shadow); }
.bg-section__svg .horizon { stroke: var(--ink); stroke-width: 2; opacity: .5; }
.bg-section__svg .house { fill: var(--surface); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.bg-section__svg .house .door { fill: var(--surface-2); }
.bg-section__svg .rig { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.bg-section__svg .rig rect { fill: var(--orange); stroke: none; }
.bg-section__svg .l-soil { fill: var(--soil); }
.bg-section__svg .l-sand { fill: var(--sand); }
.bg-section__svg .l-loam { fill: var(--loam); }
.bg-section__svg .l-clay { fill: var(--clay); }
.bg-section__svg .l-aqua { fill: var(--water-deep); }
.bg-section__svg .dot { fill: oklch(55% .07 70 / .55); }
.bg-section__svg .hatch { stroke: oklch(25% .04 50 / .35); stroke-width: 1.4; }
.bg-section__svg .wave { fill: none; stroke: oklch(85% .07 220 / .55); stroke-width: 1.6; }
.bg-section__svg .aqua-wave { animation: bg-flow 6s linear infinite; }
.bg-section__svg .bore { fill: oklch(22% .04 50 / .55); }
.bg-section__svg .drill__rod { fill: oklch(70% .01 258); }
.bg-section__svg .drill__cone { fill: var(--navy); }
[data-theme="night"] .bg-section__svg .drill__cone { fill: oklch(88% .02 258); }
.bg-section__svg .drill__flights { fill: var(--orange); animation: bg-spin .55s linear infinite; }
.bg-section__svg .tag path { stroke: var(--surface); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .8; }
.bg-section__svg .tag text { font: 650 14px var(--f-text); fill: var(--ink); }
.bg-section__svg .tag__bg { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.bg-section__svg .tag--water .tag__bg { fill: var(--water); stroke: none; }
.bg-section__svg .tag .tag__m { font-weight: 450; font-size: 12px; fill: var(--ink-2); }
.bg-section__svg .strata text { fill: var(--ink); }
.bg-section__svg .tag { opacity: 0; transform: translateX(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 90ms); }
.bg-section.is-in .tag { opacity: 1; transform: none; }
.bg-section__svg .tag--water text, .bg-section__svg .tag--water .tag__m { fill: oklch(20% .06 240); }
.bg-section__gauge { position: absolute; left: var(--space-lg); bottom: var(--space-lg); display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.bg-section__lbl { grid-column: 1 / -1; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.bg-section__val { font: 800 34px/1.05 var(--f-display); font-variant-numeric: tabular-nums; min-width: 3.4ch; }
.bg-section__unit { font: 700 16px var(--f-display); color: var(--ink-2); }
.bg-section__hint { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
@keyframes bg-spin { to { transform: translateY(-24px); } }
@keyframes bg-flow { to { transform: translateX(-22px); } }

/* ---------- Калькулятор ---------- */
.bg-calc { padding: var(--sec) 0; background: var(--surface); border-block: 1px solid var(--line); }
.bg-calc__head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: var(--space-sm) var(--space-2xl); margin-bottom: var(--space-xl); }
.bg-calc__head .bg-sub { margin: 0; }
.bg-calc__tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: var(--space-xl); flex-wrap: wrap; }
.bg-calc__tabs button { border: 0; background: none; padding: 12px 22px; border-radius: 9px; font-weight: 650; transition: background-color .25s var(--ease), color .25s; }
.bg-calc__tabs [aria-selected="true"] { background: var(--navy); color: oklch(97% .01 258); }
[data-theme="night"] .bg-calc__tabs [aria-selected="true"] { background: var(--accent-btn); color: var(--on-accent); }
.bg-calc__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: var(--space-2xl); align-items: start; }
.bg-calc__form { display: grid; gap: var(--space-xl); }
.bg-q { display: grid; gap: var(--space-md); }
.bg-q__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); }
.bg-q__label { font-weight: 650; font-size: 17px; }
.bg-q__value { font: 800 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bg-q__value small { font: 600 14px var(--f-text); color: var(--ink-2); margin-left: 4px; }
.bg-q__hint { font-size: 14px; color: var(--ink-2); margin: -6px 0 0; }
.bg-range { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; touch-action: none; cursor: grab; margin: 0; }
.bg-range:active { cursor: grabbing; }
.bg-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--orange) var(--p), var(--surface-2) var(--p)); }
.bg-range::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--orange) var(--p), var(--surface-2) var(--p)); }
.bg-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--navy); box-shadow: 0 2px 8px oklch(25% .06 258 / .25); transition: transform .2s var(--ease); }
.bg-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 3px solid var(--navy); }
.bg-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.bg-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: -8px; }
.bg-chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.bg-chip { position: relative; }
.bg-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bg-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.bg-chip span small { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bg-chip input:checked + span { border-color: var(--navy); background: color-mix(in oklch, var(--navy) 8%, var(--surface)); }
[data-theme="night"] .bg-chip input:checked + span { border-color: var(--orange); background: color-mix(in oklch, var(--orange) 14%, var(--surface)); }
.bg-chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.bg-chip span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--ink-2); flex: none; transition: background .2s, border-color .2s; }
.bg-chip input[type="radio"] + span::before { border-radius: 50%; }
.bg-chip input:checked + span::before { background: var(--orange); border-color: var(--orange); box-shadow: inset 0 0 0 3px var(--surface); }

/* Наряд-смета */
.bg-order { position: sticky; top: 24px; padding: var(--space-xl); border-radius: var(--r-lg); background: var(--bg); border: 1.5px solid var(--line); overflow: hidden; }
.bg-order::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(90deg, var(--orange) 0 24px, transparent 24px 40px); }
.bg-order__top { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 40px; padding-right: 150px; }
.bg-order__date { display: block; margin-top: 2px; }
.bg-order__title { font: 750 22px/1.2 var(--f-display); margin: var(--space-md) 0 var(--space-lg); }
.bg-order__lines { list-style: none; margin: 0 0 var(--space-lg); padding: 0; display: grid; gap: 10px; font-size: 15px; }
.bg-order__lines li { display: flex; gap: 8px; align-items: baseline; animation: bg-line .4s var(--ease); }
.bg-order__lines li span:first-child { flex: none; max-width: 70%; }
.bg-order__lines li i { flex: 1; border-bottom: 1.5px dotted var(--line); transform: translateY(-4px); }
.bg-order__lines li b { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bg-order__sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-md); border-top: 2px solid var(--ink); }
.bg-order__sum span { font-weight: 650; }
.bg-order__sum output { font: 800 clamp(28px, 3vw, 38px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bg-order__note { font-size: 13px; color: var(--ink-2); margin: var(--space-sm) 0 var(--space-lg); min-height: 1.4em; }
.bg-order__btn { width: 100%; }
.bg-order__stamp { position: absolute; right: 22px; top: 30px; padding: 6px 12px; border: 2.5px solid var(--orange-ink); color: var(--orange-ink); border-radius: 6px; font: 800 12px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-9deg); opacity: .75; }
@keyframes bg-line { from { opacity: 0; transform: translateX(-6px); } }

/* ---------- Керны услуг ---------- */
.bg-cores { padding: var(--sec) 0; }
.bg-cores__row { display: grid; grid-template-columns: 1.25fr 1fr 1.15fr .85fr; gap: var(--space-lg); align-items: end; }
.bg-core { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-lg); align-items: end; padding: var(--space-lg); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); min-height: calc(220px + var(--h) * 300px); transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.bg-core:hover { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow); transform: translateY(-4px); }
.bg-core__sample { align-self: stretch; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; box-shadow: inset 0 0 0 1px oklch(0% 0 0 / .08), inset -10px 0 14px -8px oklch(0% 0 0 / .25); }
.bg-core__sample i { flex: 1; }
.bg-core__sample .s1 { background: var(--soil); flex: .35; }
.bg-core__sample .s2 { background: var(--sand); }
.bg-core__sample .s3 { background: var(--loam); }
.bg-core__sample .s4 { background: var(--clay); }
.bg-core__sample .s5 { background: var(--water-deep); flex: 1.3; }
.bg-core--water .bg-core__sample .s4 { flex: .7; }
.bg-core__body { align-self: stretch; display: flex; flex-direction: column; }
.bg-core__from { margin: 0 0 auto; padding-bottom: var(--space-lg); display: grid; gap: 4px; }
.bg-core__from b { font: 800 clamp(20px, 1.8vw, 26px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bg-core__from span { font-size: 13px; color: var(--ink-2); }
.bg-core__depth { margin: 0 0 6px; font: 700 13px/1 var(--f-display); color: var(--orange-ink); font-variant-numeric: tabular-nums; }
.bg-core__h { font: 750 24px/1.1 var(--f-display); margin: 0 0 var(--space-md); }
.bg-core__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bg-core__list a { display: block; padding: 6px 0; text-decoration: none; font-size: 15.5px; border-bottom: 1px solid transparent; transition: color .2s, transform .3s var(--ease); }
.bg-core__list a:hover { color: var(--orange-ink); transform: translateX(4px); }

/* ---------- Колодец или скважина ---------- */
.bg-vs { padding: var(--sec) 0; background: var(--navy); color: oklch(96% .01 258); }
[data-theme="night"] .bg-vs { background: var(--surface-2); }
.bg-vs .bg-sub { color: oklch(84% .03 258); }
.bg-vs__in { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
.bg-vs__q { display: grid; gap: var(--space-sm); margin-top: var(--space-xl); }
.bg-check { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: oklch(100% 0 0 / .06); cursor: pointer; transition: background-color .2s; }
.bg-check:hover { background: oklch(100% 0 0 / .1); }
.bg-check input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.bg-vs__scale { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-md); align-items: center; }
.bg-vs__pic { grid-column: 1 / -1; width: 100%; height: auto; border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--space-lg); }
.bg-vs__pic .v-soil { fill: var(--soil); }
.bg-vs__pic .v-sand { fill: var(--sand); }
.bg-vs__pic .v-loam { fill: var(--loam); }
.bg-vs__pic .v-clay { fill: var(--clay); }
.bg-vs__pic .v-aqua { fill: var(--water-deep); }
.bg-vs__pic .v-shaft { fill: oklch(86% .01 258); stroke: oklch(70% .01 258); stroke-width: 2; }
.bg-vs__pic .v-seam { stroke: oklch(65% .01 258); stroke-width: 2; }
.bg-vs__pic .v-pipe { fill: oklch(92% .01 258); }
.bg-vs__pic .v-head { fill: var(--orange); }
.bg-vs__pic .v-water { fill: var(--water); }
.bg-vs__pic text { font: 700 14px var(--f-display); fill: oklch(96% .01 258); }
.bg-vs__pic g { transition: opacity .5s var(--ease); }
.bg-vs__pic.is-well .v-bore, .bg-vs__pic.is-bore .v-well { opacity: .3; }
.bg-vs__side { display: grid; gap: 4px; text-align: center; }
.bg-vs__side span { font-size: 14px; opacity: .8; }
.bg-vs__side b { font: 800 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bg-vs__side--bore b { color: var(--water); }
.bg-vs__side--well b { color: var(--orange); }
.bg-vs__bar { height: 14px; border-radius: 99px; background: var(--water); overflow: hidden; }
.bg-vs__bar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--orange); transition: width .6s var(--ease); }
.bg-vs__verdict { grid-column: 1 / -1; margin: var(--space-lg) 0 0; font: 700 20px/1.35 var(--f-display); text-align: center; min-height: 2.7em; }

/* ---------- Этапы ---------- */
.bg-steps { padding: var(--sec) 0; }
.bg-steps .bg-h2 { margin-bottom: var(--space-2xl); }
.bg-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-lg); counter-reset: s; }
.bg-steps__list li { position: relative; padding-top: var(--space-xl); }
.bg-steps__list li:nth-child(2) { margin-top: 24px; }
.bg-steps__list li:nth-child(3) { margin-top: 48px; }
.bg-steps__list li:nth-child(4) { margin-top: 72px; }
.bg-steps__list li:nth-child(5) { margin-top: 96px; }
.bg-steps__list li::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: .35; }
.bg-steps__list li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); }
.bg-steps__list li:last-child::after { background: var(--water); }
.bg-steps__m { font: 700 13px var(--f-display); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bg-steps__list h3 { font: 700 19px/1.2 var(--f-display); margin: 8px 0; }
.bg-steps__list p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- Работы: лента ---------- */
.bg-works { padding: var(--sec) 0; background: var(--surface); border-block: 1px solid var(--line); overflow: hidden; }
.bg-works__head { display: flex; justify-content: space-between; align-items: end; margin-bottom: var(--space-xl); }
.bg-arrows { display: flex; gap: var(--space-sm); }
.bg-arrows button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-size: 20px; transition: border-color .2s, transform .25s var(--ease); }
.bg-arrows button:hover { border-color: var(--ink); transform: translateY(-2px); }
.bg-strip { display: flex; gap: var(--space-md); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 max(16px, (100vw - var(--wrap)) / 2); scroll-padding-inline: max(16px, (100vw - var(--wrap)) / 2); cursor: grab; overscroll-behavior-x: contain; }
.bg-strip::-webkit-scrollbar { display: none; }
.bg-strip.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.bg-strip.is-drag a { pointer-events: none; }
.bg-strip figure { margin: 0; flex: none; scroll-snap-align: start; width: clamp(240px, 28vw, 400px); }
.bg-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); transition: transform .6s var(--ease); -webkit-user-drag: none; }
.bg-strip a { display: block; overflow: hidden; border-radius: var(--r-md); }
.bg-strip a:hover img { transform: scale(1.04); }
.bg-strip figcaption { margin-top: 10px; font-weight: 600; font-size: 15px; }

/* ---------- Вопросы ---------- */
.bg-faq { padding: var(--sec) 0; }
.bg-faq__in { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--space-3xl); }
.bg-acc__item { border-bottom: 1px solid var(--line); }
.bg-acc__item h3 { margin: 0; }
.bg-acc__item button { width: 100%; display: flex; justify-content: space-between; gap: var(--space-md); align-items: center; text-align: left; background: none; border: 0; padding: 22px 0; font: 650 18px/1.35 var(--f-text); }
.bg-acc__item button::after { content: ""; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313294b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .35s var(--ease), background-color .2s; }
.bg-acc__item button[aria-expanded="true"]::after { transform: rotate(45deg); background-color: var(--orange); }
.bg-acc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.bg-acc__body > div { overflow: hidden; }
.bg-acc__body p { margin: 0 0 22px; color: var(--ink-2); max-width: 65ch; }
.bg-acc__item button[aria-expanded="true"] + .bg-acc__body, .bg-acc__item h3:has(button[aria-expanded="true"]) + .bg-acc__body { grid-template-rows: 1fr; }

/* ---------- Подвал — водоносный слой ---------- */
.bg-foot { position: relative; margin-top: var(--space-2xl); background: var(--water-deep); color: oklch(96% .02 222); }
[data-theme="night"] .bg-foot { background: oklch(28% .07 228); }
.bg-foot__wave { position: absolute; bottom: 100%; left: 0; width: 100%; height: 40px; fill: var(--water-deep); }
[data-theme="night"] .bg-foot__wave { fill: oklch(28% .07 228); }
/* полоса «посчитаем до выезда»: мессенджеры белыми пилюлями и обратный звонок */
.bg-foot__cta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg) var(--space-xl); flex-wrap: wrap; margin-top: var(--space-xl); padding: var(--space-lg) var(--space-xl); border-radius: var(--r-lg); background: oklch(100% 0 0 / .08); box-shadow: inset 0 0 0 1px oklch(100% 0 0 / .14); }
.bg-foot__cta-text { display: grid; gap: 6px; max-width: 52ch; }
.bg-foot__cta-text p { margin: 0; opacity: .88; }
.bg-foot__cta-text .bg-foot__cta-h { font: 750 clamp(19px, 2vw, 24px)/1.15 var(--f-display); opacity: 1; }
.bg-foot__cta-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bg-foot__mes { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 11px; border-radius: 99px; background: var(--surface); color: var(--ink); font: 700 15px var(--f-text); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.bg-foot__mes img { width: 26px; height: 26px; }
.bg-foot__mes:hover, .bg-foot__mes:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px -10px oklch(0% 0 0 / .45); }
.bg-foot__cta-act .bg-btn { height: 48px; }
/* колонки: бренд и контакты, три группы услуг, компания */
.bg-foot__in { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: var(--space-xl); padding: var(--space-2xl) 0 var(--space-xl); }
.bg-foot__brand { display: grid; gap: var(--space-md); align-content: start; }
.bg-foot__logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.bg-foot__mark { width: 52px; height: 52px; flex: none; }
.bg-foot__logo span { font: 800 22px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.bg-foot__logo b { font-weight: inherit; }
.bg-foot__logo em { font-style: normal; color: var(--orange); }
.bg-foot__brand p { margin: 0; max-width: 34ch; opacity: .88; }
.bg-foot__phone { font: 800 22px/1 var(--f-display); color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bg-foot__phone:hover { color: var(--sand); }
.bg-foot__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; opacity: .85; }
.bg-foot__facts a { color: inherit; }
.bg-foot__col { display: grid; gap: var(--space-lg); align-content: start; }
.bg-foot__nav { display: grid; gap: 8px; align-content: start; }
.bg-foot__nav a { text-decoration: none; opacity: .88; }
.bg-foot__nav a:hover { opacity: 1; text-decoration: underline; }
.bg-foot__h { font: 700 14px var(--f-display); margin: 0 0 6px; letter-spacing: .02em; }
/* города: строка ссылок на поддомены, текущий выделен */
.bg-foot__geo { padding: var(--space-lg) 0; border-top: 1px solid oklch(100% 0 0 / .18); }
.bg-foot__geo ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bg-foot__geo a, .bg-foot__geo span { display: inline-block; padding: 5px 11px; border-radius: 99px; font-size: 14px; color: inherit; text-decoration: none; box-shadow: inset 0 0 0 1px oklch(100% 0 0 / .2); transition: background-color .2s; }
.bg-foot__geo a:hover, .bg-foot__geo a:focus-visible { background: oklch(100% 0 0 / .14); }
.bg-foot__geo span { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: none; }
.bg-foot__geo ul + .bg-foot__h { margin-top: var(--space-md); }
.bg-foot__geo a.bg-foot__all { font-weight: 700; background: oklch(100% 0 0 / .1); }
.bg-foot__legal { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); padding: var(--space-lg) 0 var(--space-xl); border-top: 1px solid oklch(100% 0 0 / .18); font-size: 14px; }
.bg-foot__legal a { opacity: .8; }
.bg-foot__made { margin-left: auto; opacity: .8; }
@media (min-width: 961px) { .bg-foot__legal { padding-bottom: 108px; } }
.bg-foot__made a { opacity: 1; color: inherit; font-weight: 700; }

/* ---------- Уголок связи: загнутый лист, под ним — оранжевая «изнанка» ---------- */
.bg-corner { position: fixed; right: 0; bottom: 0; z-index: 30; width: 108px; height: 108px; border: 0; padding: 0; background: none; transition: width .4s var(--ease), height .4s var(--ease); }
.bg-corner::before { content: ""; position: absolute; inset: 0; background: var(--orange); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.bg-corner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--surface) 30%, var(--surface-2) 100%); clip-path: polygon(0 100%, 100% 0, 0 0); filter: drop-shadow(0 0 0 transparent); box-shadow: inset -6px -6px 12px -6px oklch(25% .06 258 / .35); opacity: 0; }
.bg-corner span { position: absolute; left: 68%; top: 68%; font: 800 12px/1 var(--f-display); color: var(--on-accent); transform: translate(-50%, -50%) rotate(-45deg); letter-spacing: .03em; white-space: nowrap; }
.bg-corner:hover { width: 128px; height: 128px; }

/* ---------- Диалоги: бланк заявки ---------- */
.bg-dlg, .bg-drawer, .bg-lb { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; }
.bg-dlg::backdrop, .bg-drawer::backdrop, .bg-lb::backdrop { background: oklch(20% .05 258 / .55); backdrop-filter: blur(2px); }
.bg-dlg[open], .bg-citydlg[open] { animation: bg-paper .5s var(--ease); }
.bg-dlg, .bg-citydlg { overflow-x: hidden; scrollbar-width: thin; }
.bg-drawer[open] { animation: bg-sink .45s var(--ease); }
.bg-blank { position: relative; overflow: hidden; width: min(92vw, 460px); display: grid; gap: var(--space-md); padding: var(--space-2xl) var(--space-xl) var(--space-xl); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); background-image: repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in oklch, var(--water) 18%, transparent) 31px 32px); }
.bg-blank__no { margin: 0; font: 700 12px var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); }
.bg-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.bg-field input { min-height: 50px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 500 17px var(--f-text); }
.bg-field input:focus { border-color: var(--navy); outline: 0; box-shadow: 0 0 0 3px color-mix(in oklch, var(--orange) 40%, transparent); }
.bg-via { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bg-via__cap { width: 100%; margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.bg-via label { position: relative; }
.bg-via input { position: absolute; opacity: 0; inset: 0; }
.bg-via span { display: block; padding: 10px 14px; border-radius: 99px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; background: var(--surface); }
.bg-via input:checked + span { background: var(--navy); color: oklch(97% .01 258); border-color: var(--navy); }
.bg-via input:focus-visible + span { outline: 3px solid var(--orange); }
.bg-agree { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); align-items: flex-start; }
.bg-agree input { margin-top: 3px; accent-color: var(--orange); }
.bg-dlg__x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 24px; line-height: 1; }
.bg-blank__stamp { position: absolute; right: 26px; bottom: 90px; padding: 8px 14px; border: 3px solid var(--water-deep); color: var(--water-deep); border-radius: 8px; font: 800 18px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; transform: rotate(-12deg) scale(2.4); opacity: 0; pointer-events: none; }
.bg-blank.is-sent .bg-blank__stamp { animation: bg-stamp .5s var(--ease) forwards; }
@keyframes bg-stamp { to { opacity: .85; transform: rotate(-12deg) scale(1); } }
@keyframes bg-paper { from { opacity: 0; transform: translateY(30px) rotate(-1.5deg); } }

/* ---------- Мобильное меню: спуск по слоям ---------- */
.bg-drawer { width: 100%; height: 100%; margin: 0; }
.bg-drawer__in { position: relative; min-height: 100%; display: flex; flex-direction: column; background: var(--sky); padding: 72px 0 0; }
.bg-drawer__surface { margin: 0 20px 12px; font: 700 12px var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.bg-layer { padding: 0 20px; }
.bg-layer summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; }
.bg-layer summary::-webkit-details-marker { display: none; }
.bg-layer summary b { font: 750 22px/1 var(--f-display); }
.bg-layer summary span { font: 700 13px var(--f-display); opacity: .75; }
.bg-layer a { display: block; padding: 10px 0; text-decoration: none; font-weight: 600; font-size: 17px; }
.bg-layer[open] { padding-bottom: 14px; }
.bg-layer--1 { background: var(--sand); color: oklch(25% .04 60); }
.bg-layer--2 { background: var(--loam); color: oklch(18% .04 55); }
.bg-layer--3 { background: var(--clay); color: oklch(96% .02 60); }
.bg-layer--4 { background: var(--soil); color: oklch(96% .02 60); }
.bg-drawer__aqua { margin-top: auto; padding: 28px 20px 40px; background: var(--water-deep); color: oklch(97% .02 222); display: grid; gap: 16px; }
.bg-drawer__aqua .bg-phone { font-size: 24px; }
.bg-drawer__aqua .bg-mes a { width: 52px; height: 52px; }
.bg-drawer .bg-dlg__x { position: absolute; top: 14px; right: 14px; }
@keyframes bg-sink { from { opacity: 0; transform: translateY(-24px); } }

/* ---------- Просмотр фото ---------- */
.bg-lb { width: 100vw; height: 100vh; margin: 0; display: none; place-items: center; }
.bg-lb[open] { display: grid; }
.bg-lb img { max-width: 92vw; max-height: 82vh; border-radius: var(--r-md); }
.bg-lb p { color: oklch(96% .01 258); margin: 12px 0 0; text-align: center; }
.bg-lb .bg-dlg__x { position: fixed; }

/* ---------- Появление при прокрутке ---------- */
.js .bg-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .bg-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .bg-foot__in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bg-foot__brand { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; column-gap: var(--space-xl); }
  .bg-foot__brand > p, .bg-foot__facts { grid-column: 2; }
  .bg-nav { display: none; }
  .bg-burger { display: grid; }
  .bg-head__contact { margin-left: auto; }
  .bg-cores__row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .bg-hero__in, .bg-calc__grid, .bg-vs__in, .bg-faq__in { grid-template-columns: 1fr; }
  .bg-calc__head { grid-template-columns: 1fr; }
  .bg-order { position: relative; top: 0; }
  .bg-steps__list { grid-template-columns: 1fr; gap: 0; }
  .bg-steps__list li { margin: 0 !important; padding: 0 0 var(--space-xl) var(--space-xl); }
  .bg-steps__list li::before { left: 6px; right: auto; top: 18px; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 12px); }
  .bg-foot__in { grid-template-columns: 1fr 1fr; }
  .bg-foot__cta { padding: var(--space-lg); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bg-topline__note { display: none; }
  .bg-head__in { gap: var(--space-md); min-height: 68px; }
  .bg-logo__mark { width: 42px; height: 42px; }
  .bg-logo__name { font-size: 19px; }
  .bg-logo__word small { display: none; }
  .bg-head__contact .bg-mes, .bg-head__contact .bg-phone { display: none; }
  .bg-hero__facts { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-md); }
  .bg-hero__facts b { font-size: 22px; }
  .bg-hero__cta .bg-btn { flex: 1 1 100%; }
  .bg-cores__row { grid-template-columns: 1fr; }
  .bg-core { min-height: 0; }
  .bg-section__gauge { left: 12px; bottom: 12px; padding: 10px 14px; }
  .bg-section__val { font-size: 26px; }
  .bg-section__hint { display: none; }
  .bg-foot__in { gap: var(--space-xl) var(--space-md); }
  .bg-foot__made { margin-left: 0; width: 100%; }
  .bg-foot__brand { grid-template-columns: 1fr; }
  .bg-foot__brand > p, .bg-foot__facts { grid-column: auto; }
  .bg-foot__cta-act { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bg-foot__mes { justify-content: center; flex-direction: column; height: auto; gap: 4px; padding: 10px 6px; border-radius: var(--r-md); font-size: 13px; }
  .bg-foot__cta-act .bg-btn { grid-column: 1 / -1; justify-content: center; }
  .bg-corner { width: 84px; height: 84px; }
  .bg-corner span { font-size: 10px; }
  .bg-calc__tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
