/* ==========================================================================
   Вилен Окна
   ========================================================================== */

:root {
  --canvas: #f8fafc;
  --tile: #ffffff;
  --ink: #18324a;
  --ink-strong: #142d43;
  --ink-2: #5b7590;
  --ink-3: #7a90a6;
  --line: #cfd9e3;
  --line-soft: #e4eaf0;
  --blue: #1689e8;
  --blue-btn: #0e76d6;
  --blue-hover: #0b67bd;
  --blue-soft: #eaf4fd;
  --link: #0c6cc4;
  --star: #1689e8;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --radius-tile: 28px;
  --radius-pill: 980px;
  --radius-btn: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --page-pad: clamp(20px, 4.2vw, 84px);
  --maxw: 1240px;
  --header-h: 96px;
  --header-h-compact: 72px;
  --benefits-h: 152px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h-compact);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(22, 137, 232, .55);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

.container { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--ink-2); }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon .fill { fill: currentColor; stroke: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 44px; padding: 10px 22px;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  font-size: 17px; font-weight: 600; line-height: 1.1; white-space: nowrap;
  transition: background-color .22s, color .22s, border-color .22s, transform .3s var(--ease);
}
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn--lg { min-height: 54px; padding: 14px 28px; }
.btn--hero { min-height: 62px; padding: 0 30px; font-size: 18px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue-btn); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--outline { background: rgba(255, 255, 255, .72); border-color: #c5d2de; color: var(--ink-strong); }
.btn--outline:hover { border-color: var(--blue); background: var(--blue-soft); }
.btn--ghost { border-color: var(--blue-btn); color: var(--blue-btn); background: transparent; }
.btn--ghost:hover { background: var(--blue-btn); color: #fff; }
.btn--soft { background: var(--canvas); color: var(--ink); }
.btn--soft:hover { background: var(--line-soft); }
.icon--arrow { transition: transform .3s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--link); font-weight: 500;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid rgba(20, 45, 67, .07);
  transition: height .35s var(--ease), box-shadow .35s;
  animation: fade-in .6s ease both;
}
.site-header.is-compact { height: var(--header-h-compact); box-shadow: 0 8px 28px rgba(20, 45, 67, .06); }
.site-header__inner {
  height: 100%;
  padding-inline: var(--page-pad);
  display: flex; align-items: center; gap: clamp(20px, 2.1vw, 40px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 50px; height: auto; flex: none; }
.brand__text { display: grid; line-height: 1; }
.brand__name { font-size: 27px; font-weight: 800; letter-spacing: -0.032em; color: var(--ink-strong); }
.brand__sub { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.005em; }

.site-nav { display: flex; gap: clamp(22px, 2.2vw, 42px); margin-inline: auto; }
.site-nav a {
  padding: 8px 0;
  font-size: 16px; font-weight: 500; color: var(--ink); white-space: nowrap;
  transition: color .22s ease;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--blue-btn); }

.header-phones { display: flex; align-items: center; gap: 10px; flex: none; }
.header-phones__icon { width: 20px; height: 20px; color: var(--blue); stroke-width: 1.7; }
.header-phones__list {
  display: grid; gap: 1px;
  font-size: 16px; font-weight: 600; line-height: 1.32; white-space: nowrap; letter-spacing: -0.005em;
}
.header-phones__list a { transition: color .22s ease; }
.header-phones__list a:hover { color: var(--blue-btn); }
.header-cta { flex: none; min-height: 56px; padding: 0 30px; font-size: 16px; font-weight: 600; }
.header-cta:hover { transform: translateY(-1px); }

.burger {
  display: none; position: relative; flex: none;
  width: 48px; height: 48px; border: 0; border-radius: 12px; background: transparent;
}
.burger:hover { background: var(--blue-soft); }
.burger span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink-strong);
  transition: transform .4s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49;
  background: #fff;
  padding: 24px var(--page-pad) calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  overflow-y: auto;
}
.site-header.is-compact + .menu { top: var(--header-h-compact); }
.menu__links { display: grid; }
.menu__links a {
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink-strong);
}
.menu__foot { display: grid; gap: 8px; }
.menu__phone { font-size: 20px; font-weight: 600; }
.menu__foot .btn { margin-top: 14px; width: 100%; }

/* ==========================================================================
   Первый экран
   ========================================================================== */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes hero-zoom { from { opacity: 0; transform: scale(1.02); } }

