/* =========================================================
   Палитра (фирменные цвета). Меняйте только здесь.
   ========================================================= */
:root {
  /* Базовые цвета бренда */
  --brand-blue: #005BFF;
  --brand-magenta: #F1117E;
  --brand-navy: #090089;
  --brand-sky: #00A2FF;
  --brand-white: #FFFFFF;

  /* RGB-каналы для прозрачностей */
  --blue-rgb: 0, 91, 255;
  --magenta-rgb: 241, 17, 126;
  --navy-rgb: 9, 0, 137;
  --sky-rgb: 0, 162, 255;
  --white-rgb: 255, 255, 255;

  /* Семантические роли */
  --bg: var(--brand-white);
  --bg-alt: rgba(var(--blue-rgb), .06);     /* светло-голубая подложка секций */
  --surface: var(--brand-white);
  --text: var(--brand-navy);
  --muted: rgba(var(--navy-rgb), .68);
  --line: rgba(var(--blue-rgb), .16);
  --line-strong: rgba(var(--blue-rgb), .32);

  --primary: var(--brand-blue);
  --primary-hover: var(--brand-navy);
  --primary-contrast: var(--brand-white);
  --highlight: var(--brand-magenta);       /* скидка, акценты, бейджи */
  --highlight-contrast: var(--brand-white);
  --info: var(--brand-sky);
  --dark: var(--brand-navy);
  --on-dark: var(--brand-white);
  --on-dark-muted: rgba(var(--white-rgb), .72);
  --danger: var(--brand-magenta);
  --focus: rgba(var(--blue-rgb), .35);

  --grad-primary: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-sky) 100%);
  --grad-deep: linear-gradient(140deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  --grad-highlight: linear-gradient(135deg, var(--brand-magenta) 0%, var(--brand-navy) 100%);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(var(--navy-rgb), .08);
  --shadow-lg: 0 20px 50px rgba(var(--navy-rgb), .16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Onest", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--bg); color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
::selection { background: rgba(var(--blue-rgb), .18); color: var(--brand-navy); }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1.5px solid transparent;
  font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .faq__q:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.btn--primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 8px 20px rgba(var(--blue-rgb), .28); }
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-contrast); }
.btn--outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary); color: var(--primary-contrast); }
.btn--ghost { color: var(--primary); }
.btn--ghost:hover { background: var(--bg-alt); color: var(--primary-hover); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--white-rgb), .9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px var(--display); color: var(--primary); letter-spacing: -.02em; }
.logo:hover { color: var(--primary); }
.logo__mark { color: var(--highlight); font-size: 18px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--primary); transform: scaleX(0); transition: transform .2s;
}
.nav a:hover { color: var(--primary); }
.nav a:hover::after { transform: scaleX(1); }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px; overflow: hidden;
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(var(--sky-rgb), .14) 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(var(--magenta-rgb), .07) 0%, transparent 70%),
    var(--bg);
}
.hero__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; color: var(--primary); background: rgba(var(--blue-rgb), .08);
  font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero__title { font: 800 clamp(34px, 5vw, 56px)/1.08 var(--display); letter-spacing: -.02em; }
.accent { color: var(--highlight); }
.hero__lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 540px; }
.hero__lead b { color: var(--text); white-space: nowrap; }
.hero__actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.hero__visual { position: relative; height: 320px; }
.hero-cert {
  position: absolute; inset: 20px 10px 20px 40px;
  border-radius: 20px; padding: 28px;
  background: var(--grad-deep);
  color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 24px 60px rgba(var(--blue-rgb), .35);
  transform: rotate(-4deg);
}
.hero-cert::before {
  content: ""; position: absolute; inset: 10px; border-radius: 13px;
  border: 1px solid rgba(var(--white-rgb), .25); pointer-events: none;
}
.hero-cert--back {
  transform: rotate(5deg) translate(14px, 6px);
  background: var(--grad-highlight);
  box-shadow: 0 20px 50px rgba(var(--magenta-rgb), .3);
}
.hero-cert--back::before { border-color: rgba(var(--white-rgb), .35); }
.hero-cert__top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.hero-cert__top > span:last-child { background: var(--highlight); color: var(--highlight-contrast); padding: 2px 10px; border-radius: 999px; }
.hero-cert__value { font: 800 clamp(40px, 6vw, 64px) var(--display); color: var(--on-dark); text-align: center; letter-spacing: -.02em; }
.hero-cert__bottom { text-align: center; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); }

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 36px; }
.section__title { font: 800 clamp(28px, 3.6vw, 40px) var(--display); letter-spacing: -.02em; }
.section__sub { color: var(--muted); margin-top: 8px; font-size: 17px; }

