/* ====================================================================
   Сотри Границы — общая дизайн-система
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&family=Unbounded:wght@500;600;700;800&display=swap');

:root {
  /* Палитра */
  --paper:      #FBF6EF;
  --paper-2:    #F3EBDE;
  --paper-3:    #ECE0CF;
  --ink:        #20272B;
  --ink-soft:   #5A6268;
  --ink-faint:  #8A9095;

  --coral:      #E85638;
  --coral-deep: #C13E22;
  --coral-soft: #FBE2D8;

  --teal:       #137E6D;
  --teal-deep:  #0C5A4E;
  --teal-soft:  #D6EBE5;

  --amber:      #E89A2C;
  --amber-soft: #F8E7C6;

  --line:       rgba(32,39,43,0.12);
  --line-2:     rgba(32,39,43,0.20);

  /* Тип */
  --display: 'Unbounded', sans-serif;
  --sans: 'Golos Text', sans-serif;

  /* Радиусы / тени */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(32,39,43,0.05);
  --shadow-md: 0 14px 40px rgba(32,39,43,0.08);
  --shadow-lg: 0 30px 70px rgba(32,39,43,0.12);

  /* Раскладка */
  --maxw: 1240px;
  --gutter: 40px;
  --nav-h: 84px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* scroll-behavior: smooth НЕ ставим глобально — он делает прокрутку колесом/
   тачпадом вязкой, с задержкой. Плавность включаем только для кликов по якорям. */
html { scroll-behavior: auto; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Типографика ---------------------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--coral);
  display: inline-block;
}
.eyebrow.teal { color: var(--teal); } .eyebrow.teal::before { background: var(--teal); }
.eyebrow.amber { color: var(--amber); } .eyebrow.amber::before { background: var(--amber); }

