/* ==========================================================
   «В точку»: стили. Сначала мобильная версия.
   ========================================================== */

/* 1. Шрифт (лежит локально, лицензия OFL) */
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Переменные и база. Тема одна: тёмная */
:root {
  color-scheme: dark;
  --paper: #17171A;          /* графитовый фон */
  --ink: #F6F3EC;            /* молочный текст */
  --coral: #FF5A36;          /* единственный акцент */
  --on-coral: #17171A;       /* текст на коралловом всегда графитовый */
  --ink-soft: #B8B4AC;
  --surface: #1F1F23;        /* карточка */
  --tile: #27272C;           /* плитки внутри карточки */
  --border: rgba(246, 243, 236, .12);
  --dots: rgba(246, 243, 236, .3);
  --shadow: 0 30px 70px rgba(0, 0, 0, .4);
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
}
.skip:focus { top: 12px; }

/* 3. Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 30px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.btn--accent { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.btn--accent:hover { box-shadow: 0 0 0 5px rgba(255, 90, 54, .28); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }

/* 4. Шапка */
.header { position: relative; z-index: 20; background: var(--paper); }
.js .header { position: sticky; top: 0; }   /* без JavaScript меню на телефоне высокое, поэтому не прилипает */
.header::after {               /* разделитель из точек */
  content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 0; height: 3px;
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) left center / 10px 3px repeat-x;
}
.header__in { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; min-height: 68px; }

.logo {
  display: inline-flex; align-items: baseline; margin-right: auto; padding: 8px 0;
  font-size: 1.3125rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; white-space: nowrap;
}
.logo::after {
  content: ""; width: .32em; height: .32em; margin-left: .1em;
  border-radius: 50%; background: var(--coral);
}

.nav { order: 5; width: 100%; }
.nav ul { display: flex; flex-wrap: wrap; column-gap: 20px; padding-bottom: 10px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; text-decoration: none; }
.nav a::after {                /* точка у активного и наведённого пункта */
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--coral);
  transform: scale(0); transition: transform .25s;
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current]::after { transform: scale(1); }

.menu-btn { display: none; }
/* С JavaScript меню на телефоне сворачивается. Без него ссылки видны всегда */
.js .menu-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 8px;
  border: 0; background: none; color: var(--ink); font: 600 .9375rem var(--sans); cursor: pointer;
}
.js .menu-btn::after { content: ""; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; transition: background-color .2s; }
.js .menu-btn[aria-expanded="true"]::after { background: var(--ink); }
.js .nav { display: none; }
.js .nav.is-open { display: block; }
.js .nav.is-open ul { flex-direction: column; padding: 8px 0 20px; }
.js .nav.is-open a { min-height: 52px; padding-left: 20px; font-size: 1.25rem; font-weight: 600; }
.js .nav.is-open a::after { left: 3px; top: 50%; bottom: auto; margin-top: -3px; }

/* 5. Первый экран */
.hero { overflow: hidden; overflow: clip; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 48px; }

.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--ink-soft); font-size: .875rem; line-height: 1.4;
}
.badge::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 90, 54, .2);
}

.hero__title {
  margin-top: 24px;
  font-size: clamp(2.25rem, 11vw, 5.25rem); font-weight: 820; line-height: 1.04; letter-spacing: -.04em;
}
.hero__line { display: block; }
.hero__accent { color: var(--coral); }

.hero__lead { max-width: 36em; margin-top: 24px; color: var(--ink-soft); font-size: clamp(1.125rem, .95rem + .5vw, 1.3125rem); line-height: 1.6; }

.hero__actions { display: grid; gap: 12px; margin-top: 32px; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 32px; color: var(--ink-soft); font-size: .9375rem; }
.facts li { position: relative; padding-left: 20px; }
.facts li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* Карточка площадок */
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.panel__label { color: var(--ink-soft); font-size: .9375rem; }
.panel__list { display: grid; gap: 12px; margin-top: 18px; }
.panel__list li { position: relative; padding: 20px 52px 20px 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--tile); }
.panel__list li::after {       /* точка в углу плитки */
  content: ""; position: absolute; top: 22px; right: 22px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ink);
}
.panel__list b { display: block; font-size: 1.375rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; }
.panel__list span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.45; }

