/* «Вариант» — ремонт пластиковых окон в Челябинске
   Палитра: синий и голубой. Белые окна всегда стоят на цветном фоне. */

:root {
  --navy-900: #06193A;
  --navy-800: #0B2A57;
  --blue-800: #0E3A78; /* сцена-чертёж */
  --blue-700: #1553B8; /* главный экран, цены */
  --blue-600: #1E6FD0; /* кнопки на светлом */
  --blue-hover: #185DB0;
  --blue-500: #3FA2F5; /* подсветка */
  --sky-400: #5AAEEA;
  --sky-300: #8CCBF5; /* кнопки на тёмном */
  --sky-200: #BFE0F8;
  --sky-100: #DDEEFC;
  --sky-50: #EEF6FE;
  --accent: #FFB627; /* только кнопки заявки */
  --accent-hover: #FFC654;

  --ink: #0A2340;
  --ink-2: #29425F;
  --muted: #4E6580;
  --on-dark: #FFFFFF;
  --on-dark-2: #C9DDF3;
  --on-dark-3: #9CBDE2;

  --line: #CFE0F2;
  --line-strong: #A9C4E2;
  --line-dark: rgba(255, 255, 255, 0.16);
  --danger: #C23B30;

  --radius-s: 4px;
  --radius: 8px;
  --radius-l: 14px;
  --shadow-panel: 0 28px 56px -32px rgba(11, 42, 87, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1240px;
  --gutter: 24px;
  --header-h: 72px;
  --font: 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky-50);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; color: inherit; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.03; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.022em; }
h3 { font-size: 18px; line-height: 1.3; }
a { color: var(--blue-600); }
img, svg { display: block; }

:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--sky-300); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--sky-300);
  color: var(--navy-800);
  padding: 10px 14px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font: 500 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 0.08s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:disabled { background: var(--sky-400); cursor: progress; transform: none; }

.btn-sky { background: var(--sky-300); color: var(--navy-800); }
.btn-sky:hover { background: #A9DAFA; }

.btn-accent { background: var(--accent); color: var(--navy-900); font-weight: 600; box-shadow: 0 6px 18px -8px rgba(255, 182, 39, 0.75); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { background: #FFD98A; cursor: progress; transform: none; box-shadow: none; }

.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sky-50); }
.btn-light[aria-pressed='true'] { background: var(--sky-300); color: var(--navy-800); }

.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue-700);
  color: #fff;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line-dark); }
.site-header.is-past-hero { background: var(--navy-800); }

.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand-plate {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px -8px rgba(6, 25, 58, 0.55);
}
.brand-mark { width: 50px; height: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 23px; font-weight: 650; line-height: 1; letter-spacing: -0.025em; }
.brand-tag { margin-top: 4px; font-size: 12px; line-height: 1.2; color: var(--on-dark-2); white-space: nowrap; }

.main-nav { display: flex; gap: 26px; margin-left: 16px; }
.main-nav a {
  position: relative;
  padding: 6px 0;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--sky-300);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-contact { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.header-phone {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.header-phone:hover { color: var(--sky-300); }
.header-hours { margin-top: 3px; font-size: 12px; color: var(--on-dark-2); }

.nav-toggle .i-close { display: none; }
.menu-open .nav-toggle .i-open { display: none; }
.menu-open .nav-toggle .i-close { display: block; }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy-800);
  padding: 4px 16px 24px;
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.5);
}
.mobile-menu nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line-dark);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu-contact { display: flex; flex-direction: column; margin: 20px 0 16px; }
.mobile-menu-contact .header-phone { font-size: 22px; }
.mobile-menu-contact .header-hours { display: block; font-size: 14px; }

/* ---------- главный экран ---------- */

.hero {
  position: relative;
  padding: 32px 0 88px;
  background: var(--blue-700);
  color: #fff;
  overflow: hidden;
}

/* облака за окном: видео на всю ширину, слева затемнено под текст */
.sky { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky-video { width: 100%; height: 100%; object-fit: cover; }
.js .sky-video { opacity: 0; transition: opacity 1.4s ease; }
.js .sky.is-ready .sky-video { opacity: 1; }
.hero-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 42, 87, 0) 62%, rgba(11, 42, 87, 0.6) 100%),
    linear-gradient(90deg, rgba(17, 72, 170, 0.86) 0%, rgba(17, 72, 170, 0.66) 34%, rgba(17, 72, 170, 0.12) 62%, rgba(17, 72, 170, 0) 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px;
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; padding: 24px 0; }
.hero-copy h1 { max-width: 10.5em; }

/* заголовок «Скорая помощь» в две строки + телефон */
.hero-copy .hero-title { max-width: none; font-size: clamp(38px, 4.2vw, 58px); line-height: 1.02; }
.hero-title .line { display: block; }
.hero-title .line-main { white-space: nowrap; }
.hero-title .line-sub { margin-top: 0.08em; font-size: 0.74em; line-height: 1.08; letter-spacing: -0.025em; }

