/* ============================================================
   Формула Порядка — стили сайта
   ============================================================ */

:root {
  --bg: #f8f5ee;
  --surface: #ffffff;
  --ink: #16302f;
  --muted: #5f716d;
  --brand: #2d5b60;
  --brand-dark: #1d4247;
  --brand-soft: #e7efe9;
  --accent: #d7b06a;
  --accent-dark: #c19a52;
  --line: #e5dfd2;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 4px 16px rgba(22, 48, 47, 0.07);
  --shadow: 0 18px 44px rgba(22, 48, 47, 0.1);
  --shadow-lg: 0 30px 70px rgba(22, 48, 47, 0.16);
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Unbounded", "Manrope", "Segoe UI", sans-serif;
  --container: 1200px;
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

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

.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(45, 91, 96, 0.26); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--brand); }
.btn--primary:hover { background: var(--brand-dark); }

.btn--accent { background: var(--accent); color: #16352c; }
.btn--accent:hover { background: var(--accent-dark); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(11, 35, 32, 0.18);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.7); box-shadow: none; }

.btn--sm { padding: 11px 20px; font-size: 15px; }
.btn--lg { padding: 17px 32px; font-size: 17px; }
.btn--block { width: 100%; }

.link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--brand);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }
.link-muted { color: var(--muted); border-bottom: 1px solid rgba(45, 91, 96, 0.25); }
.link-muted:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------- Шапка ---------------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(248, 245, 238, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(22, 48, 47, 0.07);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
}

.logo { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo__img {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(22, 48, 47, 0.18));
}
.logo__text {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}
.logo__text b { font-weight: 700; }
.logo__text span { color: var(--brand); }
.logo__text--light { color: #fff; }
.logo__text--light span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  position: relative;
  font-size: 15.5px;
  font-weight: 600;
  color: #33504a;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover { color: var(--brand); }
.nav a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 16px; }
.header__phone { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.header__phone:hover { color: var(--brand); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.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); }

/* ---------------- HERO ---------------- */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 72px;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(215, 176, 106, 0.32), transparent 62%),
    radial-gradient(900px 720px at -8% 22%, rgba(45, 91, 96, 0.1), transparent 62%),
    linear-gradient(180deg, #faf5ea 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: #33504a;
  box-shadow: var(--shadow-sm);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f8f4f;
  box-shadow: 0 0 0 4px rgba(111, 143, 79, 0.18);
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.accent {
  position: relative;
  color: var(--brand);
  white-space: nowrap;
}
.accent::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: 0.06em;
  height: 0.28em;
  border-radius: 4px;
  background: var(--accent);
  z-index: -1;
}

.lead { font-size: clamp(16px, 1.15vw, 18.5px); color: var(--muted); max-width: 54ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 38px; }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts b { font-family: var(--display); font-size: 24px; letter-spacing: -0.03em; }
.hero__facts span { font-size: 14px; color: var(--muted); }

.hero__visual { position: relative; }

.formula-card {
  position: relative;
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #eef7f3;
  box-shadow: var(--shadow-lg);
}
.formula-card::before {
  content: "";
  position: absolute;
  inset: -14px -14px auto auto;
  width: 120px;
  height: 120px;
  border-radius: 32px;
  background: var(--accent);
  opacity: 0.55;
  z-index: -1;
  transform: rotate(12deg);
}
.formula-card::after {
  content: "";
  position: absolute;
  inset: auto auto -18px -18px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.16;
  z-index: -1;
}
.formula-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.chip--soft { background: var(--brand-soft); color: var(--brand-dark); }
.formula-card__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.formula-card__mark svg { width: 22px; height: 22px; fill: currentColor; }

