/* ============ База ============ */
:root {
  --blue-700: #0f56cc;
  --blue-600: #1b6ef3;
  --blue-500: #3d8bff;
  --blue-300: #8ec7ff;
  --blue-100: #d3e9ff;
  --sky-50: #f2f8ff;
  --ink: #10233f;
  --muted: #51637d;
  --line: #d9e6f7;
  --white: #ffffff;
  --green: #0d9d63;
  --red: #d92d20;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 60, 130, .12);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }

a { color: var(--blue-600); }

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

.container-narrow { width: min(780px, 100% - 40px); }

/* Фокус */
:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--blue-600);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(27, 110, 243, .35);
}
.btn-primary:hover { background: var(--blue-700); }
.btn-ghost {
  background: var(--white);
  color: var(--blue-600);
  border-color: var(--blue-300);
}
.btn-ghost:hover { border-color: var(--blue-600); }
.btn-soft {
  background: var(--sky-50);
  color: var(--blue-600);
  border-color: var(--blue-100);
}
.btn-soft:hover { background: var(--blue-100); }
.btn-lg { padding: 15px 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* ============ Шапка ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo-mark { width: 30px; height: 30px; fill: var(--blue-600); flex: none; }
.logo-text { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.logo-city {
  font-size: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  line-height: 1.3;
}
.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 10px;
}
.main-nav a:hover { background: var(--sky-50); color: var(--blue-600); }
.btn-header { flex: none; }

/* ============ Первый экран ============ */
.hero {
  background:
    radial-gradient(700px 340px at 85% 10%, var(--blue-100) 0%, transparent 60%),
    radial-gradient(500px 300px at 5% 90%, var(--sky-50) 0%, transparent 60%),
    var(--white);
  padding: 72px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sky-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.hero-lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.hero-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
}
.hero-facts li {
  font-size: 15px;
  color: var(--muted);
}
.hero-facts strong {
  display: block;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -.02em;
}
.hero-art { min-width: 0; }
.hero-scene { display: block; width: 100%; height: auto; }

/* Анимации сцены */
.blob-2 { animation: drift 7s ease-in-out infinite alternate; }
.bubble { animation: floaty 4.5s ease-in-out infinite alternate; }
.b2 { animation-duration: 5.5s; }
.b3 { animation-duration: 6.5s; animation-delay: .8s; }
.sp { animation: twinkle 2.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.s2 { animation-delay: .9s; }
.s3 { animation-delay: 1.7s; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes twinkle { 0%, 100% { opacity: .45; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-14px, 12px); } }

/* ============ Секции ============ */
.section { padding: 76px 0; }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.02em;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 44em;
  margin: 0 auto 44px;
}
.section-band {
  background: linear-gradient(180deg, var(--sky-50), #e3f0ff);
  border-radius: 44px;
  margin-inline: 12px;
}
.section-tint { background: var(--white); }

/* ============ Карточки типов ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.type-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 14px rgba(16, 60, 130, .06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.type-card--featured {
  border: 2px solid var(--blue-600);
  box-shadow: var(--shadow);
}
.card-flag {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--blue-600);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0;
}
.card-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--sky-50);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 32px; height: 32px; }
.type-card h3 { font-size: 22px; }
.card-desc { color: var(--muted); font-size: 15.5px; flex-grow: 1; }
.card-price { font-size: 15px; color: var(--muted); }
.price-base { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-plus { color: var(--blue-600); font-weight: 700; }

/* ============ Калькулятор ============ */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.calc-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 4px 14px rgba(16, 60, 130, .06);
  display: grid;
  gap: 28px;
  min-width: 0;
}
.calc-step {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.calc-step legend {
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-size: 14px;
  display: inline-grid;
  place-items: center;
  flex: none;
}

/* Радио-карточки */
.type-radios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.type-radio { position: relative; min-width: 0; }
.type-radio input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.tr-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: border-color .15s, background .15s;
  height: 100%;
}
.tr-name { font-weight: 700; font-size: 15px; }
.tr-price { font-size: 13px; color: var(--muted); }
.type-radio:hover .tr-body { border-color: var(--blue-300); }
.type-radio input:checked + .tr-body {
  border-color: var(--blue-600);
  background: var(--sky-50);
  box-shadow: 0 0 0 3px rgba(27, 110, 243, .15);
}
.type-radio input:focus-visible + .tr-body {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}

/* Площадь */
.area-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
input[type="range"] {
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-600) var(--fill, 20%), var(--blue-100) var(--fill, 20%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--blue-600);
  box-shadow: 0 2px 8px rgba(16, 60, 130, .3);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--blue-600);
  box-shadow: 0 2px 8px rgba(16, 60, 130, .3);
  cursor: grab;
}
.area-input-wrap { position: relative; flex: none; }
.area-input-wrap input {
  width: 96px;
  padding: 10px 34px 10px 14px;
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.area-input-wrap input:focus { border-color: var(--blue-600); outline: none; }
.area-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
.hint { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

/* Допы */
.extras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.extra {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-width: 0;
}
.extra:hover { border-color: var(--blue-300); }
.extra input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.extra-box {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--sky-50);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  flex: none;
  transition: background .15s, color .15s;
}
.extra-box svg { width: 22px; height: 22px; }
.extra:has(input:checked) {
  border-color: var(--blue-600);
  background: var(--sky-50);
}
.extra:has(input:checked) .extra-box { background: var(--blue-600); color: var(--white); }
.extra input:focus-visible ~ .extra-box {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}
.extra-text { font-size: 14.5px; font-weight: 600; line-height: 1.3; min-width: 0; }
.extra-text small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* Результат */
.calc-result {
  background: var(--ink);
  color: #eaf2ff;
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 96px;
  min-width: 0;
}
.calc-result h3 { font-size: 20px; color: var(--white); }
.breakdown { margin: 0 0 16px; }
.bd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .18);
}
.bd-row dt { color: #a9c3ea; font-size: 14.5px; min-width: 0; }
.bd-row dd {
  margin: 0;
  font-weight: 700;
  font-size: 15.5px;
  text-align: right;
  white-space: nowrap;
}
.bd-total { border-bottom: 0; padding-top: 14px; align-items: baseline; }
.bd-total dt { color: var(--white); font-weight: 700; font-size: 16px; }
.bd-total dd { font-size: 30px; color: #7ddcff; letter-spacing: -.02em; white-space: normal; }
.calc-note { font-size: 13px; color: #a9c3ea; margin-bottom: 20px; }

/* ============ Что входит ============ */
.included-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.included-card {
  background: var(--sky-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 26px;
  min-width: 0;
}
.included-card h3 {
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.inc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.inc-dot--1 { background: var(--blue-300); }
.inc-dot--2 { background: var(--blue-500); }
.inc-dot--3 { background: var(--ink); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-600);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 7.5px;
  width: 8px; height: 4.5px;
  border-left: 2.2px solid var(--white);
  border-bottom: 2.2px solid var(--white);
  transform: rotate(-48deg);
}

/* ============ Шаги ============ */
.steps-list {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.step-item {
  background: var(--sky-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  min-width: 0;
}
.step-item::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 18px; right: 20px;
  font-size: 15px;
  font-weight: 800;
  color: var(--blue-300);
}
.step-badge {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--blue-100);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.step-badge svg { width: 26px; height: 26px; }
.step-item h3 { font-size: 18px; }
.step-item p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  min-width: 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue-600); }
.faq-chevron {
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--blue-600);
  border-bottom: 2.5px solid var(--blue-600);
  transform: rotate(45deg);
  flex: none;
  transition: transform .2s;
}
.faq-item[open] .faq-chevron { transform: rotate(225deg); }
.faq-body { padding: 0 22px 18px; }
.faq-body p { color: var(--muted); margin: 0; }

/* ============ Форма ============ */
.form-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { margin-bottom: 18px; min-width: 0; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus {
  border-color: var(--blue-600);
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 110, 243, .15);
}
.field input[aria-invalid="true"] { border-color: var(--red); }
.field-msg {
  min-height: 1.45em;
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--red);
  font-weight: 600;
  line-height: 1.35;
}
.field-consent { margin-top: 4px; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 500 !important;
  font-size: 15px !important;
}
.consent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.consent-box {
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--white);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
  transition: background .15s, border-color .15s;
}
.consent-box svg { width: 14px; height: 14px; color: var(--white); opacity: 0; }
.consent input:checked ~ .consent-box { background: var(--blue-600); border-color: var(--blue-600); }
.consent input:checked ~ .consent-box svg { opacity: 1; }
.consent input:focus-visible ~ .consent-box {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}
.consent-text { color: var(--muted); }
.calc-summary {
  background: var(--sky-50);
  border: 1px dashed var(--blue-300);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  color: var(--blue-700);
  margin-bottom: 18px;
  font-weight: 600;
}
.form-note { text-align: center; font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }

