/* JS Match — стили сайта.
   Цвета: кобальт и бирюза ташкентских изразцов + глубокий чернильный. */

:root {
  --ink: #0F1B33;
  --ink-2: #1B2A4A;
  --cobalt: #2547D0;
  --cobalt-dark: #1A36A8;
  --tile: #14A3A0;
  --tile-soft: #E2F4F3;
  --paper: #F7F8FB;
  --sand: #F1EADC;
  --line: #DDE2EC;
  --muted: #5B6680;
  --white: #FFFFFF;

  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Golos Text", "Segoe UI", Arial, sans-serif;

  --wrap: 88rem;
  --gut: clamp(1rem, 3vw, 3rem);
  --sect: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, 0.5vw + 11px, 30px); scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--tile); outline-offset: 3px; border-radius: 0.375rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: absolute; left: 1rem; top: -3.75rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.625rem 1rem; border-radius: 0.5rem;
}
.skip:focus { top: 0.75rem; }

/* ---------- Типографика ---------- */
.h1, .h2, .h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.08; margin-bottom: 1.5rem; }
.h2 { font-size: clamp(1.625rem, 3.2vw, 2.375rem); line-height: 1.14; margin-bottom: 1rem; }
.h3 { font-size: clamp(1.125rem, 1.7vw, 1.312rem); line-height: 1.25; margin-bottom: 0.625rem; }
.lead { font-size: clamp(1.062rem, 1.5vw, 1.188rem); color: var(--muted); max-width: 60ch; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0 1.625rem; border-radius: 62.44rem;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--cobalt); color: var(--white); }
.btn--primary:hover { background: var(--cobalt-dark); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--sm { min-height: 2.625rem; padding: 0 1.125rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 251, .8); backdrop-filter: blur(14px);
  backdrop-filter: saturate(1.4) blur(0.625rem);
  -webkit-backdrop-filter: saturate(1.4) blur(0.625rem);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__row { display: flex; align-items: center; gap: 1.75rem; height: 4.5rem; }

.logo { display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.logo__mark { width: 2.5rem; height: 1.75rem; }
.logo__word { font: 700 1.188rem/1 var(--display); letter-spacing: -0.03em; }
.logo--light { color: var(--white); }

.nav { display: flex; gap: 1.625rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); padding: 0.375rem 0; }
.nav a:hover { color: var(--cobalt); }
.nav__tg { display: none; }
.top__actions { display: flex; align-items: center; gap: 0.75rem; }

.burger { display: none; width: 2.75rem; height: 2.75rem; border: 0; background: transparent; cursor: pointer; padding: 0.625rem; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 0.375rem 0; transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(0.25rem) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-0.25rem) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 var(--sect); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__kicker { font-weight: 600; color: var(--tile); margin-bottom: 1.125rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

.promises {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 1.75rem;
  margin: 2.75rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.promises dt { font: 600 1.25rem/1.2 var(--display); letter-spacing: -0.02em; }
.promises dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9375rem; }

/* Визуализация мэтча — главный акцент страницы */
.match {
  margin: 0; background: var(--white); border-radius: 1.375rem; padding: 1.625rem;
  border: 1px solid var(--line);
  box-shadow: 0 1.875rem 3.75rem -1.875rem rgba(15, 27, 51, .35);
  position: relative;
}
.match__head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: 1.125rem; border-bottom: 1px dashed var(--line); }
.match__side { display: flex; flex-direction: column; gap: 2px; }
.match__side--right { text-align: right; align-items: flex-end; }
.match__side strong { font: 600 1.062rem/1.3 var(--display); letter-spacing: -0.01em; }
.match__side small { color: var(--muted); font-size: 0.875rem; }
.match__tag { font-size: 0.75rem; font-weight: 600; padding: 3px 0.625rem; border-radius: 62.44rem; margin-bottom: 0.5rem; width: max-content; }
.match__tag--role { background: #E6EBFB; color: var(--cobalt); }
.match__tag--person { background: var(--tile-soft); color: #0B7472; }

.match__rows { list-style: none; display: grid; gap: 0.625rem; margin: 1.125rem 0 1.25rem; }
.match__rows li { display: grid; grid-template-columns: 1fr 2.75rem 1fr; align-items: center; }
.match__a, .match__b { font-size: 0.9062rem; line-height: 1.3; padding: 0.625rem 0.75rem; border-radius: 0.625rem; }
.match__a { background: #EEF2FD; color: var(--ink-2); }
.match__b { background: var(--tile-soft); color: var(--ink-2); text-align: right; }
.match__link { position: relative; height: 2px; background: var(--ink); transform-origin: left center; }
.match__link::before, .match__link::after {
  content: ""; position: absolute; top: 50%; width: 0.5rem; height: 0.5rem; border-radius: 50%; transform: translateY(-50%);
}
.match__link::before { left: -0.25rem; background: var(--cobalt); }
.match__link::after { right: -0.25rem; background: var(--tile); }

.match__result {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--ink); color: var(--white); border-radius: 0.875rem; padding: 0.875rem 1.125rem; font-size: 0.9375rem;
}
.match__result strong { font-family: var(--display); font-weight: 600; margin-right: 0.375rem; }
.match__mark { width: 2.25rem; height: 1.562rem; flex: none; }
.match__result .match__mark path { fill: var(--white); }

/* Анимация при загрузке: связи протягиваются по очереди, затем появляется итог */
@media (prefers-reduced-motion: no-preference) {
  .js .match__link { transform: scaleX(0); animation: link .45s cubic-bezier(.3,.7,.2,1) forwards; }
  .js .match__b { opacity: 0; animation: reveal .35s ease-out forwards; }
  .js .match__rows li:nth-child(1) .match__link { animation-delay: .35s; } .js .match__rows li:nth-child(1) .match__b { animation-delay: .6s; }
  .js .match__rows li:nth-child(2) .match__link { animation-delay: .6s; } .js .match__rows li:nth-child(2) .match__b { animation-delay: .85s; }
  .js .match__rows li:nth-child(3) .match__link { animation-delay: .85s; } .js .match__rows li:nth-child(3) .match__b { animation-delay: 1.1s; }
  .js .match__rows li:nth-child(4) .match__link { animation-delay: 1.1s; } .js .match__rows li:nth-child(4) .match__b { animation-delay: 1.35s; }
  .js .match__rows li:nth-child(5) .match__link { animation-delay: 1.35s; } .js .match__rows li:nth-child(5) .match__b { animation-delay: 1.6s; }
  .js .match__result { opacity: 0; transform: translateY(0.5rem); animation: rise .5s ease-out 1.95s forwards; }
}
@keyframes link { to { transform: scaleX(1); } }
@keyframes reveal { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Секции ---------- */
.section { padding: var(--sect) 0; }
.section__head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink .lead { color: #AEB8D0; }
.section--soft { background: rgba(241, 234, 220, .72); }

/* Направления: строки, а не одинаковые карточки */
.services { border-top: 1px solid var(--ink); }
.service {
  display: grid; grid-template-columns: 1.1fr 1.4fr auto; gap: 1.5rem 3rem; align-items: start;
  padding: 2rem 1.25rem; margin: 0 -1.25rem; border-radius: 0.75rem; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s;
}
.service { transition: background .25s, box-shadow .25s, transform .25s cubic-bezier(.2,.8,.2,1); border-radius: 1.25rem; }
.service:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -14px rgba(15,27,51,.28); border-bottom-color: transparent; }
.service:nth-child(1):hover { box-shadow: 0 18px 40px -14px rgba(37,71,208,.4); }
.service:nth-child(2):hover { box-shadow: 0 18px 40px -14px rgba(20,163,160,.4); }
.service:nth-child(3):hover { box-shadow: 0 18px 40px -14px rgba(124,77,210,.4); }
.service:nth-child(4):hover { box-shadow: 0 18px 40px -14px rgba(201,150,43,.45); }
.service:nth-child(1):hover { background: #DCE5FF ; }
.service:nth-child(2):hover { background: #D3F1EF ; }
.service:nth-child(3):hover { background: #E9DEFB ; }
.service:nth-child(4):hover { background: #F6E3B4 ; }
.service__main p { color: var(--muted); margin: 0; }
.service__roles { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.25rem; }
.service__roles li { font-size: 0.875rem; padding: 0.375rem 0.75rem; border: 1px solid var(--line); border-radius: 62.44rem; background: var(--white); }
.service__more { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; color: var(--cobalt); white-space: nowrap; padding-top: 0.375rem; }
.service__more svg { width: 1.125rem; height: 1.125rem; transition: transform .15s; }
.service:hover .service__more svg { transform: translateX(3px); }

/* Принципы */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.principle {
  --accent: #7FA1FF;
  position: relative; padding: clamp(1.5rem, 2.4vw, 2.25rem); border-radius: 1.25rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, border-color .25s, box-shadow .25s;
}
.principle:nth-child(1) { --accent: #7FA1FF; }
.principle:nth-child(2) { --accent: #4FD8D2; }
.principle:nth-child(3) { --accent: #C3A2FF; }
.principle:nth-child(4) { --accent: #FFC857; }
.principle:nth-child(5) { --accent: #FF9E7A; }
.principle:nth-child(6) { --accent: #7BE0A0; }
.principle:hover {
  transform: translateY(-6px); border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--ink));
  box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--accent) 55%, transparent);
}
.principle__icon {
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; margin-bottom: 1.25rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.principle__icon svg { width: 1.625rem; height: 1.625rem; }
.principle p { color: #C9D1E3; max-width: 46ch; }
.principle .h3 { color: var(--white); }
.principle__promise {
  margin: 1.25rem 0 0; padding-left: 0.875rem; border-left: 3px solid var(--tile);
  color: var(--white) !important; font-weight: 500;
}

/* Шаги — настоящая последовательность, поэтому с номерами */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2rem; counter-reset: none; }
.step {
  position: relative; padding: 1.375rem 1.5rem 1.5rem; border-top: 2px solid var(--ink); border-radius: 0 0 1.25rem 1.25rem;
  background: rgba(255,255,255,.55); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-color .25s;
}
.step:hover { transform: translateY(-8px); background: #DCE5FF; border-top-color: var(--cobalt); box-shadow: 0 20px 44px -16px rgba(37,71,208,.35); }
.step:nth-child(3n+2):hover { background: #D3F1EF; border-top-color: var(--tile); box-shadow: 0 20px 44px -16px rgba(20,163,160,.4); }
.step:nth-child(3n):hover { background: #F6E3B4; border-top-color: #C9962B; box-shadow: 0 20px 44px -16px rgba(201,150,43,.45); }
@media (prefers-reduced-motion: reduce) { .step:hover, .service:hover, .principle:hover, .terms li:hover { transform: none; } }
.step__num { font: 600 0.9375rem/1 var(--display); color: var(--cobalt); }
.step__title { font: 600 1.188rem/1.3 var(--display); letter-spacing: -0.01em; margin: 0.75rem 0 0.5rem; }
.step p { color: var(--muted); margin-bottom: 0.75rem; }
.step__days { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: #0B7472; background: var(--tile-soft); padding: 0.25rem 0.625rem; border-radius: 62.44rem; }

/* О нас */
.about { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.terms { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1.25rem; }
.terms li { padding: 1.5rem; border-radius: 1.25rem; background: rgba(255,255,255,.75); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s; }
.terms li:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -14px rgba(37,71,208,.35); }
.terms li:nth-child(1):hover { background: #DCE5FF; }
.terms li:nth-child(2):hover { background: #E9DEFB; }
.terms li:nth-child(3):hover { background: #D3F1EF; }
.terms li:nth-child(4):hover { background: #F6E3B4; }
.terms .h3 { margin-bottom: 0.5rem; }
.terms p { margin: 0; color: var(--muted); }
.founders { display: grid; gap: 1.25rem; }
.founder { display: grid; grid-template-columns: 5.25rem 1fr; gap: 1.375rem; background: var(--white); border-radius: 1.25rem; padding: 1.625rem; }
.founder__mono {
  width: 5.25rem; height: 5.25rem; border-radius: 50%; display: grid; place-items: center;
  font: 700 2.25rem/1 var(--display); color: var(--white); background: var(--cobalt);
}
.founder:nth-child(2) .founder__mono { background: var(--tile); }
.founder__role { color: var(--cobalt); font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.625rem; }
.founder p:not(.founder__role) { color: var(--muted); }
.founder__focus { list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.founder__focus li { font-size: 0.8125rem; padding: 0.25rem 0.625rem; border-radius: 62.44rem; background: var(--paper); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; }
.faq__list { border-top: 1px solid var(--ink); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 1.375rem 2.75rem 1.375rem 0; position: relative;
  font-weight: 600; font-size: 1.125rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 0.375rem; top: 50%; width: 0.875rem; height: 0.875rem; margin-top: -0.5625rem;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s;
}
.qa[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.qa p { color: var(--muted); padding-right: 2.75rem; margin-bottom: 1.5rem; max-width: 64ch; }

/* ---------- Контакты и форма ---------- */
.contact { padding: var(--sect) 0; background: var(--white); border-top: 1px solid var(--line); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.tg-card {
  display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1.75rem; padding: 1.125rem 1.375rem;
  background: var(--ink); color: var(--white); border-radius: 1rem; text-decoration: none; max-width: 26.25rem;
  transition: background .15s;
}
.tg-card:hover { background: var(--ink-2); }
.tg-card svg { width: 1.875rem; height: 1.875rem; color: #5FC4F2; flex: none; }
.tg-card strong { display: block; font-size: 1.062rem; }
.tg-card small { color: #AEB8D0; font-size: 0.875rem; }
.contact__list { list-style: none; display: grid; gap: 0.75rem; }
.contact__list li { display: grid; grid-template-columns: 6.25rem 1fr; }
.contact__list span { color: var(--muted); }
.contact__list a { text-decoration: none; font-weight: 500; }
.contact__list a:hover { color: var(--cobalt); }

.form { position: relative; background: var(--paper); border-radius: 1.375rem; padding: clamp(1.375rem, 3vw, 2.25rem); display: grid; gap: 1rem; }
.form__dir { border: 0; margin: 0 0 0.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.form__dir legend { font-weight: 600; margin-bottom: 0.625rem; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 0.5625rem 1rem; border-radius: 62.44rem; border: 1.5px solid var(--line);
  background: var(--white); font-size: 0.9375rem; font-weight: 500; transition: all .15s;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--tile); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.375rem; }
.field span { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--body); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 0.75rem; padding: 0.8125rem 0.875rem;
  transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 5.75rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); }
.field input[aria-invalid="true"] { border-color: #C9372C; }
.form__error { margin: 0; color: #B3261E; font-weight: 500; font-size: 0.9375rem; }
.form__note { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.hp { position: absolute; left: -624.9rem; width: 1px; height: 1px; overflow: hidden; }
.form__done {
  position: absolute; inset: 0; border-radius: 1.375rem; background: var(--paper);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem);
}
.form__done[hidden] { display: none; }
.form__done h3 { font: 600 1.625rem/1.2 var(--display); margin: 1.125rem 0 0.625rem; }
.form__done p { color: var(--muted); max-width: 40ch; }
.form__done-mark { width: 4rem; height: 2.812rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Страница направления ---------- */
.page-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--line); }
.page-hero--center { text-align: center; padding: clamp(5rem, 12vw, 10rem) 0; border: 0; }
.page-hero--center .lead { margin: 0 auto; }
.page-hero--center .hero__cta { justify-content: center; }
.nf__mark { width: 6rem; height: 4.188rem; margin: 0 auto 1.75rem; }
.crumbs { display: flex; gap: 0.625rem; font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--cobalt); }
.page-hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 21.25rem)); gap: 1.5rem; margin: 2.75rem 0 0; }
.page-hero__facts div { padding-top: 1rem; border-top: 2px solid var(--ink); }
.page-hero__facts dt { font-size: 0.875rem; color: var(--muted); }
.page-hero__facts dd { margin: 0.375rem 0 0; font-weight: 600; font-size: 1.062rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 0.75rem; }
.tags li { padding: 0.625rem 1rem; border-radius: 62.44rem; background: var(--white); border: 1px solid var(--line); font-weight: 500; }
.checklist { list-style: none; counter-reset: c; display: grid; gap: 0.875rem; margin-top: 0.75rem; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem; align-items: baseline; }
.checklist li::before { content: counter(c); font: 600 0.875rem/1 var(--display); color: var(--cobalt); }

.others { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 0.75rem; }
.other { display: grid; gap: 0.375rem; padding: 1.5rem; background: var(--white); border-radius: 1rem; text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s; }
.other:hover { border-color: var(--ink); }
.other strong { font: 600 1.188rem/1.3 var(--display); }
.other span { color: var(--muted); }

/* ---------- Подвал ---------- */
.foot { background: var(--ink); color: #C9D1E3; padding: 4rem 0 1.75rem; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; }
.foot__brand p { margin-top: 1rem; }
.foot h3 { color: var(--white); font: 600 0.9375rem/1 var(--display); margin: 0 0 1rem; }
.foot nav { display: grid; gap: 0.625rem; align-content: start; }
.foot nav a { text-decoration: none; }
.foot a:hover { color: var(--white); }
.foot .logo__mark path { fill: var(--white); }
.foot__base { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.375rem; border-top: 1px solid rgba(255,255,255,.12); font-size: 0.875rem; }
.foot__base a { text-decoration: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid, .about, .contact__grid, .faq, .split { grid-template-columns: minmax(0, 1fr); }
  .match { max-width: 35rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service { grid-template-columns: minmax(0, 1fr); gap: 0.875rem; }
  .faq { gap: 0.5rem; }
}

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 4.5rem 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gut) 1.25rem;
    transform: translateY(-0.5rem); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 0.875rem 0; font-size: 1.062rem; border-bottom: 1px solid var(--line); }
  .nav__tg { display: block; color: var(--cobalt) !important; border-bottom: 0 !important; }
  .top__actions { margin-left: auto; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .top__actions .btn { display: none; }
  .promises { grid-template-columns: 1fr; gap: 0.875rem; }
  .promises div { display: flex; align-items: baseline; gap: 0.75rem; }
  .promises dd { margin: 0; }
  .match { padding: 1.125rem; }
  .match__rows li { grid-template-columns: 1fr 1.5rem 1fr; }
  .match__a, .match__b { font-size: 0.8125rem; padding: 0.5rem 0.5625rem; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .steps, .others, .form__row, .page-hero__facts { grid-template-columns: minmax(0, 1fr); }
  .founder { grid-template-columns: 1fr; }
  .founder__mono { width: 4rem; height: 4rem; font-size: 1.75rem; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .hero__cta .btn { flex: 1 1 100%; }
  .contact__list li { grid-template-columns: 5rem 1fr; }
}

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

/* ---------- Живой фон ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--paper); }
.bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.bg i:nth-child(1) { width: 52vmax; height: 52vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, rgba(37,71,208,.45), transparent 68%); animation: drift1 26s ease-in-out infinite alternate; }
.bg i:nth-child(2) { width: 46vmax; height: 46vmax; right: -14vmax; top: 12vh; background: radial-gradient(circle, rgba(20,163,160,.5), transparent 68%); animation: drift2 32s ease-in-out infinite alternate; }
.bg i:nth-child(3) { width: 44vmax; height: 44vmax; left: 20vw; bottom: -20vmax; background: radial-gradient(circle, rgba(241,200,120,.55), transparent 68%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(28vw, 22vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-30vw, 30vh) scale(.85); } }
@keyframes drift3 { to { transform: translate(24vw, -26vh) scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } }

/* ---------- Чат-ассистент ---------- */
.chat { position: fixed; right: clamp(1rem, 2vw, 1.75rem); bottom: clamp(1rem, 2vw, 1.75rem); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.chat__launcher {
  width: 3.75rem; height: 3.75rem; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: var(--white); background: linear-gradient(135deg, var(--cobalt), var(--tile));
  box-shadow: 0 12px 30px -8px rgba(37,71,208,.55); transition: transform .2s;
}
.chat__launcher:hover { transform: scale(1.07); }
.chat__teaser {
  position: relative; max-width: 17rem; padding: 1rem 2.25rem 1rem 1.125rem; border-radius: 1.125rem 1.125rem 0.25rem 1.125rem;
  background: var(--white); box-shadow: 0 16px 40px -12px rgba(15,27,51,.35); animation: chatpop .4s cubic-bezier(.2,.8,.2,1);
}
.chat__teaser[hidden] { display: none; }
.chat__teaser p { margin: 0 0 0.5rem; font-size: 0.9375rem; }
.chat__teaser a { font-weight: 600; color: var(--cobalt); text-decoration: none; }
.chat__teaser-x { position: absolute; top: 0.375rem; right: 0.5rem; border: 0; background: none; font-size: 1.375rem; line-height: 1; color: var(--muted); cursor: pointer; }
.chat__panel {
  display: none; flex-direction: column; width: min(24rem, calc(100vw - 2rem)); height: min(34rem, calc(100vh - 7rem));
  background: var(--white); border-radius: 1.25rem; overflow: hidden; box-shadow: 0 24px 60px -16px rgba(15,27,51,.45);
}
.chat.is-open .chat__panel { display: flex; animation: chatpop .25s cubic-bezier(.2,.8,.2,1); }
.chat__head { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; color: var(--white); background: linear-gradient(135deg, var(--ink), var(--cobalt-dark)); }
.chat__head div { flex: 1; line-height: 1.25; }
.chat__head strong { display: block; font-size: 0.9375rem; }
.chat__head small { color: #C9D1E3; font-size: 0.75rem; }
.chat__avatar { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255,255,255,.16); font: 700 0.8125rem/1 var(--display); }
.chat__close { border: 0; background: none; color: var(--white); font-size: 1.625rem; line-height: 1; cursor: pointer; opacity: .8; }
.chat__log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.625rem; background: var(--paper); }
.chat__msg { max-width: 86%; padding: 0.625rem 0.875rem; border-radius: 1rem; font-size: 0.9375rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 0.25rem; }
.chat__msg--user { align-self: flex-end; color: var(--white); background: var(--cobalt); border-bottom-right-radius: 0.25rem; }
.chat__msg.is-typing { color: var(--muted); animation: chatblink 1s infinite; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chat__chips button { border: 1px solid var(--cobalt); color: var(--cobalt); background: var(--white); border-radius: 62.44rem; padding: 0.375rem 0.75rem; font: inherit; font-size: 0.875rem; cursor: pointer; transition: background .15s; }
.chat__chips button:hover { background: #DCE5FF; }
.chat__form { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); background: var(--white); }
.chat__input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.625rem 0.875rem; font: inherit; font-size: 0.9375rem; background: var(--paper); }
.chat__input:focus { outline: 2px solid var(--cobalt); outline-offset: 0; }
.chat__send { width: 2.75rem; border: 0; border-radius: 0.75rem; display: grid; place-items: center; color: var(--white); background: var(--cobalt); cursor: pointer; }
.chat__send:disabled { opacity: .5; cursor: default; }
@keyframes chatpop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes chatblink { 50% { opacity: .45; } }
@media (max-width: 640px) { .chat.is-open .chat__launcher { display: none; } .chat__panel { height: calc(100vh - 2rem); } }
@media (prefers-reduced-motion: reduce) { .chat__msg.is-typing, .chat__teaser, .chat.is-open .chat__panel { animation: none; } }

/* ---------- Мобильная версия: страница не шире экрана ---------- */
html, body { overflow-x: clip; max-width: 100%; }
.hero__grid > *, .contact__grid > *, .about > *, .split > *, .service > *, .step, .principle { min-width: 0; }
.h1, .h2, .h3, .step__title, .lead { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 640px) {
  .h1 { font-size: clamp(1.625rem, 8vw, 2rem); }
  .h2 { font-size: clamp(1.375rem, 6.4vw, 1.75rem); }
  .lead { font-size: 1.0625rem; }
  .service { margin: 0; padding: 1.5rem 0.5rem; }
  .step { padding: 1.25rem 1.125rem; }
  .btn { max-width: 100%; }
  .match__rows li { gap: 0.25rem; }
  .match__a, .match__b { min-width: 0; overflow-wrap: anywhere; }
  .top__row { gap: 0.5rem; }
  .logo { font-size: 1.125rem; }
  .form { padding: 1.25rem; }
  .form__dir { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .foot__base { flex-direction: column; gap: 0.5rem; }
}

/* Телефоны: крупнее текст и контрастнее, фон спокойнее */
@media (max-width: 640px) {
  html { font-size: 17px; }
  :root { --muted: #465169; }
  .bg i { opacity: .35; filter: blur(50px); }
  .btn, .chip span, .faq summary { min-height: 3rem; }
}
