/* ============================================================
   электро-шкафы.рф — дизайн-система «Однолинейная схема»
   Эстетика проектной документации: миллиметровка, маркировка
   секций, схемные обозначения ГОСТ, штамп чертежа.
   Шрифты: Oswald (дисплей), IBM Plex Sans (текст), IBM Plex Mono (метки)
   ============================================================ */
:root {
  /* Бумага и чернила */
  --paper: #f2f1ec;
  --paper-2: #eae8e1;
  --ink: #1a2129;
  --ink-soft: #4c5763;
  --muted: #6b7683;

  /* Тёмная «синька» */
  --dark: #10161d;
  --dark-2: #161e27;
  --dark-3: #1d2733;
  --on-dark: #e8e6df;
  --on-dark-muted: #93a0ad;

  /* Акцент — сигнальный янтарь электрики */
  --accent: #f2a007;
  --accent-strong: #d88c00;
  --accent-ink: #161006;

  /* Чертёжные линии */
  --line: rgba(26, 33, 41, .14);
  --line-strong: rgba(26, 33, 41, .32);
  --grid-s: rgba(26, 33, 41, .045);
  --grid-l: rgba(26, 33, 41, .09);
  --dline: rgba(232, 230, 223, .10);
  --dgrid-s: rgba(232, 230, 223, .035);
  --dgrid-l: rgba(232, 230, 223, .065);

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;

  --container: 1200px;
  --r: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: 1.14;
}
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: .03em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 860px; }

/* якорные переходы не прячутся под sticky-шапкой */
section[id], [id="order"], [id="quiz"] { scroll-margin-top: 84px; }