/* Успех */
.form-success { text-align: center; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; color: var(--green); }
.form-success h3 { font-size: 24px; }
.success-honest { color: var(--muted); max-width: 34em; margin-inline: auto; }
.success-summary {
  text-align: left;
  max-width: 420px;
  margin: 22px auto;
  background: var(--sky-50);
  border: 1px solid var(--blue-100);
  border-radius: 14px;
  padding: 18px 22px;
}
.success-summary .bd-row { border-color: var(--line); }
.success-summary .bd-row dt { color: var(--muted); }
.success-summary .bd-row dd { color: var(--ink); }
.success-summary .bd-total dd { color: var(--blue-600); font-size: 24px; }

/* ============ Подвал ============ */
.site-footer {
  background: var(--ink);
  color: #b9cbe6;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  padding: 44px 0 30px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.footer-brand .logo-mark { fill: var(--blue-300); flex: none; margin-top: 3px; }
.footer-title { color: var(--white); font-weight: 800; margin: 0 0 6px; }
.footer-demo { font-size: 13.5px; margin: 0; max-width: 46em; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-content: start;
  justify-content: flex-end;
}
.footer-nav a { color: #b9cbe6; text-decoration: none; font-size: 14.5px; }
.footer-nav a:hover { color: var(--white); }
.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 18px;
  font-size: 13px;
  margin: 0;
}

/* ============ Адаптив ============ */
@media (max-width: 1020px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 420px; margin-inline: auto; width: 100%; }
  .cards-grid, .included-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .main-nav { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .section-band { border-radius: 28px; margin-inline: 6px; }
  .logo-city { display: none; }
  .header-inner { gap: 12px; }
  .btn-header { padding: 10px 16px; font-size: 15px; }
  .type-radios, .extras { grid-template-columns: 1fr; }
  .area-row { flex-wrap: wrap; }
  .area-input-wrap { width: 100%; }
  .area-input-wrap input { width: 100%; text-align: left; padding-left: 14px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-wrap { padding: 22px 18px; }
  .calc-form { padding: 22px 18px; }
  .steps-list { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 10px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