/* ---------- Тулбар каталога ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font: 500 14px var(--font); color: var(--text); cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort select, .field select, .field input {
  font: 500 15px var(--font); color: var(--text);
  padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface);
  transition: border-color .2s;
}
.sort select:hover, .field select:hover, .field input:hover { border-color: var(--primary); }
.field input:focus, .field select:focus { border-color: var(--primary); }
.sort select { padding-right: 32px; cursor: pointer; }

/* ---------- Карточки-сертификаты ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.grid__empty { color: var(--muted); }

.cert {
  --c-bg: var(--surface);
  --c-text: var(--text);
  --c-muted: var(--muted);
  --c-frame: var(--line-strong);
  --c-value: var(--primary);
  --c-badge-bg: var(--highlight);
  --c-badge-text: var(--highlight-contrast);
  --c-btn-bg: var(--primary);
  --c-btn-text: var(--primary-contrast);
  --c-btn-hover-bg: var(--primary-hover);
  --c-btn-hover-text: var(--primary-contrast);
  --c-perf: var(--bg);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .25s, box-shadow .25s;
  animation: certIn .35s ease both;
}
.cert:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(var(--blue-rgb), .18); }
.cert__face {
  position: relative; margin: 8px; padding: 20px 20px 18px;
  border: 1px solid var(--c-frame); border-radius: 11px;
  display: flex; flex-direction: column; min-height: 240px;
}
.cert__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cert__brand { font: 700 12px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert__badge {
  background: var(--c-badge-bg); color: var(--c-badge-text);
  font: 800 14px var(--font); padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
}
.cert__label { margin-top: 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.cert__value { font: 800 40px/1.1 var(--display); color: var(--c-value); margin-top: 6px; white-space: nowrap; letter-spacing: -.02em; }
.cert__perf {
  position: relative; margin: auto -21px 0; padding-top: 22px;
  border-bottom: 1.5px dashed var(--c-frame);
}
.cert__perf::before, .cert__perf::after {
  content: ""; position: absolute; bottom: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-perf);
}
.cert__perf::before { left: -19px; }
.cert__perf::after { right: -19px; }
.cert__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.cert__prices { display: flex; flex-direction: column; line-height: 1.25; }
.cert__price { font: 800 20px var(--font); white-space: nowrap; }
.cert__old { font-size: 14px; color: var(--c-muted); white-space: nowrap; }
.btn--cert { background: var(--c-btn-bg); color: var(--c-btn-text); padding: 11px 18px; font-size: 14px; }
.btn--cert:hover { background: var(--c-btn-hover-bg); color: var(--c-btn-hover-text); }

/* Plus: 35–60k — сине-голубой градиент */
.cert--gold {
  --c-bg: var(--grad-primary);
  --c-text: var(--on-dark);
  --c-muted: var(--on-dark-muted);
  --c-frame: rgba(var(--white-rgb), .4);
  --c-value: var(--on-dark);
  --c-btn-bg: var(--brand-white);
  --c-btn-text: var(--brand-blue);
  --c-btn-hover-bg: var(--brand-navy);
  --c-btn-hover-text: var(--brand-white);
  border-color: transparent;
}

