/* ---------- Шрифты: Manrope (текст) и Actay Wide (заголовки, из брендбука) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyrillic-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Actay Wide";
  src: url("../fonts/ActayWide-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #0b1626;
  --ink-2: #13233a;
  --ink-3: #1c3150;
  --blue: #1f6fd1;
  --sky: #7fd3ff;
  --ice: #e8f4ff;
  --yellow: #f5b301;
  --red: #e8392d;
  --text: #0f1b2b;
  --muted: #5d6c80;
  --line: #e2e8f0;
  --bg: #ffffff;
  --tint: #f3f7fb;
  --radius: 22px;
  --shadow: 0 20px 50px -20px rgba(11, 22, 38, .25);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --head: "Actay Wide", "Arial Black", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0; overflow-x: clip;
  font: 500 17px/1.65 var(--body);
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.015em; }
h2 { font-size: clamp(30px, 4.2vw, 50px); }
h3 { font-size: 19px; line-height: 1.2; }
p { margin: 0 0 1em; }
::selection { background: var(--sky); color: var(--ink); }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: var(--blue); margin-bottom: 14px;
}
.eyebrow--light { color: var(--sky); }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 17px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 800 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s, color .2s;
  will-change: transform;
}
.btn i { font-style: normal; transition: transform .25s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #ff5a3c, var(--red) 55%, #c9241a);
  box-shadow: 0 14px 30px -10px rgba(232, 57, 45, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { box-shadow: 0 18px 40px -10px rgba(232, 57, 45, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--glass {
  color: #fff; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .16); }
.btn--big { padding: 20px 34px; font-size: 18px; }
.btn--block { width: 100%; }
.link { font-weight: 800; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Полоса прокрутки сверху ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 70; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--sky), var(--blue), var(--yellow), var(--red));
}

/* ---------- Шапка ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; color: #fff;
  transition: background .3s, box-shadow .3s, color .3s;
}
.header.is-scrolled {
  background: rgba(255, 255, 255, .9); color: var(--ink);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(11, 22, 38, .3);
}
.header__row { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text b { font-family: var(--head); font-size: 18px; letter-spacing: .02em; }
.brand__text small { font-size: 12px; opacity: .7; letter-spacing: .05em; margin-top: 3px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { position: relative; color: inherit; text-decoration: none; font-weight: 700; font-size: 15px; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.header__phones { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.header__phone { font-weight: 800; font-size: 18px; color: inherit; text-decoration: none; white-space: nowrap; }
.header__phone svg { display: none; }
.header__phone--small { font-size: 13px; font-weight: 600; opacity: .7; }
.burger { display: none; flex-shrink: 0; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; color: inherit; }
.burger span, .burger span::before, .burger span::after {
  display: block; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: .25s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; right: 0; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; padding: 120px 0 40px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--ink); color: #fff;
}
.hero__gl, .hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__fallback {
  z-index: -3;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(31, 111, 209, .55), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(232, 57, 45, .35), transparent 70%),
    var(--ink);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 22, 38, .2), rgba(11, 22, 38, 0) 30%, rgba(11, 22, 38, .55));
}
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: rgba(255, 255, 255, .8);
  padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px); margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.hero__title { font-size: clamp(40px, 5.3vw, 78px); line-height: 1; margin-bottom: 26px; }
.hero__title .line { display: block; }
.line--accent {
  background: linear-gradient(90deg, var(--sky), #b7e6ff 40%, #ffd36b 75%, #ff7a59);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.hero__lead { font-size: 19px; color: rgba(255, 255, 255, .78); max-width: 580px; }
.hero__lead b { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__visual { position: relative; }
.hero__photo {
  margin: 0; border-radius: 28px; overflow: hidden; transform: perspective(1000px) rotateY(var(--ry, -6deg)) rotateX(var(--rx, 2deg));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12);
  transition: transform .4s var(--ease);
}
.hero__photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.thermo {
  position: absolute; left: -36px; bottom: -34px; width: 178px; height: 178px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: rgba(11, 22, 38, .55); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(16px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.thermo__ring { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); transform: rotate(-90deg); }
.thermo__track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 6; }
.thermo__bar {
  fill: none; stroke: url(#ring); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke .5s;
}
.thermo__value { font-family: var(--head); font-size: 44px; line-height: 1; margin-top: 8px; }
.thermo__value sup { font-size: 16px; vertical-align: top; margin-left: 2px; opacity: .8; }
.thermo__label { position: absolute; bottom: 38px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.chip {
  position: absolute; padding: 10px 16px; border-radius: 14px; font-size: 13px; color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(12px);
  animation: float 6s ease-in-out infinite; white-space: nowrap;
}
.chip b { font-family: var(--head); color: #fff; margin-right: 4px; }
.chip--1 { top: -18px; right: 24px; }
.chip--2 { right: -18px; bottom: 70px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.hero__facts {
  list-style: none; padding: 0; margin-top: 70px; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__facts li { padding: 22px 20px 0 0; }
.hero__facts li + li { padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, .14); }
.hero__facts b { display: block; font-family: var(--head); font-size: clamp(28px, 3.4vw, 42px); line-height: 1; }
.hero__facts span { display: block; margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .65); }
.hero__scroll {
  position: absolute; left: 50%; bottom: 18px; width: 24px; height: 38px; margin-left: -12px;
  border: 2px solid rgba(255, 255, 255, .35); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Бегущая строка ---------- */