.lead { font-size: 22px; line-height: 1.55; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* ---- Контейнеры / секции ------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 120px 0; }
.section--tight { padding: 84px 0; }
.bg-paper-2 { background: var(--paper-2); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-teal { background: var(--teal); color: #fff; }
.bg-coral { background: var(--coral); color: #fff; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(34px, 4vw, 52px); margin: 18px 0 0; }
.section-head .lead { margin-top: 20px; }

/* ---- Кнопки --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 17px;
  padding: 16px 28px; border-radius: var(--r-pill);
  transition: transform .18s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 10px 24px rgba(232,86,56,0.28); }
.btn-primary:hover { background: var(--coral-deep); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #11171a; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn-light { background: #fff; color: var(--ink); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---- Шапка ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  /* Непрозрачный фон вместо backdrop-filter: blur — размытие пересчитывалось
     на КАЖДОМ кадре скролла и было главной причиной дрожания под шапкой.
     Сплошной цвет + собственный слой = чистая композиция без перерисовки. */
  background: #FCF8F2;
  transform: translateZ(0);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1380px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; flex: none; }
.brand-mark { height: 42px; width: auto; flex: none; }
.brand-name { font-family: var(--sans); font-weight: 800; font-size: 18px; line-height: 1.05; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name small { display: block; font-weight: 500; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav-links a {
  position: relative;
  font-weight: 600; font-size: 13.5px; color: var(--ink); --c: var(--coral);
  padding: 8px 9px; border-radius: var(--r-pill); white-space: nowrap;
  transition: color .22s ease, background-color .22s ease, transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
}
.nav-links a:nth-child(1) { --c: #FBDACF; --ct: #B23A1C; }
.nav-links a:nth-child(2) { --c: #CFEBE1; --ct: #0E7A66; }
.nav-links a:nth-child(3) { --c: #F6E7BA; --ct: #8A6512; }
.nav-links a:nth-child(4) { --c: #E0DAF6; --ct: #5B4FB0; }
.nav-links a:nth-child(5) { --c: #D0E6F6; --ct: #1F6699; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active {
  background-color: var(--c); color: var(--ct);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px color-mix(in oklab, var(--ct) 22%, transparent);
}
.nav-links a.active { font-weight: 700; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-phone { display: none; }
.nav-toggle { display: none; }
/* компактная «Записаться» в шапке — чтобы полное меню жило до узких экранов */
.nav .btn-primary { padding: 10px 18px; font-size: 15px; }
/* вторичная кнопка «Помочь» в шапке — меньше основной, коралловый контур */
.nav .btn-help { padding: 6px 13px; font-size: 13px; font-weight: 700; color: var(--coral-deep); background: transparent; border: 1.5px solid color-mix(in oklab, var(--coral) 55%, transparent); border-radius: var(--r-pill); }
.nav .btn-help:hover { background: var(--coral-soft); border-color: var(--coral); }

/* ---- Карточки ------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--r-pill);
}
.tag.teal { background: var(--teal-soft); color: var(--teal-deep); }
.tag.coral { background: var(--coral-soft); color: var(--coral-deep); }
.tag.amber { background: var(--amber-soft); color: #9A6310; }

/* иконка-кружок */
.iconbox { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.iconbox.teal { background: var(--teal-soft); color: var(--teal-deep); }
.iconbox.coral { background: var(--coral-soft); color: var(--coral-deep); }
.iconbox.amber { background: var(--amber-soft); color: #9A6310; }
.iconbox svg { width: 32px; height: 32px; }

/* ---- Футер ---------------------------------------------------------- */
.footer { background: var(--ink); color: var(--paper); padding: 80px 0 40px; }
.footer a { color: rgba(251,246,239,0.72); transition: color .15s; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; }
.footer h4 { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 20px; font-weight: 700; }
.footer ul { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.footer-bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--ink-faint); }
.donate-strip { display: inline-flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); padding: 14px 20px; border-radius: var(--r-pill); font-size: 15px; }
.donate-strip a { color: var(--amber); font-weight: 700; }

/* ---- Мотив «стираемой границы» ------------------------------------- */
.erase {
  position: relative; display: inline-block;
}
.erase::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: 0.12em;
  background-image: linear-gradient(to right, currentColor 0 60%, transparent 60% 100%);
  background-size: 22px 100%;
  opacity: 0.9;
  transform-origin: left;
}

/* пунктирная разделительная полоса */
.dashed-rule { height: 2px; background-image: linear-gradient(to right, var(--line-2) 0 50%, transparent 50% 100%); background-size: 16px 100%; border: none; }

/* ---- Утилиты -------------------------------------------------------- */
.grid { display: grid; gap: 28px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* анимация появления */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(30px) scale(.985); transition: opacity .55s cubic-bezier(.16,.84,.3,1), transform .55s cubic-bezier(.16,.84,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---- Плавающая кнопка связи ---------------------------------------- */
/* pointer-events:none на контейнере: скрытое меню занимает место над кнопкой,
   и без этого невидимая область съедала клики по контенту рядом с кнопкой.
   Кликабельны только сама кнопка и открытое меню. */
.fab-contact { position: fixed; right: 26px; bottom: 26px; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; pointer-events: none; }
.fab-toggle { pointer-events: auto; }
.fab-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .24s ease, transform .24s cubic-bezier(.2,.8,.2,1); }
.fab-contact.open .fab-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.fab-item { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 9px 9px 9px 18px; box-shadow: var(--shadow-md); font-weight: 600; font-size: 15px; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.fab-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.fab-item .lab { line-height: 1.1; }
.fab-item .lab small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.fab-item .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.fab-item .ic svg { width: 20px; height: 20px; }
.ic-phone { background: var(--ink); } .ic-max { background: #6C2BD9; } .ic-tg { background: #2AABEE; } .ic-wa { background: #25D366; } .ic-vk { background: #0077FF; }
.fab-toggle { width: 64px; height: 64px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(232,86,56,.4); transition: transform .2s ease, background .2s ease; }
.fab-toggle:hover { background: var(--coral-deep); transform: translateY(-2px); }
.fab-toggle svg { width: 28px; height: 28px; transition: transform .26s ease; }
.fab-contact.open .fab-toggle svg.i-chat { display: none; }
.fab-toggle svg.i-close { display: none; }
.fab-contact.open .fab-toggle svg.i-close { display: block; }
.fab-toggle { position: relative; }
.fab-toggle .pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(232,86,56,.5); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .fab-contact:not(.open) .fab-toggle .pulse { animation: fabPulse 2.6s ease-out infinite; } }
@keyframes fabPulse { 0% { box-shadow: 0 0 0 0 rgba(232,86,56,.45); } 70% { box-shadow: 0 0 0 16px rgba(232,86,56,0); } 100% { box-shadow: 0 0 0 0 rgba(232,86,56,0); } }

/* ---- Живые детали (tweak): выглядывающий котик + птичка -------------- */
.pet { position: fixed; z-index: 240; pointer-events: none; }
body:not(.pets-on) .pet { display: none; }
/* котик меньше и в самом углу, чтобы не перекрывать контент; на узких экранах прячем */
.pet-cat { left: 10px; bottom: 0; width: 62px; color: var(--ink); transform: translateY(112%); transition: transform .6s cubic-bezier(.2,.9,.3,1.3); }
.pet-cat svg { width: 100%; display: block; filter: drop-shadow(0 -3px 8px rgba(0,0,0,.12)); }
body.pets-on .pet-cat.peek { transform: translateY(46%); }
@media (max-width: 860px) { .pet-cat { display: none; } }
.pet-bird { top: 70px; left: 0; width: 42px; color: var(--coral); transform: translateX(-22vw); }
@media (prefers-reduced-motion: no-preference) {
  .pet-bird.fly { animation: birdFly 9s linear 1; }
  .pet-bird.fly svg { animation: birdFlap .32s ease-in-out infinite; transform-origin: center; }
  @keyframes birdFly { 0% { transform: translateX(-12vw) translateY(0); } 50% { transform: translateX(52vw) translateY(-18px); } 100% { transform: translateX(114vw) translateY(8px); } }
  @keyframes birdFlap { 50% { transform: scaleY(.55); } }
}
@media (prefers-reduced-motion: reduce) { .pet { display: none !important; } }
@media (max-width: 560px) {
  .fab-contact { right: 16px; bottom: 16px; }
  .fab-item { font-size: 14px; padding: 8px 8px 8px 14px; }
  .fab-toggle { width: 58px; height: 58px; }
}

/* логотип: мягкая тень на тёмном футере для читаемости гранёного знака */
.footer .brand-mark { filter: drop-shadow(0 2px 7px rgba(0,0,0,.4)); }

/* ====================================================================
   ТЕМА B — «Фирменная» (палитра с действующего сайта: бирюза + азур + жёлтый)
   ==================================================================== */
[data-theme="brand"] {
  --paper:      #FFFFFF;
  --paper-2:    #ECF6F7;
  --paper-3:    #D7EEF0;
  --ink:        #37371F;   /* тёмная олива из слова «ГРАНИЦЫ» */
  --ink-soft:   #5C6047;
  --ink-faint:  #9AA088;

  --coral:      #159AA8;   /* primary -> бирюза логотипа */
  --coral-deep: #0E7682;
  --coral-soft: #D3EEF1;

  --teal:       #6E7146;   /* secondary -> олива логотипа */
  --teal-deep:  #50522F;
  --teal-soft:  #E7E8D3;

  --amber:      #CDA23E;   /* accent -> тёплое золото (грань самоцвета) */
  --amber-soft: #F3E7C6;

  --line:       rgba(55,55,31,0.13);
  --line-2:     rgba(55,55,31,0.22);
}
[data-theme="brand"] .btn-primary { box-shadow: 0 10px 24px rgba(21,154,168,0.30); }
[data-theme="brand"] .fab-toggle { box-shadow: 0 12px 30px rgba(21,154,168,.4); }

/* ====================================================================
   СЕЗОННЫЕ ПАЛИТРЫ (tweak «Время года» на главной). Перекрывают тему.
   ==================================================================== */
[data-season="spring"] {
  --paper: #F4FBEF; --paper-2: #E5F3DB; --paper-3: #D3EBC4;
  --ink: #2C3A22; --ink-soft: #57663F; --ink-faint: #93A57E;
  --coral: #E86E9E; --coral-deep: #C44E7E; --coral-soft: #FBE0EC;
  --teal: #6FB23A; --teal-deep: #4F8526; --teal-soft: #E2F0C9;
  --amber: #F2C530; --amber-soft: #FBEFBF;
  --line: rgba(44,58,34,.13); --line-2: rgba(44,58,34,.22);
}
[data-season="summer"] {
  --paper: #F0FCFA; --paper-2: #D6F4EE; --paper-3: #BCEBE1;
  --ink: #0E3A3F; --ink-soft: #3C6469; --ink-faint: #7AA5A6;
  --coral: #07B6C4; --coral-deep: #088A95; --coral-soft: #CBEFF2;
  --teal: #2FBE48; --teal-deep: #1F9034; --teal-soft: #D2F0CE;
  --amber: #FF9E1B; --amber-soft: #FCE6BE;
  --line: rgba(14,58,63,.14); --line-2: rgba(14,58,63,.24);
}
[data-season="autumn"] {
  --paper: #FBF2E5; --paper-2: #F2E1C9; --paper-3: #E8D0AC;
  --ink: #3A2818; --ink-soft: #6E5640; --ink-faint: #A98C6A;
  --coral: #D9622A; --coral-deep: #AE4818; --coral-soft: #F7DCC6;
  --teal: #A6402E; --teal-deep: #7E2C1E; --teal-soft: #F0D6CE;
  --amber: #E0A026; --amber-soft: #F7E3BE;
  --line: rgba(58,40,24,.15); --line-2: rgba(58,40,24,.26);
}
[data-season="winter"] {
  --paper: #F1F2FB; --paper-2: #E2E3F3; --paper-3: #CFD1EC;
  --ink: #1E2348; --ink-soft: #4A5070; --ink-faint: #8A8FB2;
  --coral: #5A57E0; --coral-deep: #4038B8; --coral-soft: #E0DEFB;
  --teal: #5E7290; --teal-deep: #44546B; --teal-soft: #DDE2EF;
  --amber: #C0394B; --amber-soft: #F4D6DB;
  --line: rgba(30,35,72,.15); --line-2: rgba(30,35,72,.26);
}
[data-season] .btn-primary { box-shadow: 0 10px 24px rgba(0,0,0,.14); }

/* ---- Переключатель темы -------------------------------------------- */
.theme-switch { position: fixed; left: 22px; bottom: 24px; z-index: 250; display: flex; align-items: center; gap: 4px; background: var(--ink); color: var(--paper); padding: 6px 6px 6px 14px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); }
.theme-switch .tl { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.62); margin-right: 6px; letter-spacing: .02em; }
.theme-switch button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-pill); color: rgba(255,255,255,.8); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; }
.theme-switch button .sw { width: 13px; height: 13px; border-radius: 50%; }
.theme-switch button[data-theme-val="warm"] .sw { background: #E85638; }
.theme-switch button[data-theme-val="brand"] .sw { background: #2BB3C0; }
.theme-switch button.on { background: #fff; color: var(--ink); }

/* переключатель стиля страницы в подвале */
.style-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.style-switch .ss-lbl { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.style-switch .ss-opts { display: inline-flex; gap: 4px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); padding: 4px; border-radius: var(--r-pill); }
.style-switch button { padding: 7px 14px; border-radius: var(--r-pill); color: rgba(251,246,239,.8); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.style-switch button:hover { color: #fff; }
.style-switch button.on { background: #fff; color: var(--ink); }
@media (max-width: 560px) { .theme-switch { left: 12px; bottom: 12px; padding: 5px 5px 5px 10px; } .theme-switch .tl { display: none; } .theme-switch button { padding: 7px 11px; font-size: 12.5px; } }

/* ---- Страницы документов / статьи ---------------------------------- */
.doc-main { padding: 56px 0 40px; }
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.doc-toc h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.doc-toc ul { display: flex; flex-direction: column; gap: 4px; }
.doc-toc a { display: block; padding: 8px 12px; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 500; color: var(--ink-soft); border-left: 2px solid transparent; transition: background .15s, color .15s; }
.doc-toc a:hover { background: var(--coral-soft); color: var(--coral-deep); }
.doc-article { max-width: 760px; }
.doc-article > section { scroll-margin-top: calc(var(--nav-h) + 20px); margin-bottom: 52px; }
.doc-article h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 18px; letter-spacing: -0.01em; }
.doc-article h3 { font-size: 21px; margin: 28px 0 10px; }
.doc-article p { color: var(--ink-soft); margin-bottom: 16px; font-size: 17px; line-height: 1.65; }
.doc-article p strong, .doc-article li strong { color: var(--ink); font-weight: 600; }
.doc-article a:not(.btn) { color: var(--coral-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-article ul.bul { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.doc-article ul.bul li { position: relative; padding-left: 26px; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.doc-article ul.bul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
@media (max-width: 920px) { .doc-layout { grid-template-columns: 1fr; gap: 20px; } .doc-toc { position: static; } .doc-toc ul { flex-direction: row; flex-wrap: wrap; } .doc-toc a { border: 1px solid var(--line); border-left: 1px solid var(--line); } }

/* нумерованные шаги */
.steps-flow { display: flex; flex-direction: column; gap: 16px; }
.flow { display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 30px; }
.flow .fn { width: 56px; height: 56px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-deep); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; }
.flow h3 { margin: 4px 0 8px; font-size: 20px; }
.flow p { margin-bottom: 8px; font-size: 16px; }
.flow ul.bul li { font-size: 16px; }

/* callout */
.callout { border-radius: var(--r-lg); padding: 28px 32px; margin: 0 0 18px; }
.callout.info { background: var(--coral-soft); }
.callout.warn { background: var(--amber-soft); }
.callout h3 { margin: 0 0 8px; font-size: 19px; }
.callout p { color: var(--ink); margin-bottom: 8px; }
.callout.info p, .callout.info h3 { color: var(--coral-deep); }

/* лицензионная плашка */
.req-box { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 34px; }
.req-box .req-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.req-box .req-row:last-child { border-bottom: none; }
.req-box .req-row .k { color: var(--ink-soft); flex: none; }
.req-box .req-row .v { font-weight: 600; text-align: right; }

/* аккордеон FAQ */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin-bottom: 12px; overflow: hidden; }
.acc summary { cursor: pointer; padding: 22px 26px; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--coral); transition: transform .2s; flex: none; }
.acc[open] summary::after { transform: rotate(45deg); }
.acc .acc-body { padding: 0 26px 24px; }
.acc .acc-body p { color: var(--ink-soft); font-size: 16.5px; margin-bottom: 12px; }
.acc .acc-body ul.bul li { font-size: 16px; }
.acc .tip { background: var(--paper-2); border-radius: var(--r-sm); padding: 14px 18px; font-size: 15px; color: var(--ink-soft); }
.acc .tip b { color: var(--coral-deep); }

/* сетка преимуществ (для статей "как мы работаем") */
.adv-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.adv { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; }
.adv .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; }
.adv:nth-child(4n+1) .ic { background: var(--coral-soft); color: var(--coral-deep); }
.adv:nth-child(4n+2) .ic { background: var(--teal-soft); color: var(--teal-deep); }
.adv:nth-child(4n+3) .ic { background: var(--amber-soft); color: #8a6512; }
.adv:nth-child(4n) .ic { background: var(--coral-soft); color: var(--coral-deep); }
.adv h3 { font-size: 20px; margin-bottom: 8px; }
.adv p { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 760px) { .adv-grid { grid-template-columns: 1fr !important; } .flow { grid-template-columns: 1fr; gap: 14px; } }

/* ---- Модальное окно выбора способа связи --------------------------- */
.contact-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; }
.contact-modal[hidden] { display: none; }
.cm-overlay { position: absolute; inset: 0; background: rgba(20,30,28,.55); opacity: 0; transition: opacity .22s ease; backdrop-filter: blur(3px); }
.contact-modal.show .cm-overlay { opacity: 1; }
.cm-card { position: relative; z-index: 1; width: min(440px, calc(100vw - 40px)); background: var(--paper); border-radius: var(--r-lg); padding: 38px 34px 30px; box-shadow: var(--shadow-lg); transform: translateY(16px) scale(.97); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.contact-modal.show .cm-card { transform: none; opacity: 1; }
.cm-card h3 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
.cm-card > p { color: var(--ink-soft); margin: 8px 0 24px; font-size: 16px; }
.cm-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); background: var(--paper-2); transition: background .15s, color .15s; }
.cm-close:hover { background: var(--paper-3); color: var(--ink); }
.cm-close svg { width: 18px; height: 18px; }
.cm-methods { display: flex; flex-direction: column; gap: 10px; }
.cm-group-label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); margin: 18px 0 10px; }
.cm-card > p + .cm-group-label { margin-top: 0; }
.cm-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.cm-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.cm-item .ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.cm-item .ic svg { width: 24px; height: 24px; }
.cm-item .lab { font-weight: 700; font-size: 17px; line-height: 1.15; }
.cm-item .lab small { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 560px) { .cm-card { padding: 30px 22px 24px; } .cm-card h3 { font-size: 22px; } }

/* ====================================================================
   ЖИВОЙ ФОН + АНИМАЦИИ
   ==================================================================== */
/* Воздушный фон «Круги на воде»: чистая тёплая бумага + два кластера
   концентрических волн, нарисованных крошечным inline-SVG (<1 КБ, ноль сетевых
   запросов). Смысловой акцент — яркая коралловая «капля», от которой расходятся
   круги: одно доброе действие расходится волнами (и отсылка к воде логотипа).
   Лежит ПРЯМО на фоне body (не fixed), скроллится с контентом — не дрожит.
   Позиции в px от верха — одинаково на любой длине страницы. */
body {
  background-color: var(--paper);
  background-image:
    /* капля + круги, бирюза, справа сверху */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 760 760'%3E%3Cg fill='none' stroke='%23137E6D'%3E%3Ccircle cx='380' cy='380' r='90' stroke-opacity='.28' stroke-width='2.5'/%3E%3Ccircle cx='380' cy='380' r='160' stroke-opacity='.20' stroke-width='2'/%3E%3Ccircle cx='380' cy='380' r='230' stroke-opacity='.14' stroke-width='2'/%3E%3Ccircle cx='380' cy='380' r='300' stroke-opacity='.09' stroke-width='2'/%3E%3Ccircle cx='380' cy='380' r='365' stroke-opacity='.05' stroke-width='2'/%3E%3C/g%3E%3Ccircle cx='380' cy='380' r='30' fill='%23E85638' opacity='.92'/%3E%3C/svg%3E"),
    /* второй кластер, коралл с янтарной каплей, ниже слева */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='%23E85638'%3E%3Ccircle cx='320' cy='320' r='75' stroke-opacity='.20' stroke-width='2'/%3E%3Ccircle cx='320' cy='320' r='140' stroke-opacity='.14' stroke-width='2'/%3E%3Ccircle cx='320' cy='320' r='205' stroke-opacity='.09' stroke-width='2'/%3E%3Ccircle cx='320' cy='320' r='270' stroke-opacity='.05' stroke-width='2'/%3E%3C/g%3E%3Ccircle cx='320' cy='320' r='22' fill='%23E89A2C' opacity='.85'/%3E%3C/svg%3E"),
    radial-gradient(900px 620px at 88% -120px, color-mix(in oklab, var(--teal) 6%, transparent), transparent 70%),
    radial-gradient(820px 560px at -6% 480px, color-mix(in oklab, var(--coral) 5%, transparent), transparent 70%);
  background-repeat: no-repeat;
  background-position: right -170px top -140px, left -240px top 1080px, top center, top center;
  background-size: 760px 760px, 640px 640px, auto, auto;
}
/* На узких экранах боковых полей нет — прячем «капли», чтобы круги не лезли
   под текст; остаются только мягкие цветные облака. */
@media (max-width: 760px) {
  body {
    background-image:
      radial-gradient(620px 460px at 92% -120px, color-mix(in oklab, var(--teal) 7%, transparent), transparent 70%),
      radial-gradient(560px 420px at -10% 520px, color-mix(in oklab, var(--coral) 6%, transparent), transparent 70%);
    background-position: top center, top center;
    background-size: auto, auto;
  }
}
body::before { content: none; }
/* Нейтрализуем старые декоративные слои (HTML-элемент .bg-waves остаётся
   на страницах, но больше ничего не рисует — снимаем нагрузку со скролла). */
body::after { content: none; }
.bg-waves { display: none; }

@media (prefers-reduced-motion: no-preference) {
  /* появление контента в герое: ВИДИМОЕ состояние — базовое; прячем только пока на <html> класс sg-enter.
     JS снимает класс на load — поэтому при любой заминке контент остаётся виден. */
  .heroA .kicker, .heroA h1, .heroA-lower,
  .heroB > div > *, .heroB .orbit,
  .heroC .kicker, .heroC h1, .heroC .lead, .heroC-cta, .heroC .path,
  .subhero .crumbs, .subhero .eyebrow, .subhero .tag, .subhero h1, .subhero .lead, .subhero .row,
  .hhero .crumbs, .hhero .eyebrow, .hhero h1, .hhero .lead, .hhero .row {
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  }
  html.sg-enter .heroA .kicker, html.sg-enter .heroA h1, html.sg-enter .heroA-lower,
  html.sg-enter .heroB > div > *, html.sg-enter .heroB .orbit,
  html.sg-enter .heroC .kicker, html.sg-enter .heroC h1, html.sg-enter .heroC .lead, html.sg-enter .heroC-cta, html.sg-enter .heroC .path,
  html.sg-enter .subhero .crumbs, html.sg-enter .subhero .eyebrow, html.sg-enter .subhero .tag, html.sg-enter .subhero h1, html.sg-enter .subhero .lead, html.sg-enter .subhero .row,
  html.sg-enter .hhero .crumbs, html.sg-enter .hhero .eyebrow, html.sg-enter .hhero h1, html.sg-enter .hhero .lead, html.sg-enter .hhero .row {
    opacity: 0; transform: translateY(26px);
  }
  .heroA h1, .heroC h1, .subhero h1, .hhero h1 { transition-delay: .08s; }
  .heroA-lower, .heroC .lead, .subhero .lead, .hhero .lead { transition-delay: .16s; }
  .heroC-cta, .subhero .row, .hhero .row, .heroC .path { transition-delay: .24s; }
  .heroB .orbit { transition-delay: .14s; }

  /* пульс-подсказка для плавающей кнопки уже есть; добавляем «всплытие» иконок меню связи */
  .fab-contact.open .fab-item { animation: fabItem .32s cubic-bezier(.2,.8,.2,1) both; }
  .fab-contact.open .fab-item:nth-child(1){animation-delay:.02s}
  .fab-contact.open .fab-item:nth-child(2){animation-delay:.06s}
  .fab-contact.open .fab-item:nth-child(3){animation-delay:.10s}
  .fab-contact.open .fab-item:nth-child(4){animation-delay:.14s}
  .fab-contact.open .fab-item:nth-child(5){animation-delay:.18s}
  @keyframes fabItem { from { opacity:0; transform: translateY(8px) scale(.96); } to { opacity:1; transform:none; } }
}

/* анимация дашевой «стираемой границы» под словом в герое */
@media (prefers-reduced-motion: no-preference) {
  .erase-word svg path { stroke-dasharray: 11 9; animation: eraseShift 3.2s linear infinite; }
  @keyframes eraseShift { to { stroke-dashoffset: -40; } }
}

/* мягкий «вдох» иконок направлений при наведении на карточку */
.dir-card .iconbox, .disc .iconbox, .val .iconbox { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.dir-card:hover .iconbox, .disc:hover .iconbox, .val:hover .iconbox { transform: translateY(-3px) rotate(-3deg); }

/* стат-числа слегка увеличиваются при появлении */
.stat .num, .hstat .num { transition: transform .5s cubic-bezier(.2,.8,.2,1); }

/* ---- Адаптив -------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
/* ===== Поэтапное сворачивание шапки: пункты уходят в бургер ПО ОДНОМУ ===== */
/* Выпадающее бургер-меню (.nav-more строит script.js). На каждой ширине в нём
   видны только те пункты, которые уже спрятаны из строки меню. */
.nav-more { display: none; position: absolute; top: calc(var(--nav-h) - 8px); right: var(--gutter); width: max-content; max-width: calc(100vw - var(--gutter) * 2); flex-direction: column; align-items: stretch; gap: 4px; background: var(--paper); padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 99; }
.nav-more.open { display: flex; }
.nav-more a { display: none; font-size: 17px; font-weight: 600; padding: 12px 18px; border-radius: var(--r-sm); white-space: nowrap; color: var(--ink); }
.nav-more a:hover { background: var(--paper-2); }
.nav-more a.active { font-weight: 700; }
.nav-more .nav-help-item { color: var(--coral-deep); font-weight: 700; }
.nav-more .nav-cta-item { display: none; background: var(--coral); color: #fff; font-weight: 700; border-radius: 10px; margin-top: 4px; }
.nav-more .nav-cta-item:hover { background: var(--coral-deep); color: #fff; }

/* этап 1: первой из шапки уходит «Помочь» — появляется бургер с ней внутри */
@media (max-width: 1020px) {
  .nav .btn-help { display: none; }
  .nav-toggle { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: var(--paper); }
  .nav-right { gap: 12px; }
  .nav-more.open .nav-help-item { display: block; }
}
/* дальше пункты меню убираются по одному, справа налево */
@media (max-width: 960px) { .nav-links a:nth-child(5) { display: none; } .nav-more.open a[data-i="5"] { display: block; } }
@media (max-width: 880px) { .nav-phone { display: none; } .nav .wrap { gap: 16px; } .nav-links a:nth-child(4) { display: none; } .nav-more.open a[data-i="4"] { display: block; } }
@media (max-width: 800px) { .nav-links a:nth-child(3) { display: none; } .nav-more.open a[data-i="3"] { display: block; } }
@media (max-width: 730px) { .nav-links a:nth-child(2) { display: none; } .nav-more.open a[data-i="2"] { display: block; } }
@media (max-width: 660px) { .nav-links { display: none; } .nav-more.open a[data-i="1"] { display: block; } }
/* на узких экранах кнопка «Записаться» в шапке не помещается рядом с логотипом
   и бургером — прячем её и показываем акцентным пунктом в бургер-меню;
   плюс остаётся плавающая кнопка связи */
@media (max-width: 680px) {
  .nav-right .btn-primary { display: none; }
  .nav-more.open .nav-cta-item { display: block; }
}
@media (max-width: 860px) {
  :root { --gutter: 22px; }
  body { font-size: 17px; }
  .section { padding: 80px 0; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .lead { font-size: 19px; }
}
@media (max-width: 560px) {
  .brand-name small { display: none; }
  /* крупные заголовки подстраниц: не дать длинному слову вылезти за экран */
  .subhero h1 { font-size: clamp(30px, 8.4vw, 42px) !important; }
  .hhero h1 { font-size: clamp(32px, 9vw, 48px) !important; }
  h1, h2, h3 { overflow-wrap: break-word; }
  /* длинные надписи кнопок переносим, чтобы не вылезали за экран */
  .btn { white-space: normal; max-width: 100%; text-align: center; }
}
/* очень узкие экраны (≤400px): уменьшаем поля и крупное hero-слово,
   чтобы исключить горизонтальное переполнение на старых/маленьких телефонах */
@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .heroC-mark { font-size: clamp(38px, 12vw, 60px) !important; }
  .heroC h1 { font-size: clamp(34px, 9vw, 60px) !important; }
  /* grid/flex-элементы по умолчанию имеют min-width:auto и не сжимаются ниже
     своего контента — на узких экранах это давало переполнение в пару px */
  .wrap > *, .wrap > * > * { min-width: 0; }
  /* уменьшаем боковые поля крупных панелей, чтобы контент влезал на 320px */
  .panel { padding-left: 20px; padding-right: 20px; }
}