/* Premium: 65–100k — глубокий тёмно-синий с малиновыми акцентами */
.cert--premium {
  --c-bg: radial-gradient(120% 90% at 100% 0%, rgba(var(--sky-rgb), .35) 0%, transparent 55%), var(--grad-deep);
  --c-text: var(--on-dark);
  --c-muted: var(--on-dark-muted);
  --c-frame: rgba(var(--white-rgb), .35);
  --c-value: transparent;
  --c-btn-bg: var(--brand-magenta);
  --c-btn-text: var(--brand-white);
  --c-btn-hover-bg: var(--brand-white);
  --c-btn-hover-text: var(--brand-navy);
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(var(--navy-rgb), .3);
}
.cert--premium .cert__face::before {
  content: ""; position: absolute; inset: 5px; border-radius: 7px;
  border: 1px solid rgba(var(--white-rgb), .18); pointer-events: none;
}
.cert--premium .cert__value {
  background: linear-gradient(135deg, var(--brand-white) 0%, var(--brand-sky) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.cert--premium .cert__badge { box-shadow: 0 4px 14px rgba(var(--magenta-rgb), .5); }
.cert--premium:hover { box-shadow: 0 22px 50px rgba(var(--navy-rgb), .42); }

@keyframes certIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Шаги ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; transition: border-color .2s, transform .2s; }
.step:hover { border-color: var(--primary); transform: translateY(-2px); }
.step__num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad-primary); color: var(--primary-contrast); font: 800 18px var(--display); margin-bottom: 18px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ---------- Условия ---------- */
.terms { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.term { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.term:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.term__icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(var(--blue-rgb), .1); color: var(--primary);
}
.term__icon svg { width: 22px; height: 22px; }
.term:nth-child(3n+2) .term__icon { background: rgba(var(--magenta-rgb), .1); color: var(--brand-magenta); }
.term:nth-child(3n) .term__icon { background: rgba(var(--sky-rgb), .14); color: var(--brand-navy); }
.term h3 { font-size: 16px; margin-bottom: 6px; }
.term p { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border-radius: 14px; border: 1px solid var(--line); transition: border-color .2s; }
.faq__item:hover, .faq__item.is-open { border-color: var(--primary); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 22px; background: none; border: 0; text-align: left; cursor: pointer;
  font: 600 16px var(--font); color: var(--text); border-radius: 14px;
}
.faq__q:hover, .faq__item.is-open .faq__q { color: var(--primary); }
.faq__icon { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: var(--primary);
  transition: transform .25s;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: rotate(0); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 22px 20px; color: var(--muted); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.contacts__card { background: var(--surface); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.contacts__card--accent { background: var(--grad-deep); color: var(--on-dark); border-color: transparent; }
.contacts__card--accent h3 { font: 800 26px var(--display); margin-bottom: 8px; }
.contacts__card--accent p { color: var(--on-dark-muted); margin-bottom: 24px; }
.contacts__list { margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.contacts__list dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.contacts__list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.contacts__list a { text-decoration: none; color: var(--text); }
.contacts__list a:hover { color: var(--primary); }
.messengers { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: var(--on-dark-muted); padding: 36px 0; font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.footer__name { color: var(--on-dark); font: 800 20px var(--display); margin-bottom: 6px; letter-spacing: -.02em; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--on-dark-muted); }
.footer a:hover { color: var(--brand-sky); }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(var(--navy-rgb), .55); opacity: 0; transition: opacity .2s; }
.modal__dialog {
  position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: 20px; padding: 32px 28px 28px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px) scale(.98); transition: all .2s;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
.modal__close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg-alt); font-size: 22px; line-height: 1; cursor: pointer; color: var(--primary);
  transition: background .2s, color .2s;
}
.modal__close:hover { background: var(--primary); color: var(--primary-contrast); }
.modal__title { font: 800 26px var(--display); margin-bottom: 20px; padding-right: 32px; letter-spacing: -.02em; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; border: 0; padding: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 500; color: var(--muted); padding: 0; }
.field input, .field select { width: 100%; }
.field__error { display: none; color: var(--danger); font-size: 13px; font-weight: 600; }
.field.is-invalid input { border-color: var(--danger); }
.field.is-invalid .field__error, .field__error--consent.is-visible { display: block; }
.field--radio { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
.field--radio legend { margin-bottom: 6px; width: 100%; }
.field--radio label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form__price { margin-top: -6px; font-size: 15px; }
.form__price b { font-size: 18px; color: var(--primary); }
.form__price s { color: var(--muted); margin-left: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--primary); }
.check.is-invalid span { color: var(--danger); }
.field--radio input { accent-color: var(--primary); }

.done p { color: var(--muted); }
.done__text {
  margin: 16px 0; padding: 14px 16px; background: var(--bg-alt); border: 1px dashed var(--line-strong); border-radius: 12px;
  font: 14px/1.6 var(--font); white-space: pre-wrap; color: var(--text);
}
.done__actions { display: flex; flex-direction: column; gap: 10px; }
.done__hint { margin-top: 10px; font-size: 14px; color: var(--primary) !important; font-weight: 500; }

/* ---------- Чат с администратором ---------- */
.btn--chat { background: var(--brand-white); color: var(--brand-blue); }
.btn--chat:hover { background: var(--brand-sky); color: var(--brand-navy); }

.chat { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat__fab {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary); color: var(--primary-contrast); display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(var(--blue-rgb), .4); transition: transform .2s, background .2s;
}
.chat__fab:hover { background: var(--primary-hover); transform: scale(1.05); }
.chat.is-open .chat__fab { background: var(--highlight); box-shadow: 0 10px 26px rgba(var(--magenta-rgb), .4); }
.chat__fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.chat__badge {
  position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--highlight); color: var(--highlight-contrast); font: 700 12px/22px var(--font);
  box-shadow: 0 0 0 2px var(--brand-white);
}
.chat__panel {
  width: 360px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px));
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  animation: chatIn .2s ease both;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--grad-deep); color: var(--on-dark); flex-shrink: 0; }
.chat__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--highlight); color: var(--highlight-contrast); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.chat__title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.chat__status { font-size: 12px; color: var(--on-dark-muted); }
.chat__status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-sky); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(var(--sky-rgb), .3); }
.chat__close { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(var(--white-rgb), .14); color: var(--on-dark); font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.chat__close:hover { background: rgba(var(--white-rgb), .28); }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; background: linear-gradient(var(--bg-alt), var(--bg-alt)), var(--bg); display: flex; flex-direction: column; gap: 8px; }
.chat__list { display: flex; flex-direction: column; gap: 8px; }
.chat__msg {
  max-width: 85%; padding: 9px 12px 6px; font-size: 14px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 14px;
}
.chat__msg time { display: block; text-align: right; font-size: 11px; margin-top: 2px; opacity: .65; }
.chat__msg a { color: inherit; text-decoration: underline; }
.chat__msg--admin { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(var(--navy-rgb), .06); }
.chat__msg--admin a { color: var(--primary); }
.chat__msg--me { align-self: flex-end; background: var(--primary); color: var(--primary-contrast); border-bottom-right-radius: 4px; }
.chat__quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat__quick button {
  border: 1.5px solid var(--primary); color: var(--primary); background: var(--surface);
  border-radius: 999px; padding: 6px 12px; font: 500 13px var(--font); cursor: pointer; transition: background .2s, color .2s;
}
.chat__quick button:hover { background: var(--primary); color: var(--primary-contrast); }
.chat__form { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); flex-shrink: 0; }
.chat__intro input, .chat__form textarea {
  width: 100%; font: 14px/1.4 var(--font); color: var(--text);
  padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface);
}
.chat__form textarea { resize: none; max-height: 120px; overflow-y: hidden; }
.chat__intro input:focus, .chat__form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.chat__row { display: flex; gap: 8px; align-items: flex-end; }
.chat__sendbtn {
  width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--primary); color: var(--primary-contrast); display: grid; place-items: center; transition: background .2s;
}
.chat__sendbtn:hover { background: var(--primary-hover); }
.chat__hint { font-size: 13px; color: var(--danger); font-weight: 500; }
.chat__hint:empty { display: none; }

@media (max-width: 600px) {
  .chat { right: 12px; bottom: 12px; }
  .chat__panel { height: calc(100vh - 100px); }
}

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { height: 260px; max-width: 460px; width: 100%; margin: 0 auto; }
  .terms { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .header__cta { display: none; }
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 42px; height: 42px; padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav a:hover { color: var(--primary); }
  .nav a:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .contacts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 56px; }
  .section { padding: 60px 0; }
  .terms { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .sort { justify-content: space-between; }
  .contacts__list { grid-template-columns: 1fr; }
  .contacts__card { padding: 24px; }
  .modal__dialog { padding: 28px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