.marquee {
  position: relative; z-index: 2; margin: -22px 0; padding: 18px 0; overflow: hidden;
  background: var(--yellow); color: var(--ink); transform: rotate(-1.6deg) scale(1.04);
  box-shadow: 0 20px 40px -20px rgba(11, 22, 38, .4);
}
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--head); font-size: 22px; text-transform: uppercase; white-space: nowrap; }
.marquee i { font-style: normal; color: var(--red); font-size: 18px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section { position: relative; padding: 120px 0; }
.section--tinted { background: var(--tint); }
.head { max-width: 820px; margin-bottom: 52px; }
.head p { font-size: 18px; color: var(--muted); }
.head--light p { color: rgba(255, 255, 255, .7); }
.head__num {
  display: inline-block; font-family: var(--head); font-size: 14px; color: var(--blue);
  padding: 6px 12px; border-radius: 999px; background: var(--ice); margin-bottom: 18px;
}
.head--light .head__num, .head__num--light { background: rgba(127, 211, 255, .14); color: var(--sky); }
.subhead { margin: 64px 0 22px; font-size: 22px; }

/* Почему я */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.card:hover { box-shadow: var(--shadow); border-color: transparent; }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(31, 111, 209, .09), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); margin: 0; }
.card__icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; margin-bottom: 22px; color: #fff;
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__icon--blue { background: linear-gradient(135deg, #4aa3ff, var(--blue)); box-shadow: 0 10px 20px -8px rgba(31, 111, 209, .6); }
.card__icon--yellow { background: linear-gradient(135deg, #ffd34d, var(--yellow)); color: var(--ink); box-shadow: 0 10px 20px -8px rgba(245, 179, 1, .6); }
.card__icon--red { background: linear-gradient(135deg, #ff7058, var(--red)); box-shadow: 0 10px 20px -8px rgba(232, 57, 45, .6); }

/* Услуги — бенто */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 18px; }
.bento__main {
  grid-column: span 2; grid-row: span 2; position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 460px; color: #fff; display: flex; align-items: flex-end;
}
.bento__main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.bento__main:hover img { transform: scale(1.05); }
.bento__main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 22, 38, 0) 25%, rgba(11, 22, 38, .92)); }
.bento__body { position: relative; z-index: 1; padding: 34px; }
.bento__body h3 { font-size: 28px; }
.bento__body p { color: rgba(255, 255, 255, .8); }
.bento__body .link { color: var(--yellow); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; background: var(--red); margin-bottom: 14px;
}
.bento__item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.bento__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bento__item > b { display: block; font-family: var(--head); font-size: 13px; color: var(--blue); margin-bottom: 18px; }
.bento__item p { color: var(--muted); margin: 0; font-size: 15px; }
.bento__item:nth-of-type(2), .bento__item--dark { grid-column: span 2; }
.bento__item--dark { background: var(--ink); color: #fff; border: 0; }
.bento__item--dark p { color: rgba(255, 255, 255, .7); }
.bento__item--dark > b { color: var(--sky); }

/* ---------- Калькулятор ---------- */
.calc-section { background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.calc-section__glow {
  position: absolute; inset: -20% -10% auto auto; width: 70%; height: 90%; z-index: -1; filter: blur(60px); opacity: .55;
  background: radial-gradient(closest-side, rgba(31, 111, 209, .9), transparent), radial-gradient(closest-side at 20% 80%, rgba(127, 211, 255, .5), transparent);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-20%, 15%) scale(1.15); } }
.calc { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.calc__fields {
  display: grid; gap: 26px; padding: 34px; border-radius: 28px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(10px);
}
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field legend, .field__label { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 12px; padding: 0; }
.field__label b { color: #fff; font-family: var(--head); letter-spacing: 0; text-transform: none; font-size: 15px; margin-left: 4px; }
.seg { display: grid; gap: 8px; }
.seg--5 { grid-template-columns: repeat(5, 1fr); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--2 { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; flex-direction: column; justify-content: center; min-height: 52px; height: 100%; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  font-weight: 700; font-size: 15px; line-height: 1.25; text-align: center;
  transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.seg span small { font-weight: 600; font-size: 12px; color: rgba(255, 255, 255, .55); margin-top: 3px; }
.seg label:hover span { border-color: rgba(255, 255, 255, .35); }
.seg input:checked + span {
  background: linear-gradient(135deg, #2f86f0, var(--blue)); border-color: transparent;
  box-shadow: 0 10px 24px -10px rgba(31, 111, 209, .9);
}
.seg input:checked + span small { color: rgba(255, 255, 255, .8); }
.seg input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.field--row { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.range { width: 100%; height: 28px; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; --p: 14%; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--sky) var(--p), rgba(255, 255, 255, .14) var(--p)); }
.range::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--sky) var(--p), rgba(255, 255, 255, .14) var(--p)); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 6px rgba(127, 211, 255, .25), 0 4px 10px rgba(0, 0, 0, .3);
}
.range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(127, 211, 255, .25); }
.range__hint { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .45); margin-top: 6px; }
.stepper { display: flex; align-items: center; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.stepper button { width: 48px; height: 50px; border: 0; background: none; color: #fff; font-size: 22px; cursor: pointer; border-radius: 14px; }
.stepper button:hover { background: rgba(255, 255, 255, .1); }
.stepper output { min-width: 34px; text-align: center; font-family: var(--head); font-size: 20px; }
.field--checks { display: grid; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; color: rgba(255, 255, 255, .85); }
.check input {
  flex-shrink: 0; -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, .35); display: grid; place-items: center; cursor: pointer; transition: .2s;
}
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease); }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.calc__result {
  position: sticky; top: 100px; padding: 32px; border-radius: 28px; color: var(--ink);
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--sky), var(--blue), var(--yellow), var(--red)) border-box;
  border: 2px solid transparent; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}