/* ---------- Чертёжная сетка ---------- */
.blueprint-light {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-l) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-l) 1px, transparent 1px),
    linear-gradient(var(--grid-s) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-s) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.blueprint-dark {
  background-color: var(--dark);
  background-image:
    linear-gradient(var(--dgrid-l) 1px, transparent 1px),
    linear-gradient(90deg, var(--dgrid-l) 1px, transparent 1px),
    linear-gradient(var(--dgrid-s) 1px, transparent 1px),
    linear-gradient(90deg, var(--dgrid-s) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

/* ---------- Маркировка секций (как позиции на схеме) ---------- */
.sec-mark {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.sec-mark::before {
  content: "";
  width: 11px; height: 11px;
  background: var(--accent);
  outline: 1px solid var(--line-strong);
  outline-offset: 3px;
  flex-shrink: 0;
}
.sec-mark::after {
  content: "";
  flex: 0 1 120px;
  height: 1px;
  background: var(--line-strong);
}
.section--dark .sec-mark { color: var(--on-dark-muted); }
.section--dark .sec-mark::before { outline-color: rgba(232,230,223,.35); }
.section--dark .sec-mark::after { background: rgba(232,230,223,.3); }

/* ---------- Кнопки: шильдик со срезанным углом ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 0;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.btn--accent:hover { background: var(--accent-strong); }
.btn--ghost {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn--ghost:hover { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--lg { padding: 16px 32px; font-size: 1.06rem; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--dark);
  color: var(--on-dark);
  border-bottom: 1px solid var(--dline);
}
.header__inner { display: flex; align-items: center; gap: 28px; min-height: 72px; transition: min-height .25s ease; }
.header.is-scrolled .header__inner { min-height: 56px; }
.header__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; position: relative; z-index: 61; }
.logo-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: background .2s, width .25s, height .25s;
}
.header.is-scrolled .logo-mark { width: 34px; height: 34px; }
.logo-mark svg { width: 22px; height: 22px; }
.header__logo:hover .logo-mark { background: var(--accent-strong); }
.header__logo:hover .logo-mark svg { animation: boltflash .45s ease; }
@keyframes boltflash {
  0%, 100% { opacity: 1; }
  25% { opacity: .2; }
  45% { opacity: 1; }
  60% { opacity: .4; }
  75% { opacity: 1; }
}
.logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.22rem;
  text-transform: uppercase; letter-spacing: .05em; line-height: 1.1;
}
.logo-text small {
  display: block;
  font-family: var(--font-mono); font-weight: 400;
  font-size: .62rem; letter-spacing: .12em;
  color: var(--on-dark-muted); text-transform: uppercase;
  margin-top: 3px;
}
.header__nav { display: flex; gap: 20px; margin-left: auto; }
.header__nav a {
  text-decoration: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--on-dark-muted);
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  position: relative;
}
.header__nav a i {
  font-style: normal; font-size: .68rem;
  color: rgba(147,160,173,.55);
  margin-right: 6px;
  transition: color .15s;
}
.header__nav a:hover { color: var(--on-dark); border-color: rgba(242,160,7,.45); }
.header__nav a:hover i { color: var(--accent); }
.header__nav a.is-active { color: var(--on-dark); border-color: var(--accent); }
.header__nav a.is-active i { color: var(--accent); }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone {
  font-family: var(--font-mono); font-weight: 500; font-size: .98rem;
  text-decoration: none; white-space: nowrap; color: var(--on-dark);
  display: inline-flex; align-items: center; gap: 9px;
}
.header__phone:hover { color: var(--accent); }
.nav__extra { display: none; }
@media (prefers-reduced-motion: reduce) {
  .header__logo:hover .logo-mark svg { animation: none; }
}
.burger { display: none; background: none; border: none; width: 36px; height: 30px; position: relative; cursor: pointer; z-index: 61; }
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; left: 5px; right: 5px; height: 2px; background: var(--on-dark);
  transition: transform .28s ease, top .28s ease, background .2s;
}
.burger span { top: 14px; }
.burger span::before { top: -8px; }
.burger span::after { top: 8px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { top: 0; transform: rotate(45deg); background: var(--accent); }
.burger.is-open span::after { top: 0; transform: rotate(-45deg); background: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  color: var(--on-dark);
  min-height: calc(100svh - 72px - 52px); /* экран минус шапка и бегущая строка */
  display: flex;
  align-items: center;
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; width: 100%; }
.hero__mark {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.hero__mark::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; max-width: 620px; }
.hero__sub { margin-top: 18px; max-width: 560px; font-size: 1.08rem; color: var(--on-dark-muted); }
.hero__tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero__tags span {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--on-dark);
  border: 1px solid rgba(232,230,223,.28);
  padding: 8px 14px 8px 12px;
  display: inline-flex; align-items: center; gap: 9px;
}
.hero__tags span::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }
.hero__stats {
  display: flex; gap: 0; margin: 30px 0;
  border: 1px solid var(--dline);
  width: fit-content;
}
.hero__stats > div { padding: 14px 26px; border-right: 1px solid var(--dline); }
.hero__stats > div:last-child { border-right: none; }
.hero__stats strong {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 1.85rem; color: var(--accent); line-height: 1.1;
}
.hero__stats span { font-family: var(--font-mono); color: var(--on-dark-muted); font-size: .74rem; letter-spacing: .04em; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Однолинейная схема в hero */
.hero__scheme { position: relative; }
.hero__scheme svg { width: 100%; height: auto; display: block; }
.scheme-line { stroke: #5f6d7c; stroke-width: 2; fill: none; transition: stroke .25s; }
.scheme-bus { stroke: var(--on-dark); stroke-width: 5; }
.scheme-accent { stroke: var(--accent); }
.scheme-label { font-family: var(--font-mono); font-size: 11.5px; fill: var(--on-dark-muted); letter-spacing: .06em; transition: fill .25s; }
.scheme-label--strong { fill: var(--on-dark); }
.scheme-m { font-size: 17px; }
.scheme-joint { fill: var(--on-dark); transition: fill .25s; }
.scheme-sym { stroke: var(--on-dark); stroke-width: 2; fill: none; transition: stroke .25s; }

/* узлы схемы: наведение и клик */
.sch-node { cursor: pointer; }
.sch-node:hover .scheme-sym,
.sch-node:hover .scheme-line { stroke: var(--accent); }
.sch-node:hover .scheme-label { fill: var(--accent); }
.sch-tip {
  position: fixed; z-index: 90; pointer-events: none;
  max-width: 260px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.45;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s;
}
.sch-tip.is-visible { opacity: 1; transform: none; }

/* ток и индикаторы: оживают при включённом рубильнике */
.scheme-flow {
  stroke: var(--accent); stroke-width: 2.5; fill: none;
  stroke-dasharray: 5 14;
  opacity: 0;
  transition: opacity .5s;
}
.is-live .scheme-flow { opacity: 1; animation: flow 2.4s linear infinite; }
.is-live .scheme-flow--bus { animation-delay: .3s; }
.is-live .scheme-flow--feeders { animation-delay: .6s; }
@keyframes flow { to { stroke-dashoffset: -76; } }
.lamp { fill: #3a4553; transition: fill .3s; }
.is-live .lamp { fill: var(--accent); animation: blink 2.2s ease-in-out infinite; }
.is-live .lamp--2 { animation-delay: .4s; }
.is-live .lamp--3 { animation-delay: .9s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .is-live .scheme-flow, .is-live .lamp { animation: none; }
}

/* рубильник «СЕТЬ» */
.power-switch {
  position: absolute; bottom: 24px; right: 26px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  color: var(--on-dark-muted);
}
.power-switch__track {
  width: 44px; height: 22px;
  border: 1.5px solid var(--on-dark-muted);
  display: block; position: relative;
  transition: border-color .2s;
}
.power-switch__knob {
  position: absolute; top: 2px; left: 2px;
  width: 15px; height: 14px;
  background: var(--on-dark-muted);
  transition: transform .2s, background .2s;
}
.power-switch.is-on .power-switch__track { border-color: var(--accent); }
.power-switch.is-on .power-switch__knob { transform: translateX(21px); background: var(--accent); }
.power-switch.is-on .power-switch__state { color: var(--accent); }

/* ---------- Бегущая техстрока ---------- */
.ticker {
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
  border-top: 1px solid rgba(0,0,0,.2);
  padding: 11px 0;
}
.ticker__track {
  display: flex; width: max-content;
  animation: ticker 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  letter-spacing: .1em; white-space: nowrap; padding-right: 8px;
}
.ticker i { font-style: normal; opacity: .45; padding: 0 10px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* Вольтметр: стрелка дрожит при включённой сети */
.scheme-needle {
  stroke: var(--accent); stroke-width: 2;
  transform-origin: 452px 284px;
  transform: rotate(-38deg);
  transition: transform .6s ease;
}
.is-live .scheme-needle {
  transform: rotate(0deg);
  animation: needle 2.8s ease-in-out .7s infinite;
}
@keyframes needle {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-4deg); }
  55% { transform: rotate(3deg); }
  75% { transform: rotate(-2deg); }
}

/* Печатающаяся строка в hero */
.typer-cursor {
  display: inline-block; width: 9px; height: 14px;
  background: var(--accent); margin-left: 6px; vertical-align: baseline;
  animation: cursorBlink 1s steps(1) infinite;
}
@keyframes cursorBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .is-live .scheme-needle, .typer-cursor { animation: none; }
}

/* ---------- География выездов ---------- */
.geo-list { display: none; }
.geo-scheme { overflow-x: auto; margin-top: 10px; }
.geo-scheme svg { min-width: 700px; width: 100%; height: auto; display: block; }
.geo-rays line { stroke: #46536200; stroke: #465362; stroke-width: 1.5; }
.geo-flows line {
  stroke: var(--accent); stroke-width: 1.8;
  stroke-dasharray: 4 90;
  opacity: 0;
}
.section.in-view .geo-flows line { opacity: .9; animation: geoflow 3.2s linear infinite; }
.geo-flows line:nth-child(2) { animation-delay: .5s; }
.geo-flows line:nth-child(3) { animation-delay: 1.1s; }
.geo-flows line:nth-child(4) { animation-delay: 1.6s; }
.geo-flows line:nth-child(5) { animation-delay: 2.2s; }
.geo-flows line:nth-child(6) { animation-delay: .8s; }
.geo-flows line:nth-child(7) { animation-delay: 1.9s; }
@keyframes geoflow { to { stroke-dashoffset: -376; } }
.geo-km { font-family: var(--font-mono); font-size: 11px; fill: var(--on-dark-muted); letter-spacing: .05em; }
.geo-name {
  font-family: var(--font-mono); font-size: 13.5px; fill: var(--on-dark);
  letter-spacing: .06em; text-transform: uppercase;
}
.geo-name--center { font-size: 15px; font-weight: 500; }
.geo-city rect { fill: var(--dark); stroke: var(--on-dark); stroke-width: 2; }
.geo-city { transition: opacity .2s; }
.geo-scheme:hover .geo-city:not(:hover) { opacity: .55; }
.geo-city:hover rect { fill: var(--accent); stroke: var(--accent); }
.geo-city:hover .geo-name { fill: var(--accent); }
.geo-center rect:first-child { fill: none; stroke: var(--accent); stroke-width: 2; }
.geo-center rect:nth-child(2) { fill: var(--accent); stroke: none; }
.geo-ray-solo { stroke: #465362; stroke-width: 1.5; stroke-dasharray: 5 6; }
.geo-arrow { fill: none; stroke: var(--on-dark); stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .section.in-view .geo-flows line { animation: none; } }

/* Иконки «рисуются» при появлении секции */
.js .section .card__icon svg * {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}
.js .section.in-view .card__icon svg * {
  animation: iconDraw 1s ease forwards;
}
.js .section.in-view .card:nth-child(2) .card__icon svg * { animation-delay: .12s; }
.js .section.in-view .card:nth-child(3) .card__icon svg * { animation-delay: .24s; }
.js .section.in-view .card:nth-child(4) .card__icon svg * { animation-delay: .36s; }
@keyframes iconDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .js .section .card__icon svg * { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
}

/* ---------- Секции ---------- */
.section { padding: 76px 0; }
.section--dark { color: var(--on-dark); }
.section__lead { max-width: 780px; color: var(--muted); margin: 14px 0 36px; }
.section--dark .section__lead { color: var(--on-dark-muted); }

/* ---------- Карточки услуг ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); background: var(--line); grid-auto-rows: 1fr; }
.cards { gap: 1px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card, .feature {
  background: var(--paper);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  transition: background .18s;
}
.card:hover { background: #fff; }
.card__icon { width: 54px; height: 54px; margin-bottom: 6px; }
.card__icon svg { width: 100%; height: 100%; stroke: var(--ink); }
.card__code {
  position: absolute; top: 18px; right: 20px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em;
  color: var(--muted);
}
.card p, .feature p { color: var(--ink-soft); font-size: .95rem; }
.card__price {
  margin-top: auto; padding-top: 14px;
  font-family: var(--font-mono); font-weight: 500; font-size: .95rem;
  color: var(--ink) !important;
  border-top: 1px dashed var(--line-strong);
}
.card--sm { padding: 22px; }

.section--dark .card, .section--dark .feature { background: var(--dark-2); }
.section--dark .card:hover { background: var(--dark-3); }
.section--dark .cards { border-color: var(--dline); background: var(--dline); }
.section--dark .card p, .section--dark .feature p { color: var(--on-dark-muted); }
.section--dark .card__icon svg { stroke: var(--on-dark); }
.section--dark .card__price { color: var(--on-dark) !important; border-color: rgba(232,230,223,.3); }
.section--dark .card__code { color: var(--on-dark-muted); }

/* ---------- Этапы: цепь с клеммами ---------- */
.steps__title { margin: 48px 0 22px; font-size: 1.5rem; }
.steps { counter-reset: step; list-style: none; display: grid; max-width: 860px; position: relative; }
.steps li {
  padding: 0 0 26px 64px; position: relative; color: var(--on-dark-muted);
}
.steps li strong { color: var(--on-dark); }
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute; left: 0; top: -2px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 500; font-size: .9rem;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  background: var(--dark);
  z-index: 1;
}
.steps li::after {
  content: ""; position: absolute; left: 20px; top: 40px; bottom: -2px;
  width: 1.5px; background: linear-gradient(var(--accent) 40%, rgba(242,160,7,.25));
}
.steps li:last-child::after { display: none; }
.steps li:last-child { padding-bottom: 0; }

/* ---------- Техсписок «почему мы» ---------- */
.spec-list {
  list-style: none; counter-reset: spec;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 2px solid var(--ink);
  margin-top: 34px;
}
.spec-list li {
  counter-increment: spec;
  display: grid; grid-template-columns: 72px 1fr; gap: 4px 0;
  padding: 24px 32px 24px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.spec-list li::before {
  content: "06." counter(spec, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  color: var(--accent-strong); padding-top: 4px;
}
.spec-list li h3 { font-size: 1.05rem; }
.spec-list li p { color: var(--ink-soft); font-size: .95rem; grid-column: 2; }
.spec-list li:nth-child(odd) { margin-right: 28px; }
.spec-list li:nth-child(even) { margin-left: 28px; }

/* ---------- Контакты на тёмном ---------- */
.section--dark .contacts p { color: var(--on-dark-muted); }
.section--dark .contacts__phone a { color: var(--on-dark); }
.section--dark .contacts__phone a:hover { color: var(--accent); }

/* ---------- Штамп чертежа в подвале ---------- */
.stamp {
  margin-top: 40px;
  border: 1.5px solid rgba(232,230,223,.4);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .05em;
}
.stamp > div {
  padding: 10px 14px;
  border-right: 1px solid rgba(232,230,223,.22);
  border-bottom: 1px solid rgba(232,230,223,.22);
}
.stamp > div:nth-child(4n) { border-right: none; }
.stamp > div:nth-last-child(-n+4) { border-bottom: none; }
.stamp b { display: block; color: var(--on-dark-muted); font-weight: 400; font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 3px; }
.stamp span { color: var(--on-dark); }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery__item {
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 8px 0;
  position: relative;
}
.gallery__item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; height: auto; }
.gallery__item figcaption {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .02em;
  padding: 10px 4px 12px; color: var(--ink-soft);
  text-transform: uppercase;
}
.gallery__item.is-hidden { display: none; }
.gallery__more { text-align: center; margin-top: 30px; }

/* ---------- Отзывы ---------- */
.review { background: #fff; border: 1px solid var(--line); padding: 26px; }
.review p { color: var(--ink); }
.review footer { margin-top: 14px; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

/* ---------- Таблицы цен: спецификация ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 34px; border: 1px solid var(--line-strong); background: #fff; }
.price-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.price-table caption {
  text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 16px 18px 14px;
  background: #fff;
  border-bottom: 2px solid var(--ink);
}
.price-table th, .price-table td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.price-table th {
  font-family: var(--font-mono); font-weight: 500; font-size: .76rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table td:nth-child(2) { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.price-table td:nth-child(3) { font-family: var(--font-mono); font-size: .88rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; display: grid; gap: 0; border: 1px solid var(--line); background: #fff; }
.faq__item { border-bottom: 1px solid var(--line); padding: 0 24px; }
.faq__item:last-child { border-bottom: none; }
.faq__item summary {
  padding: 18px 34px 18px 0; font-weight: 600; cursor: pointer; list-style: none; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 2px; top: 14px;
  font-family: var(--font-mono); font-size: 1.4rem; color: var(--accent);
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p { padding: 0 0 20px; color: var(--ink-soft); }

/* ---------- Формы ---------- */
.order-card {
  background: var(--dark-2); color: var(--on-dark);
  border: 1px solid var(--dline);
  padding: 44px;
  max-width: 760px; margin: 0 auto;
  position: relative;
}
.order-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
}
.order-card h3 { font-size: 1.6rem; margin-bottom: 10px; }
.order-card > p { color: var(--on-dark-muted); margin-bottom: 24px; }
.order-card a { color: var(--accent); }
.order-form { display: grid; gap: 16px; }
.order-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.order-form input, .order-form select, .order-form textarea {
  width: 100%; padding: 14px 16px;
  border: 1px solid rgba(232,230,223,.22);
  background: var(--dark); color: var(--on-dark);
  font-size: 1rem; font-family: var(--font-body);
  border-radius: 0;
  transition: border-color .15s;
}
.order-form input:focus, .order-form select:focus, .order-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.order-form input::placeholder, .order-form textarea::placeholder { color: var(--on-dark-muted); }
.order-form__policy { font-size: .78rem; color: var(--on-dark-muted); }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 13px 16px; font-size: .95rem; }
.form-status--ok { background: #1d4d2b; }
.form-status--err { background: #5d2626; }

/* ---------- Квиз ---------- */
.quiz-card {
  background: var(--dark-2); color: var(--on-dark);
  border: 1px solid var(--dline);
  padding: 44px; max-width: 760px; margin: 0 auto;
  position: relative;
}
.quiz-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
}
.quiz-card h2 { margin-bottom: 8px; font-size: 1.8rem; }
.quiz-card__sub { color: var(--on-dark-muted); margin-bottom: 24px; }

/* метаданные шага: назад · счётчик · сегменты */
.quiz__meta { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.quiz__back {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em;
  color: var(--on-dark-muted); text-transform: uppercase; padding: 4px 0;
  transition: color .15s;
}
.quiz__back:hover { color: var(--accent); }
.quiz__stepnum {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em;
  color: var(--on-dark); text-transform: uppercase;
}
.quiz__segs { display: flex; gap: 6px; flex: 1; }
.quiz__segs span { flex: 1; height: 4px; background: rgba(232,230,223,.14); transition: background .35s; }
.quiz__segs span.is-done { background: var(--accent); }

/* крошки-ответы: клик возвращает на шаг */
.quiz__crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.quiz__crumbs button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--dark); border: 1px solid rgba(232,230,223,.25); cursor: pointer;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em;
  color: var(--on-dark-muted); text-transform: uppercase;
  padding: 6px 10px;
  transition: border-color .15s, color .15s;
}
.quiz__crumbs button span { color: var(--accent); }
.quiz__crumbs button:hover { border-color: var(--accent); color: var(--on-dark); }

/* сцена с анимацией перехода */
.quiz__stage { transition: opacity .28s ease, transform .28s ease; }
.quiz__stage.is-entering { opacity: 0; transform: translateX(26px); transition: none; }
.quiz__stage.is-entering-back { opacity: 0; transform: translateX(-26px); transition: none; }

.quiz__q { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-size: 1.2rem; font-weight: 600; margin-bottom: 18px; }
.quiz__options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz__options button {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(232,230,223,.22);
  background: var(--dark); color: var(--on-dark);
  font-size: .98rem; font-family: var(--font-body);
  cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s, transform .15s;
}
.quiz__options button:hover { border-color: var(--accent); background: var(--dark-3); transform: translateY(-2px); }
.quiz__options button.is-picked {
  border-color: var(--accent); background: var(--dark-3);
  animation: picked .26s ease;
}
@keyframes picked {
  0% { box-shadow: inset 0 0 0 40px rgba(242,160,7,.35); }
  100% { box-shadow: inset 0 0 0 40px rgba(242,160,7,0); }
}
.quiz__opt-visual {
  width: 46px; height: 46px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(232,230,223,.3);
  color: var(--accent);
  transition: border-color .15s;
}
.quiz__options button:hover .quiz__opt-visual { border-color: var(--accent); }
.quiz__opt-visual svg { width: 30px; height: 30px; }
.quiz__opt-visual b { font-family: var(--font-mono); font-weight: 500; font-size: .82rem; letter-spacing: .02em; }

/* сводка ответов перед отправкой */
.quiz__spec { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.quiz__spec td {
  font-family: var(--font-mono); font-size: .8rem;
  padding: 8px 10px; border-bottom: 1px dashed rgba(232,230,223,.2);
  color: var(--on-dark-muted);
}
.quiz__spec td:first-child { color: var(--accent); width: 34px; }
.quiz__spec td:last-child { color: var(--on-dark); text-align: right; }

/* финальный штамп */
.quiz__done { text-align: center; padding: 26px 0 12px; }
.quiz__stamp {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent);
  border: 3px solid var(--accent); outline: 1px solid var(--accent); outline-offset: 4px;
  padding: 18px 30px;
  transform: rotate(-6deg);
  animation: stampIn .45s cubic-bezier(.2, 1.6, .45, 1) both;
}
.quiz__stamp small {
  display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: .68rem; letter-spacing: .12em; color: var(--on-dark-muted); margin-top: 8px;
}
@keyframes stampIn {
  from { opacity: 0; transform: rotate(-6deg) scale(2.4); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}
.quiz__done-note { margin-top: 26px; color: var(--on-dark-muted); }
.quiz__done-note a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .quiz__stage, .quiz__stamp, .quiz__options button.is-picked { transition: none; animation: none; }
}

/* ---------- Опросный лист ---------- */
.doc-card {
  display: flex; gap: 36px; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line-strong);
  padding: 36px 40px;
  position: relative;
}
.doc-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
}
.doc-card h2 { font-size: 1.5rem; }
.doc-card p { color: var(--ink-soft); max-width: 560px; margin-top: 10px; }
.doc-card__actions { display: grid; gap: 12px; flex-shrink: 0; }

/* ---------- SEO-текст ---------- */
.seo-text h2 { font-size: 1.35rem; margin-top: 30px; }
.seo-text h2:first-child { margin-top: 0; }
.seo-text p { color: var(--ink-soft); margin-top: 10px; }

/* ---------- Контакты ---------- */
.contacts__phone a { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; text-decoration: none; }
.contacts p { margin-bottom: 6px; color: var(--muted); }
.socials { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.socials--lg { margin-top: 20px; }
.socials a { font-size: .95rem; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: var(--on-dark-muted); padding: 52px 0 0; font-size: .92rem; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer__brand { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem; color: var(--on-dark); }
.footer__title { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 8px; }
.footer a { color: var(--on-dark-muted); }
.footer a:hover { color: var(--accent); }
.footer__bottom { border-top: 1px solid var(--dline); margin-top: 36px; padding: 18px 24px; font-family: var(--font-mono); font-size: .78rem; }

/* ---------- Мобильная CTA-панель ---------- */
.mobile-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--dark); border-top: 1px solid var(--dline);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.mobile-bar__btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-align: center; padding: 12px 6px;
  background: var(--dark-3); color: var(--on-dark);
  text-decoration: none;
  font-family: var(--font-display); font-size: .88rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.mobile-bar__btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.mobile-bar__btn--accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- Появление секций при скролле ---------- */
.js .section .sec-mark::after { transform: scaleX(0); transform-origin: left; transition: transform .7s ease .15s; }
.js .section.in-view .sec-mark::after { transform: scaleX(1); }
.js .section h2,
.js .section .section__lead,
.js .section .card,
.js .section .spec-list li,
.js .section .table-wrap,
.js .section .doc-card,
.js .section .faq__item,
.js .section .steps li {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .section.in-view h2, .js .section.in-view .section__lead,
.js .section.in-view .card, .js .section.in-view .spec-list li,
.js .section.in-view .table-wrap, .js .section.in-view .doc-card,
.js .section.in-view .faq__item, .js .section.in-view .steps li {
  opacity: 1; transform: none;
}
.js .section.in-view .card:nth-child(2), .js .section.in-view .spec-list li:nth-child(2), .js .section.in-view .steps li:nth-child(2) { transition-delay: .08s; }
.js .section.in-view .card:nth-child(3), .js .section.in-view .spec-list li:nth-child(3), .js .section.in-view .steps li:nth-child(3) { transition-delay: .16s; }
.js .section.in-view .card:nth-child(4), .js .section.in-view .spec-list li:nth-child(4), .js .section.in-view .steps li:nth-child(4) { transition-delay: .24s; }
.js .section.in-view .spec-list li:nth-child(5), .js .section.in-view .steps li:nth-child(5) { transition-delay: .32s; }
.js .section.in-view .spec-list li:nth-child(6) { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  .js .section h2, .js .section .section__lead, .js .section .card,
  .js .section .spec-list li, .js .section .table-wrap, .js .section .doc-card,
  .js .section .faq__item, .js .section .steps li { opacity: 1; transform: none; transition: none; }
}

/* ---------- «Ток» по карточкам при наведении ---------- */
.card::after {
  content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent);
  transition: width .35s ease;
}
.card:hover::after { width: 100%; }
.card:hover .card__icon svg { stroke: var(--accent-strong); }
.section--dark .card:hover .card__icon svg { stroke: var(--accent); }
.card__icon svg { transition: stroke .25s; }

/* ---------- Индикатор прокрутки в шапке ---------- */
.header__load {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 0;
  background: var(--accent);
  z-index: 5;
}

/* ---------- Лайтбокс галереи ---------- */
.gallery__item { cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease; }
.gallery__item:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 10px 30px rgba(26,33,41,.18); }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 18, 24, .93);
  display: flex; align-items: center; justify-content: center; gap: 18px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__figure {
  background: #fff; padding: 12px 12px 14px;
  max-width: min(78vw, 640px); max-height: 88vh;
  position: relative;
}
.lightbox__figure img {
  max-height: calc(88vh - 74px); max-width: 100%;
  width: auto; margin: 0 auto; object-fit: contain;
}
.lightbox__figure figcaption {
  font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft);
  padding: 10px 90px 0 2px;
}
.lightbox__counter {
  position: absolute; right: 12px; bottom: 12px;
  font-family: var(--font-mono); font-size: .74rem; color: var(--muted);
}
.lightbox__close, .lightbox__nav {
  background: none; border: 1.5px solid rgba(232,230,223,.4); color: var(--on-dark);
  font-family: var(--font-mono); cursor: pointer;
  width: 46px; height: 46px; font-size: 1.5rem; line-height: 1;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.lightbox__close { position: absolute; top: 22px; right: 24px; }
.lightbox__close:hover, .lightbox__nav:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero__scheme { max-width: 560px; }
}
@media (max-width: 1000px) {
  .cards, .cards--4, .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .spec-list { grid-template-columns: 1fr; }
  .spec-list li:nth-child(odd), .spec-list li:nth-child(even) { margin-left: 0; margin-right: 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  /* Полноэкранное меню — лист схемы */
  .header__nav {
    position: fixed; inset: 0; z-index: 60;
    background-color: var(--dark);
    background-image:
      linear-gradient(var(--dgrid-l) 1px, transparent 1px),
      linear-gradient(90deg, var(--dgrid-l) 1px, transparent 1px),
      linear-gradient(var(--dgrid-s) 1px, transparent 1px),
      linear-gradient(90deg, var(--dgrid-s) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    display: flex; flex-direction: column; justify-content: center;
    margin: 0; padding: 96px 30px 40px;
    visibility: hidden; opacity: 0;
    transition: opacity .3s ease, visibility 0s .3s;
  }
  .header__nav.is-open { visibility: visible; opacity: 1; transition: opacity .3s ease; }
  /* шина слева */
  .header__nav::before {
    content: ""; position: absolute; left: 30px; top: 110px; bottom: 48px;
    width: 2px; background: var(--on-dark);
    transform: scaleY(0); transform-origin: top;
    transition: transform .5s ease .15s;
  }
  .header__nav.is-open::before { transform: scaleY(1); }
  .header__nav a {
    font-family: var(--font-display); font-size: 1.55rem; font-weight: 600;
    letter-spacing: .03em; text-transform: uppercase;
    padding: 15px 0 15px 34px; border-bottom: none;
    position: relative; white-space: nowrap;
    opacity: 0; transform: translateX(-16px);
    transition: opacity .35s ease, transform .35s ease, color .15s;
  }
  /* клемма на шине у каждого пункта */
  .header__nav a::before {
    content: ""; position: absolute; left: -5px; top: 50%; margin-top: -6px;
    width: 12px; height: 12px;
    background: var(--dark); border: 2px solid var(--on-dark);
    transition: background .15s, border-color .15s;
  }
  .header__nav a:hover::before, .header__nav a.is-active::before { background: var(--accent); border-color: var(--accent); }
  .header__nav a i { font-size: .82rem; margin-right: 12px; }
  .header__nav.is-open a { opacity: 1; transform: none; }
  .header__nav.is-open a:nth-child(1) { transition-delay: .12s; }
  .header__nav.is-open a:nth-child(2) { transition-delay: .18s; }
  .header__nav.is-open a:nth-child(3) { transition-delay: .24s; }
  .header__nav.is-open a:nth-child(4) { transition-delay: .3s; }
  .header__nav.is-open a:nth-child(5) { transition-delay: .36s; }
  /* контакты внизу меню */
  .nav__extra {
    display: block; margin-top: 34px; padding-left: 34px;
    opacity: 0; transform: translateY(10px);
    transition: opacity .4s ease .42s, transform .4s ease .42s;
  }
  .header__nav.is-open .nav__extra { opacity: 1; transform: none; }
  .nav__phone {
    font-family: var(--font-mono) !important; font-size: 1.2rem !important; font-weight: 500 !important;
    color: var(--accent) !important; text-decoration: none;
    padding: 0 !important; opacity: 1 !important; transform: none !important;
  }
  .nav__phone::before { display: none !important; }
  .nav__hours { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--on-dark-muted); margin: 10px 0 16px; text-transform: uppercase; }
  .nav__socials { display: flex; gap: 18px; }
  .nav__socials a {
    font-family: var(--font-mono) !important; font-size: .82rem !important;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--on-dark-muted) !important;
    padding: 11px 0 !important; opacity: 1 !important; transform: none !important;
    border-bottom: 1px solid rgba(232,230,223,.3) !important;
  }
  .nav__socials a::before { display: none !important; }
  .nav__socials a:hover { color: var(--accent) !important; border-color: var(--accent) !important; }

  .burger { display: block; }
  .header__cta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .cards, .cards--4, .cards--3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 36px; min-height: calc(100svh - 68px - 64px - 52px); } /* минус шапка, панель и бегущая строка */
  .hero__stats { width: 100%; }
  .hero__stats > div { padding: 12px 16px; flex: 1; }
  .hero__stats strong { font-size: 1.4rem; }
  .hero__scheme { display: none; }
  .order-form__row { grid-template-columns: 1fr; }
  .order-card, .quiz-card { padding: 30px 22px; }
  .quiz__options { grid-template-columns: 1fr; }
  .doc-card { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .mobile-bar { display: grid; }
  .header__inner { gap: 12px; }
  .header__actions { gap: 12px; }
  .header__phone { font-size: .82rem; }
  .logo-text { font-size: 1rem; }
  .logo-mark { width: 34px; height: 34px; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding-left: 56px; }
  /* маркировка секций компактнее */
  .sec-mark { font-size: .68rem; gap: 9px; }
  .sec-mark::after { display: none; }

  /* телефон в шапке: тап-зона повыше */
  .header__phone { padding: 12px 0; }

  /* гео: вертикальная шина вместо горизонтального скролла схемы */
  .geo-scheme { display: none; }
  .geo-list {
    display: block; list-style: none; margin-top: 8px;
    position: relative; padding-left: 26px;
  }
  .geo-list::before {
    content: ""; position: absolute; left: 5px; top: 14px; bottom: 14px;
    width: 2px; background: var(--on-dark);
  }
  .geo-list li {
    display: flex; align-items: baseline; gap: 12px;
    padding: 11px 0; position: relative;
  }
  .geo-list li::before {
    content: ""; position: absolute; left: -26px; top: 50%; margin-top: -6px;
    width: 12px; height: 12px;
    background: var(--dark); border: 2px solid var(--on-dark);
  }
  .geo-list b {
    font-family: var(--font-mono); font-weight: 500; font-size: .88rem;
    letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark);
  }
  .geo-list i { flex: 1; border-bottom: 1px dashed rgba(232,230,223,.25); transform: translateY(-4px); }
  .geo-list span { font-family: var(--font-mono); font-size: .76rem; color: var(--on-dark-muted); }
  .geo-list li.geo-list__center::before { background: var(--accent); border-color: var(--accent); }
  .geo-list__center b { color: var(--accent); }
  .geo-list li.geo-list__all::before { border-style: dashed; }

  /* таблицы цен: карточный формат вместо горизонтального скролла */
  .table-wrap { overflow-x: visible; }
  .price-table { min-width: 0; display: block; }
  .price-table caption, .price-table tbody { display: block; }
  .price-table thead { display: none; }
  .price-table tbody tr {
    display: grid; grid-template-columns: 1fr auto;
    gap: 2px 12px; padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .price-table tbody tr:last-child { border-bottom: none; }
  .price-table td { display: block; padding: 0; border: none; }
  .price-table td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .price-table td:nth-child(2) { font-size: .95rem; }
  .price-table td:nth-child(3) { text-align: right; white-space: normal; }
  .price-table caption { padding: 14px 14px 12px; font-size: 1.05rem; }

  .lightbox { gap: 0; }
  .lightbox__figure { max-width: 88vw; }
  .lightbox__nav { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2; }
  .lightbox__nav--prev { left: 22px; }
  .lightbox__nav--next { right: 22px; }
  .lightbox__close { top: 14px; right: 14px; }
  .stamp { grid-template-columns: 1fr 1fr; }
  .stamp > div:nth-child(4n) { border-right: 1px solid rgba(232,230,223,.22); }
  .stamp > div:nth-child(2n) { border-right: none; }
  .stamp > div:nth-last-child(-n+4) { border-bottom: 1px solid rgba(232,230,223,.22); }
  .stamp > div:nth-last-child(-n+2) { border-bottom: none; }
}