.hero { position: relative; padding-top: var(--header-h); background: var(--canvas); }
.hero__main {
  position: relative;
  height: clamp(460px, calc(100vh - var(--header-h) - var(--benefits-h)), 820px);
  height: clamp(460px, calc(100svh - var(--header-h) - var(--benefits-h)), 820px);
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 60%;
  background: #e9eef3;
  animation: hero-zoom .9s var(--ease) .1s both;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero__media::before {
  /* мягкий переход фото в фон, без вертикальной границы */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg,
    var(--canvas) 0%,
    rgba(248, 250, 252, .94) 7%,
    rgba(248, 250, 252, .75) 15%,
    rgba(248, 250, 252, .4) 26%,
    rgba(248, 250, 252, .12) 36%,
    rgba(248, 250, 252, 0) 46%);
}
.hero__content {
  position: relative; z-index: 2;
  width: min(54%, 860px);
  padding-left: var(--page-pad);
}
.hero__label {
  display: flex; align-items: center; gap: 16px;
  font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
  animation: rise .7s var(--ease) .1s both;
}
.hero__label::before { content: ""; width: 44px; height: 2px; border-radius: 2px; background: var(--blue); flex: none; }
.hero__title {
  margin-top: 22px; max-width: 9.2em;
  font-size: clamp(42px, calc(3.3vw + 14px), 76px);
  font-weight: 750; line-height: 1.02; letter-spacing: -0.035em;
  color: var(--ink-strong);
  animation: rise .8s var(--ease) .18s both;
}
.hero__sub {
  margin-top: 26px; max-width: 500px;
  font-size: clamp(18px, calc(.6vw + 10.5px), 22px); line-height: 1.4;
  color: var(--ink-2);
  animation: rise .8s var(--ease) .28s both;
}
.hero__sub span { display: block; }
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px;
  animation: rise .8s var(--ease) .36s both;
}
.hero__primary { min-width: 340px; }
.hero__secondary { min-width: 236px; }