.hero-phone {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  margin-top: 26px;
  padding: 2px 0 6px;
  color: var(--sky-300);
  font-size: clamp(34px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.25s ease, scale 0.2s var(--ease-out);
}
.hero-phone-icon { font-size: 0.78em; }
.hero-phone::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.hero-phone:hover { color: #fff; }
.hero-phone:hover::after { transform: scaleX(1); transform-origin: left; }
.hero-phone:active { scale: 0.97; color: #fff; }

.hero-lead { margin-top: 24px; max-width: 27em; font-size: 20px; line-height: 1.5; color: var(--on-dark-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { display: flex; align-items: baseline; gap: 10px; margin-top: 28px; font-size: 15px; color: var(--on-dark-2); }
.hero-note::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; background: var(--sky-300); transform: translateY(-1px); }

.hero-visual { position: relative; }
.hero-viewer { height: clamp(460px, 48vw, 660px); }
.hero-visual figcaption { margin-top: -4px; text-align: center; font-size: 13px; color: var(--on-dark-2); }

/* появление главного экрана */
.js .hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js .hero h1 .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i) * 80ms + 120ms);
}
.hero.is-in h1 .w > span { transform: none; }
.js .hero-lead,
.js .hero-actions,
.js .hero-note { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.9s var(--ease-out); }
.hero.is-in .hero-lead { opacity: 1; transform: none; transition-delay: 0.55s; }
.hero.is-in .hero-actions { opacity: 1; transform: none; transition-delay: 0.67s; }
.hero.is-in .hero-note { opacity: 1; transform: none; transition-delay: 0.79s; }
/* телефон появляется через translate, а на нажатие реагирует через scale — свойства не мешают друг другу */
.js .hero-phone {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s ease 0.45s, translate 0.9s var(--ease-out) 0.45s, color 0.25s ease, scale 0.2s var(--ease-out);
}
.hero.is-in .hero-phone { opacity: 1; translate: none; }
.js .hero-visual figcaption { opacity: 0; transition: opacity 0.8s ease 1.6s; }
.hero.is-in .hero-visual figcaption { opacity: 1; }

/* ---------- 3D ---------- */

.viewer { position: relative; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.planet { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.w3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; opacity: 0; transition: opacity 0.6s ease; }
.is-ready > .w3d-canvas { opacity: 1; }
.is-dragging .w3d-canvas { cursor: grabbing; }

.w3d-overlay { position: absolute; inset: 0; pointer-events: none; }
.w3d-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.w3d-leaders polyline { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; }
.w3d-leaders polyline.is-active { stroke: var(--sky-300); }
.w3d-leaders > rect { fill: #fff; }
.w3d-leaders > rect.is-active { fill: var(--sky-300); }
.w3d-leaders g rect { fill: var(--blue-800); stroke: #fff; stroke-width: 1; }
.w3d-leaders g text { font: 600 10px var(--font); text-anchor: middle; fill: #fff; }
.w3d-leaders g.is-active rect { fill: var(--sky-300); stroke: var(--sky-300); }
.w3d-leaders g.is-active text { fill: var(--navy-800); }

.w3d-dim {
  position: absolute;
  left: 0;
  top: 0;
  padding: 1px 6px;
  background: var(--blue-800);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.w3d-part {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}
.w3d-part.is-active { color: var(--sky-300); font-weight: 600; }
.is-compact .w3d-part { display: flex; gap: 6px; font-size: 12px; white-space: normal; }
.is-compact .w3d-part::before {
  content: attr(data-n);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid #fff;
  font-size: 10px;
  font-weight: 600;
}
.is-compact .w3d-part.is-active::before { background: var(--sky-300); border-color: var(--sky-300); color: var(--navy-800); }

.viewer-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--on-dark-2);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s;
}
.viewer-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.was-touched .viewer-hint { opacity: 0; }
.hero-viewer .viewer-hint { left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 2; }

.w3d-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--on-dark-2);
}

/* ---------- подпись над заголовком ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
}
/* два пикселя — как в логотипе и на границах секций */
.eyebrow::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: currentColor;
  box-shadow: 12px 0 0 rgba(63, 162, 245, 0.45);
}
.on-dark .eyebrow { color: var(--sky-300); }

/* ---------- пиксельные границы секций ---------- */

.pixel-edge { position: absolute; left: 0; right: 0; z-index: 1; overflow: hidden; line-height: 0; pointer-events: none; }
.pixel-edge[data-edge='bottom'] { bottom: 0; }
.pixel-edge[data-edge='top'] { top: 0; }
.pixel-edge rect { fill: var(--edge); transform-box: fill-box; transform-origin: center; }
.js .pixel-edge rect { opacity: 0; animation: px-in 0.45s steps(3, end) forwards paused; animation-delay: var(--d, 0s); }
.js .pixel-edge.is-in rect { animation-play-state: running; }
@keyframes px-in {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: none; }
}

/* ---------- доверие ---------- */

.trust { background: var(--navy-800); color: #fff; }
.trust-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.trust-list li { padding: 34px 28px 38px 0; }
.trust-list li + li { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.trust-list h3 { margin-top: 16px; font-size: 17px; }
.trust-list p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--on-dark-2); }
.trust-list .icon { stroke: var(--sky-300); width: 30px; height: 30px; }
.js .trust-list .icon > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(0.65, 0, 0.35, 1); }
.js .trust-list li:nth-child(2) .icon > * { transition-delay: 0.15s; }
.js .trust-list li:nth-child(3) .icon > * { transition-delay: 0.3s; }
.js .trust-list li:nth-child(4) .icon > * { transition-delay: 0.45s; }
.trust-list.is-in .icon > * { stroke-dashoffset: 0; }

.icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* ---------- секции и появление ---------- */

.section { position: relative; padding: 112px 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 40em; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; }
.section-head-row p { margin-top: 0; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- калькулятор ---------- */

.calc-section,
.order-section { background: var(--sky-100); }
.section.calc-section { padding-bottom: 40px; }
.section.order-section { padding-top: 40px; }

.calc {
  display: grid;
  grid-template-columns: 404px minmax(0, 1fr);
  grid-template-areas:
    'params stage'
    'params result';
  grid-template-rows: minmax(540px, 1fr) auto;
  background: #fff;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

.calc-params { grid-area: params; display: flex; flex-direction: column; gap: 28px; padding: 28px; border-right: 1px solid var(--line); }
.calc-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc-group legend { padding: 0; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }

.dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.label-hint { color: var(--muted); }

.num-input {
  display: flex;
  height: 48px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.num-input:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--sky-100); }
.num-input button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s;
}
.num-input button:hover { background: var(--sky-50); color: var(--blue-600); }
.num-input button:active svg { transform: scale(0.8); }
.num-input button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform 0.1s; }
.num-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  text-align: center;
  color: var(--ink);
  font: 500 17px var(--font);
  font-variant-numeric: tabular-nums;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 22px;
  margin: 6px 0 0;
  background: transparent;
  cursor: pointer;
  --p: 50%;
}
.range::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--blue-600) var(--p), var(--line) var(--p)); }
.range::-moz-range-track { height: 3px; background: var(--line); }
.range::-moz-range-progress { height: 3px; background: var(--blue-600); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  background: #fff;
  border: 2px solid var(--blue-600);
  border-radius: 2px;
  transition: transform 0.15s;
}
.range:active::-webkit-slider-thumb { transform: scale(1.25); }
.range::-moz-range-thumb { width: 10px; height: 10px; background: #fff; border: 2px solid var(--blue-600); border-radius: 2px; }

.field-error { display: none; margin-top: 4px; font-size: 13px; color: var(--danger); }
.field.is-invalid .field-error { display: block; }
.field.is-invalid .num-input,
.field.is-invalid input:not([type='range']),
.field.is-invalid textarea { border-color: var(--danger); }

.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.segmented svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 0.35s var(--ease-out); }
.segmented label:hover span { border-color: var(--blue-600); }
.segmented label:hover svg { transform: scale(1.08); }
.segmented input:checked + span { border-color: var(--blue-600); background: var(--blue-600); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--blue-600); outline-offset: 2px; }