/* ============================================================
   Доработки по аудиту мобильной версии
   ============================================================ */
@media (max-width: 640px) {
  /* 1. Нижняя панель не влезала на экраны 360–375px */
  .mobile-bar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .mobile-bar__btn {
    min-width: 0; padding: 13px 4px; gap: 6px;
    font-size: .8rem; letter-spacing: .02em;
  }
  .mobile-bar__btn svg { width: 14px; height: 14px; }

  /* 2. Тап-цели не меньше 44px (рекомендация Apple HIG / Material) */
  .footer .socials a,
  .footer__col > p > a,
  .order-form__policy a,
  .faq__item summary { display: inline-block; padding: 11px 0; }
  .footer .socials { gap: 18px; margin-top: 4px; }
  .contacts__phone a { display: inline-block; padding: 8px 0; }
  .socials--lg a { width: 100%; text-align: center; }

  /* 3. Минимальный читаемый кегль — 12px (требование PageSpeed) */
  .sec-mark { font-size: .75rem; }
  .nav__hours, .logo-text small, .hero__tags span,
  .gallery__item figcaption, .footer__bottom, .stamp { font-size: .75rem; }
  .stamp b { font-size: .68rem; }

  /* 4. Компактнее первый экран на невысоких телефонах (iPhone SE) */
  .hero__tags span { padding: 7px 11px 7px 10px; }
  .hero__stats { margin: 22px 0; }
  .hero__cta { gap: 12px; }
  .hero__cta .btn { width: 100%; text-align: center; }
}