/* Услуги и цены */
/* scroll-margin на 3px меньше высоты шапки, чтобы две точечные линии совпали, а не двоились */
.section { position: relative; padding: 64px 0 72px; scroll-margin-top: 65px; }
.section::before {             /* разделитель из точек */
  content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 0; height: 3px;
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) left center / 10px 3px repeat-x;
}
.section__title { font-size: clamp(2.25rem, 9vw, 5rem); font-weight: 820; line-height: 1.05; letter-spacing: -.04em; }
.section__title::after { content: ""; display: inline-block; width: .2em; height: .2em; margin-left: .08em; border-radius: 50%; background: var(--coral); }
.section__lead { max-width: 36em; margin-top: 16px; color: var(--ink-soft); font-size: clamp(1.0625rem, .95rem + .4vw, 1.25rem); }

.note {
  position: relative; margin-top: 32px; padding: 20px 22px 20px 46px;
  border: 2px dotted var(--dots); border-radius: 20px;
  color: var(--ink-soft); font-size: .9375rem; line-height: 1.6;
}
.note::before { content: ""; position: absolute; left: 20px; top: calc(20px + .5em); width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.note b { color: var(--ink); font-weight: 700; }

.services { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; }
.service {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; padding: 26px 24px 28px;
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface);
  transition: border-color .7s ease;
}
/* Точка в углу и подсветка, которая из неё раскрывается */
.service::before, .service::after {
  content: ""; position: absolute; top: 28px; right: 28px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--coral);
}
.service::before { z-index: -1; opacity: 0; transition: transform 1.1s cubic-bezier(.45, 0, .25, 1), opacity .9s ease; }
.service:hover, .service:focus-visible { border-color: var(--coral); }
.service:hover::before, .service:focus-visible::before { transform: scale(40); opacity: .11; }

