/* ID Solutions — тёмная фирменная тема (воспроизведение текущего сайта, без Tilda). Mobile-first. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Якорная навигация (меню → секции главной): секция «приземляется» ниже фиксированной шапки (~90px) */
section[id] { scroll-margin-top: 100px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-hover); }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; color: #fff; font-weight: 500; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space); }
.section { padding: var(--section-pad) 0; }
.section--tight { padding: 45px 0; }
.section__title { text-align: center; margin-bottom: var(--space-lg); font-size: 42px; font-weight: 500; }
.section__lead { text-align: center; color: var(--c-muted); max-width: 620px; margin: 0 auto var(--space-lg); font-size: 22px; }
@media (max-width: 640px) { .section__title { font-size: 30px; } .section__lead { font-size: 18px; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Тонкий фирменный разделитель между секциями (как в оригинале) */
.separator { height: 1px; border: 0; margin: 0 auto; max-width: var(--container);
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent); opacity: .5; }

/* ---- Кнопки (pill) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: 0 40px; border-radius: var(--radius-pill);
  border: 2px solid var(--c-accent); background: var(--c-bg); color: var(--c-accent);
  font-weight: 500; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}
.btn:hover { background: #eeeeee; color: var(--c-accent); border-color: var(--c-accent); }
.btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.btn--accent { background: var(--c-accent); color: #eeeeee; border-color: #eeeeee; }
.btn--accent:hover { background: #eeeeee; color: var(--c-accent); border-color: var(--c-accent); }
/* Эффект «перелива» Tilda (btneffects-light): блик пробегает по кнопке раз в 4с (с паузой) */
.btn--shimmer { position: relative; overflow: hidden; isolation: isolate; }
.btn--shimmer::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55) 50%, transparent) no-repeat;
  background-size: 70px 100%; background-position: -90px 0;
  animation: btnShimmer 4s ease infinite;
}
@keyframes btnShimmer { 20%, 100% { background-position: calc(100% + 90px) 0; } }
@media (prefers-reduced-motion: reduce) { .btn--shimmer::before { animation: none; } }
.btn--tg { border-color: var(--c-tg); color: var(--c-tg); }
.btn--tg:hover { background: rgba(42, 168, 224, .15); color: var(--c-tg); }
.btn--max { border-color: var(--c-max); color: var(--c-max); }
.btn--max:hover { background: rgba(138, 107, 255, .15); color: var(--c-max); }
/* Значок внутри кнопки (например, Telegram у «Обсудить задачу») */
.btn__icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; }
/* Состояние «Отправляем…»: спиннер в кнопке (мгновенная обратная связь по клику) */
.btn.is-sending { opacity: .85; cursor: progress; }
.btn__spinner { width: 1em; height: 1em; flex: 0 0 auto; display: inline-block; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: btnSpin .7s linear infinite; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn__spinner { animation-duration: 1.4s; } }
/* CTA-пара (Обсудить задачу + Написать нам) — единый ряд на всех страницах */
.cta-buttons { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin: var(--space) 0; }
/* В футере — компактно, в столбик, во всю ширину колонки */
.cta-buttons--footer { flex-direction: column; align-items: stretch; gap: .5em; margin: 0; }
.cta-buttons--footer .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.contacts { display: inline-flex; gap: .6em; flex-wrap: wrap; }

/* ---- Header (фиксированный, прозрачный над hero, чёрный при скролле) ---- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--c-header); transition: background .3s, box-shadow .3s; }
body.has-hero .site-header:not(.is-scrolled) { background: rgba(0, 0, 0, .30); }
.site-header.is-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.4); }
/* Шапка — во всю ширину (как в оригинале): снимаем ограничение .container, даём комфортный боковой отступ. */
.site-header__inner { display: flex; align-items: center; gap: var(--space-lg); min-height: 90px;
  max-width: none; padding-inline: clamp(16px, 3vw, 48px); }
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo img { width: 290px; max-width: 55vw; height: auto; }
.site-header__spacer { margin-left: auto; }
/* Иконка личного кабинета — оригинальный SVG (оранжевый диск с силуэтом уже внутри файла) */
.site-header__account { width: 44px; height: 44px; display: inline-flex; align-items: center;
  justify-content: center; flex: 0 0 auto; transition: transform .15s ease, opacity .15s ease; }