/* 5. Схема — главная фишка сайта — теперь видна и на телефоне */
@media (max-width: 640px) {
  .hero__scheme { display: block; margin-top: 28px; }
  .hero__scheme svg { max-width: 420px; margin: 0 auto; }
  /* подписи крупнее: SVG сжимается, иначе текст нечитаем */
  .hero__scheme .scheme-label { font-size: 15px; }
  .hero__scheme .scheme-m { font-size: 20px; }
  .power-switch { position: static; margin: 0 0 10px auto; width: fit-content; }
}
@media (max-width: 380px) {
  .mobile-bar__btn { font-size: .72rem; }
  .mobile-bar__btn svg { display: none; }
}

/* Итоговые правки по аудиту: переполнение таблиц-карточек и тап-зоны */
@media (max-width: 640px) {
  .table-wrap { overflow-x: hidden; }
  .price-table tbody tr { max-width: 100%; }
  .price-table td { min-width: 0; overflow-wrap: anywhere; }
  .price-table td:nth-child(2) { white-space: normal; }

  /* тап-зоны ≥ 44px у всех мелких ссылок */
  .header__phone { padding: 11px 0; }
  .nav__phone { display: inline-block; padding: 12px 0; }
  .socials a, .footer a { padding-top: 11px; padding-bottom: 11px; display: inline-block; }
  .power-switch { padding: 11px 0; }
  .footer__col > p { margin-bottom: 0; }
}