.calc__label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc__total { font-family: var(--head); font-size: 48px; line-height: 1.1; margin: 8px 0 22px; white-space: nowrap; }
.calc__total b { font-weight: 700; }
.calc__total.is-long { font-size: 38px; }
.calc__lines { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.calc__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.calc__lines span { color: var(--muted); }
.calc__model { font-size: 14px; color: var(--muted); background: var(--tint); border-radius: 12px; padding: 12px 14px; }
.calc__note { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.06); color: var(--blue); } }

/* Шаги */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 2px;
  background: linear-gradient(90deg, var(--sky), var(--blue), var(--yellow), var(--red));
  transform: scaleX(var(--steps, 0)); transform-origin: 0 50%; transition: transform 1.6s var(--ease);
}
.steps.is-in { --steps: 1; }
.steps li { counter-increment: step; position: relative; padding-top: 78px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 2px solid var(--line);
  font-family: var(--head); font-size: 18px; color: var(--ink); transition: background .3s, color .3s, border-color .3s;
}
.steps li:hover::before { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps b { display: block; font-family: var(--head); font-size: 19px; margin-bottom: 8px; }
.steps span { color: var(--muted); font-size: 15px; line-height: 1.5; display: block; }

/* Галереи */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 14px; }
.gallery__item { border-radius: 16px; overflow: hidden; display: block; }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item--wide { grid-column: span 2; grid-row: span 2; }
.details { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.details a { position: relative; display: block; border-radius: 16px; overflow: hidden; color: #fff; text-decoration: none; }
.details img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .8s var(--ease); }
.details a:hover img { transform: scale(1.08); }
.details span {
  position: absolute; left: 10px; right: 10px; bottom: 10px; font-size: 13px; font-weight: 700;
  padding: 8px 10px; border-radius: 10px; background: rgba(11, 22, 38, .7); backdrop-filter: blur(6px);
  transform: translateY(8px); opacity: 0; transition: .35s var(--ease);
}
.details a:hover span { transform: none; opacity: 1; }

/* Зима */
.winter { background: radial-gradient(80% 80% at 80% 0%, #1d4a7a, transparent 60%), linear-gradient(160deg, #0d2038, #0b1626); color: #fff; overflow: hidden; isolation: isolate; }
.winter__snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.winter__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.winter p { color: rgba(255, 255, 255, .75); font-size: 18px; }
.winter .btn { margin-top: 10px; }
.winter__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.winter__photos a { display: block; border-radius: 18px; overflow: hidden; }
.winter__photos a:first-child { grid-column: 1 / -1; }
.winter__photos img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.winter__photos a:hover img { transform: scale(1.05); }

/* Мастер */
.master { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.master__photos { position: relative; padding-bottom: 70px; }
.master__now { border-radius: 28px; box-shadow: var(--shadow); width: 86%; }
.master__then {
  position: absolute; right: 0; bottom: 0; width: 48%; margin: 0;
  background: #fff; padding: 10px 10px 12px; border-radius: 16px; box-shadow: var(--shadow); rotate: 4deg;
}
.master__then img { border-radius: 10px; }
.master__then figcaption { font-size: 13px; font-weight: 800; text-align: center; padding-top: 8px; color: var(--muted); }
.master__quote {
  font-family: var(--head); font-size: clamp(20px, 2vw, 26px); line-height: 1.25;
  background: linear-gradient(90deg, var(--blue), #6a5cff 60%, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.timeline div { padding: 16px; border-radius: 16px; background: var(--tint); }
.timeline b { display: block; font-family: var(--head); font-size: 20px; color: var(--blue); }
.timeline span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 4px; }

/* Объекты */
.objects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.objects__item { position: relative; display: block; border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; }
.objects__item:first-child { grid-column: span 2; grid-row: span 2; }
.objects__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s var(--ease); }
.objects__item:hover img { transform: scale(1.06); }
.objects__item span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; font-size: 14px; font-weight: 700;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
}

/* Бренды и сертификаты */
.brands { list-style: none; padding: 0; margin: 0 0 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.brands li {
  font-family: var(--head); font-size: 20px; padding: 14px 26px; border-radius: 999px;
  border: 2px solid var(--line); color: var(--ink); transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.brands li:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-3px); }
.certs { display: grid; grid-template-columns: 1fr 1fr 1.6fr 1fr; gap: 18px; align-items: center; margin-bottom: 18px; }
.certs a { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .3s, transform .3s var(--ease); }
.certs a:hover { box-shadow: var(--shadow); transform: translateY(-6px) rotate(-1deg); }
.dealer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dealer a { display: block; border-radius: 18px; overflow: hidden; }
.dealer img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .8s var(--ease); }
.dealer a:hover img { transform: scale(1.05); }

/* Города */
.towns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.towns figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; }
.towns img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s var(--ease); }
.towns figure:hover img { transform: scale(1.06); }
.towns figcaption {
  position: absolute; left: 14px; bottom: 14px; background: #fff; color: var(--ink);
  font-family: var(--head); font-size: 15px; padding: 8px 14px; border-radius: 10px;
}
.towns__more { margin: 22px 0 0; color: var(--muted); }