.site-header__account:hover { transform: translateY(-1px); opacity: .85; }
.site-header__account img { width: 100%; height: 100%; display: block; }
/* Мини-статус ФССП в шапке (мельче и справа, «приклеен» как шапка) */
.site-header__fssp { display: inline-flex; align-items: center; gap: .45em; padding: .4em .75em;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius-pill); color: #fff; font-size: .82rem;
  white-space: nowrap; flex: 0 0 auto; }
.site-header__fssp:hover { border-color: var(--c-accent); color: var(--c-accent); }
@media (max-width: 1100px) { .site-header__fssp-label { display: none; } }

.site-nav { display: flex; align-items: center; }
.site-nav__toggle { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius-sm); cursor: pointer; }
.site-nav__burger, .site-nav__burger::before, .site-nav__burger::after { display: block; width: 20px; height: 2px; background: #fff; position: relative; }
.site-nav__burger::before, .site-nav__burger::after { content: ""; position: absolute; left: 0; }
.site-nav__burger::before { top: -6px; } .site-nav__burger::after { top: 6px; }
.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list a { color: #fff; font-weight: 400; font-size: .95rem; }
.site-nav__list a:hover { color: var(--c-accent); }

/* Бургер раньше (≤1300px): 8 пунктов меню + крупный логотип не помещаются в строку на средних экранах. */
@media (max-width: 1300px) {
  .site-nav__list { display: none; position: absolute; left: 0; right: 0; top: 90px; flex-direction: column;
    gap: 0; background: #000; border-top: 1px solid var(--c-border); padding: var(--space); }
  .site-nav__list.is-open { display: flex; }
  .site-nav__list li { padding: .6em 0; border-bottom: 1px solid var(--c-border); }
}
@media (min-width: 1301px) {
  .site-nav__toggle { display: none; }
  .site-nav__list { display: flex; gap: 20px; align-items: center; }
}

/* main: компенсируем фиксированную шапку (кроме страниц с hero) */
.site-main { padding-top: 90px; }
body.has-hero .site-main { padding-top: 0; }

/* ---- Hero (обложка 100vh, JS-параллакс через ::before — как Tilda cover «dynamic») ---- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -15%; left: 0; right: 0; height: 130%; z-index: 0;
  /* Подложка вместо фото: тёплое «свечение» (как яркий участок прежней картинки — оптоволокно)
     по центру-верху, откуда расходится неон, на тёплом тёмно-бордовом градиенте, снизу почти чёрный. */
  background:
    radial-gradient(42% 38% at 62% 29%, rgba(240, 130, 80, .42), transparent 70%),
    radial-gradient(85% 75% at 60% 36%, rgba(204, 90, 53, .15), transparent 78%),
    linear-gradient(to bottom, #41201a 0%, #1d1310 48%, #0b0b0b 100%);
  transform: translateY(var(--hero-py, 0)); will-change: transform;
}
.hero .container { position: relative; z-index: 1; }
/* Неоновая гексагональная сеть в hero (canvas, JS-порт референса). Поверх фона, под контентом.
   mix-blend-mode: screen — светящиеся линии «проявляются» над тёмным фоном, чёрная заливка трейлов не затемняет. */
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none; mix-blend-mode: screen; }
@media (prefers-reduced-motion: reduce) { .hero__canvas { display: none; } }
.hero h1 { margin-bottom: .35em; font-size: 52px; font-weight: 500; color: #fff; text-shadow: 0 2px 1px rgba(0,0,0,.9); }
.hero__lead { color: #eeeeee; font-size: 26px; line-height: 34px; font-weight: 400; text-shadow: 0 1px 1px rgba(0,0,0,.9); margin: 0; }
.hero__cta { display: flex; gap: .9em; flex-wrap: wrap; margin-top: var(--space-lg); }
.hero__status { margin-top: var(--space-lg); max-width: 640px; }
.hero__inner { display: flex; align-items: center; gap: var(--space-lg); justify-content: space-between; }
.hero__content { flex: 1 1 auto; max-width: 600px; }
.hero__aside { flex: 0 0 auto; }
@media (max-width: 900px) {
  .hero__inner { flex-direction: column; align-items: flex-start; }
  .hero__aside { width: 100%; }
}
/* FSSP — квадратная карточка (как на /fssp), приклеена справа в hero */
.fssp-card { width: 230px; max-width: 100%; background: var(--c-bg-2); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: var(--space); box-shadow: var(--shadow); }
.fssp-card__head { display: flex; align-items: center; gap: .45em; color: var(--c-muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .05em; }
.fssp-card__status { font-size: 1.4rem; font-weight: 500; color: #fff; margin: .1em 0 .5em; }
.fssp-card__metrics { list-style: none; margin: 0 0 .6em; padding: 0; display: grid; gap: .22em;
  color: var(--c-muted); font-size: .82rem; }
.fssp-card__metrics b { color: var(--c-text); font-weight: 600; }
.fssp-card__time { font-size: .76rem; }
.fssp-card__link { font-weight: 600; font-size: .88rem; }

/* Плавающий статус ФССП — фикс справа, ниже шапки (доп. штрих); разворот деталей по стрелке */
.fssp-float { position: fixed; top: 104px; right: 18px; z-index: 90; width: 218px;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  background: rgba(20, 20, 20, .94); border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
.fssp-float__bar { display: flex; align-items: center; gap: .5em; padding: .6em .7em; color: #fff; font-size: .85rem; min-width: 0; }
.fssp-float__bar:hover { color: var(--c-accent); }
.fssp-float__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fssp-float__toggle { background: transparent; border: 0; color: var(--c-muted); cursor: pointer; padding: .5em .55em; display: inline-flex; }
.fssp-float__toggle:hover { color: var(--c-accent); }
.fssp-float__toggle svg { width: 18px; height: 18px; transition: transform .25s ease; }
.fssp-float[data-open] .fssp-float__toggle svg { transform: rotate(180deg); }
.fssp-float__details { grid-column: 1 / -1; padding: 0 .7em .65em; display: none; }
.fssp-float[data-open] .fssp-float__details { display: block; animation: faqIn .2s ease; }
.fssp-float__details ul { list-style: none; margin: 0 0 .5em; padding: .45em 0 0; border-top: 1px solid var(--c-border);
  display: grid; gap: .2em; color: var(--c-muted); font-size: .8rem; }
.fssp-float__details b { color: #fff; font-weight: 600; }
.fssp-float__na { margin: .45em 0 .5em; padding-top: .45em; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: .8rem; }
.fssp-float__open { font-weight: 600; font-size: .82rem; }
@media (max-width: 980px) { .fssp-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .fssp-float__details { animation: none; } }
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .hero__lead { font-size: 20px; line-height: 26px; }
}
/* Входные анимации hero — 1:1 как оригинал Tilda (блок t189, data-animate-group).
   Партитура (см. память hero-animation-timing):
   - пролог ~1.5s: hero держится невидимым поверх cover-картинки (Tilda: setTimeout(start,1500));
   - заголовок падает сверху (fadeindown −100px), подзаголовок и кнопки поднимаются снизу (fadeinup +100px);
   - стаггер 0 / 0.3 / 0.8 / 1.2 / 1.6s (после заголовка +0.3, после текста +0.2-разделитель, между кнопками +0.4);
   - длительности намеренно разные: заголовок 1.2s, подзаголовок 0.7s, кнопки 1.0s;
   - кривая cubic-bezier(.19,1,.22,1) (резкий старт, долгий мягкий доезд); только ≥1200px.
   Преролл 1.5s «зашит» в animation-delay; fill-mode both держит начальное состояние во время паузы. */
@media (min-width: 1200px) {
  .hero h1       { animation: heroDown 1.2s cubic-bezier(.19, 1, .22, 1) both 1.5s; }
  .hero__lead    { animation: heroUp   0.7s cubic-bezier(.19, 1, .22, 1) both 1.8s; }
  .hero__cta .btn { animation: heroUp  1.0s cubic-bezier(.19, 1, .22, 1) both; }
  .hero__cta .btn:nth-child(1) { animation-delay: 2.3s; }
  .hero__cta .btn:nth-child(2) { animation-delay: 2.7s; }
  .hero__cta .btn:nth-child(3) { animation-delay: 3.1s; }

  /* Уважение к prefers-reduced-motion: без пролога и полёта, сразу на месте */
  @media (prefers-reduced-motion: reduce) {
    .hero h1, .hero__lead, .hero__cta .btn { animation: none; }
  }
}
@keyframes heroDown { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: none; } }
@keyframes heroUp { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: none; } }
.hero__chevron { position: absolute; left: 50%; bottom: 40px; z-index: 2; transform: translateX(-50%); color: #eeeeee; animation: t-arrow 1.7s ease infinite; }
.hero__chevron:hover { opacity: .7; }
.hero__chevron svg { width: 30px; height: 30px; }
@keyframes t-arrow { 0%,100% { transform: translateX(-50%) translateY(0); } 50%,55% { transform: translateX(-50%) translateY(-7px); } }

/* ---- «О нас» (картинка + текст) ---- */
.about { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1fr; } }
.about__img { border-radius: var(--radius); overflow: hidden; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: 42px; }
.about p { font-size: 22px; margin: 0; }
@media (max-width: 640px) { .about h2 { font-size: 30px; } .about p { font-size: 18px; } }

/* ---- Преимущества (сетка на тёмном) ---- */
.adv { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 640px) { .adv { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .adv { grid-template-columns: repeat(3, 1fr); } }
.adv__item h3 { color: var(--c-accent); font-size: 18px; }
.adv__item p, .adv__item ul { color: var(--c-muted); margin: 0; font-size: 18px; }
.adv__item ul { padding-left: 1.1em; }

/* ---- Карточки услуг (светлые #eeeeee, иконка + текст) ---- */
.svc-cards { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; margin-bottom: calc(var(--space-lg) + var(--space)); }
@media (min-width: 760px) { .svc-cards { grid-template-columns: 1fr 1fr; } }
.svc-card { background: var(--c-card); color: var(--c-card-text); border-radius: var(--radius);
  padding: var(--space-lg); display: flex; gap: var(--space-lg); align-items: flex-start; height: 100%; }
.svc-card__icon { width: 64px; height: 64px; flex: 0 0 auto; }
.svc-card__title { margin: 0 0 .4em; font-size: 1.18rem; }
.svc-card__title a { color: var(--c-accent); font-weight: 500; }
.svc-card__descr { color: var(--c-card-muted); margin: 0 0 .8em; }
.svc-card__more { color: var(--c-accent); font-weight: 600; font-size: .9rem; }

/* ---- «Что мы ещё делаем» (иконки на тёмном) ---- */
.more-cards { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 600px) { .more-cards { grid-template-columns: 1fr 1fr; } }
.more-card { border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--space-lg); background: var(--c-bg-2); }
.more-card__icon { width: 52px; height: 52px; margin-bottom: var(--space); filter: brightness(0) invert(1); opacity: .85; }
.more-card h3 { color: #fff; }
.more-card p { color: var(--c-muted); margin: 0; }

/* ---- Новости ---- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }
.news-list__date { color: var(--c-muted); font-size: .85rem; }
.news-list__title { margin: .2em 0; }

/* ---- Партнёры (логотипы в светлых боксах) ---- */
/* Партнёры — логотипы на тёмном фоне с оранжевыми вертикальными разделителями (как Tilda t595, 5 в ряд) */
.partners { display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: center; gap: 0; }
.partners__item { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px 22px; border-left: 2px solid var(--c-accent); }
.partners__item:first-child { border-left: 0; }
.partners__item img { width: 100%; max-width: 200px; height: auto; }
/* Мобильная карусель партнёров (замена Tilda slds+hammer) — нативный свайп через scroll-snap */
@media (max-width: 980px) {
  .partners { overflow-x: auto; scroll-snap-type: x mandatory; justify-content: flex-start;
    padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
  .partners__item { flex: 0 0 auto; min-width: 55%; scroll-snap-align: center; }
}

/* ---- FSSP status widget ---- */
.fssp-widget { display: flex; align-items: center; gap: .75em; flex-wrap: wrap;
  border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--space); background: var(--c-bg-2); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-unknown); display: inline-block; }
.status-dot--ok { background: var(--c-ok); } .status-dot--warn { background: var(--c-warn); }
.status-dot--err { background: var(--c-err); }
.fssp-widget__metric { color: var(--c-muted); font-size: .85rem; }
.fssp-widget__link { margin-left: auto; white-space: nowrap; font-weight: 600; }
.content__fssp { margin: 0 0 var(--space-lg); }

/* ---- Cover-hero внутренних страниц (как Tilda t-cover 65vh) ---- */
.page-cover { position: relative; min-height: 65vh; display: flex; align-items: center; overflow: hidden; background-color: var(--c-bg); }
.page-cover::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(to bottom, rgba(20,20,20,.2), rgba(20,20,20,1)), var(--cover-img, none);
  background-size: cover; background-position: center; }
.page-cover .container { position: relative; z-index: 1; }
.page-cover h1 { font-size: clamp(34px, 6vw, 72px); color: #eeeeee; text-shadow: 0 2px 10px rgba(0,0,0,.3); margin: 0 0 .3em; }
.page-cover__subtitle { font-size: 24px; line-height: 1.5; color: #eeeeee; text-shadow: 0 1px 10px rgba(0,0,0,.3); max-width: 56ch; margin: 0; }
@media (max-width: 640px) { .page-cover { min-height: 50vh; } .page-cover__subtitle { font-size: 18px; } }

/* ---- FAQ-аккордеон (нативный <details>, как Tilda T585) ---- */
.faq { margin-top: var(--space-lg); border-bottom: 2px solid var(--c-accent); }
.faq__item { border-top: 2px solid var(--c-accent); }
.faq__q { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: var(--space); padding: 18px 0; font-size: 24px; font-weight: 500; color: #eeeeee; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; color: var(--c-accent); font-size: 30px; line-height: 1; flex: 0 0 auto; }
.faq__item[open] .faq__q::after { content: "\2212"; }
.faq__a { padding: 0 0 18px; font-size: 16px; color: var(--c-text); }
.faq__a p { margin: 0 0 .6em; }
.faq__item[open] .faq__a { animation: faqIn .25s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .faq__q { font-size: 18px; } }

/* ---- Контент-страницы (markdown) ---- */
.content { max-width: 820px; }
.content h2 { margin-top: 1.7em; color: var(--c-accent); font-size: 26px; }
.content h3 { margin-top: 1.1em; color: var(--c-accent); }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin: .3em 0; }
.content__cta { display: flex; gap: .75em; flex-wrap: wrap; margin-top: var(--space-lg); }
.breadcrumbs { color: var(--c-muted); font-size: .85rem; margin-bottom: var(--space); }
.breadcrumbs a { color: var(--c-muted); }

/* ---- Контакты ---- */
.contacts-block { font-style: normal; font-size: 22px; }
.contacts-block p { margin: .2em 0; }
.contacts-block a { color: var(--c-text); }
.contacts-grid { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 760px) { .contacts-grid { grid-template-columns: 1fr 1fr; } }
.contact-map { margin-top: var(--space-lg); }
.contact-map iframe { display: block; border: 0; border-radius: var(--radius-sm); }

/* ---- Форма обратной связи ---- */
.contact-form { display: grid; gap: var(--space); max-width: 520px; position: relative; }
.contact-form .field { display: grid; gap: .3em; }
.contact-form label { font-weight: 500; font-size: .92rem; }
.contact-form input[type=text], .contact-form input[type=tel], .contact-form input[type=email], .contact-form textarea {
  width: 100%; padding: .65em .8em; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-bg-2); color: var(--c-text); font: inherit; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.field--check label { display: flex; gap: .5em; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--c-muted); }
.field--check input { margin-top: .25em; }
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__status { margin: 0; padding: .6em .8em; border-radius: var(--radius-sm); font-size: .9rem; }
.contact-form__status.is-ok { background: rgba(56,177,106,.18); color: var(--c-ok); }
.contact-form__status.is-error { background: rgba(224,83,63,.18); color: var(--c-err); }
/* SmartCaptcha (невидимый режим): «щит» скрыт (hideShield) — под формой даём текстовую атрибуцию. */
.contact-form__captcha { margin: 0; font-size: .75rem; line-height: 1.4; color: var(--c-muted); }
.contact-form__captcha a { color: var(--c-muted); text-decoration: underline; }
.contact-form__captcha a:hover { color: var(--c-text); }

/* ---- «Мультик» успешной отправки: письмо вкладывается в конверт → запечатывается → улетает ---- */
/* При .is-sent поля формы тают, поверх играет анимация конверта (оверлей .envfly). */
.contact-form.is-sent > :not(.envfly) { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.envfly { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.3em; text-align: center;
  opacity: 0; animation: envShow .25s ease forwards; }
.envfly__stage { perspective: 800px; width: 176px; height: 116px; }
.envfly__env { position: relative; width: 176px; height: 116px; transform-origin: 50% 50%;
  animation: envFly .9s cubic-bezier(.5, 0, .35, 1) both 1.05s; }
/* база/задняя стенка конверта */
.envfly__body { position: absolute; inset: 0; z-index: 1; border-radius: 7px;
  background: linear-gradient(180deg, #d3623a, #cc5a35); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
/* письмо (вкладывается сверху внутрь) */
.envfly__paper { position: absolute; z-index: 2; left: 13px; right: 13px; top: 12px; height: 92px;
  background: #fff; border-radius: 3px; box-shadow: 0 2px 7px rgba(0,0,0,.25);
  background-image: linear-gradient(#d2d2d2,#d2d2d2), linear-gradient(#d2d2d2,#d2d2d2),
    linear-gradient(#d2d2d2,#d2d2d2), linear-gradient(#e3a08a,#e3a08a);
  background-size: 68% 3px, 80% 3px, 52% 3px, 34% 4px;
  background-position: 14px 18px, 14px 32px, 14px 46px, 14px 66px; background-repeat: no-repeat;
  transform: translateY(-54px); animation: envPaper .55s cubic-bezier(.6, 0, .3, 1) both; }
/* передняя стенка с диагональными швами (карман конверта) */
.envfly__front { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 58px; border-radius: 0 0 7px 7px;
  background-color: #cc5a35;
  background-image: linear-gradient(to top right, transparent 49.5%, rgba(0,0,0,.16) 50%, transparent 50.5%),
    linear-gradient(to top left, transparent 49.5%, rgba(0,0,0,.16) 50%, transparent 50.5%); }
/* клапан — запечатывается после того, как письмо легло внутрь */
.envfly__flap { position: absolute; z-index: 4; top: 0; left: 0; width: 176px; height: 70px;
  background: linear-gradient(180deg, #c2542f, #b84e2b); transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%); backface-visibility: hidden;
  transform: rotateX(180deg); animation: envFlap .5s ease both .5s; }
.envfly__msg { margin: 0; font-size: 20px; font-weight: 500; color: var(--c-text);
  opacity: 0; animation: envMsg .5s ease both 1.7s; }
.envfly__msg small { display: block; margin-top: .4em; font-size: 15px; font-weight: 400; color: var(--c-muted); }
@keyframes envShow { to { opacity: 1; } }
@keyframes envPaper { from { transform: translateY(-54px); } to { transform: translateY(6px); } }
@keyframes envFlap { from { transform: rotateX(180deg); } to { transform: rotateX(0deg); } }
@keyframes envFly {
  0%   { transform: translate(0,0) rotate(0) scale(1); opacity: 1; }
  16%  { transform: translate(0,9px) scale(1.04); }
  100% { transform: translate(70px,-300px) rotate(13deg) scale(.5); opacity: 0; } }
@keyframes envMsg { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.envfly__ok { margin-top: .2em; opacity: 0; animation: envMsg .5s ease both 1.95s; } /* кнопка «Хорошо» — проявляется после сообщения */
@media (prefers-reduced-motion: reduce) {
  .envfly__stage { display: none; }
  .envfly__msg, .envfly__ok { animation: none; opacity: 1; }
}

/* ---- Диалог формы ---- */
.contact-dialog { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 0; max-width: 560px;
  width: calc(100% - 2 * var(--space)); background: var(--c-bg); color: var(--c-text); box-shadow: var(--shadow); }
.contact-dialog::backdrop { background: rgba(0,0,0,.6); }
.contact-dialog[open] { animation: dialogIn .3s ease both; }
.contact-dialog[open]::backdrop { animation: backdropIn .3s ease both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(-24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.contact-dialog__inner { padding: var(--space-lg); position: relative; }
.contact-dialog__title { margin-top: 0; }
.contact-dialog__close { position: absolute; top: .5em; right: .6em; width: 36px; height: 36px; font-size: 1.5rem;
  line-height: 1; background: transparent; border: none; color: var(--c-muted); cursor: pointer; border-radius: var(--radius-sm); }
.contact-dialog__close:hover { background: var(--c-bg-2); color: #fff; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--c-border); background: #000; margin-top: 0; }
.site-footer__inner { display: grid; gap: var(--space-lg); padding: var(--section-pad) var(--space) var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 700px) { .site-footer__inner { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }
.site-footer__brand img { height: 40px; margin-bottom: var(--space); }
.site-footer__heading { font-weight: 500; margin-bottom: .6em; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4em; }
.site-footer a { color: var(--c-text); }
.site-footer a:hover { color: var(--c-accent); }
.site-footer__muted { color: var(--c-muted); font-size: .9rem; }
.site-footer__bottom { padding: var(--space) 0; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: .85rem; }

/* ---- Cookie ---- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: #000; border-top: 1px solid var(--c-border); }
.cookie__inner { display: flex; align-items: center; gap: var(--space); padding: var(--space); flex-wrap: wrap; }
.cookie__text { margin: 0; font-size: .9rem; color: var(--c-muted); flex: 1 1 280px; }

/* ---- Появление по скроллу — как chain-блоки Tilda: снизу (fadeinup 100px), по очереди
   шагом 0.16s, кривая cubic-bezier(.19,1,.22,1). Только ≥980px. Триггер в site.js настроен
   срабатывать чуть раньше входа в кадр — элемент «въезжает», а не «допрыгивает» уже видимым. ---- */
@media (min-width: 980px) {
  .reveal { opacity: 0; transform: translateY(100px); backface-visibility: hidden;
    transition: opacity 1s cubic-bezier(.19, 1, .22, 1), transform 1s cubic-bezier(.19, 1, .22, 1); }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* Карточки — короче и по очереди (chain, шаг 0.16s как в оригинале) */
  .svc-card.reveal, .more-card.reveal { transition-duration: .7s; }
  .svc-cards .reveal:nth-child(2), .more-cards .reveal:nth-child(2) { transition-delay: .16s; }
  .svc-cards .reveal:nth-child(3), .more-cards .reveal:nth-child(3) { transition-delay: .32s; }
  .svc-cards .reveal:nth-child(4), .more-cards .reveal:nth-child(4) { transition-delay: .48s; }

  /* Сетки с одним .reveal на контейнере (Преимущества, Партнёры): контейнер — только триггер,
     а въезжают по очереди сами элементы (иначе весь блок «выпрыгивает» разом). */
  .adv.reveal, .partners.reveal { opacity: 1; transform: none; }
  .adv__item, .partners__item { opacity: 0; transform: translateY(100px); backface-visibility: hidden;
    transition: opacity .7s cubic-bezier(.19, 1, .22, 1), transform .7s cubic-bezier(.19, 1, .22, 1); }
  .adv.is-visible .adv__item, .partners.is-visible .partners__item { opacity: 1; transform: none; }
  .adv.is-visible .adv__item:nth-child(2) { transition-delay: .16s; }
  .adv.is-visible .adv__item:nth-child(3) { transition-delay: .32s; }
  .adv.is-visible .adv__item:nth-child(4) { transition-delay: .48s; }
  .adv.is-visible .adv__item:nth-child(5) { transition-delay: .64s; }
  .adv.is-visible .adv__item:nth-child(6) { transition-delay: .80s; }
  .partners.is-visible .partners__item:nth-child(2) { transition-delay: .16s; }
  .partners.is-visible .partners__item:nth-child(3) { transition-delay: .32s; }
  .partners.is-visible .partners__item:nth-child(4) { transition-delay: .48s; }
  .partners.is-visible .partners__item:nth-child(5) { transition-delay: .64s; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal, .adv__item, .partners__item { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