/* Тап-зоны в мобильном меню и бургер */
@media (max-width: 1000px) {
  .burger { width: 44px; height: 44px; }
  .nav__phone { padding: 13px 0 !important; }
  .nav__socials a { display: inline-block; padding: 11px 0; }
  .nav__socials { display: flex; gap: 20px; flex-wrap: wrap; }
}

/* ---------- Уведомление о cookie ---------- */
.cookie {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 70;
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  background: var(--dark-2); color: var(--on-dark);
  border: 1px solid var(--dline); border-left: 3px solid var(--accent);
  padding: 18px 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
}
.cookie.is-shown { opacity: 1; transform: none; }
.cookie p { font-size: .86rem; line-height: 1.5; color: var(--on-dark-muted); }
.cookie a { color: var(--accent); }
.cookie .btn { flex-shrink: 0; padding: 11px 22px; font-size: .9rem; }
@media (max-width: 640px) {
  .cookie {
    left: 10px; right: 10px; bottom: 74px;
    flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 18px;
  }
  .cookie .btn { width: 100%; text-align: center; }
  .cookie p { font-size: .82rem; }
}

/* ---------- Телефон в шапке: на мобильном только иконка ---------- */
.header__phone svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 640px) {
  .header__phone {
    width: 44px; height: 44px; padding: 0;
    justify-content: center;
    border: 1px solid rgba(232,230,223,.28);
  }
  .header__phone svg { width: 20px; height: 20px; }
  .header__phone-text { display: none; }
  .header__phone:active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
}

