/* ============================================================
   ГидравликаПлюс. Светлый, инженерный, с одним акцентом —
   цветом гидравлического масла. Главный герой — сам узел.
   ============================================================ */

@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/golos-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/golos-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --bg-2: #f2f3f4;
  --ink: #0f1113;
  --ink-2: #2b2f34;
  --mute: #5d636b;
  --line: #dfe2e5;
  --oil: #f2a100;
  --oil-2: #ffb829;
  --oil-ink: #8a5600;
  --dark: #101214;
  --dark-2: #1a1d20;
  --dark-mute: #b4b9bf;
  --r: 6px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: 32px;
  --hdr: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
/* Строки заголовка выравниваются по длине: последнее слово не остаётся одно. */
h1, h2, h3, h4 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--oil); outline-offset: 2px; border-radius: 2px; }
/* Колонка перестаёт расти на ширине окна 1360px. Размеры заголовков в vw упираются в предел
   на той же ширине (vw × 13,6), иначе на большом мониторе шрифт растёт, а строка — нет. */
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; }
.anchor { position: absolute; bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r);
  font-weight: 600; font-size: 17px; line-height: 1.2; text-align: center;
  transition: background-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out;
}
.btn-oil { background: var(--oil); color: var(--ink); }
.btn-oil:hover { background: var(--oil-2); }
.btn-line { box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-line:hover { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-wide { width: 100%; }
.link-arrow { display: inline-block; padding: 4px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.link-arrow:hover { text-decoration-color: var(--oil); }

.draft-bar { background: var(--oil); color: var(--ink); text-align: center; font-weight: 600; font-size: 15px; padding: 8px 16px; position: relative; z-index: 31; }

/* ---------- шапка ---------- */

.hdr { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s ease-out; }
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr-in { display: flex; align-items: center; gap: 34px; height: var(--hdr); }
.logo { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; white-space: nowrap; }
/* «Плюс» на масляной плашке — один и тот же знак на светлой шапке и тёмном подвале. */
.logo b { font-weight: 800; background: var(--oil); color: var(--ink); padding: 1px 6px 2px; border-radius: 4px; }
.nav { display: flex; gap: 26px; font-size: 17px; color: var(--ink-2); }
.nav a { padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
/* Номер всегда у правого края; кнопка «Узнать стоимость» — слева от него. */
.hdr-tel { font-weight: 700; font-size: 17px; white-space: nowrap; padding: 10px 0; }
.hdr-cta { margin-left: auto; min-height: 44px; font-size: 15px; padding: 0 18px; transition: background-color .15s ease-out, opacity .15s ease-out, visibility 0s; }
/* Пока на экране главная кнопка страницы, второй такой же в шапке нет. */
.hdr-cta.is-quiet { opacity: 0; visibility: hidden; transition: opacity .15s ease-out, visibility 0s linear .15s; }
.burger { display: none; flex: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.burger span:not(.sr) { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .2s ease-out; }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.menu { position: fixed; inset: var(--hdr) 0 0; overflow-y: auto; border-top: 1px solid var(--line); background: #fff; z-index: 45; }
.menu-in { display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 24px; }
.menu-in > a { font-size: 22px; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--line); }
.menu-in .menu-tel { border: 0; margin-top: 12px; }
.menu-msg { display: flex; gap: 18px; margin-top: 6px; font-size: 17px; }
.menu-msg a { display: inline-block; padding: 6px 0; text-decoration: underline; text-underline-offset: 4px; }
.menu-hours { color: var(--mute); margin-top: 10px; font-size: 15px; }

/* ---------- сцена с цилиндром ---------- */

.stage { position: relative; background: var(--bg-2); }
.stage-hero { height: 470vh; }
.stage-inline { height: 380vh; }
.stage-in { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; display: flex; flex-direction: column; padding-top: calc(var(--hdr) + 26px); }
.stage-copy { position: relative; flex: 0 0 auto; min-height: 400px; }
.stage-inline .stage-copy { min-height: 300px; }
.layer { position: absolute; inset: 0 var(--pad); transition: opacity .35s ease-out, transform .35s ease-out; }
.layer.off { opacity: 0; transform: translateY(-14px); pointer-events: none; visibility: hidden; transition: opacity .35s ease-out, transform .35s ease-out, visibility 0s linear .35s; }

.layer-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.layer-hero h1 { font-weight: 800; font-size: clamp(40px, 4.9vw, 66px); line-height: .96; letter-spacing: -.04em; text-wrap: balance; }
.hero-side p { font-size: 18px; color: var(--ink-2); max-width: 34em; }
.hero-side p + p { margin-top: 8px; }
.hero-act { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; margin-top: 24px; }
.hero-tel { font-weight: 700; font-size: 18px; white-space: nowrap; padding: 6px 0; }
.hero-msg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 15px; color: var(--mute); }
.hero-msg a { display: inline-block; padding: 3px 0; text-decoration: underline; text-underline-offset: 4px; }
.hero-msg a:hover { color: var(--ink); }

/* Последняя строка заголовка у всех этапов на одной линии, поэтому при смене этапа заголовок
   не прыгает. Пояснение, ссылка на ведомость и манометр стоят вне потока: пояснение и ссылка
   под заголовком, манометр справа по центру его последней строки. */
.layer-stage { --stage-fs: clamp(36px, 3.95vw, 54px); --stage-pb: 150px; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: var(--stage-pb); }
.stage-head { position: relative; }
/* Размер от ширины окна: самый длинный этап («Комплексная диагностика и дефектовка») встаёт в одну строку. */
.stage-head h2 { font-weight: 800; font-size: var(--stage-fs); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
/* Номер этапа — как «Плюс» в логотипе: тёмная цифра на масляной плашке. */
.stage-n { display: inline-block; background: var(--oil); color: var(--ink); border-radius: .1em; padding: 0 .16em .02em; margin-right: .08em; line-height: 1.02; }
.stage-side { position: absolute; left: 0; top: calc(100% - var(--stage-pb) + 16px); display: grid; gap: 10px; justify-items: start; }
.stage-text { max-width: 62ch; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
/* Справа от заголовка оставлено место под манометр (его ширина + 32px). */
.layer-stage[data-layer="3"] .stage-head { padding-right: 464px; }
.layer-stage[data-layer="3"] .stage-side { right: 464px; }
.layer-stage .gauge-box { position: absolute; right: 0; bottom: calc(var(--stage-pb) + var(--stage-fs) / 2); transform: translateY(50%); }
.sheet-link { font-size: 17px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-align: left; }
.sheet-link:hover { text-decoration-color: var(--oil); }
.group h3, .group h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; padding-top: 10px; border-top: 2px solid var(--ink); }
.group li { font-size: 15px; line-height: 1.4; color: var(--ink-2); padding: 4px 0 4px 16px; position: relative; }
.group li::before { content: ""; position: absolute; left: 0; top: .78em; width: 8px; height: 2px; background: var(--mute); }
.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 34px; }

.gauge-box { display: flex; align-items: center; gap: 22px; }
.gauge-col { display: grid; gap: 10px; width: 260px; }
.gauge { width: 150px; height: 150px; flex: none; }
.gauge text { font-family: var(--font); font-weight: 600; font-variant-numeric: tabular-nums; }
.gauge-unit { font-size: 13px; fill: var(--mute); }
.gauge-read { font-size: 15px; color: var(--mute); }
.gauge-read b { display: block; font-weight: 800; font-size: 64px; line-height: 1; color: var(--ink); letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.gauge-read span { display: block; font-family: var(--font); margin-top: 6px; color: var(--ink-2); }
.stamp {
  max-width: 380px;
  font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity .3s ease-out, transform .3s ease-out;
}
.stamp.on { opacity: 1; transform: none; }

.cyl-box { flex: 1 1 auto; display: flex; align-items: center; min-height: 0; padding: 8px 0; }
.cyl { width: 100%; height: 100%; max-height: 500px; overflow: visible; }
.cyl text { font-family: var(--font); }
.cyl .t { font-size: 24px; font-weight: 700; fill: var(--ink); }
.cyl .n { font-size: 18px; fill: var(--mute); }
.cyl .ld { stroke: var(--ink); stroke-width: 1.5; }
.cyl .lbl { opacity: var(--e, 0); }
.cyl [data-p] { transition: opacity .25s ease-out; }
.cyl[data-hl] [data-p] { opacity: .3; }
.cyl[data-hl="rod"] [data-p="rod"],
.cyl[data-hl="seals"] [data-p="seals"],
.cyl[data-hl="barrel"] [data-p="barrel"],
.cyl[data-hl="pg"] [data-p="piston"],
.cyl[data-hl="pg"] [data-p="gland"] { opacity: 1; }
.cyl[data-hl] [data-p] .ld { stroke: var(--oil); stroke-width: 3; }

.part-cap { display: none; }
.rail { flex: 0 0 auto; display: flex; align-items: flex-start; padding-bottom: 24px; transition: opacity .3s ease-out; }
.rail.off { opacity: 0; }
/* Этапы под цилиндром — кнопки: переход к этапу (прокруткой на компьютере, сразу на телефоне). */
.rail button { flex: 1; font-size: 15px; line-height: 1.35; text-align: left; color: var(--mute); padding: 12px 10px 4px 0; position: relative; }
.rail button:hover { color: var(--ink); }
.rail button::before { content: ""; position: absolute; left: 0; right: 6px; top: 0; height: 3px; background: var(--line); border-radius: 2px; }
.rail button i { position: absolute; left: 0; top: 0; height: 3px; background: var(--ink); border-radius: 2px; width: 0; }
.rail button.on { color: var(--ink); font-weight: 600; }
.cue { position: absolute; left: var(--pad); bottom: 18px; padding: 6px 0; font-size: 15px; color: var(--mute); transition: opacity .3s ease-out; }
.cue:hover { color: var(--ink); }
.cue.off { opacity: 0; pointer-events: none; }

/* Без JS сцена — обычная секция: собранный цилиндр и все этапы списком. */
.no-js .stage, .stage.is-static { height: auto; }
.no-js .stage-in, .stage.is-static .stage-in { position: static; height: auto; min-height: 0; padding-bottom: 40px; }
.no-js .layer, .stage.is-static .layer { position: static; opacity: 1; transform: none; visibility: visible; margin-bottom: 40px; }
.no-js .stage-copy, .stage.is-static .stage-copy { min-height: 0 !important; }
.no-js .rail, .no-js .cue, .stage.is-static .rail, .stage.is-static .cue { display: none; }
.stage.is-static .stamp { opacity: 1; transform: none; }
.no-js .layer-stage, .stage.is-static .layer-stage { padding: 0; gap: 16px; }
.no-js .layer-stage[data-layer] :is(.stage-head, .stage-side, .gauge-box),
.stage.is-static .layer-stage[data-layer] :is(.stage-head, .stage-side, .gauge-box) { position: static; transform: none; padding-right: 0; margin: 0 0 8px; }

/* ---------- разделы ---------- */

.sec { padding: 104px 0; }
.sec-tight { padding: 40px 0 88px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 18px 48px; margin-bottom: 44px; }
.sec-head > p, .sec-head > div { flex: 0 1 560px; }
.sec-head > .sec-link { flex: 0 0 auto; }
.sec-head h2 { font-weight: 800; font-size: clamp(32px, 4vw, 54px); line-height: 1; letter-spacing: -.035em; }
.sec-head p { color: var(--ink-2); font-size: 18px; }
.sec-head > div > p + p { margin-top: 10px; }
.onsite { font-weight: 600; color: var(--ink); display: inline-flex; gap: 10px; align-items: baseline; }
.onsite::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--oil); flex: none; transform: translateY(-1px); }
.lead { font-size: 18px; color: var(--ink-2); max-width: 40em; }

.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.svc { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 4px 14px 0; border-top: 1px solid var(--line); }
.svc:hover .svc-text b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.svc-img { width: 112px; height: 76px; border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.svc-img img, .svc-img picture { width: 100%; height: 100%; object-fit: cover; }
.svc-text b { display: block; font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: break-word; }
.svc-text span { display: block; color: var(--mute); font-size: 15px; margin-top: 3px; }
.svc-go { font-size: 22px; color: var(--mute); transition: transform .15s ease-out, color .15s ease-out; }
.svc:hover .svc-go { transform: translateX(4px); color: var(--ink); }

/* ---------- выполненные работы ---------- */

.works { background: var(--dark); color: #fff; }
.works .sec-head p { color: var(--dark-mute); }
.works .link-arrow { color: #fff; }
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 48px 28px; }
.works-grid > :only-child { max-width: 860px; }
.work-media { position: relative; border-radius: var(--r); overflow: hidden; background: var(--dark-2); aspect-ratio: 16 / 10; }
.work-media img, .work-media picture { width: 100%; height: 100%; object-fit: cover; }
.work-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 20px; gap: 10px; }
.play span { display: inline-flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); font-weight: 600; min-height: 48px; padding: 0 18px 0 16px; border-radius: var(--r); transition: background-color .15s ease-out; }
.play span::before { content: ""; border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.play:hover span { background: var(--bg-2); }
.work-text h3, .work-text h2 { font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; margin-top: 18px; }
.work-text :is(h2, h3) a:hover { text-decoration: underline; text-underline-offset: 5px; }
.work-text p { color: var(--dark-mute); font-size: 15px; margin-top: 8px; max-width: 62ch; }
.work-text p b { color: #fff; font-weight: 600; }

.works-light { background: var(--bg); color: var(--ink); }
.works-light .work-text p { color: var(--mute); }
.works-light .work-text p b { color: var(--ink); }
.works-light .work-media { background: var(--bg-2); }
.works-grid-all { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; }
.works-cell[hidden] { display: none; }
.filter { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.filter button { padding: 10px 0 12px; font-size: 17px; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.filter button:hover { color: var(--ink); }
.filter button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- цех ---------- */

.shop { padding: 104px 0; }
.sec-tight + .shop { border-top: 1px solid var(--line); }
.shop-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.shop-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.shop-photo-1 { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.shop-photo, .gallery-item { cursor: zoom-in; }
.shop-photo img, .shop-photo picture { width: 100%; height: 100%; object-fit: cover; }
.shop-text h2 { font-weight: 800; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.shop-addr { margin-top: 16px; font-size: 18px; color: var(--ink-2); }
.facts { margin-top: 32px; border-top: 1px solid var(--line); }
.facts li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts .fact-num { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: baseline; }
.facts b { font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.facts span { color: var(--ink-2); }
.facts .fact-plain span { display: block; padding-left: 170px; }

/* ---------- сроки, стоимость и заявка ---------- */

.order { background: var(--bg-2); padding: 104px 0; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.order-info h2, .order-form h2 { font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.order-info h2 { font-size: clamp(28px, 2.8vw, 38px); margin-bottom: 18px; }
.order-factors-h { margin-top: 24px; font-weight: 600; }
.order-factors { margin-top: 12px; }
.order-factors li { padding: 6px 0 6px 22px; position: relative; color: var(--ink-2); }
.order-factors li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 2px; background: var(--mute); }
.order-call { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.order-call p { color: var(--ink-2); }
.order-tel { display: inline-block; font-weight: 800; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.02em; margin: 6px 0 8px; }
.order-msg { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.order-msg .btn { min-height: 46px; font-size: 15px; }
.order-form { background: #fff; border-radius: var(--r); padding: 34px; display: grid; gap: 16px; }
.order-form h2 { font-size: 28px; }
.order-form-lead { color: var(--mute); margin-top: -6px; }
.fld { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.fld i { font-style: normal; font-weight: 400; color: var(--mute); }
.fld input { font: inherit; font-size: 17px; font-weight: 400; height: 54px; padding: 0 14px; border: 1.5px solid #c6cbd0; border-radius: var(--r); background: #fff; color: var(--ink); width: 100%; }
.fld input:focus { outline: none; border-color: var(--ink); }
.fld input[aria-invalid="true"] { border-color: #c2413f; }
.fld-err { font-style: normal; color: #b3332f; font-size: 15px; font-weight: 500; }
.fld-err:empty { display: none; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--mute); cursor: pointer; }
.agree input { width: 24px; height: 24px; margin: -1px 0 0; accent-color: var(--ink); flex: none; }
.agree a { text-decoration: underline; text-underline-offset: 3px; }
.form-done { font-weight: 600; background: #e7f4ec; color: #1c5d3a; padding: 12px 14px; border-radius: var(--r); }
.form-fail { font-weight: 600; background: #fbe9e8; color: #8f2723; padding: 12px 14px; border-radius: var(--r); }
.order-form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }

/* ---------- контакты и карта ---------- */

.contacts { padding: 88px 0 104px; }
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: stretch; }
.contacts-list { display: grid; gap: 22px; align-content: start; }
.contacts-list dt { color: var(--mute); font-size: 15px; }
.contacts-list dd { font-size: 21px; font-weight: 600; margin-top: 2px; }
.contacts-list dd a:hover { text-decoration: underline; text-underline-offset: 5px; }
.contacts-list .btn { font-size: 15px; min-height: 46px; }
.map { border-radius: var(--r); overflow: hidden; min-height: 420px; background: var(--bg-2); position: relative; display: grid; place-items: center; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 12px; }

/* ---------- страницы услуг, работ и тексты ---------- */

.page-hero { background: var(--bg-2); padding: 48px 0 72px; }
.page-hero-plain { padding-bottom: 56px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.page-hero h1 { font-weight: 800; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; letter-spacing: -.04em; margin: 18px 0 20px; text-wrap: balance; }
.page-hero .onsite { margin-top: 18px; }
.page-hero .meta { margin-top: 12px; color: var(--mute); }
.page-hero-img { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: #fff; }
.page-hero-img img, .page-hero-img picture { width: 100%; height: 100%; object-fit: cover; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--mute); }
.crumbs a { display: inline-block; padding: 4px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.points li { padding: 6px 0 6px 22px; position: relative; color: var(--ink-2); font-size: 18px; }
.points li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 2px; background: var(--mute); }
.points-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }

.kinds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.kind-img { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 11; background: var(--bg-2); margin-bottom: 16px; }
.kind-img img, .kind-img picture { width: 100%; height: 100%; object-fit: cover; }
.kind h3 { font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; }
.kind p { color: var(--mute); margin-top: 6px; font-size: 15px; }

.process { background: var(--bg-2); border-top: 1px solid var(--line); }
.process + .order { border-top: 1px solid var(--line); }
.points-sec { padding: 44px 0 8px; }
.points-sec + .kinds { padding-top: 72px; }
.process-list { display: grid; gap: 48px; }
.process-stage { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.process-stage h3 { font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.process-stage .sheet-link { grid-column: 2; justify-self: start; }

.work-page { display: grid; gap: 28px; }
.work-media-page { aspect-ratio: 16 / 9; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-item { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); position: relative; }
.gallery-item img, .gallery-item picture { width: 100%; height: 100%; object-fit: cover; }
.gallery-item span { position: absolute; left: 8px; bottom: 8px; background: rgba(15, 17, 19, .75); color: #fff; font-size: 13px; padding: 3px 8px; border-radius: 4px; }
.work-foot { display: grid; gap: 14px; color: var(--ink-2); }
.work-foot a { text-decoration: underline; text-underline-offset: 4px; }
.work-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }

.prose { max-width: 68ch; color: var(--ink-2); }
.prose h2 { font-size: 21px; font-weight: 700; color: var(--ink); margin: 40px 0 12px; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; }
.prose ul li { padding-left: 20px; position: relative; margin-bottom: 6px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .78em; width: 8px; height: 2px; background: var(--mute); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.notfound { padding: 120px 0 140px; }
.empty { color: var(--mute); }

/* ---------- подвал ---------- */

.ftr { background: var(--dark); color: var(--dark-mute); padding: 64px 0 28px; font-size: 15px; }
.ftr a:hover { color: #fff; }
.ftr-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.ftr .logo { color: #fff; }
.ftr-brand p { margin-top: 14px; max-width: 26em; }
.ftr-h { font-size: 15px; font-weight: 600; color: #fff; margin: 0 0 10px; }
.ftr-h + p + .ftr-h, p + .ftr-h { margin-top: 22px; }
.ftr-list li { padding: 0; }
.ftr-list a, .ftr-social a, .ftr-bottom a, .ftr p a { display: inline-block; padding: 4px 0; }
.ftr-tel { color: #fff; font-weight: 700; font-size: 21px; white-space: nowrap; }
.ftr-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ftr-social a, .ftr-list a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .25); }
.ftr-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; font-size: 15px;
  background: linear-gradient(#2a2e33, #2a2e33) center top / calc(100% - 2 * var(--pad)) 1px no-repeat; }
.ftr-bottom a { text-decoration: underline; text-underline-offset: 4px; }
/* Документы в подвале — сколько заведено в админке, переносятся строками. */
.ftr-docs { display: flex; flex-wrap: wrap; gap: 0 22px; }

/* ---------- нижняя панель на телефоне ---------- */

.callbar { display: none; }

/* ---------- просмотр фото ---------- */

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(10, 11, 12, .92); display: grid; place-items: center; padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 112px); width: auto; height: auto; border-radius: var(--r); background: #fff; }
.lightbox-x { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--ink); font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: var(--r); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: var(--r); background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; }
.lightbox-nav:hover { background: rgba(255, 255, 255, .26); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav[hidden] { display: none; }

/* ---------- адаптив ---------- */

@media (max-width: 1180px) {
  .svc-list { grid-template-columns: minmax(0, 1fr); }
  .facts .fact-num { grid-template-columns: 124px minmax(0, 1fr); }
  .facts b { font-size: 28px; }
  .facts .fact-plain span { padding-left: 144px; }
  .nav { gap: 18px; font-size: 15px; }
  .hdr-in { gap: 22px; }
  .groups { gap: 0 22px; }
  .gauge { width: 150px; height: 150px; }
  .gauge-read b { font-size: 44px; }
}

@media (max-width: 1020px) {
  :root { --pad: 20px; --hdr: 60px; }
  .nav, .hdr-cta { display: none; }
  .hdr-tel { margin-left: auto; font-size: 16px; }
  .burger { display: block; margin-left: 4px; }
  .layer-hero, .shop-grid, .order-grid, .contacts-grid, .page-hero-grid, .process-stage { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .process-stage .sheet-link { grid-column: 1; }
  .svc-list, .kinds-grid, .points-wide { grid-template-columns: minmax(0, 1fr); }
  .works-grid-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kinds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec, .shop, .order { padding: 72px 0; }

  /* Сцена на планшете и телефоне: группы листаются вбок, подпись детали — текстом под цилиндром. */
  .stage-in { padding-top: calc(var(--hdr) + 18px); }
  .stage-copy { min-height: 470px; }
  .stage-inline .stage-copy { min-height: 300px; }
  .layer-hero { align-content: start; }
  /* Заголовок этапа начинается там же, где заголовок первого экрана; ссылка и манометр — под ним. */
  .layer-stage { justify-content: flex-start; gap: 16px; padding-bottom: 0; }
  .layer-stage .stage-side, .layer-stage .gauge-box { position: static; transform: none; }
  .layer-stage[data-layer="3"] .stage-head { padding-right: 0; }
  .gauge-col { width: auto; max-width: 320px; }
  /* Пояснение — под заголовком: рядом ему тесно. */
  .sec-head { gap: 14px; }
  .sec-head > p:not(.sec-link), .sec-head > div { flex-basis: 100%; }
  .layer-hero h1, .stage-head h2 { font-size: clamp(36px, 8.6vw, 60px); }
  .cyl .lbl { display: none; }
  .part-cap { display: block; flex: 0 0 auto; min-height: 56px; font-size: 15px; color: var(--ink-2); }
  .part-cap b { display: block; font-size: 18px; color: var(--ink); }
  .rail button { font-size: 13px; }
  .cue { bottom: 20px; left: var(--pad); right: var(--pad); }
}

@media (max-width: 700px) {
  body { font-size: 16px; padding-bottom: 64px; }
  /* Группы работ этапа листаются вбок карточками. */
  .groups { display: flex; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 6px; scrollbar-width: none; }
  .groups::-webkit-scrollbar { display: none; }
  .group { flex: 0 0 min(78%, 320px); scroll-snap-align: start; background: #fff; border-radius: var(--r); padding: 4px 14px 12px; }
  .group h3, .group h4 { border-top: 0; padding-top: 10px; }
  .hdr-in { gap: 12px; }
  .logo { font-size: 18px; }
  .hdr-tel { font-size: 15px; }
  /* Телефон: без анимации при прокрутке. Первый экран — обычный, под ним цилиндр, который
     тянут пальцем: он разбирается, ремонтируется, проверяется давлением, а на месте первого
     заголовка сменяются этапы (все слои лежат в одной ячейке сетки, высота не прыгает).
     На странице услуги сцены нет — там тот же раздел этапов стоит сразу следом. */
  .stage-hero { height: auto; }
  .stage-inline { display: none; }
  .stage-in { position: static; height: auto; min-height: 0; padding: 36px 0 8px; }
  .stage-copy { min-height: 0; display: grid; }
  .layer { position: static; grid-area: 1 / 1; }
  /* Высоту ячейки задаёт первый экран; этапы короче — прижаты к цилиндру, а не к верху. */
  .layer-stage { align-self: end; }
  .cue { display: none; }
  .hero-side p { font-size: 16px; }
  /* Цилиндр меряется шириной экрана; вертикальная прокрутка страницы по нему не мешает. */
  .cyl-box { flex: 0 0 auto; margin-top: 0; padding: 16px 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
  .cyl { height: auto; }
  .part-cap i { font-style: normal; color: var(--mute); }
  .sheet-link { font-size: 15px; }
  .stage-text { font-size: 16px; }
  .gauge { width: 110px; height: 110px; }
  .gauge-read b { font-size: 36px; }
  .gauge-box { gap: 16px; }
  .stamp { font-size: 15px; }
  /* Стрелка на телефоне не нужна — вся строка ссылка; место отдано названию. */
  .svc { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .svc-img { width: 72px; height: 54px; }
  .svc-go { display: none; }
  .svc-text b { font-size: 18px; }
  .works-grid, .works-grid-all, .kinds-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-photos { gap: 8px; }
  .facts .fact-num { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; }
  .facts b { font-size: 26px; }
  .facts .fact-plain span { padding-left: 130px; }
  .order-form { padding: 22px; }
  .map { min-height: 320px; }
  .ftr-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .groups { align-items: flex-start; }
  .order-form h2 { font-size: 24px; }
  .play { padding: 12px; }
  .play span { min-height: 40px; font-size: 15px; padding: 0 14px 0 12px; gap: 10px; }
  .play span::before { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 1px;
    background: var(--line); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(110%); transition: transform .25s ease-out;
  }
  .callbar.on { transform: none; }
  .callbar a { flex: 1; background: #fff; text-align: center; font-weight: 600; padding: 16px 6px; font-size: 15px; }
  .callbar a:first-child { background: var(--oil); }
}

/* Обычный телефон (375–429): логотип, номер и меню помещаются в строку. Значок меню
   доходит до края колонки, поле нажатия 44px заходит в отступ. */
@media (max-width: 429px) {
  .hdr-in { gap: 8px; }
  .logo { font-size: 16px; }
  .hdr-tel { font-size: 14px; }
  .burger { margin-left: 0; margin-right: -11px; }
}

/* Совсем узкий телефон: номер остаётся в нижней панели «Позвонить». */
@media (max-width: 374px) {
  .hdr-tel { display: none; }
  .burger { margin-left: auto; }
  .svc-text b { hyphens: auto; }
}

@media (max-height: 700px) and (min-width: 1021px) {
  .stage-copy { min-height: 330px; }
  .layer-hero h1 { font-size: clamp(36px, 4.6vw, 62px); }
  .group li { font-size: 14px; padding: 2px 0 2px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer, .stamp, .hdr-cta { transition: none; }
}