.service__num { font-size: 3.5rem; font-weight: 400; line-height: 1; letter-spacing: -.05em; }
.service h3 { margin-top: 24px; font-size: 1.25rem; font-weight: 750; line-height: 1.3; letter-spacing: -.015em; }
.service__price { margin-top: 18px; font-size: clamp(1.875rem, 1.6rem + 1vw, 2.25rem); font-weight: 820; line-height: 1.15; letter-spacing: -.035em; }
.service__price small { font-size: 1rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.service__term { margin-top: 6px; color: var(--ink-soft); font-size: .9375rem; }
.service__text { margin-top: 20px; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.service__result { margin-top: auto; padding-top: 22px; color: var(--ink-soft); font-size: .9375rem; }
.service__result b { color: var(--ink); font-weight: 700; }

.eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  color: var(--coral); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.section__title--long { max-width: 13em; font-size: clamp(2rem, 7vw, 3.75rem); line-height: 1.1; }
.section__title, .doc h1, .faq__item h3 { text-wrap: balance; }   /* ровные строки в заголовках */

/* Этапы. Точки соединяет линия; на телефоне она вертикальная.
   Без JavaScript и при «меньше движения» линия сразу нарисована целиком */
.steps { display: grid; gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.step { position: relative; padding: 22px 20px 24px 78px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.step__num {
  position: absolute; z-index: 2; left: 18px; top: 22px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 2px solid var(--coral); border-radius: 50%; background: var(--coral);
  color: var(--on-coral); font-weight: 800; line-height: 1;
  transition: background-color .3s, color .3s;
}
.step.is-waiting .step__num { background: var(--surface); color: var(--ink); }
.step h3 { padding-top: 7px; font-size: 1.125rem; font-weight: 750; line-height: 1.35; letter-spacing: -.01em; }
.step p { margin-top: 14px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.7; }
.step:not(:last-child)::after {
  content: ""; position: absolute; z-index: 1; left: 37px; top: 62px; width: 2px; height: calc(100% - 22px);
  background: var(--coral); transform: scaleY(var(--seg, 1)); transform-origin: top;
}
/* Автоматическое рисование: отрезки по очереди, номер слегка увеличивается, когда линия дошла */
.steps.is-auto .step::after { transition: transform .8s cubic-bezier(.45, 0, .25, 1); }
.step.is-reached .step__num { animation: step-pop .5s ease; }
@keyframes step-pop { 50% { transform: scale(1.2); } }

/* Контакты: текст и большой коралловый круг */
.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.contact__text { max-width: 32em; margin-top: 20px; color: var(--ink-soft); line-height: 1.7; }
.circle {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; padding: 32px;
  border-radius: 50%; background: var(--coral); color: var(--on-coral); text-align: center;
}
.circle li + li { margin-top: clamp(16px, 4vw, 32px); }
.circle__label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.circle__value { display: table; margin: 0 auto; padding: 8px 0; font-size: clamp(1.1875rem, .95rem + 1vw, 1.625rem); font-weight: 800; line-height: 1.3; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.circle__value:hover { text-decoration-thickness: 4px; }
.circle__value--email { font-size: clamp(1rem, .75rem + .9vw, 1.375rem); overflow-wrap: anywhere; }  /* на узком экране переносится перед @ */
.circle a:focus-visible { outline-color: var(--on-coral); }

.services__timing { max-width: 52em; margin-top: 20px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.6; }

/* Оплата и возврат */
.terms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 40px; }
.term { display: flex; flex-direction: column; padding: 26px 22px 28px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.term h3 { font-size: 1.3125rem; font-weight: 750; line-height: 1.3; letter-spacing: -.015em; }
.term__note { margin-top: auto; padding-top: 22px; color: var(--ink-soft); font-size: .875rem; line-height: 1.6; }

/* Анимация оплаты: карточки выплывают по очереди, потом одна за другой загораются точки.
   Класс is-animated добавляет только скрипт, поэтому без него всё видно сразу */
.terms.is-animated .term { opacity: 0; transform: translateY(36px); }
.terms.is-animated .term.is-shown {
  opacity: 1; transform: none;
  transition: opacity .6s ease var(--delay, 0s), transform .8s cubic-bezier(.2, .7, .2, 1) var(--delay, 0s);
}
.terms .dots li:nth-child(2) { --step: 1; }
.terms .dots li:nth-child(3) { --step: 2; }
.terms.is-animated .dots li { opacity: .2; }
.terms.is-animated .dots li::before { transform: scale(0); }
.terms.is-animated .is-shown .dots li {
  opacity: 1;
  transition: opacity .5s ease calc(var(--delay, 0s) + .5s + var(--step, 0) * .3s);
}
.terms.is-animated .is-shown .dots li::before {
  animation: dot-on .7s ease calc(var(--delay, 0s) + .5s + var(--step, 0) * .3s) both;
}
.terms.is-animated .term__note { opacity: .2; }   /* сноска проявляется после пунктов */
.terms.is-animated .is-shown .term__note { opacity: 1; transition: opacity .5s ease calc(var(--delay, 0s) + 1.4s); }
@keyframes dot-on {
  0%   { transform: scale(0);   box-shadow: 0 0 0 0 rgba(255, 90, 54, .55); }
  55%  { transform: scale(1.7); }
  100% { transform: scale(1);   box-shadow: 0 0 0 11px rgba(255, 90, 54, 0); }
}
@media print {   /* на печати всё видно */
  .terms.is-animated .term, .terms.is-animated .dots li, .terms.is-animated .term__note { opacity: 1; transform: none; }
  .terms.is-animated .dots li::before { transform: none; }
}

/* Списки с точками вместо маркеров */
.dots { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; color: var(--ink-soft); line-height: 1.65; }
.dots li { position: relative; padding-left: 20px; }
.dots li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.dots b { color: var(--ink); font-weight: 700; }

/* Частые вопросы */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 56px; margin-top: 40px; }
.faq__item { position: relative; padding: 24px 0 26px 24px; border-top: 2px dotted var(--dots); }
.faq__item::before { content: ""; position: absolute; left: 0; top: calc(24px + .5em); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.faq__item h3 { font-size: 1.125rem; font-weight: 750; line-height: 1.4; letter-spacing: -.01em; }
.faq__item p { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }

/* Страница с документом (политика) */
.doc { max-width: calc(48rem + 2 * var(--pad)); padding-top: 48px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(1.875rem, 6vw, 3.25rem); font-weight: 820; line-height: 1.12; letter-spacing: -.035em; overflow-wrap: break-word; hyphens: auto; }
.doc h2 { margin-top: 44px; font-size: 1.3125rem; font-weight: 750; line-height: 1.35; letter-spacing: -.015em; }
.doc p { margin-top: 14px; color: var(--ink-soft); line-height: 1.75; overflow-wrap: anywhere; }
.doc .dots { margin-top: 14px; }
.doc a { color: var(--ink); text-underline-offset: 4px; }
.todo { border-bottom: 2px dashed var(--coral); color: var(--ink); font-weight: 600; }   /* заполнить до публикации */

/* Форма заявки */
[hidden] { display: none !important; }
.form { display: grid; gap: 20px; margin-top: 32px; padding: 24px 20px 26px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend, .form__manual label { display: block; margin-bottom: 8px; padding: 0; font-size: .9375rem; font-weight: 700; }
.field > label span, .field > legend span { margin-left: 6px; color: var(--ink-soft); font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field textarea, .form__manual textarea {
  display: block; width: 100%; padding: 14px 16px; border: 1px solid rgba(246, 243, 236, .24); border-radius: 14px;
  background: var(--paper); color: var(--ink); font: inherit; line-height: 1.5; transition: border-color .25s;
}
.field textarea, .form__manual textarea { resize: vertical; min-height: 120px; }
.form ::placeholder { color: #8E8B85; opacity: 1; }
.field input:hover, .field textarea:hover { border-color: rgba(246, 243, 236, .45); }
.field input:focus-visible, .field textarea:focus-visible, .form__manual textarea:focus-visible { outline: 2px solid var(--coral); outline-offset: 1px; border-color: var(--coral); }

/* Выбор площадки: кнопки с точкой, она закрашивается при выборе */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(246, 243, 236, .24); border-radius: 999px; font-size: .9375rem; font-weight: 600;
  transition: border-color .25s, background-color .25s;
}
.chip span::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--coral); border-radius: 50%; transition: background-color .25s; }
.chip input:checked + span { border-color: var(--coral); background: rgba(255, 90, 54, .14); }
.chip input:checked + span::before { background: var(--coral); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.form__actions { display: grid; gap: 12px; }
.form__actions .btn { background-clip: border-box; font-family: inherit; font-size: 1rem; cursor: pointer; }
.form__actions .btn--line { background: transparent; color: var(--ink); }
.form__actions .btn--line:hover { background: var(--ink); color: var(--paper); }
.form__hint { color: var(--ink-soft); font-size: .875rem; line-height: 1.65; }
.form__hint b { color: var(--ink); font-weight: 700; }
.form__hint a { color: var(--ink); text-underline-offset: 3px; }
.form__status:empty { display: none; }
.form__status { position: relative; padding: 14px 16px 14px 40px; border: 2px dotted var(--coral); border-radius: 14px; line-height: 1.55; }
.form__status::before { content: ""; position: absolute; left: 18px; top: calc(14px + .5em); width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.form__manual label { font-weight: 400; color: var(--ink-soft); line-height: 1.6; overflow-wrap: anywhere; }
.form__manual .btn { margin-top: 12px; background: transparent; color: var(--ink); font-family: inherit; cursor: pointer; }
.form__manual .btn:hover { background: var(--ink); color: var(--paper); }

/* Подвал */
.footer__policy { margin-top: 14px; font-size: .9375rem; }
.footer__policy a { display: inline-block; padding: 10px 0; text-underline-offset: 4px; }
.footer__policy a:hover { text-decoration-color: var(--coral); text-decoration-thickness: 3px; }
.footer { position: relative; padding: 40px 0 48px; }
.footer::before {
  content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 0; height: 3px;
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) left center / 10px 3px repeat-x;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 16px 0 0; font-size: .9375rem; }
.footer__legal li { position: relative; padding-left: 18px; }
.footer__legal li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.footer__note { max-width: 44em; margin-top: 20px; color: var(--ink-soft); font-size: .875rem; line-height: 1.6; }

/* 6. Главная точка. По умолчанию уже стоит на месте */
.dot { position: relative; display: inline-block; width: .23em; height: .23em; margin-left: .07em; }
.dot__x, .dot__y { position: absolute; inset: 0; display: block; }
.dot__x { z-index: 2; }
.dot__y { border-radius: 50%; background: var(--coral); }
.dot__ring { position: absolute; inset: 0; border: 1.5px solid var(--coral); border-radius: 50%; opacity: 0; pointer-events: none; }

/* Полёт: горизонталь и вертикаль анимируются отдельно, вместе получается дуга */
@media (prefers-reduced-motion: no-preference) {
  .dot__x { animation: fly-x 1.5s cubic-bezier(.3, .15, .3, 1) .45s both; }
  .dot__y { animation: fly-y 1.5s .45s both; }
  .dot__ring { animation: ring 1.1s cubic-bezier(.15, .6, .3, 1) 1.93s forwards; }  /* до прилёта кольца не видно */
}
@keyframes fly-x {
  from { transform: translateX(var(--fly-x, -60vw)); }   /* на телефоне летит слева */
  to   { transform: translateX(0); }
}
@keyframes fly-y {
  0%   { opacity: 0; transform: translateY(.9em) scale(2.8); animation-timing-function: cubic-bezier(.25, .6, .5, 1); }
  10%  { opacity: 1; }
  56%  { transform: translateY(-1.1em) scale(2.3); animation-timing-function: cubic-bezier(.5, 0, .75, .6); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes ring {
  0%   { top: 0; right: 0; bottom: 0; left: 0; opacity: 1; }
  100% { top: -.55em; right: -.55em; bottom: -.55em; left: -.55em; opacity: 0; }
}

/* «Меньше движения»: ничего не двигается и не растёт,
   но плавная смена цвета и прозрачности остаётся */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav a::after { transition: none; }
  .service::before { transform: scale(40); transition: opacity 1s ease; }  /* подсветка сразу в полный размер и мягко проявляется */
}

/* Фон «Траектория»: пунктирные дуги полёта точки в свободных местах */
.hero { position: relative; isolation: isolate; }
.section { isolation: isolate; overflow: hidden; overflow: clip; }
.section::after {              /* на телефоне и планшете: маленькая дуга в верхнем отступе раздела */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 6px; right: var(--pad); width: 126px; height: 46px;
  background: url("../img/arc.svg") center / contain no-repeat;
}
#contacts::after { display: none; }   /* здесь акцент — большой круг */

@media (min-width: 1100px) {
  .hero::after {               /* путь проходит между текстом и карточкой */
    content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background: url("../img/trail.svg") 0 0 / 100% 100% no-repeat;
    opacity: .75;
  }
  .section::after {            /* дуга справа от заголовка; на узких экранах меньше, чтобы не задеть текст */
    top: 40px; right: calc(max(0px, (100% - 1440px) / 2) + var(--pad));
    width: min(calc(100vw - 880px), 520px); height: 170px;
  }
  .section:nth-of-type(odd)::after { transform: rotate(-4deg); }
}

/* 7. Экраны шире */
@media (max-width: 374px) {
  .logo { font-size: 1.1875rem; }
  .btn--sm { padding: 0 14px; }
}

@media (min-width: 560px) {
  .hero__actions { display: flex; flex-wrap: wrap; }
}

@media (min-width: 768px) {
  .dot { --fly-x: 30vw; }      /* на широком экране летит справа */
  .hero__in { padding-top: 64px; padding-bottom: 72px; }
  .panel { padding: 30px; }
  .section { padding: 88px 0 96px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term { padding: 30px 28px 32px; }
  .form { padding: 30px 30px 32px; }
  .form__actions { display: flex; flex-wrap: wrap; }
  .service { padding: 32px 30px; }
  .service::before, .service::after { top: 34px; right: 34px; }
  .service:last-child { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
  .hero__in { grid-template-columns: minmax(0, 1.7fr) minmax(330px, 1fr); align-items: center; gap: clamp(40px, 5vw, 80px); padding-top: clamp(32px, 5vh, 64px); }
  .hero__title { font-size: clamp(3.5rem, min(6.5vw, 12vh), 6rem); }

  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; }
  .step { padding: 28px 22px 32px; }
  .step__num { position: relative; left: auto; top: auto; margin-bottom: 26px; }
  .step h3 { padding-top: 0; }
  .step:not(:last-child)::after {
    left: 62px; top: 47px; width: calc(100% - 22px); height: 2px;
    transform: scaleX(var(--seg, 1)); transform-origin: left;
  }

  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 64px; }
  .circle { position: sticky; top: 130px; margin-top: 36px; }   /* круг остаётся на виду, пока заполняют форму */
}

@media (min-width: 1100px) {
  .header__in { flex-wrap: nowrap; column-gap: 40px; min-height: 80px; }
  .logo { font-size: 1.5rem; }
  .nav, .js .nav { display: block; order: 0; width: auto; }
  .nav ul, .js .nav.is-open ul { flex-direction: row; flex-wrap: nowrap; column-gap: 30px; padding: 0; }
  .js .nav.is-open a { min-height: 44px; padding-left: 0; font-size: .9375rem; font-weight: 400; }
  .js .nav.is-open a::after { left: 50%; top: auto; bottom: 3px; margin-top: 0; }
  .js .menu-btn { display: none; }
  .header { position: sticky; top: 0; }
  .section { scroll-margin-top: 77px; }
  /* Асимметричная сетка: три карточки Авито, ниже две разной ширины */
  .terms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .services { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .service { grid-column: span 4; }
  .service:nth-child(4) { grid-column: span 5; }
  .service:last-child { grid-column: span 7; }
  .hero__in { min-height: min(calc(100vh - 81px), 820px); min-height: min(calc(100svh - 81px), 820px); }
}