/* ---------- Мобильная шапка: выравнивание блока действий ---------- */
@media (max-width: 640px) {
  .header__actions { gap: 10px; }

  /* телефон — акцентный шильдик (главное действие), а не «пустая рамка» */
  .header__phone {
    width: 44px; height: 44px; padding: 0 !important;
    justify-content: center;
    background: var(--accent); color: var(--accent-ink);
    border: none;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  }
  .header__phone svg { width: 19px; height: 19px; }
  .header__phone:active { background: var(--accent-strong); }

  /* бургер того же габарита, но легче по весу — короче штрихи.
     ::before/::after позиционируются внутри span, поэтому им нужен свой left/right */
  .burger { width: 44px; height: 44px; }
  .burger span { left: 11px; right: 11px; top: 21px; }
  .burger span::before, .burger span::after { left: 0; right: 0; }
  .burger span::before { top: -7px; }
  .burger span::after { top: 7px; }

  /* подпись под названием не конкурирует с брендом */
  .logo-text { font-size: 1.06rem; }
  .logo-text small { font-size: .56rem !important; letter-spacing: .1em; opacity: .8; margin-top: 2px; }
  .logo-mark { width: 38px; height: 38px; }
  .logo-mark svg { width: 20px; height: 20px; }
  .header__logo { gap: 10px; }
}