.problems { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.problem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.25s var(--ease-out);
}
.problem + .problem { border-top: 1px solid var(--line); }
.problem:hover { background: var(--sky-50); }
.problem:has(input:checked) { background: var(--sky-50); box-shadow: inset 3px 0 0 var(--blue-600); }
.problem input {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.problem input::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-600);
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}
.problem input:checked { border-color: var(--blue-600); }
.problem input:checked::before { transform: scale(1); }
.problem-name { flex: 1; }
.problem input:checked ~ .problem-name { font-weight: 500; }
.problem-price { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.problem input:checked ~ .problem-price { color: var(--blue-600); font-weight: 500; }

/* сцена в стиле чертежа */
.calc-stage {
  grid-area: stage;
  position: relative;
  min-height: 540px;
  background-color: var(--blue-800);
  background-image:
    linear-gradient(rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(143, 182, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.07) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.calc-viewer { position: absolute; inset: 0; }

.stage-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}
.stage-bar > * { pointer-events: auto; }
.stage-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  background: #fff;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}
.stage-legend.is-changed { animation: chip-in 0.45s var(--ease-out); }
@keyframes chip-in {
  from { opacity: 0.2; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.legend-swatch { flex-shrink: 0; width: 10px; height: 10px; background: var(--blue-500); }

.calc-result {
  grid-area: result;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'main lines cta'
    'note note note';
  align-items: center;
  gap: 10px 36px;
  padding: 22px 28px;
  background: #fff;
}
.result-main { grid-area: main; }
.result-label { font-size: 14px; color: var(--muted); }
.result-price {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--blue-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-lines { grid-area: lines; list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.35; }
.price-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; max-width: 340px; animation: line-in 0.45s var(--ease-out) both; }
.price-lines li + li { margin-top: 8px; animation-delay: 0.08s; }
@keyframes line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}
.pl-label { font-weight: 500; }
.pl-detail { grid-column: 1; color: var(--muted); font-size: 13px; }
.pl-sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; }
.result-note { grid-area: note; font-size: 13px; color: var(--muted); }
.result-cta { grid-area: cta; }

/* ---------- заявка ---------- */

.order-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.order-intro { padding-top: 8px; }
.order-lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 26em; }

.order-summary { margin-top: 28px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-panel); }
.order-summary-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.order-summary-head h3 { font-size: 15px; }
.order-summary-head a { display: inline-block; padding: 11px 0; margin: -11px 0; font-size: 14px; font-weight: 500; text-decoration: none; }
.order-summary-head a:hover { text-decoration: underline; }
.order-summary-body { display: flex; align-items: center; gap: 22px; padding: 20px; }
.order-scheme {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  background: var(--blue-800);
  border-radius: var(--radius);
}
.order-scheme svg { max-width: 88px; max-height: 88px; }
.order-scheme .sc-frame { fill: none; stroke: #fff; stroke-width: 1.5; }
.order-scheme .sc-sash { fill: rgba(140, 203, 245, 0.18); stroke: #fff; stroke-width: 1; }
.order-scheme .sc-open { fill: none; stroke: var(--sky-300); stroke-width: 1; stroke-dasharray: 3 2; }
.w3d-fallback .sc-frame { fill: none; stroke: #fff; stroke-width: 1.5; }
.w3d-fallback .sc-sash { fill: rgba(140, 203, 245, 0.18); stroke: #fff; stroke-width: 1; }
.w3d-fallback .sc-open { fill: none; stroke: var(--sky-300); stroke-width: 1; stroke-dasharray: 4 3; }

.summary-list { font-size: 15px; line-height: 1.4; }
.summary-list div { display: flex; flex-wrap: wrap; column-gap: 6px; padding: 3px 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { font-weight: 500; }
.summary-list .is-price { margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--line); }
.summary-list .is-price dd { font-weight: 600; color: var(--blue-700); font-variant-numeric: tabular-nums; }

.order-panel { background: #fff; border-radius: var(--radius-l); padding: 32px; box-shadow: var(--shadow-panel); }
.order-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.order-form input[type='text'],
.order-form input[type='tel'],
.order-form textarea {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  background: var(--sky-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: 16px var(--font);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.order-form textarea { height: auto; min-height: 100px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.order-form input:hover,
.order-form textarea:hover { border-color: var(--line-strong); }
.order-form input:focus,
.order-form textarea:focus { outline: none; background: #fff; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--sky-100); }
.order-form ::placeholder { color: #8499B2; }

.photo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.photo-btn { cursor: pointer; }
.photo-btn:has(+ input:focus-visible) { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.photo-note { font-size: 13px; color: var(--muted); }
.photo-list { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; list-style: none; margin: 0; padding: 0; }
.photo-list:empty { display: none; }
.photo-list li {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-s);
  overflow: hidden;
  animation: chip-in 0.35s var(--ease-out);
}
.photo-list img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--navy-800);
  cursor: pointer;
}
.photo-remove svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 1.8; }

.form-status { font-size: 14px; color: var(--danger); }
.form-status:empty { display: none; }
.consent { font-size: 13px; line-height: 1.5; color: var(--muted); }
.consent a { color: inherit; }

.order-done { outline: none; animation: chip-in 0.5s var(--ease-out); }
.order-done .icon { width: 48px; height: 48px; }
.order-done h3 { margin-top: 18px; font-size: 24px; }
.order-done p { margin-top: 10px; color: var(--ink-2); max-width: 30em; }
.order-done .btn { margin-top: 24px; }

/* ---------- услуги ---------- */

.services-section { background: #fff; }
/* 6 колонок: две главные услуги по половине ряда, остальные по трети */
.services { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.service {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: var(--sky-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}
.service-lg { grid-column: span 3; }
/* картинка из нашей 3D-модели на «чертеже», как в калькуляторе */
.service-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--blue-800);
  background-image:
    linear-gradient(rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(143, 182, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.07) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
  overflow: hidden;
}
.service-lg .service-media { aspect-ratio: 16 / 9; }
.service:nth-child(even) .service-media { background-color: var(--blue-700); }
.service-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 0.7s var(--ease-out); }
.service-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.service h3 { font-size: 19px; }
.service-lg h3 { font-size: 24px; }
.service p { flex: 1; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.service-lg p { font-size: 16px; }
.service-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.service-price { font-size: 16px; font-weight: 600; color: var(--ink); }
.service-lg .service-price { font-size: 18px; }
.service-foot a { font-size: 14px; font-weight: 500; text-decoration: none; }
.service-foot a::after { content: ''; position: absolute; inset: 0; }

@media (hover: hover) {
  .service:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 22px 44px -26px rgba(6, 25, 58, 0.45); }
  .service:hover .service-media img { transform: scale(1.06); }
}
.service:focus-within { outline: 2px solid var(--blue-600); outline-offset: 2px; }

/* ---------- цены ---------- */

.prices-section { background: var(--blue-800) url(../video/sky-poster.jpg) center / cover no-repeat; color: #fff; overflow: hidden; }
.prices-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14, 58, 120, 0.96) 0%, rgba(21, 83, 184, 0.88) 42%, rgba(21, 83, 184, 0.62) 100%);
}
.prices-grid { position: relative; z-index: 1; }
.price-panel {
  padding: 26px 30px 10px;
  background: rgba(6, 25, 58, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-l);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td { border-bottom: 0; }
.visit { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.visit h3 { font-size: 17px; }
.visit-list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.visit-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 14px; font-size: 15px; line-height: 1.45; color: var(--on-dark-2); }
.visit-list li::before { content: ''; width: 10px; height: 10px; margin-top: 6px; background: var(--accent); }
.prices-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.prices-intro p { margin-top: 16px; font-size: 17px; color: var(--on-dark-2); max-width: 24em; }
.prices-intro .btn { margin-top: 28px; }

.price-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.price-table thead th {
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-2);
}
.price-table thead th:last-child { text-align: right; }
.price-table tbody th { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line-dark); text-align: left; font-weight: 500; transition: color 0.2s; }
.price-table td { padding: 18px 0; border-bottom: 1px solid var(--line-dark); text-align: right; color: var(--on-dark-2); white-space: nowrap; }
.price-table td b { color: #fff; font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; }
.js .price-table tbody tr { opacity: 0; transition: opacity 0.6s ease; }
.price-table.is-in tbody tr { opacity: 1; }
.price-table tbody tr:nth-child(2) { transition-delay: 0.08s; }
.price-table tbody tr:nth-child(3) { transition-delay: 0.16s; }
.price-table tbody tr:nth-child(4) { transition-delay: 0.24s; }
.price-table tbody tr:nth-child(5) { transition-delay: 0.32s; }
.price-table tbody tr:nth-child(6) { transition-delay: 0.4s; }
.price-table tbody tr:hover th { color: var(--sky-300); }

/* ---------- этапы ---------- */

.process-section { background: var(--sky-50); }
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps::before {
  content: '';
  position: absolute;
  top: 21px;
  left: 44px;
  width: calc(80% - 44px);
  height: 2px;
  background: var(--line-strong);
}
.steps li { position: relative; padding-right: 28px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 2px solid var(--blue-600);
  border-radius: var(--radius-s);
  color: var(--blue-600);
  font-size: 17px;
  font-weight: 600;
  transition: background-color 0.4s, color 0.4s;
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 21px;
  left: 44px;
  right: 0;
  height: 2px;
  background: var(--blue-600);
  transform-origin: left;
}
.step-icon { display: block; width: 30px; height: 30px; margin-top: 24px; stroke: var(--blue-600); }
.steps h3 { margin-top: 14px; font-size: 17px; }
.steps p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.js .steps li::after { transform: scaleX(0); transition: transform 0.45s ease-in-out; }
.js .steps li .step-icon,
.js .steps li h3,
.js .steps li p { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.6s var(--ease-out); }
.steps.is-in li::before { background: var(--blue-600); color: #fff; }
.steps.is-in li::after { transform: scaleX(1); }
.steps.is-in li .step-icon,
.steps.is-in li h3,
.steps.is-in li p { opacity: 1; transform: none; }
.steps li:nth-child(1)::before, .steps li:nth-child(1) .step-icon, .steps li:nth-child(1) h3, .steps li:nth-child(1) p { transition-delay: 0.1s; }
.steps li:nth-child(1)::after { transition-delay: 0.35s; }
.steps li:nth-child(2)::before, .steps li:nth-child(2) .step-icon, .steps li:nth-child(2) h3, .steps li:nth-child(2) p { transition-delay: 0.8s; }
.steps li:nth-child(2)::after { transition-delay: 1.05s; }
.steps li:nth-child(3)::before, .steps li:nth-child(3) .step-icon, .steps li:nth-child(3) h3, .steps li:nth-child(3) p { transition-delay: 1.5s; }
.steps li:nth-child(3)::after { transition-delay: 1.75s; }
.steps li:nth-child(4)::before, .steps li:nth-child(4) .step-icon, .steps li:nth-child(4) h3, .steps li:nth-child(4) p { transition-delay: 2.2s; }
.steps li:nth-child(4)::after { transition-delay: 2.45s; }
.steps li:nth-child(5)::before, .steps li:nth-child(5) .step-icon, .steps li:nth-child(5) h3, .steps li:nth-child(5) p { transition-delay: 2.9s; }

/* ---------- отзывы ---------- */

.reviews-section { background: #fff; }
.reviews-links { font-size: 15px; color: var(--muted); }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.review {
  display: flex;
  flex-direction: column;
  padding: 28px;
  position: relative;
  background: var(--sky-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
/* крупная кавычка в углу */
.review::after {
  content: '\201D';
  position: absolute;
  top: 6px;
  right: 22px;
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  color: var(--sky-200);
  pointer-events: none;
}
.review-tag {
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--sky-100);
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-700);
}
.review blockquote { flex: 1; margin-top: 18px; font-size: 16px; line-height: 1.6; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 15px; font-weight: 600; }
.review-author .review-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.review:nth-child(2) .review-avatar { background: var(--sky-400); }
.review:nth-child(3) .review-avatar { background: var(--navy-800); }
.review-who span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* ---------- вопросы и ответы ---------- */

.faq-section { background: var(--sky-100); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--header-h, 72px) + 24px); margin-bottom: 0; }
.faq-grid .section-head .btn { margin-top: 24px; }
.faq-wa {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  margin-top: 28px;
  padding: 16px 18px;
  background: #fff;
  border-radius: var(--radius-l);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.faq-wa:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(6, 25, 58, 0.45); }
.faq-wa-icon { display: grid; flex-shrink: 0; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #25D366; color: #fff; }
.faq-wa-icon svg { width: 26px; height: 26px; fill: currentColor; }
.faq-wa-text { font-size: 14px; line-height: 1.4; color: var(--muted); }
.faq-wa-text b { display: block; margin-bottom: 2px; font-size: 16px; color: var(--ink); }
.faq { display: grid; gap: 10px; }
.faq-item { background: #fff; border-radius: var(--radius-l); box-shadow: 0 1px 0 var(--line); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--blue-600), var(--blue-600)) center / 100% 2px no-repeat,
    linear-gradient(var(--blue-600), var(--blue-600)) center / 2px 100% no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--blue-600); }
.faq-item p { padding: 0 24px 22px; max-width: 44em; color: var(--ink-2); line-height: 1.6; }

/* ---------- кнопка WhatsApp ---------- */

.float-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(6, 25, 58, 0.55);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.float-wa svg { width: 30px; height: 30px; fill: currentColor; }
.float-wa:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 28px -8px rgba(6, 25, 58, 0.6); }

/* ---------- квиз «Что с окном?» ---------- */

/* светлый «чертёж» на фоне */
.quiz-section {
  background-color: #fff;
  background-image:
    linear-gradient(var(--sky-50) 1px, transparent 1px),
    linear-gradient(90deg, var(--sky-50) 1px, transparent 1px);
  background-size: 32px 32px;
}
.quiz-grid { display: block; }
.quiz-grid .section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.quiz-grid .section-head .eyebrow { justify-content: center; }
.quiz-grid .section-head p { margin-left: auto; margin-right: auto; }
.quiz {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 32px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 40px 80px -48px rgba(6, 25, 58, 0.5);
}
.quiz-fallback { color: var(--ink-2); }
.quiz-steps { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: qs; }
.quiz-steps li {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--sky-100);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  counter-increment: qs;
  transition: border-color 0.4s, color 0.4s;
}
.quiz-steps li::before {
  content: counter(qs);
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--sky-100);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.4s, color 0.4s;
}
.quiz-steps li.is-current { border-color: var(--blue-600); color: var(--ink); }
.quiz-steps li.is-current::before { background: var(--blue-600); color: #fff; }
.quiz-steps li.is-done { border-color: var(--sky-300); color: var(--ink-2); }
.quiz-steps li.is-done::before { content: '\2713'; background: var(--sky-300); color: var(--navy-800); }
.quiz-body.is-enter { animation: quiz-in 0.5s var(--ease-out); }
@keyframes quiz-in {
  from { opacity: 0; transform: translateX(22px); }
}
.quiz-q { margin-top: 26px; font-size: 26px; line-height: 1.25; outline: none; }
.quiz-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.quiz-options.is-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  background: var(--sky-50);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font: 500 16px/1.35 var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.quiz-opt:hover { border-color: var(--blue-600); background: #fff; transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(6, 25, 58, 0.55); }
.quiz-opt svg { flex-shrink: 0; width: 30px; height: 30px; fill: none; stroke: var(--blue-600); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* первый вопрос: плитки с картинками из 3D-модели */
.quiz-tile { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding: 0; overflow: hidden; background: #fff; }
.quiz-tile-media,
.quiz-result-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--blue-800);
  background-image:
    linear-gradient(rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(143, 182, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.07) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
}
.quiz-tile:nth-child(even) .quiz-tile-media { background-color: var(--blue-700); }
.quiz-tile-media img,
.quiz-result-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 0.6s var(--ease-out); }
.quiz-tile:hover .quiz-tile-media img { transform: scale(1.08); }
.quiz-tile-label { display: block; flex: 1; padding: 12px 14px 14px; font-size: 15px; }
/* третий вопрос: схемы окон */
.quiz-win { flex-direction: column; justify-content: center; gap: 12px; padding: 22px 16px; text-align: center; }
.quiz-win svg { width: 72px; height: 72px; stroke-width: 1.6; }
.quiz-back,
.quiz-restart { margin-top: 18px; padding: 0; background: none; border: 0; color: var(--blue-600); font: 500 14px var(--font); cursor: pointer; }
.quiz-back:hover,
.quiz-restart:hover { text-decoration: underline; }
/* результат: картинка ремонта рядом с ценой */
.quiz-result { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: center; margin-top: 26px; }
.quiz-result-media { border-radius: 18px; }
.quiz-label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-600); }
.quiz-result h3 { margin-top: 8px; font-size: 30px; line-height: 1.2; outline: none; }
.quiz-why { margin-top: 10px; color: var(--ink-2); line-height: 1.55; }
.quiz-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--blue-800);
  border-radius: 14px;
  color: #fff;
}
.quiz-price span { font-size: 14px; color: var(--on-dark-2); }
.quiz-price b { font-size: 38px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quiz-price small { flex-basis: 100%; font-size: 13px; color: var(--on-dark-3); }
.quiz-lines { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.quiz-lines li { display: flex; justify-content: space-between; gap: 12px; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.quiz-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- устройство окна: разбирается при прокрутке ---------- */

.anatomy-section {
  background-color: var(--navy-900);
  background-image:
    linear-gradient(rgba(143, 182, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  color: #fff;
}
.anatomy-head { margin-bottom: 8px; }
.anatomy-head p { color: var(--on-dark-2); }
.anatomy-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.anatomy-step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64vh;
  padding: 24px 0;
  opacity: 0.3;
  transition: opacity 0.45s ease;
}
.anatomy-step.is-active { opacity: 1; }
.anatomy-num { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; color: var(--sky-300); }
.anatomy-step h3 { margin-top: 10px; font-size: clamp(26px, 2.6vw, 36px); }
.anatomy-step p { margin-top: 14px; max-width: 30em; font-size: 17px; line-height: 1.6; color: var(--on-dark-2); }
.anatomy-step .anatomy-price { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; color: #fff; }
.anatomy-price a { color: var(--accent); font-weight: 500; text-decoration: none; }
.anatomy-price a:hover { text-decoration: underline; }
.anatomy-stage {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  height: calc(100vh - var(--header-h) - 48px);
  min-height: 460px;
  max-height: 760px;
  background-color: var(--blue-800);
  background-image:
    linear-gradient(rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(143, 182, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 182, 227, 0.07) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  border: 1px solid rgba(143, 182, 227, 0.2);
  border-radius: 20px;
  overflow: hidden;
}
.anatomy-viewer { position: absolute; inset: 0; }
.anatomy-viewer .viewer-hint { left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 2; }

/* ---------- цифры ---------- */

.numbers-section { padding: 88px 0; background: #fff; }
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.numbers li { padding: 4px 28px; border-left: 1px solid var(--line); }
.numbers li:first-child { padding-left: 0; border-left: 0; }
/* пиксель-акцент над цифрой */
.numbers li::before { content: ''; display: block; width: 10px; height: 10px; margin-bottom: 20px; background: var(--accent); box-shadow: 14px 0 0 var(--sky-300); }
.num {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(46px, 5.2vw, 78px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--blue-700);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.num small { font-size: 0.36em; font-weight: 600; letter-spacing: 0; color: var(--blue-600); }
.num-text { display: block; max-width: 14em; margin-top: 14px; font-size: 16px; line-height: 1.45; color: var(--muted); }

/* ---------- было / стало ---------- */

.compare-section { background: var(--navy-900); color: #fff; overflow: hidden; }
/* тёплый свет справа — как от лампы в комнате */
.compare-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 70% at 88% 62%, rgba(255, 160, 60, 0.2), transparent 70%),
    radial-gradient(40% 60% at 10% 30%, rgba(63, 162, 245, 0.14), transparent 70%);
  pointer-events: none;
}
.compare-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.compare-intro p { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--on-dark-2); }
.compare-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.compare-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.compare-list svg { flex-shrink: 0; width: 26px; height: 26px; fill: none; stroke-width: 1.5; }
.compare-list .is-cold svg { stroke: var(--sky-300); }
.compare-list .is-warm svg { stroke: #FFB45E; }
.compare-intro .btn { margin-top: 32px; }

.compare {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: ew-resize;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.compare-layer { position: absolute; inset: 0; }
.compare-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.compare-cold { z-index: 0; background: radial-gradient(85% 75% at 50% 40%, #1F5596 0%, #0B2A57 58%, #06193A 100%); }
.compare-cold img { z-index: 1; filter: saturate(0.75) hue-rotate(10deg) brightness(0.92); }
/* иней по краям */
.frost {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .94 0 0 0 0 1 0 0 0 2.2 -1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(closest-side, transparent 68%, rgba(0, 0, 0, 0.55) 88%, #000 100%);
  mask-image: radial-gradient(closest-side, transparent 68%, rgba(0, 0, 0, 0.55) 88%, #000 100%);
  pointer-events: none;
}
/* снег: обёртка во всю высоту кадра едет сверху вниз, снежинка — у её верхнего края */
.snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.snow-back { z-index: 0; }
.snow-front { z-index: 3; }
.snow i {
  position: absolute;
  top: 0;
  width: var(--s);
  height: 100%;
  animation: snowfall var(--d) linear var(--delay) infinite;
  will-change: transform;
}
.snow i::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff;
  opacity: var(--o);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  animation: sway var(--sway) ease-in-out infinite alternate;
}
.snow i.flake::before {
  content: '\2744';
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  font-size: var(--s);
  line-height: 1;
  text-shadow: 0 0 10px rgba(190, 225, 255, 0.95);
}
@keyframes snowfall {
  from { transform: translateY(-8%); }
  to { transform: translateY(104%); }
}
@keyframes sway {
  from { transform: translateX(-9px) rotate(0deg); }
  to { transform: translateX(9px) rotate(50deg); }
}
.compare.is-off .snow i,
.compare.is-off .snow i::before,
.compare.is-off .gusts i,
.compare.is-off .glow,
.compare.is-off .lamp,
.compare.is-off .steam path { animation-play-state: paused; }

/* сквозняк: струйки воздуха от притвора */
.gusts i {
  position: absolute;
  z-index: 3;
  width: 110px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(225, 242, 255, 0.9), transparent);
  opacity: 0;
  animation: gust 2.6s linear infinite;
}
.gusts i:nth-child(1) { top: 22%; left: 30%; animation-delay: 0s; }
.gusts i:nth-child(2) { top: 38%; left: 46%; animation-delay: 0.7s; }
.gusts i:nth-child(3) { top: 55%; left: 32%; animation-delay: 1.3s; }
.gusts i:nth-child(4) { top: 70%; left: 48%; animation-delay: 0.35s; }
.gusts i:nth-child(5) { top: 30%; left: 62%; animation-delay: 1.8s; }
.gusts i:nth-child(6) { top: 62%; left: 64%; animation-delay: 1s; }
@keyframes gust {
  0% { transform: translateX(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(-130px); opacity: 0; }
}
.compare-warm {
  z-index: 1;
  clip-path: inset(0 0 0 var(--pos));
  background: radial-gradient(95% 85% at 28% 92%, #7A4416 0%, #3D2615 34%, #1B1724 70%, #0F1526 100%);
}
.compare-warm img { z-index: 1; filter: sepia(0.32) saturate(1.45) hue-rotate(-12deg) brightness(1.04); }
.glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(48% 42% at 18% 92%, rgba(255, 184, 96, 0.5), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: flicker 5.3s ease-in-out infinite;
}
/* лампа за кадром справа: тёплый свет падает на окно и подоконник и чуть мерцает */
.lamp {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(38% 46% at 100% 30%, rgba(255, 196, 120, 0.55), transparent 72%),
    radial-gradient(60% 55% at 85% 40%, rgba(255, 170, 80, 0.18), transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: flicker 4.1s ease-in-out infinite;
}
/* неровное мерцание, без резких вспышек */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  9% { opacity: 0.84; }
  14% { opacity: 0.97; }
  23% { opacity: 0.88; }
  37% { opacity: 1; }
  51% { opacity: 0.86; }
  57% { opacity: 0.98; }
  71% { opacity: 0.9; }
  86% { opacity: 1; }
}

/* подоконник: трапеция, передний край шире */
.sill {
  position: absolute;
  left: 15%;
  right: 13%;
  top: 87%;
  height: 8%;
  z-index: 2;
  clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.compare-cold .sill { background: linear-gradient(180deg, #D3DEEB 0%, #A8BBD2 55%, #7F95B3 100%); }
.compare-warm .sill { z-index: 3; background: linear-gradient(180deg, #FBEBD3 0%, #E6CBA4 55%, #C49C6E 100%); }

/* кружка с паром на подоконнике */
.mug { position: absolute; left: 62%; bottom: 8.6%; z-index: 4; width: 10%; pointer-events: none; }
.mug-body { display: block; width: 100%; height: auto; }
.steam {
  position: absolute;
  left: 4%;
  bottom: 88%;
  width: 70%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: rgba(255, 244, 232, 0.75);
  stroke-width: 3.2;
  stroke-linecap: round;
  filter: blur(1.2px);
}
.steam path { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: steam 3.4s ease-out infinite; }
.steam path:nth-child(2) { animation-delay: 1.1s; }
.steam path:nth-child(3) { animation-delay: 2.2s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(10px) scaleY(0.7); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-22px) scale(1.35, 1.1); }
}
.compare-tag {
  position: absolute;
  top: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.compare-tag svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.compare-tag-cold { left: 16px; background: rgba(6, 25, 58, 0.6); color: var(--sky-200); }
.compare-tag-warm { right: 16px; background: rgba(58, 30, 8, 0.6); color: #FFD29A; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.92); pointer-events: none; }
.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-800);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease-out);
}
.compare-handle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.compare.is-dragging .compare-handle span { transform: translate(-50%, -50%) scale(1.1); }
.compare-range { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compare-range:focus-visible ~ .compare-handle span { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- карта районов ---------- */

.map-section { background: var(--navy-800); color: #fff; overflow: hidden; }
.map-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.map-intro p { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--on-dark-2); max-width: 30em; }
.map-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.map-list button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: #fff;
  font: 500 14px var(--font);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.map-list button i { width: 10px; height: 10px; background: var(--c, var(--sky-300)); transition: background-color 0.2s; }
.map-list button:hover,
.map-list button.is-active { background: rgba(255, 182, 39, 0.14); border-color: var(--accent); }
.map-list button.is-active i { background: var(--accent); }
.map-intro .btn { margin-top: 30px; }
.map-box { position: relative; max-width: 520px; justify-self: center; width: 100%; }
.map-canvas { display: block; width: 100%; cursor: pointer; }
.map-tip {
  position: absolute;
  z-index: 2;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px)) scale(0.9);
  transition: opacity 0.2s, transform 0.25s var(--ease-out), left 0.25s var(--ease-out), top 0.25s var(--ease-out);
}
.map-tip::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.map-tip.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
.map-credit { margin-top: 10px; font-size: 12px; color: var(--on-dark-3); text-align: right; }
.map-credit a { color: inherit; }

/* ---------- финальный блок ---------- */

.cta-band { position: relative; padding: 112px 0 104px; background: var(--navy-800); color: #fff; overflow: hidden; }
/* облака уже загружены на главном экране — до запуска видео показываем кадр-заставку */
.cta-sky { background: url(../video/sky-poster.jpg) center / cover no-repeat; }
.cta-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 42, 87, 0.95) 0%, rgba(11, 42, 87, 0.84) 46%, rgba(14, 58, 120, 0.42) 100%);
}
.cta-inner { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.cta-band h2 { max-width: 16em; font-size: clamp(28px, 2.9vw, 40px); }
.cta-band p { margin-top: 14px; font-size: 18px; color: var(--on-dark-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

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

.site-footer { background: var(--navy-900); color: var(--on-dark-2); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.footer-brand p { margin-top: 18px; font-size: 15px; max-width: 18em; }
.footer-col h3 { margin-bottom: 14px; font-size: 15px; color: #fff; }
.footer-col p { font-size: 15px; }
.footer-col p + p { margin-top: 6px; }
.footer-col a { color: var(--sky-300); }
.footer-col .footer-phone { display: table; margin-bottom: 6px; color: #fff; font-size: 22px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.footer-col .footer-phone:hover { color: var(--sky-300); }
.districts,
.footer-nav { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.districts li + li,
.footer-nav li + li { margin-top: 6px; }
.footer-col .footer-nav a { color: var(--on-dark-2); text-decoration: none; }
.footer-col .footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  color: var(--on-dark-3);
}
.footer-bottom a { color: inherit; }

/* ---------- плашка на мобильном ---------- */

.mobile-bar { display: none; }

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

@media (max-width: 1180px) {
  .main-nav { gap: 18px; margin-left: 4px; }
  .header-hours { display: none; }
  .header-inner { gap: 20px; }
  .calc { grid-template-columns: 360px minmax(0, 1fr); }
  .calc-params { padding: 24px; }
  .calc-result { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'main cta' 'lines lines' 'note note'; }
  .result-cta { justify-self: end; }
}

@media (max-width: 1024px) {
  .main-nav,
  .header-contact,
  .header-cta { display: none; }
  .icon-btn { display: inline-flex; }
  .header-call { margin-left: auto; }
  .header-inner { gap: 8px; }
  .menu-open .mobile-menu { display: block; }
  .menu-open.site-header { background: var(--navy-800); }

  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service,
  .service-lg { grid-column: auto; }
  .service-lg .service-media { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 32px; }

  .hero { padding: 16px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-sky::after {
    background: linear-gradient(180deg, rgba(17, 72, 170, 0.84) 0%, rgba(17, 72, 170, 0.7) 46%, rgba(17, 72, 170, 0.15) 66%, rgba(11, 42, 87, 0.45) 100%);
  }
  .hero-copy { padding: 8px 0 0; }
  .hero-viewer { height: 420px; }
  .hero-copy .hero-title { font-size: clamp(38px, 6vw, 52px); }

  .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-list li,
  .trust-list li + li { padding: 26px 20px 26px 0; border-left: 0; }
  .trust-list li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-dark); }
  .trust-list li:nth-child(n + 3) { border-top: 1px solid var(--line-dark); }

  .calc { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: 'params' 'stage' 'result'; }
  .calc-params { border-right: 0; border-bottom: 1px solid var(--line); }
  .calc-stage { min-height: 460px; }

  .order-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .prices-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { top: 44px; left: 21px; width: 2px; height: calc(100% - 88px); }
  .steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; padding: 0 0 30px; }
  .steps li::before { grid-row: 1 / span 2; }
  .steps li:not(:last-child)::after { top: 44px; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; transform-origin: top; }
  .js .steps li::after { transform: scaleY(0); }
  .steps.is-in li::after { transform: scaleY(1); }
  .steps h3 { margin-top: 10px; }
  .steps p { margin-top: 4px; }

  .reviews { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .step-icon { display: none; }
  .cta-sky::after { background: rgba(11, 42, 87, 0.86); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .quiz-grid,
  .compare-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* устройство окна: 3D сверху и «прилипает», шаги прокручиваются под ним */
  .anatomy-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .map-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .quiz-options.is-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz-result { grid-template-columns: minmax(0, 1fr); }
  .quiz-result-media { max-width: 420px; }
  .anatomy-stage { order: -1; z-index: 2; top: var(--header-h); height: 54vh; min-height: 320px; border-radius: 16px; }
  .anatomy-step { min-height: 56vh; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .numbers li:nth-child(3) { padding-left: 0; border-left: 0; }
  .faq-grid .section-head { position: static; }
  .section-head-row { flex-direction: column; align-items: flex-start; }

  .cta-band { padding: 88px 0 72px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
}

@media (max-width: 760px) {
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--navy-800);
    color: #fff;
    transform: translateY(110%);
    transition: transform 0.35s var(--ease-out);
  }
  .mobile-bar.is-visible { transform: none; }
  /* над плашкой «Нужен ремонт окна?» */
  .float-wa { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .mobile-bar p { font-size: 15px; font-weight: 600; }
  .site-footer { padding-bottom: 72px; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 36px; }
  .brand-name { font-size: 21px; }
  .brand-plate { width: 50px; height: 50px; border-radius: 10px; }
  .brand-mark { width: 43px; }
  /* «Скорая помощь 🚑» всегда в одну строку: кегль подстраивается под ширину экрана */
  .hero-copy .hero-title { font-size: min(40px, calc((100vw - 32px) / 9.8)); }
  .hero-title .line-sub { font-size: 0.8em; }
  .hero-phone { margin-top: 18px; font-size: min(32px, 8.6vw); }
  .hero-lead { font-size: 18px; margin-top: 16px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-note { margin-top: 20px; font-size: 14px; }
  .hero-viewer { height: 360px; }

  .trust-list { grid-template-columns: minmax(0, 1fr); }
  .trust-list li,
  .trust-list li + li,
  .trust-list li:nth-child(even) {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px 0;
    border-left: 0;
  }
  .trust-list li + li { border-top: 1px solid var(--line-dark); }
  .trust-list .icon { grid-row: 1 / span 2; }
  .trust-list h3 { margin-top: 2px; font-size: 16px; }
  .trust-list p { margin-top: 2px; font-size: 14px; }

  .section.calc-section { padding-top: 64px; padding-bottom: 32px; }
  .section.order-section { padding-top: 32px; }
  .calc { margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .calc-params { padding: 20px 16px; gap: 24px; }
  .dims { gap: 12px; }
  .num-input button { width: 36px; }
  .range { height: 32px; }
  .calc-stage { min-height: 440px; transition: min-height 0.3s ease; }
  .calc-stage.is-exploded { min-height: 620px; }
  .calc-stage.is-exploded .viewer-hint { opacity: 0; }
  .stage-bar { top: 12px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; }
  .stage-bar .btn { align-self: flex-start; }
  .calc-result { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'main' 'lines' 'note' 'cta'; padding: 20px 16px; gap: 14px; }
  .result-price { font-size: 38px; }
  .result-cta { width: 100%; }

  .order-panel { padding: 20px 16px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .order-summary-body { padding: 16px; gap: 16px; }
  .order-scheme { width: 84px; height: 84px; }
  .order-scheme svg { max-width: 70px; max-height: 70px; }

  .services { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* на телефоне обычные услуги — строкой: картинка слева, текст справа */
  .service:not(.service-lg) { flex-direction: row; }
  .service:not(.service-lg) .service-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 150px; }
  .service-body { padding: 16px 16px 14px; }
  .service h3 { font-size: 17px; }
  .service-lg h3 { font-size: 21px; }
  .service p { font-size: 14px; }
  .service-foot { flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 10px; }
  .price-panel { padding: 18px 18px 4px; }

  .price-table { font-size: 16px; }
  .price-table td { white-space: normal; }
  .price-table td b { font-size: 17px; }

  .review { padding: 22px 18px; }
  .faq-item summary { padding: 18px; font-size: 16px; }
  .quiz { padding: 18px 16px 22px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; }
  .quiz-steps { gap: 6px; }
  .quiz-steps li { font-size: 12px; gap: 6px; }
  .quiz-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quiz-q { font-size: 20px; }
  .quiz-options,
  .quiz-options.is-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* пятая плитка на всю ширину — строкой: картинка слева, текст справа */
  .quiz-options.is-tiles .quiz-tile:last-child { grid-column: 1 / -1; flex-direction: row; }
  .quiz-options.is-tiles .quiz-tile:last-child .quiz-tile-media { flex: 0 0 calc(50% - 5px); }
  .quiz-options.is-tiles .quiz-tile:last-child .quiz-tile-label { display: flex; align-items: center; }
  .quiz-options.is-text { grid-template-columns: minmax(0, 1fr); }
  .quiz-options.is-windows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz-opt { min-height: 60px; font-size: 15px; }
  .quiz-tile-label { padding: 10px 12px 12px; font-size: 14px; }
  .quiz-win { padding: 14px 8px; font-size: 14px; }
  .quiz-win svg { width: 52px; height: 52px; }
  .quiz-result { gap: 18px; }
  .quiz-result h3 { font-size: 23px; }
  .quiz-price b { font-size: 30px; }
  .quiz-actions .btn { flex: 1 1 100%; }
  .map-list button { padding: 7px 12px; font-size: 13px; }
  .anatomy-step p { font-size: 16px; }
  .numbers-section { padding: 64px 0; }
  .numbers li { padding: 0 0 0 16px; }
  .num-text { font-size: 14px; }
  .compare { margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .compare-tag { top: 10px; padding: 6px 10px; font-size: 13px; }
  .compare-tag-cold { left: 10px; }
  .compare-tag-warm { right: 10px; }
  .faq-item p { padding: 0 18px 18px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1 1 100%; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gusts { display: none; }
  /* без движения снежинки просто стоят в кадре */
  .snow i { animation: none !important; transform: translateY(var(--y)); }
  .snow i::before { animation: none !important; }
  .steam path { animation: none !important; opacity: 0.55; }
  .glow,
  .lamp { animation: none !important; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