.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: clamp(17px, 1.5vw, 21px);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.formula i { font-style: normal; color: #9db5ae; }
.formula > span:not(.formula__eq) { padding-bottom: 2px; border-bottom: 2px dashed rgba(45, 91, 96, 0.26); }
.formula__eq { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.formula__result {
  padding: 4px 12px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
}

.formula-list { display: grid; gap: 11px; margin-bottom: 24px; }
.formula-list li { display: flex; align-items: center; gap: 11px; font-size: 15.5px; color: #2c4742; }
.formula-list svg { width: 21px; height: 21px; color: var(--brand); flex-shrink: 0; }

.formula-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.rating { display: flex; flex-direction: column; gap: 2px; }
.rating__stars { color: #d9a441; font-size: 15px; letter-spacing: 2px; }
.rating span:last-child { font-size: 13px; color: var(--muted); }

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.9), rgba(215, 176, 106, 0.22) 62%, rgba(215, 176, 106, 0.05));
  border: 1px solid rgba(215, 176, 106, 0.4);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
  pointer-events: none;
}
.bubble--1 { width: 150px; height: 150px; top: 74%; left: -64px; animation-delay: 0s; }
.bubble--2 { width: 42px; height: 42px; top: 70%; left: 2%; animation-delay: -3s; }
.bubble--3 { width: 84px; height: 84px; bottom: 6%; right: 2%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
}

/* ---------------- Секции ---------------- */

.section { padding: clamp(56px, 7vw, 96px) 0; scroll-margin-top: calc(var(--header-h) + 8px); }
.section--tint { background: linear-gradient(180deg, #f1f2e7 0%, var(--bg) 100%); }

.section__head { max-width: 720px; margin-bottom: 44px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.section__head h2, .order__info h2, .why__head h2 {
  font-size: clamp(27px, 3.1vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section__lead { margin-top: 16px; color: var(--muted); font-size: 17px; }

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.service-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: #d8cfbb;
}
.service-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 15.5px; }

.ticks { display: grid; gap: 7px; margin: 18px 0 22px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: #33504a;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
  border-radius: 1px;
}
.service-card__price {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.03em;
}
.service-card__price span {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

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

.calc {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.calc__controls { display: grid; gap: 26px; align-content: start; }

.field { margin: 0; padding: 0; border: 0; }
.field legend, .field__row label {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #47615b;
}
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.area-value { font-size: 15px; color: var(--muted); }
.area-value b { font-family: var(--display); font-size: 22px; color: var(--ink); }

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.segmented__item { position: relative; cursor: pointer; }
.segmented__item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fdfcf8;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.18s ease;
}
.segmented__item input:checked + span {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.segmented__item input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 14%, #e9e4d7 14%, #e9e4d7 100%);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 4px 12px rgba(45, 91, 96, 0.28);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 4px 12px rgba(45, 91, 96, 0.28);
  cursor: grab;
}
.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 12.5px;
  color: #938d7f;
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fdfcf8;
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.chip-check span::before {
  content: "+";
  font-weight: 800;
  color: var(--brand);
}
.chip-check input:checked + span {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.chip-check input:checked + span::before { content: "✓"; }
.chip-check input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

.switch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #fdfcf8;
  border: 1.5px solid var(--line);
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; }
.switch__ui {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #dbe9e5;
  transition: background 0.2s ease;
}
.switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(11, 35, 32, 0.2);
  transition: transform 0.2s ease;
}
.switch input:checked + .switch__ui { background: var(--brand); }
.switch input:checked + .switch__ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--brand); outline-offset: 3px; }
.switch__text { display: flex; flex-direction: column; }
.switch__text small { color: var(--muted); font-size: 13.5px; }

.calc__result {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(165deg, #2d5b60 0%, #1b3f44 100%);
  color: #fff;
  box-shadow: 0 22px 44px rgba(27, 63, 68, 0.3);
}
.calc__label { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.calc__price {
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 6px 0 4px;
}
.calc__price small {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.75;
  margin-right: 4px;
}
.calc__note { font-size: 14.5px; opacity: 0.85; }
.calc__meta {
  display: grid;
  gap: 9px;
  margin: 22px 0 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.calc__meta li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.calc__meta svg { width: 19px; height: 19px; flex-shrink: 0; opacity: 0.85; }
.calc__result .btn { background: var(--accent); color: #2b2413; }
.calc__result .btn:hover { background: var(--accent-dark); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2); }
.calc__disclaimer { margin-top: 14px; font-size: 12.5px; line-height: 1.5; opacity: 0.7; }

/* ---------------- Шаги ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.step__num {
  display: block;
  margin-bottom: 34px;
  font-family: var(--display);
  font-size: 30px;
  color: #d3cbb6;
  letter-spacing: -0.04em;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
.step::after {
  content: "";
  position: absolute;
  top: 40px;
  right: -12px;
  width: 24px;
  height: 2px;
  background: #ded6c4;
}
.step:last-child::after { display: none; }

/* ---------------- Почему мы ---------------- */

.why {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.why__head .btn { margin-top: 26px; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature__icon svg { width: 23px; height: 23px; }
.feature h3 { font-size: 17px; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ---------------- Отзывы ---------------- */

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.reviews__more { margin-top: 26px; }
.review {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.review__stars { color: #d9a441; letter-spacing: 3px; margin-bottom: 14px; }
.review p { font-size: 15.5px; color: #294641; }
.review__author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 22px; }
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: var(--display);
  font-size: 15px;
  flex-shrink: 0;
}
.review__author b { display: block; font-size: 15px; }
.review__author small { color: var(--muted); font-size: 13px; }

/* ---------------- FAQ ---------------- */

.faq { display: grid; gap: 12px; }
.faq__item {
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 22px;
  transition: box-shadow 0.2s ease;
}
.faq__item[open] { box-shadow: var(--shadow-sm); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.faq__item[open] summary::after { transform: rotate(225deg); }
.faq__item p { padding-bottom: 20px; color: var(--muted); font-size: 15.5px; }

/* ---------------- Заявка ---------------- */

.order { background: linear-gradient(180deg, #f7f3ea 0%, #eef1e6 100%); }
.order__grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 48px; align-items: start; }

.contact-list { display: grid; gap: 18px; margin-top: 30px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  flex-shrink: 0;
}
.contact-list__icon svg { width: 22px; height: 22px; }
.contact-list small { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contact-list a, .contact-list span { font-weight: 700; font-size: 16.5px; }
.contact-list a:hover { color: var(--brand); }

.promo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #2b2413;
}
.promo__badge {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--display);
  font-size: 15px;
}
.promo p { font-size: 14.5px; }

.form {
  display: grid;
  gap: 16px;
  padding: 32px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input { display: grid; gap: 7px; }
.input span { font-size: 13.5px; font-weight: 700; color: #47615b; }
.input input, .input select, .input textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fdfcf8;
  font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input textarea { resize: vertical; min-height: 88px; }
.input input::placeholder, .input textarea::placeholder { color: #a8a294; }
.input input:focus, .input select:focus, .input textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(45, 91, 96, 0.14);
}
.input input.is-invalid { border-color: #e05252; box-shadow: 0 0 0 4px rgba(224, 82, 82, 0.12); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.check a { color: var(--brand); text-decoration: underline; }

.form__hint { font-size: 12.5px; color: #938d7f; text-align: center; }

.form.is-sent { place-items: center; text-align: center; padding: 48px 32px; }
.form.is-sent > .form__row,
.form.is-sent > .input,
.form.is-sent > .check,
.form.is-sent > .btn,
.form.is-sent > .form__hint { display: none; }
.success { display: none; max-width: 420px; }
.form.is-sent .success { display: block; }
.success__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.success__icon svg { width: 34px; height: 34px; }
.success h3 { font-size: 24px; margin-bottom: 10px; }
.success p { color: var(--muted); font-size: 15.5px; }

/* ---------------- Правовые страницы ---------------- */

.legal-page { padding: 150px 0 80px; }
.legal-page h1 { font-size: clamp(22px, 6vw, 40px); letter-spacing: -0.03em; margin-bottom: 10px; overflow-wrap: break-word; }
.legal-page__date { color: var(--muted); font-size: 14.5px; margin-bottom: 36px; }
.legal { display: grid; gap: 28px; max-width: 820px; }
.legal h2 { font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }
.legal p, .legal li { line-height: 1.68; color: var(--ink); }
.legal p + p { margin-top: 10px; }
.legal ul { display: grid; gap: 6px; padding-left: 22px; list-style: disc; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.legal__back { margin-top: 44px; }

@media (max-width: 720px) {
  .legal-page { padding: 120px 0 60px; }
}

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

.footer {
  padding: 64px 0 28px;
  background: #102a2b;
  color: #cfe3dd;
  scroll-margin-top: var(--header-h);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo--light .logo__text { color: #fff; }
.logo--light .logo__text span { color: var(--accent); }
.footer__logo-row { display: flex; align-items: center; gap: 16px; }
.footer__logo-row .logo__text { font-size: 19px; }
.footer__badge {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.42));
}
.footer__brand p { margin: 18px 0 20px; font-size: 14.5px; color: #9ab5ae; max-width: 34ch; }

.socials { display: flex; gap: 10px; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}
.socials a:hover { background: var(--brand); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

.footer h3 {
  margin-bottom: 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #78a79c;
}
.footer__nav, .footer__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__nav a, .footer__contacts a { font-size: 15.5px; transition: color 0.2s ease; }
.footer__nav a:hover, .footer__contacts a:hover { color: var(--accent); }
.footer__contacts p { margin-top: 6px; font-size: 14.5px; color: #9ab5ae; line-height: 1.6; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13.5px;
  color: #7f9c95;
}
.footer__bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom a:hover { color: var(--accent); }

/* ---------------- Плавающая кнопка ---------------- */

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(29, 66, 71, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.fab:hover { transform: translateY(-3px) scale(1.03); background: var(--brand-dark); }
.fab svg { width: 26px; height: 26px; fill: currentColor; }

/* ---------------- Анимация появления ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

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

@media (max-width: 1100px) {
  .nav { gap: 18px; }
  .header__phone { display: none; }
  .hero__inner { gap: 36px; }
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .why { grid-template-columns: 1fr; gap: 32px; }
  .reviews { grid-template-columns: 1fr; }
  .order__grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-140%);
    transition: transform 0.3s ease;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid #f0f7f5; font-size: 17px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .burger { display: flex; }
  .header__actions .btn { display: none; }

  .hero { padding-top: calc(var(--header-h) + 32px); }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__facts { gap: 12px 28px; }
  .formula-card { padding: 24px; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .section__head { margin-bottom: 30px; }
  .hero__cta .btn { width: 100%; }
  .hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; justify-content: initial; }
  .hero__facts b { font-size: 17px; white-space: nowrap; }
  .hero__facts span { font-size: 12.5px; line-height: 1.35; }
  .cards { grid-template-columns: 1fr; }
  .calc { padding: 20px; border-radius: 22px; }
  .calc__result { padding: 24px; }
  .steps { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; }
  .fab { width: 52px; height: 52px; right: 16px; bottom: 16px; border-radius: 16px; }
  .formula { font-size: 16px; }
  .formula__result { font-size: 15px; }
}