/* ---------- Чекбокс согласия на обработку ПДн ---------- */
.consent {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; user-select: none;
  padding: 4px 0;
}
.consent input {
  position: absolute; opacity: 0; width: 0; height: 0; margin: 0;
}
.consent__box {
  flex-shrink: 0;
  width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid rgba(232,230,223,.4);
  background: var(--dark);
  position: relative;
  transition: border-color .15s, background .15s;
}
.consent__box::after {
  content: ""; position: absolute;
  left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .18s ease;
}
.consent:hover .consent__box { border-color: var(--accent); }
.consent input:checked + .consent__box { background: var(--accent); border-color: var(--accent); }
.consent input:checked + .consent__box::after { transform: rotate(45deg) scale(1); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent); outline-offset: 2px; }
/* подсветка, если отправляют без галочки */
.consent input:invalid.is-touched + .consent__box { border-color: #e2645a; }
.consent__text {
  font-size: .82rem; line-height: 1.45;
  color: var(--on-dark-muted);
}
.consent__text a { color: var(--accent); }

@media (max-width: 640px) {
  .consent { gap: 14px; padding: 8px 0; }
  .consent__box { width: 24px; height: 24px; }
  .consent__box::after { left: 7px; top: 3px; }
  .consent__text { font-size: .8rem; }
}

/* Мобильная шапка: логотип слева, действия прижаты вправо */
@media (max-width: 1000px) {
  .header__inner { justify-content: space-between; }
}

/* ---------- Мобильное меню на низких экранах ---------- */
@media (max-width: 1000px) {
  /* меню прокручивается, если не помещается; auto-margin центрирует контент,
     но схлопывается при нехватке места — верх больше не обрезается */
  .header__nav {
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
  .header__nav > a:first-of-type { margin-top: auto; }
  .header__nav > .nav__extra { margin-bottom: auto; }
}

/* невысокие экраны (iPhone SE, малые Android) — компактнее, чтобы влезало без прокрутки */
@media (max-width: 1000px) and (max-height: 700px) {
  .header__nav {
    padding-top: 72px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    gap: 4px;
  }
  .header__nav a { font-size: 1.15rem; padding: 9px 0 9px 30px; }
  .header__nav a::before { width: 10px; height: 10px; margin-top: -5px; }
  .header__nav::before { top: 82px; bottom: 26px; }
  .nav__hours { display: none; }
  .nav__extra { margin-top: 14px !important; padding-top: 14px !important; }
  .nav__phone { font-size: 1.3rem !important; }
}

/* ландшафт и совсем низкие экраны */
@media (max-width: 1000px) and (max-height: 560px) {
  .header__nav { padding-top: 76px; }
  .header__nav a { font-size: 1.05rem; padding: 8px 0 8px 30px; }
  .header__nav a::before { width: 10px; height: 10px; margin-top: -5px; }
  .header__nav::before { top: 86px; bottom: 32px; }
  .nav__hours { display: none; }
  .nav__phone { font-size: 1.15rem !important; }
  .nav__extra { margin-top: 12px !important; padding-top: 12px !important; }
}

/* Кнопка в шапке компактнее — чтобы меню и телефон не жались на ноутбуках */
.header__cta { padding: 13px 16px; }

/* Узкие ноутбуки: не даём кнопке в шапке ломаться на две строки */
@media (max-width: 1150px) {
  .header__inner { gap: 18px; }
  .header__nav { gap: 14px; }
  .header__nav a { font-size: .76rem; }
  .header__cta { padding: 12px 14px; font-size: .88rem; white-space: nowrap; }
  .header__phone { font-size: .9rem; }
}