/* ---------- Преимущества ---------- */
.benefits {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: var(--benefits-h);
  padding-inline: var(--page-pad);
  background: var(--tile);
  border-top: 1px solid rgba(20, 45, 67, .08);
  animation: rise .7s var(--ease) .5s both;
}
.benefit {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  padding: 28px clamp(16px, 2.4vw, 48px);
}
.benefit:first-child { padding-left: 0; }
.benefit + .benefit::before {
  content: ""; position: absolute; left: 0; top: 34px; bottom: 34px; width: 1px; background: var(--line-soft);
}
.benefit__icon {
  display: grid; place-items: center; flex: none;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--blue); color: #fff;
  transition: background-color .25s ease;
}
.benefit__icon .icon { width: 26px; height: 26px; stroke-width: 1.7; }
.benefit:hover .benefit__icon { background: var(--blue-btn); }
.benefit__text { display: grid; gap: 4px; }
.benefit__text b { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.benefit__text span { font-size: 14.5px; color: var(--ink-2); }

/* ==========================================================================
   Секции
   ========================================================================== */
.section { padding-block: clamp(88px, 11vw, 160px); }
.section--white { background: var(--tile); }
.section__head { max-width: 860px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section__head--row .section__lead { margin-top: 0; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.section__title {
  font-size: clamp(38px, 5.2vw, 72px);
  font-weight: 650; line-height: 1.04; letter-spacing: -0.034em;
  text-wrap: balance;
}
.section__lead { margin-top: 20px; max-width: 46ch; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.42; color: var(--ink-2); }

/* слова заголовков для анимации */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; }

/* ---------- Бенто ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile { position: relative; border-radius: var(--radius-tile); background: var(--tile); overflow: hidden; }
.tile--a { grid-column: span 7; min-height: 600px; }
.tile--b { grid-column: span 5; min-height: 600px; }
.tile--c { grid-column: span 5; min-height: 520px; }
.tile--d { grid-column: span 7; min-height: 520px; }
.tile__media { position: absolute; inset: 0; overflow: hidden; }
.tile__media img { width: 100%; height: 115%; object-fit: cover; transition: scale 1.2s var(--ease); }
.tile--b .tile__media img { object-position: 46% 50%; }
.tile--c .tile__media img { object-position: 62% 50%; }
.tile--photo:hover .tile__media img { scale: 1.035; }
.tile__copy { position: relative; padding: clamp(28px, 3vw, 40px); max-width: 30rem; }
.tile__copy p { margin-top: 8px; color: var(--ink-2); font-size: 17px; }
.tile__copy--light { color: #fff; }
.tile__copy--light p { color: rgba(255, 255, 255, .86); }
.tile--b::before, .tile--c::before {
  content: ""; position: absolute; inset: 0 0 40% 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 16, 26, .66), rgba(10, 16, 26, .28) 55%, rgba(10, 16, 26, 0));
  pointer-events: none;
}
.tile--b .tile__copy, .tile--c .tile__copy { z-index: 2; }
.tile__title { font-size: clamp(26px, 2.4vw, 34px); font-weight: 650; letter-spacing: -0.028em; line-height: 1.1; }
.tile--a::before {
  content: ""; position: absolute; inset: 0 0 50% 0; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.tile--a .tile__copy { z-index: 2; }
.tile--plain { padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.services { display: grid; gap: 26px; }
.services li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; }
.services .icon {
  width: 48px; height: 48px; padding: 12px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue); stroke-width: 1.7;
}
.services b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.services span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 16px; line-height: 1.45; }

/* ---------- Профили ---------- */
.profiles {
  margin-top: 20px; padding: clamp(24px, 3vw, 40px) clamp(24px, 3.4vw, 48px);
  border-radius: var(--radius-tile); background: var(--tile);
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
}
.profiles__copy { max-width: 34rem; }
.profiles__label { font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.profiles__text { margin-top: 8px; font-size: 17px; line-height: 1.45; color: var(--ink); }
.profiles__list { display: flex; flex-wrap: wrap; justify-content: center; }
.profiles__list li {
  padding: 6px clamp(18px, 2.4vw, 40px);
  font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: .02em; line-height: 1;
  color: var(--ink-strong);
}
.profiles__list li + li { border-left: 1px solid var(--line); }

/* ---------- Балконы ---------- */
.balc { display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: 24px; align-items: stretch; }
.balc__chips { display: grid; gap: 10px; align-content: center; }
.chip {
  position: relative; text-align: left;
  display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto 0fr; column-gap: 12px;
  padding: 16px 22px; border: 0; border-radius: 26px;
  background: var(--canvas); color: var(--ink);
  transition: grid-template-rows .6s var(--ease), background-color .3s, padding .6s var(--ease);
}
.chip:hover { background: var(--line-soft); }
.chip.is-active { grid-template-rows: auto 1fr; padding-block: 22px 26px; background: var(--canvas); }
.chip__plus {
  grid-row: 1; width: 26px; height: 26px; border-radius: 50%; align-self: center;
  background: var(--ink); position: relative; transition: transform .5s var(--ease), background-color .3s;
}
.chip__plus::before, .chip__plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.8px; background: #fff;
  border-radius: 2px; transform: translate(-50%, -50%);
}
.chip__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.chip.is-active .chip__plus { transform: rotate(45deg); background: var(--blue); }
.chip__label { grid-row: 1; align-self: center; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.chip__text {
  grid-column: 2; grid-row: 2; overflow: hidden; min-height: 0;
  font-size: 16px; color: var(--ink-2); line-height: 1.45;
}
.chip.is-active .chip__text { padding-top: 8px; }
.chip__bar { position: absolute; left: 22px; right: 22px; bottom: 10px; height: 2px; border-radius: 2px; background: transparent; overflow: hidden; }
.chip__bar i { position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.chip.is-active .chip__bar { background: var(--line-soft); }

.balc__media {
  position: relative; border-radius: var(--radius-tile); overflow: hidden; background: var(--canvas);
  aspect-ratio: 4 / 3;
}
.balc__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; scale: 1.06;
  transition: opacity 1s var(--ease), scale 1.6s var(--ease);
}
.balc__media img.is-active { opacity: 1; scale: 1; }
.balc__media img[src*="balcony-sliding"] { object-position: 50% 42%; }
.balc__media img[src*="balcony-white"] { object-position: 50% 48%; }

/* ---------- Калькулятор ---------- */
.calc {
  background: var(--tile); border-radius: 32px;
  padding: clamp(16px, 2.4vw, 32px);
}
.segmented {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  margin: 0 auto 24px; padding: 4px; border-radius: var(--radius-pill); background: var(--canvas);
  left: 50%; transform: translateX(-50%);
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: transparent;
  padding: 10px 28px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color .3s;
}
.segmented button.is-active { color: var(--ink); }
.segmented__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: var(--radius-pill); background: var(--tile);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .5s var(--ease);
}
.segmented[data-mode="balcony"] .segmented__thumb { transform: translateX(100%); }

.calc__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); }
.calc__stage {
  position: relative; border-radius: 22px; padding: 20px 20px 16px;
  background-color: var(--canvas);
  background-image: radial-gradient(rgba(0, 0, 0, .09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  display: flex; flex-direction: column; min-height: 100%;
}
.calc__svg { width: 100%; height: auto; flex: 1; min-height: 300px; overflow: visible; }
.calc__hint { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.calc__sashes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; min-height: 36px; }
.sash-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--tile); font-size: 14px; color: var(--ink);
  transition: border-color .2s, background-color .2s;
}
.sash-btn:hover { border-color: var(--blue); }
.sash-btn b { font-weight: 600; }
.sash-btn .icon { width: 14px; height: 14px; color: var(--ink-3); }