/* Отзывы */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.review { margin: 0; background: var(--tint); border-radius: var(--radius); padding: 30px 28px 24px; transition: transform .35s var(--ease), box-shadow .35s, background .35s; }
.review:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--shadow); }
.stars { color: var(--yellow); letter-spacing: 3px; font-size: 18px; margin-bottom: 12px; }
.review cite { font-style: normal; font-weight: 800; color: var(--muted); font-size: 14px; }
.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.clients a { display: block; border-radius: 18px; overflow: hidden; }
.clients img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s var(--ease); }
.clients a:hover img { transform: scale(1.05); }

/* Контакты */
.contacts { background: var(--ink); color: #fff; overflow: hidden; }
.contacts__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.contacts__lead { color: rgba(255, 255, 255, .7); font-size: 18px; }
.contacts__list { list-style: none; padding: 0; margin: 28px 0 34px; display: grid; gap: 16px; }
.contacts__list li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; }
.contacts__list span { color: rgba(255, 255, 255, .5); font-size: 14px; }
.contacts__list a { color: #fff; font-size: 24px; font-weight: 800; text-decoration: none; transition: color .2s; }
.contacts__list a:hover { color: var(--yellow); }
.map { border-radius: 24px; overflow: hidden; min-height: 400px; background: var(--ink-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.map iframe { width: 100%; height: 440px; border: 0; display: block; }

.footer { background: #070f1a; color: rgba(255, 255, 255, .55); padding: 32px 0 36px; font-size: 14px; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; }
.brand--footer { color: #fff; }
.footer__phones { display: flex; flex-direction: column; align-items: flex-end; }
.footer__phones a { color: #fff; font-weight: 800; text-decoration: none; }

.callbar { display: none; }

/* Просмотр фото */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(7, 15, 26, .95);
  display: flex; align-items: center; justify-content: center; padding: 56px 72px;
  animation: fade .25s;
}
@keyframes fade { from { opacity: 0; } }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; animation: zoom .35s var(--ease); }
@keyframes zoom { from { transform: scale(.94); opacity: 0; } }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 30px; line-height: 1; transition: background .2s; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Появление при прокрутке (только если работает JS) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(34px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
}
/* «Шторка»: обрезаем картинку, а не саму ссылку — иначе наблюдатель её не видит */
.js [data-reveal="wipe"] { opacity: 1; transform: none; }
.js [data-reveal="wipe"] img {
  clip-path: inset(100% 0 0 0); transform: scale(1.18);
  transition: clip-path 1.1s var(--ease) var(--d, 0s), transform 1.4s var(--ease) var(--d, 0s);
}
.js [data-reveal="wipe"]:not(.details a) > :not(img) { opacity: 0; transition: opacity .6s var(--ease) calc(var(--d, 0s) + .5s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="wipe"].is-in img { clip-path: inset(0); transform: scale(1); }
.js [data-reveal="wipe"].is-in:hover img { transform: scale(1.06); transition: transform .8s var(--ease); }
.js [data-reveal="wipe"].is-in > :not(img) { opacity: 1; }
.js .hero__title [data-reveal] { transform: translateY(60%); }
.js .hero__title [data-reveal].is-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: none; }
  .js [data-reveal="wipe"] img { transform: none; clip-path: none; }
  .js [data-reveal="wipe"] > * { opacity: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .nav { gap: 18px; }
  .nav a { font-size: 14px; }
  .calc { grid-template-columns: 1fr 340px; }
  .seg--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .burger { display: block; }
  .header__phones { margin-left: auto; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; color: var(--ink); box-shadow: 0 20px 40px -20px rgba(11, 22, 38, .4); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 15px 20px; font-size: 16px; border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
  .header:has(.nav.is-open) { background: #fff; color: var(--ink); }
  .hero__grid, .winter__grid, .master, .contacts__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__visual { max-width: 620px; margin-inline: auto; width: 100%; }
  .cards { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__main { grid-column: 1 / -1; grid-row: auto; min-height: 400px; }
  .bento__item:nth-of-type(2), .bento__item--dark { grid-column: auto; }
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .steps::before { display: none; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .objects, .towns { grid-template-columns: 1fr 1fr; }
  .certs { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 70px; }
  .section { padding: 76px 0; }
  .head { margin-bottom: 36px; }
  .header__row { height: 64px; gap: 10px; }
  .nav { top: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand__text b { font-size: 15px; }
  .brand__text small { font-size: 11px; }
  .header__phone:not(:first-child) { display: none !important; }
  .header__phone {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--red); color: #fff;
  }
  .header__phone svg { display: block; }
  .header__phone span { display: none; }
  .hero { padding: 96px 0 30px; min-height: auto; }
  .hero__eyebrow { font-size: 11px; padding: 7px 12px; }
  .hero__title { font-size: clamp(28px, 9.4vw, 46px); }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__photo { transform: none; }
  .thermo { width: 128px; height: 128px; left: -6px; bottom: -40px; }
  .thermo__value { font-size: 32px; }
  .thermo__label { bottom: 24px; font-size: 9px; }
  .chip--1 { right: 10px; top: -16px; }
  .chip--2 { display: none; }
  .hero__facts { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .hero__facts li { padding: 18px 12px 18px 0 !important; border-left: 0 !important; }
  .hero__facts li:nth-child(even) { padding-left: 16px !important; border-left: 1px solid rgba(255, 255, 255, .14) !important; }
  .hero__facts li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); }
  .hero__scroll { display: none; }
  .marquee span { font-size: 17px; }
  .cards, .bento, .reviews { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .bento__main { min-height: 380px; }
  .bento__body { padding: 24px; }
  .bento__body h3 { font-size: 23px; }
  .calc__fields { padding: 22px 18px; border-radius: 22px; }
  .seg--3 { grid-template-columns: 1fr; }
  .seg--3 span { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; gap: 10px; }
  .seg--3 span small { margin: 0; }
  .field--row { grid-template-columns: 1fr; gap: 22px; }
  .stepper { justify-content: space-between; }
  .calc__result { padding: 24px; }
  .calc__total { font-size: 40px; }
  .steps { grid-template-columns: 1fr; row-gap: 26px; }
  .steps li { padding: 0 0 0 76px; min-height: 56px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery__item--wide { grid-row: auto; }
  .details { grid-template-columns: 1fr 1fr; gap: 8px; }
  .details a:last-child { display: none; }
  .details span { opacity: 1; transform: none; font-size: 11px; padding: 6px 8px; }
  .objects, .towns, .dealer, .clients { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dealer a:last-child, .clients a:last-child { display: none; }
  .winter__photos { gap: 8px; }
  .master__photos { padding-bottom: 46px; }
  .timeline { grid-template-columns: 1fr; }
  .brands li { font-size: 16px; padding: 10px 18px; }
  .contacts__list li { grid-template-columns: 1fr; gap: 0; }
  .contacts__list a { font-size: 22px; }
  .map iframe { height: 320px; }
  .footer { padding-bottom: 100px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
  .footer__phones { align-items: flex-start; }
  .callbar {
    display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    background: linear-gradient(135deg, #ff5a3c, var(--red)); color: #fff; text-align: center; font-weight: 800; text-decoration: none;
    padding: 16px; border-radius: 999px; box-shadow: 0 10px 30px -6px rgba(232, 57, 45, .6);
    transform: translateY(140%); transition: transform .4s var(--ease);
  }
  .callbar.is-on { transform: none; }
  .lightbox { padding: 60px 8px; }
  .lightbox__nav { top: auto !important; bottom: 12px; transform: none !important; }
}