/* схема */
.s-frame { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.s-inner { fill: none; stroke: #9a9aa0; stroke-width: 1; }
.s-sash { cursor: pointer; }
.s-sash .s-sash-rect { fill: #fff; stroke: var(--ink); stroke-width: 1.2; transition: fill .2s; }
.s-sash .s-glass { fill: #e9f2fc; stroke: #9fb3c8; stroke-width: .8; transition: fill .2s; }
.s-sash:hover .s-glass, .s-sash:focus-visible .s-glass { fill: #d9e9fb; }
.s-sash:focus { outline: none; }
.s-sash:focus-visible .s-sash-rect { stroke: var(--blue); stroke-width: 2.4; }
.s-open { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-linejoin: round; }
.s-open--tilt { stroke-dasharray: 6 5; }
.s-handle { fill: var(--ink); }
.s-dim { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.s-dim-text { font: 600 15px var(--font); fill: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.s-label { font: 500 13px var(--font); fill: var(--ink-2); }
.s-wall { fill: #e3e3e8; }
.s-glazing { fill: #e9f2fc; stroke: var(--ink); stroke-width: 1.2; }
.s-side { fill: #dfeaf7; stroke: var(--ink); stroke-width: 1.2; }
.s-slide { stroke: var(--blue); stroke-width: 1.4; fill: none; }

.calc__panel { display: flex; flex-direction: column; gap: 22px; padding: 8px 4px; }
.field { display: grid; gap: 10px; }
.field > legend, .label, .range-head label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field > legend { margin-bottom: 10px; }
.types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#balc-shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.type { position: relative; }
.type input { position: absolute; opacity: 0; pointer-events: none; }
.type > span {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 12px 6px 10px; border-radius: 16px; border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.2; color: var(--ink-2); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, color .2s;
}
.type svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.type svg .thin { stroke-width: 1; stroke-dasharray: 3 3; }
.type > span:hover { border-color: #aeaeb3; }
.type input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--ink); }
.type input:focus-visible + span { outline: 3px solid rgba(22, 137, 232, .45); outline-offset: 2px; }

.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-head output { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.range {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--blue) var(--fill), var(--line) var(--fill));
}
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--blue); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .22), 0 0 0 .5px rgba(0, 0, 0, .06);
  transition: transform .2s var(--ease);
}
.range::-moz-range-thumb {
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .22), 0 0 0 .5px rgba(0, 0, 0, .06);
}
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(22, 137, 232, .35), 0 1px 6px rgba(0, 0, 0, .22); }

.seg-small { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-small--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-small--4 span { padding-inline: 6px; font-size: 13.5px; }
.seg-small label, .checks label { position: relative; }
.seg-small input, .checks input { position: absolute; opacity: 0; pointer-events: none; }
.seg-small span, .checks span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.2;
  transition: border-color .2s, color .2s, background-color .2s, box-shadow .2s;
}
.seg-small span:hover, .checks span:hover { border-color: #aeaeb3; }
.seg-small input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks span { border-radius: var(--radius-pill); padding-inline: 16px; gap: 6px; }
.checks input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--ink); }
.checks input:checked + span::before {
  content: ""; width: 10px; height: 6px; border-left: 1.8px solid var(--blue); border-bottom: 1.8px solid var(--blue);
  transform: rotate(-45deg) translate(1px, -2px);
}
.seg-small input:focus-visible + span, .checks input:focus-visible + span { outline: 3px solid rgba(22, 137, 232, .45); outline-offset: 2px; }

.calc__send {
  margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: grid; gap: 8px;
}
.calc__total-label { font-size: 14px; color: var(--ink-2); }
.calc__summary { display: grid; gap: 4px; min-height: 3.2em; }
.calc__summary b { font-size: clamp(20px, 1.7vw, 24px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; color: var(--ink-strong); }
.calc__summary span { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.calc__stage, .calc__panel { min-width: 0; }
.calc__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.calc__actions .btn { flex: 1 1 auto; }
.calc__note { font-size: 13px; color: var(--ink-2); margin-top: -8px; }

/* ---------- Этапы ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps__rail { position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: var(--line-soft); }
.steps__rail i { position: absolute; inset: 0; background: var(--blue); transform-origin: left; }
.step { position: relative; }
.step__num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tile); border: 1.6px solid var(--line); color: var(--ink-2);
  font-weight: 600; font-size: 17px; margin-bottom: 26px;
  transition: background-color .4s, border-color .4s, color .4s;
}
.step.is-on .step__num { background: var(--blue-btn); border-color: var(--blue-btn); color: #fff; }
.step h3 { font-size: 23px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.step p { margin-top: 10px; color: var(--ink-2); max-width: 26ch; }

/* ---------- Наши работы ---------- */
.works { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 36px 20px; }
.work { display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 0; }
.work--xl { grid-column: span 8; }
.work--tall { grid-column: span 4; }
.work--half { grid-column: span 6; }
.work--third { grid-column: span 4; }
.work--pair { grid-column: 1 / -1; }
.work--quarter { grid-column: span 3; }
.work__media {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden;
  background: var(--line-soft); cursor: zoom-in;
}
.work--tall .work__media, .work--quarter .work__media { aspect-ratio: auto; flex: 1; min-height: 380px; }
/* фото одного ряда выравниваются по общим линиям сетки, даже если подписи разной длины */
@supports (grid-template-rows: subgrid) {
  .work { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 14px; }
  .work--tall .work__media, .work--quarter .work__media { min-height: 0; }
}
.work__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), scale 1.4s var(--ease-expo);
}
.work__media:hover img { transform: scale(1.04); }
.work__media:focus-visible { outline-offset: 4px; border-radius: 24px; }
.work__zoom {
  position: absolute; right: 14px; bottom: 14px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--ink-strong);
  box-shadow: 0 6px 18px rgba(20, 45, 67, .18);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .4s var(--ease);
}
.work__media:hover .work__zoom, .work__media:focus-visible .work__zoom { opacity: 1; transform: none; }
@media (hover: none) { .work__zoom { opacity: 1; transform: none; width: 38px; height: 38px; } }
.work__zoom .icon { width: 20px; height: 20px; }
.work__tag {
  position: absolute; left: 14px; top: 14px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .94); color: var(--ink-strong);
  font-size: 13px; font-weight: 600;
}
.work__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.work__pair .work__media { aspect-ratio: 16 / 10; }
.work figcaption { display: grid; gap: 3px; }
.work figcaption b { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink-strong); }
.work figcaption span { font-size: 15px; line-height: 1.4; color: var(--ink-2); }

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(9, 18, 29, .975); color: #fff;
  overscroll-behavior: contain;
}
.lightbox[open] { display: grid; place-items: center; animation: fade-in .3s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox__figure {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 100%; padding: 72px 96px 32px;
}
.lightbox__img {
  display: block; max-width: min(1280px, 100%); max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px);
  width: auto; height: auto; border-radius: 14px;
  transition: opacity .25s ease, transform .35s var(--ease);
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; touch-action: pan-y;
}
.lightbox__img.is-loading { opacity: 0; transform: scale(.985); }
.lightbox__caption {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  font-size: 15px; line-height: 1.4; text-align: center; color: rgba(255, 255, 255, .88);
}
.lightbox__count { color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  transition: background-color .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .24); }
.lightbox__btn .icon { width: 24px; height: 24px; stroke-width: 2; }
.lightbox__btn:focus-visible { outline-color: #fff; border-radius: 50%; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Отзывы ---------- */
.score { text-align: center; display: grid; justify-items: center; }
.score .eyebrow { margin-bottom: 8px; }
.score__value {
  font-size: clamp(110px, 17vw, 220px); font-weight: 650; letter-spacing: -0.055em; line-height: .95;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #142d43 30%, #4a6886);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score__stars { margin-top: 12px; color: var(--star); font-size: 26px; letter-spacing: 4px; }
.score__label { margin-top: 6px; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }
.score .link-arrow { margin-top: 18px; }

.marquee { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 16px; overflow: hidden; }
.marquee__row { overflow: hidden; }
.marquee__track { display: flex; gap: 16px; width: max-content; }
.motion .marquee__track { animation: marquee var(--dur, 70s) linear infinite paused; }
.marquee.is-running .marquee__track { animation-play-state: running; }
.motion .marquee__row[data-dir="1"] .marquee__track { animation-direction: reverse; }
.marquee__row:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.review {
  flex: none; width: 380px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  padding: 26px 28px; border-radius: 24px; background: var(--canvas);
}
.review p { font-size: 17px; line-height: 1.5; }
.review p::before { content: "★★★★★"; display: block; color: var(--star); font-size: 14px; letter-spacing: 2px; margin-bottom: 12px; }
.review footer { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.review footer span { color: var(--ink-2); }

/* ---------- Контакты ---------- */
.contact { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.contact__form { padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px; align-content: start; }
.label { display: block; }
.input {
  width: 100%; min-height: 52px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--tile);
  font-size: 17px; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 137, 232, .16); }
.input[aria-invalid="true"] { border-color: #d70015; }
textarea.input { resize: vertical; min-height: 96px; }
.field__error { color: #d70015; font-size: 14px; }
.form__actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.form__actions--single { grid-template-columns: 1fr; }
.form__note { font-size: 13px; color: var(--ink-2); text-align: center; margin-top: -8px; }
.form__done {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px; border-radius: 16px; background: var(--blue-soft);
}
.form__done .icon { color: var(--blue); width: 24px; height: 24px; stroke-width: 2.2; }

.contact__info { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 26px; }
.contact__phones { display: grid; gap: 4px; }
.contact__phones a {
  font-size: clamp(26px, 2.4vw, 32px); font-weight: 650; letter-spacing: -0.03em;
  transition: color .2s;
}
.contact__phones a:hover { color: var(--blue); }
.contact__phones .contact__email {
  margin-top: 6px; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--link);
}
.contact__phones .contact__email:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.contact__messengers { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__list { display: grid; gap: 18px; }
.contact__list dt { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.contact__list dd { font-size: 17px; line-height: 1.45; }
.contact__list .muted { font-size: 15px; }
.contact__info .link-arrow { margin-top: auto; }

.contact__map { grid-column: 1 / -1; height: clamp(300px, 34vw, 420px); background: var(--line-soft); }
.contact__map { display: block; overflow: hidden; }
.contact__map-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
/* живая карта 2ГИС поверх заставки (Leaflet, тайлы 2ГИС) */
.contact__map { isolation: isolate; }
.contact__map-live {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0; transition: opacity .6s var(--ease);
}
.contact__map.is-live .contact__map-live { opacity: 1; }
.contact__map .leaflet-container { width: 100%; height: 100%; background: #dfeaf6; font: inherit; }
/* перекрашиваем только подложку карты в синий сайта, маркер остаётся ярким */
.contact__map .map-tiles,
.contact__map-img { filter: url(#map-duotone); }
.map-filter { position: absolute; width: 0; height: 0; overflow: hidden; }
.map-marker svg, .map-pin-static svg { display: block; width: 36px; height: 46px; filter: drop-shadow(0 6px 10px rgba(14, 118, 214, .35)); }
.map-pin-static { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-18px, -45px); pointer-events: none; }
.contact__map.is-live .map-pin-static,
.contact__map.is-live .map-credit { visibility: hidden; }
.contact__map .leaflet-control-zoom { margin: 16px 16px 0 0; border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(20, 45, 67, .14); }
.contact__map .leaflet-control-zoom a {
  width: 40px; height: 40px; line-height: 40px; font-size: 20px; font-weight: 500;
  color: var(--ink-strong); border-bottom-color: var(--line-soft);
}
.contact__map .leaflet-control-zoom a:hover { background: var(--blue-soft); color: var(--blue-btn); }
.contact__map .leaflet-control-attribution {
  padding: 2px 8px; border-radius: 8px 0 0 0;
  background: rgba(255, 255, 255, .85); font-size: 11px; color: var(--ink-2);
}
.contact__map .leaflet-control-attribution a { color: var(--link); }
.map-activate {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center; padding: 0 0 18px;
  border: 0; background: transparent; cursor: pointer;
}
.map-activate span {
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: rgba(20, 45, 67, .86); color: #fff; font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease);
}
.map-activate:hover span, .map-activate:focus-visible span { opacity: 1; transform: none; }
.map-activate:focus-visible { outline-offset: -4px; }
@media (hover: none) { .map-activate span { opacity: 1; transform: none; } }
.contact__map.is-active .map-activate { display: none; }
.map-credit {
  position: absolute; left: 12px; bottom: 10px;
  padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .85);
  font-size: 11px; color: var(--ink-2);
}

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line-soft); padding-block: 48px 28px; font-size: 14px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__brand { display: grid; gap: 16px; align-content: start; max-width: 32ch; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; align-content: start; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--blue); }
.footer__contact { display: grid; gap: 8px; align-content: start; font-size: 16px; font-weight: 500; }
.footer__contact .muted { font-size: 14px; font-weight: 400; }
.footer__legal {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: 13px; line-height: 1.5;
}
.footer__docs { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__docs a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.footer__docs a:hover { color: var(--blue-btn); text-decoration-color: currentColor; }

/* ---------- Согласие на обработку данных ---------- */
.consent { display: grid; gap: 6px; }
.consent__label { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.consent__input { position: absolute; width: 22px; height: 22px; margin: 0; opacity: 0; }
.consent__box {
  position: relative; flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid #9fb0c2; border-radius: 6px; background: #fff;
  transition: background-color .2s, border-color .2s;
}
.consent__box::after {
  content: ""; position: absolute; left: 6.5px; top: 2.5px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0);
  transition: transform .2s var(--ease);
}
.consent__input:checked + .consent__box { background: var(--blue-btn); border-color: var(--blue-btn); }
.consent__input:checked + .consent__box::after { transform: rotate(45deg) scale(1); }
.consent__input:focus-visible + .consent__box { outline: 3px solid rgba(22, 137, 232, .45); outline-offset: 2px; }
.consent__input[aria-invalid="true"] + .consent__box { border-color: #d70015; }
.consent__text { font-size: 15px; line-height: 1.45; color: var(--ink); }
.consent__text a, .form__note a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.form__note { line-height: 1.5; }

/* ---------- Страницы документов ---------- */
.doc-page { background: var(--canvas); }
.doc-header { background: #fff; border-bottom: 1px solid var(--line-soft); }
.doc-header__inner {
  width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.doc {
  width: min(820px, 100% - 2 * var(--gutter)); margin: 40px auto 48px;
  padding: clamp(24px, 4.4vw, 56px);
  border-radius: var(--radius-tile); background: #fff;
}
.doc h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 750; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink-strong); text-wrap: balance; }
.doc__meta { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.doc h2 { margin-top: 36px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-strong); }
.doc p { margin-top: 12px; font-size: 16px; line-height: 1.6; }
.doc ul { margin-top: 10px; padding-left: 22px; list-style: disc; }
.doc li { margin-top: 6px; font-size: 16px; line-height: 1.6; }
.doc li::marker { color: var(--blue); }
.doc a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.doc__card { margin-top: 14px; padding: 18px 22px; border-radius: 16px; background: var(--canvas); }
.doc__card p { margin-top: 4px; }
.doc__card p:first-child { margin-top: 0; }
.doc-footer { width: min(820px, 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: 40px; text-align: center; font-size: 13px; color: var(--ink-2); }

/* ---------- Нижняя панель на телефоне ---------- */
.dock { display: none; }

/* ==========================================================================
   Анимация появления (только когда работает JS)
   ========================================================================== */
.motion .reveal {
  opacity: 0; transform: translateY(48px);
  transition: opacity 1.1s var(--ease-expo) var(--stagger, 0s), transform 1.1s var(--ease-expo) var(--stagger, 0s);
}
.motion .reveal.is-in { opacity: 1; transform: none; }

/* заголовки поднимаются по словам */
.motion .reveal-lines .w > span { transform: translateY(110%); transition: transform 1.1s var(--ease-expo) calc(var(--i, 0) * 50ms); }
.motion .reveal-lines.is-in .w > span { transform: none; }

/* этапы: появляются лесенкой, линия заполняется по мере прокрутки */
.motion .step { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo); }
.motion .step:nth-child(3) { transition-delay: .12s; }
.motion .step:nth-child(4) { transition-delay: .24s; }
.motion .step:nth-child(5) { transition-delay: .36s; }
.motion .steps.is-in .step { opacity: 1; transform: none; }
.motion .steps__rail i { transform: scaleX(0); transition: transform 1.4s var(--ease-expo) .2s; }
.motion .steps.is-in .steps__rail i { transform: none; }

/* фото работ слегка «приближаются» при появлении */
.motion .work__media img { scale: 1.08; }
.motion .work__media.is-in img { scale: 1; }

/* пульс метки на карте только пока карта на экране */

/*
 * Привязка к прокрутке без JS: браузер ведёт эти анимации сам, в потоке
 * композитора. Где такой поддержки нет, параллакса просто нет, а линия
 * этапов заполняется обычным переходом.
 */
@supports (animation-timeline: view()) {
  .motion .tile__media img {
    animation: tile-parallax linear both;
    animation-timeline: view();
    animation-range: cover;
  }
  .motion .steps { view-timeline: --steps block; }
  .motion .steps__rail i,
  .motion .steps.is-in .steps__rail i {
    transform: none;
    transition: none;
    animation: rail-fill-x linear both;
    animation-timeline: --steps;
    animation-range: cover 20% cover 55%;
  }
}
@keyframes tile-parallax { from { transform: translateY(-12%); } to { transform: none; } }
@keyframes rail-fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rail-fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }


/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1439px) {
  .site-header__inner { gap: 20px; }
  .site-nav { gap: 22px; }
  .header-cta { padding: 0 24px; }
  .benefit { gap: 14px; padding-inline: clamp(14px, 1.8vw, 32px); }
  .benefit:first-child { padding-left: 0; }
  .benefit__icon { width: 54px; height: 54px; }
  .brand__name { font-size: 24px; }
  .brand__sub { font-size: 12.5px; }
  .brand__mark { width: 46px; }
}

@media (max-width: 1279px) {
  .site-nav { display: none; }
  .burger { display: inline-block; }
  .header-phones { margin-left: auto; }
  .hero__content { width: min(60%, 860px); }
  .btn--hero { padding: 0 26px; font-size: 17px; }
  .hero__primary, .hero__secondary { min-width: 0; }
}

@media (max-width: 1199px) {
  :root { --benefits-h: 210px; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 0; }
  .benefit { padding: 22px var(--page-pad); }
  .benefit:first-child { padding-left: var(--page-pad); }
  .benefit + .benefit::before { display: none; }
  .benefit:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .benefit:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 1023px) {
  :root { --header-h: 76px; --header-h-compact: 64px; }
  .header-cta { display: none; }
  .brand__mark { width: 42px; }

  .hero__main { height: auto; flex-direction: column; align-items: stretch; overflow: visible; }
  .hero__content { order: -1; width: auto; padding: 36px var(--page-pad) 32px; }
  .hero__title { font-size: clamp(38px, calc(4.6vw + 20px), 58px); margin-top: 18px; }
  .hero__sub { margin-top: 20px; }
  .hero__actions { margin-top: 30px; }
  .hero__media { position: relative; width: 100%; height: clamp(300px, 70vw, 460px); }
  .hero__media::before { background: linear-gradient(180deg, var(--canvas) 0%, rgba(248, 250, 252, 0) 18%); }
  .hero__media img { object-position: 64% 50%; }


  .bento { grid-template-columns: 1fr; gap: 16px; }
  .tile--a, .tile--b, .tile--c, .tile--d { grid-column: auto; min-height: 460px; }
  .tile--d { min-height: 0; }

  .balc { grid-template-columns: 1fr; }
  .balc__media { order: -1; aspect-ratio: 4 / 3.2; }

  .calc__body { grid-template-columns: 1fr; }
  .calc__svg { min-height: 240px; }

  .steps { grid-template-columns: 1fr; gap: 0; padding-left: 64px; }
  .steps__rail { left: 21px; right: auto; top: 22px; bottom: 60px; width: 2px; height: auto; }
  .steps__rail i { transform-origin: top; }
  .motion .steps__rail i { transform: scaleY(0); }
  .motion .steps.is-in .steps__rail i { transform: none; }
  .step { padding-bottom: 36px; }
  .step__num { position: absolute; left: -64px; top: 0; margin: 0; }
  .step h3 { padding-top: 8px; }

  .contact { grid-template-columns: 1fr; }

  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .work--xl, .work--pair { grid-column: 1 / -1; }
  .work--tall, .work--half, .work--third, .work--quarter { grid-column: auto; }
  /* на планшете карточки в две колонки квадратные, чтобы ряды были ровными */
  .work--tall .work__media, .work--half .work__media, .work--third .work__media, .work--quarter .work__media { flex: none; aspect-ratio: 1 / 1; min-height: 0; }
  .lightbox__figure { padding: 68px 16px 104px; }
  .lightbox__img { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 28px; transform: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }

  .footer__inner { grid-template-columns: 1fr; }

  .dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
    padding: 8px; border-radius: 26px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05);
    transform: translateY(140%); transition: transform .6s var(--ease);
  }
  .dock.is-visible { transform: none; }
  .dock .btn { min-height: 48px; font-size: 16px; padding-inline: 12px; }
  .footer { padding-bottom: 110px; }
}

@media (max-width: 767px) {
  .contact__map { height: 340px; }
  .header-phones { display: none; }
  .burger { margin-left: auto; }
  .brand { gap: 10px; }
  .brand__mark { width: 38px; }
  .brand__name { font-size: 22px; }
  .brand__sub { font-size: 11.5px; margin-top: 4px; }

  .hero__content { padding-top: 30px; }
  .hero__label { font-size: 13px; gap: 12px; }
  .hero__label::before { width: 32px; }
  .hero__actions { flex-direction: column; gap: 12px; }
  .hero__primary, .hero__secondary { min-width: 0; width: 100%; }
  .btn--hero { min-height: 58px; font-size: 17px; }
  .hero__media { height: clamp(300px, 86vw, 400px); }

  .benefit { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 16px; }
  .benefit:first-child { padding-left: 16px; }
  .benefit__icon { width: 48px; height: 48px; }
  .benefit__icon .icon { width: 22px; height: 22px; }
  .benefit__text b { font-size: 16px; }
  .benefit__text span { font-size: 14px; }
}

@media (max-width: 640px) {
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #balc-shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg-small { grid-template-columns: 1fr; }
  .calc { border-radius: 26px; }
  .calc__stage { padding: 12px 8px; }
  .calc__actions .btn { width: 100%; }
  .calc__actions .btn, .form__actions .btn { padding-inline: 16px; white-space: normal; text-align: center; }
  .form__actions { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; gap: 28px; }
  .work--tall .work__media, .work--quarter .work__media { flex: none; aspect-ratio: 4 / 5; min-height: 0; }
  .work--half .work__media, .work--third .work__media { aspect-ratio: 4 / 3; }
  .seg-small.seg-small--4 { grid-template-columns: 1fr 1fr; }
  .profiles__list { gap: 8px 24px; }
  .profiles__list li { padding: 0; font-size: 20px; }
  .profiles__list li + li { border-left: 0; }
  .work__pair { gap: 10px; }
  .work__pair .work__media { aspect-ratio: 3 / 4; border-radius: 20px; }
  .work__media { border-radius: 20px; }
  .work__tag { left: 10px; top: 10px; font-size: 12px; padding: 4px 10px; }
  .review { width: 300px; padding: 22px; }
  .review p { font-size: 16px; }
  .section__head--row { display: block; }
  .section__head--row .section__lead { margin-top: 16px; }
}

@media (max-width: 359px) {
  .brand__mark { width: 32px; }
  .brand__name { font-size: 20px; }
  .brand__sub { font-size: 10.5px; }
}

@media (max-width: 379px) {
  .dock { left: 8px; right: 8px; gap: 6px; padding: 6px; }
  .dock .btn { font-size: 14px; padding-inline: 8px; gap: 6px; }
  .dock .icon { width: 17px; height: 17px; }
}

/* ==========================================================================
   Уменьшенное движение
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee__row { overflow-x: auto; }
}

@supports (animation-timeline: view()) {
  @media (max-width: 1023px) {
    .motion .steps__rail i,
    .motion .steps.is-in .steps__rail i { animation-name: rail-fill-y; animation-range: cover 18% cover 65%; }
  }
}

