/* =========================================================
   Kadastr360 — минималистичный сайт с акцентом и анимацией
   ========================================================= */

:root {
  --bg: #ffffff;
  --fg: #0d0d0d;
  --muted: #6f6f6f;
  --line: #e7e7e7;
  --soft: #f6f6f5;
  --dark: #101010;
  --dark-line: #2a2a2a;
  --accent: #0d0d0d;          /* акцент монохромный */
  --accent-dark: #2e2e2e;
  --accent-soft: #f1f1f0;
  --glass: rgba(255, 255, 255, .62);   /* фон кнопок с блюром */
  --container: 1160px;
  --radius: 16px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Никаких overflow-x на body/html: они ломают position: sticky у шапки.
   Всё, что может вылезти по горизонтали, обрезается на своей секции. */
h1, h2, h3, p, a, li, summary { overflow-wrap: break-word; }

a { color: inherit; text-decoration: none; }
b { font-weight: 600; }

::selection { background: var(--fg); color: #fff; }
/* На тёмных секциях выделение инвертируем: почти чёрная подсветка на #101010 не читается */
.section--dark ::selection { background: #fff; color: var(--dark); }
.section--dark ::-moz-selection { background: #fff; color: var(--dark); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
/* на тёмном фоне почти чёрная обводка фокуса не видна */
.section--dark :focus-visible { outline-color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--fg); color: #fff; padding: 12px 18px; }
.skip-link:focus { left: 12px; top: 12px; }

/* ------------------------------- Анимации ------------------------------- */

/* Появление блоков при прокрутке. Прячем только при работающем JS
   (класс .js ставится инлайн-скриптом), иначе контент останется невидимым. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Появление первого экрана при загрузке */
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.js .hero__anim { opacity: 0; animation: heroIn .8s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 100ms); }

@keyframes floatSlow { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-40px, -14px, 0); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* --------------------------------- Кнопки --------------------------------- */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; height: 54px; padding: 0 30px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .18s var(--ease), box-shadow .25s var(--ease);
}
.btn i { font-style: normal; transition: transform .25s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn--dark { background: var(--fg); color: #fff; }
.btn--dark:hover { background: var(--accent-dark); box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .9); }

/* Матовое стекло вместо прозрачного фона */
.btn--ghost {
  border-color: var(--line); color: var(--fg);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.btn--ghost:hover { border-color: var(--fg); background: rgba(255, 255, 255, .85); }

.btn--light { background: #fff; color: var(--fg); }
.btn--light:hover { background: #e6e6e6; }
.btn--sm { height: 44px; padding: 0 22px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------------------------------- Шапка ---------------------------------- */

/* Шапка и хлебные крошки едут вместе — одна липкая панель */
.topbar { position: sticky; top: 0; z-index: 50; }

/* Размытие живёт на псевдоэлементе: иначе шапка становится containing block
   и мобильное меню отсчитывает позицию от неё, а не от всей панели */
.header { position: relative; border-bottom: 1px solid var(--line); }
.header::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: background .3s var(--ease);
}
.topbar.is-scrolled { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .5); }
.topbar.is-scrolled .header::before { background: rgba(255, 255, 255, .94); }
.header__inner { position: relative; display: flex; align-items: center; gap: 32px; height: 76px; transition: height .3s var(--ease); }
.topbar.is-scrolled .header__inner { height: 66px; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark {
  width: 30px; height: 30px; color: var(--fg); flex: none;
  border-radius: 7px;
  transition: transform .4s var(--ease);
}
.logo:hover .logo__mark { transform: scale(1.06); }
.logo__text { font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.logo__accent { color: var(--muted); font-weight: 500; transition: color .3s var(--ease); }
.logo:hover .logo__accent { color: var(--fg); }
.logo--sm .logo__mark { width: 26px; height: 26px; }

.nav { display: flex; gap: 30px; margin-right: auto; font-size: 16px; color: var(--muted); }
.nav__phone, .nav__cta { display: none; }   /* только в мобильном меню */
.nav a { position: relative; transition: color .2s var(--ease); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1.5px; background: var(--fg); transition: right .3s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { right: 0; }

.header__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header__phone { font-size: 16px; font-weight: 500; white-space: nowrap; transition: color .2s var(--ease); }
.header__phone:hover { color: var(--muted); }

.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 999px; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--fg); transition: transform .25s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Затемнение под открытым мобильным меню */
.nav-scrim {
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--topbar-h, 62px);
  z-index: 55; background: rgba(16, 16, 16, .4);
  opacity: 0; transition: opacity .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.nav-scrim.is-visible { opacity: 1; }
@media (min-width: 761px) { .nav-scrim { display: none; } }

/* ------------------------------- Первый экран ------------------------------- */

.hero { position: relative; padding: 68px 0 72px; overflow: hidden; }
.hero__inner { position: relative; z-index: 1; }

/* Фон в духе геодезии: горизонтали рельефа и точки съёмки */
.hero__bg {
  position: absolute; inset: -8% -10% auto -10%; height: 118%;
  color: #c9c9c7; opacity: .5; pointer-events: none;
  animation: floatSlow 26s ease-in-out infinite alternate;
}
.hero__bg svg { width: 100%; height: 100%; }

.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.eyebrow a:hover { color: var(--fg); text-decoration: underline; }

.hero__title { font-size: clamp(2.35rem, 5.4vw, 4.15rem); line-height: 1.06; font-weight: 620; letter-spacing: -0.045em; }
.hero__lead { max-width: 620px; margin-top: 22px; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); list-style: none;
}
.hero__facts li { font-size: 15.5px; }
.hero__facts span { display: block; color: var(--muted); font-size: 13px; letter-spacing: .1em; margin-bottom: 8px; }

/* --------------------------------- Секции --------------------------------- */

.section { padding: 80px 0; }
.section--muted { background: var(--soft); }
.section--dark { background: var(--dark); color: #fff; }

.section__head { margin-bottom: 40px; }
.section__head--center { text-align: center; }
.section__title { font-size: clamp(1.85rem, 3.4vw, 2.9rem); line-height: 1.12; font-weight: 620; letter-spacing: -0.035em; }
.section__sub { margin-top: 14px; color: var(--muted); }
.section__head--center .section__sub { margin-left: auto; margin-right: auto; max-width: 560px; }

/* -------------------------------- Услуги ---------------------------------- */

.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.block {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px 24px; background: #fff;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.block:hover { border-color: #d4d4d4; box-shadow: 0 24px 50px -34px rgba(0, 0, 0, .45); transform: translateY(-3px); }

.block__head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.block__num { font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.block__title { margin-top: 12px; font-size: 24px; font-weight: 620; letter-spacing: -0.03em; }
/* min-height держит заголовки блоков на одной линии при разной длине текста */
.block__desc { margin-top: 10px; font-size: 15px; color: var(--muted); min-height: 48px; }
.block__price { margin-top: 18px; font-size: 15px; color: var(--muted); }
.block__price b { font-size: 26px; color: var(--fg); font-weight: 620; letter-spacing: -0.03em; }

.block__list { display: flex; flex-direction: column; }

.block__all {
  margin-top: auto; padding-top: 18px; font-size: 15px; font-weight: 500; color: var(--fg);
  display: inline-flex; align-items: center; gap: 8px;
}
.block__all:hover { color: var(--muted); }
.block__all i { font-style: normal; transition: transform .25s var(--ease); }
.block__all:hover i { transform: translateX(4px); }

/* Аккордеон услуги */
.item { border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: none; }

.item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 0; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 500; letter-spacing: -0.015em;
  transition: color .2s var(--ease);
}
.item summary::-webkit-details-marker { display: none; }
.item summary:hover { color: var(--muted); }
.item[open] summary { color: var(--fg); }

.item__icon { position: relative; flex: none; width: 13px; height: 13px; }
.item__icon::before, .item__icon::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: currentColor; transition: transform .3s var(--ease);
}
.item__icon::after { transform: rotate(90deg); }
.item[open] .item__icon::after { transform: rotate(0deg); }

.item__body { padding-bottom: 18px; font-size: 15px; line-height: 1.62; color: var(--muted); animation: reveal .3s var(--ease); }
.item__link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  font-size: 14.5px; font-weight: 500; color: var(--fg);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.item__link i { font-style: normal; transition: transform .25s var(--ease); }
.item__link:hover { border-color: var(--fg); }
.item__link:hover i { transform: translateX(4px); }

.note { margin-top: 24px; font-size: 14.5px; color: var(--muted); max-width: 720px; }

/* ------------------------------ Схема работы ------------------------------ */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 40px; list-style: none; }
.step { display: flex; gap: 20px; }
.step__num {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--fg); color: #fff; font-size: 17px; font-weight: 500;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.step:hover .step__num { background: var(--accent-dark); transform: scale(1.08); }
.step__title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--muted); }

/* --------------------------- Внутренние страницы --------------------------- */

/* Крошки — часть липкой панели, едут вместе с шапкой */
.crumbs {
  padding: 12px 0; font-size: 14px; color: var(--muted);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.crumbs .container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs i { font-style: normal; color: #c9c9c9; }
.crumbs a { transition: color .2s var(--ease); }
.crumbs a:hover { color: var(--fg); }
.crumbs span { color: var(--fg); }

.page { padding: 0 0 80px; }
.page--center { padding: 100px 0; text-align: center; }
.page__head { padding: 40px 0 36px; max-width: 820px; }
.page__title { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; font-weight: 620; letter-spacing: -0.04em; }
.page__lead { margin-top: 18px; font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); }
.page__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.page--center .page__meta { justify-content: center; }

.price-tag {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--fg); font-size: 15px; font-weight: 600;
}

/* Карточки услуг */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cards--wide { grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px 24px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card:hover { border-color: var(--fg); transform: translateY(-4px); box-shadow: 0 26px 50px -34px rgba(0, 0, 0, .5); }
.card__num { font-size: 12.5px; letter-spacing: .12em; color: var(--muted); }
.card__title { font-size: 19px; font-weight: 620; letter-spacing: -0.025em; line-height: 1.25; }
.card__text {
  font-size: 14.5px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card__more {
  margin-top: auto; padding-top: 12px; font-size: 14.5px; font-weight: 500; color: var(--fg);
  display: inline-flex; align-items: center; gap: 7px;
}
.card__more i { font-style: normal; transition: transform .25s var(--ease); }
.card:hover .card__more i { transform: translateX(5px); }

/* Каталог услуг */
.catalog { padding-top: 26px; padding-bottom: 30px; }
.catalog + .catalog { border-top: 1px solid var(--line); }
.catalog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.catalog__title { margin-top: 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 620; letter-spacing: -0.03em; }
.catalog__title a:hover { color: var(--muted); }
.catalog__desc { margin-top: 10px; max-width: 720px; color: var(--muted); font-size: 15.5px; }
.catalog__price {
  flex: none; margin-top: 6px;
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--soft);
  color: var(--fg); font-size: 15px; font-weight: 600;
}

/* Подпункты услуги */
.subitems { margin-top: 4px; }
.subitems__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 620; letter-spacing: -0.03em; margin-bottom: 20px; }
.subitems__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.sub {
  position: relative; padding: 28px 26px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.sub::before {
  content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 2px;
  background: var(--fg); border-radius: 2px;
  transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.sub:hover { border-color: #d4d4d4; transform: translateY(-3px); box-shadow: 0 26px 50px -36px rgba(0, 0, 0, .45); }
.sub:hover::before { transform: scaleY(1); }
.sub__num { font-size: 12.5px; letter-spacing: .12em; color: var(--muted); }
.sub__title { margin-top: 10px; font-size: 19px; font-weight: 620; letter-spacing: -0.025em; line-height: 1.3; }
.sub__text { margin-top: 10px; font-size: 15px; color: var(--muted); }
.sub__link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 14.5px; font-weight: 500; color: var(--fg);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.sub__link i { font-style: normal; transition: transform .25s var(--ease); }
.sub__link:hover { border-color: var(--fg); }
.sub__link:hover i { transform: translateX(4px); }

/* Другие разделы / услуги */
.others { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.others__title { font-size: 20px; font-weight: 620; letter-spacing: -0.025em; margin-bottom: 18px; }
.others__list { display: flex; flex-direction: column; }
.others__link {
  display: flex; align-items: center; gap: 14px; padding: 18px 4px;
  border-bottom: 1px solid var(--line); font-size: 17px;
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.others__link > span { flex: 1; }
.others__link b { font-size: 15px; color: var(--muted); font-weight: 500; }
.others__link i { font-style: normal; color: var(--fg); transition: transform .25s var(--ease); }
.others__link:hover { color: var(--muted); padding-left: 10px; }
.others__link:hover i { transform: translateX(4px); }

/* ------------------------------ Контакты/форма ------------------------------ */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }

.contact__lead { margin-top: 20px; color: #b5b5b5; }
.contact__questions { margin-top: 22px; padding-left: 20px; color: #d8d8d8; font-size: 16px; }
.contact__questions li { margin-bottom: 10px; }
.contact__questions li::marker { color: #8d8d8d; }

.contact__direct { display: flex; flex-direction: column; gap: 6px; margin-top: 36px; font-size: 17px; }
.contact__direct a { border-bottom: 1px solid var(--dark-line); padding-bottom: 6px; width: fit-content; transition: color .2s var(--ease), border-color .2s var(--ease); }
.contact__direct a:hover { color: #fff; border-color: #fff; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; }

.field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.field__label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #8d8d8d; }
.field__label b { color: #fff; }

.field input, .field select, .field textarea {
  width: 100%; padding: 12px 2px; background: transparent; color: #fff;
  border: none; border-bottom: 1px solid var(--dark-line); border-radius: 0;
  font: inherit; font-size: 17px; transition: border-color .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 62px; }
.field input::placeholder, .field textarea::placeholder { color: #616161; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: #fff; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--dark); color: #fff; }
.field input[aria-invalid="true"] { border-bottom-color: #ff6b5e; }

/* Автозаполнение: браузер подставляет свою голубую подложку, тёмный текст и системный
   шрифт. Возвращаем оформление формы — фон гасим непрозрачной внутренней тенью. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active,
.field textarea:-webkit-autofill,
.field select:-webkit-autofill {
  font-family: inherit !important;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 100px var(--dark) inset;
  box-shadow: 0 0 0 100px var(--dark) inset;
  /* свой фон Chrome доводит анимацией — «замораживаем» её */
  transition: background-color 100000s 0s, border-color .25s var(--ease);
}
/* -webkit-text-fill-color сильнее color, иначе выделенный текст остаётся белым на белом */
.field input:-webkit-autofill::selection,
.field textarea:-webkit-autofill::selection { -webkit-text-fill-color: var(--dark); }

.field input:autofill,
.field textarea:autofill,
.field select:autofill {
  font-family: inherit !important;
  filter: none; background: transparent; color: #fff;
}

/* --------------------- Кастомный выпадающий список ---------------------
   Попап нативного <select> рисует ОС — стилями он не берётся. JS прячет
   select (значение формы) и строит свой список; без JS остаётся нативный. */
.field select.sel__native {
  position: absolute; width: 1px; height: 1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none; clip-path: inset(50%);
}

.sel { position: relative; width: 100%; }

.sel__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 2px; background: transparent; color: #fff;
  border: none; border-bottom: 1px solid var(--dark-line); border-radius: 0;
  font: inherit; font-size: 17px; text-align: left; cursor: pointer;
  transition: border-color .25s var(--ease);
}
.sel.is-open .sel__btn { border-bottom-color: #fff; }

/* стрелка — уголок из двух границ, разворачивается при раскрытии */
.sel__arrow {
  flex: none; width: 9px; height: 9px; margin: 0 4px 4px 0;
  border-right: 1.5px solid #8d8d8d; border-bottom: 1.5px solid #8d8d8d;
  transform: rotate(45deg);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.sel.is-open .sel__arrow { transform: translateY(4px) rotate(-135deg); border-color: #fff; }

.sel__list {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; list-style: none;
  background: #171717; border: 1px solid var(--dark-line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: reveal .18s var(--ease);
}
.sel--up .sel__list { top: auto; bottom: calc(100% + 8px); }
.sel__list:focus-visible { outline: none; }

.sel__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px; color: #c9c9c9; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.sel__opt.is-active { background: rgba(255, 255, 255, .09); color: #fff; }
.sel__opt[aria-selected="true"] { color: #fff; }
/* точка у выбранного пункта — вместо синей подсветки ОС */
.sel__opt::after {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity .15s var(--ease);
}
.sel__opt[aria-selected="true"]::after { opacity: 1; }

/* Кастомная галочка: нативный input спрятан, рисуем свой квадрат */
.check {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; line-height: 1.45; color: #a5a5a5; cursor: pointer;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.check input {
  position: absolute; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
}
.check__box {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center;
  border: 1px solid #4a4a4a; border-radius: 6px; background: transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.check__box::after {
  content: ""; width: 10px; height: 5.5px; margin-top: -2px;
  border: 1.8px solid var(--dark); border-top: 0; border-right: 0; border-radius: 1px;
  transform: rotate(-45deg) scale(.5); opacity: 0;
  transition: opacity .16s var(--ease), transform .22s var(--ease);
}
.check:hover .check__box { border-color: #7d7d7d; }
.check input:checked + .check__box { background: #fff; border-color: #fff; }
.check input:checked + .check__box::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check__box { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.check input[aria-invalid="true"] + .check__box { border-color: #ff6b5e; }
.check__text { padding-top: 1px; }
.check:hover .check__text { color: #cfcfcf; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form__status { min-height: 20px; font-size: 14.5px; color: #b5b5b5; }
.form__status--ok { color: #ffffff; }
.form__status--err { color: #ff8177; }

/* ---------------------------------- Подвал ---------------------------------- */

.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer__nav { display: flex; gap: 20px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.footer__nav a:hover { color: var(--fg); }
.footer__contacts { display: flex; gap: 22px; margin-left: auto; font-size: 16px; }
.footer__contacts a:hover { color: var(--muted); }
.footer__copy { width: 100%; font-size: 13.5px; color: var(--muted); }

/* -------------------------------- Адаптив -------------------------------- */

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .blocks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; gap: 48px; }
  .hero__facts { grid-template-columns: 1fr; gap: 18px; }
  .hero__facts span { display: inline; margin-right: 8px; }
  .subitems__grid { grid-template-columns: 1fr; }
  .cards--wide { grid-template-columns: 1fr; }
  .catalog__head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  /* Шапка: только логотип и бургер — остальное уезжает в меню */
  .header__inner { height: 62px; gap: 10px; }
  .topbar.is-scrolled .header__inner { height: 56px; }
  body.nav-lock { overflow: hidden; }
  .header__phone, .header__cta { display: none; }
  .burger { display: flex; }
  .logo__text { font-size: 18px; }
  .logo__mark { width: 27px; height: 27px; }

  /* Меню висит ровно под панелью: --topbar-h считает JS по её реальной высоте */
  .nav {
    position: fixed; left: 0; right: 0; top: var(--topbar-h, 62px); z-index: 60;
    flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 40px -32px rgba(0, 0, 0, .6);
    padding: 6px 24px calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - var(--topbar-h, 62px));
    max-height: calc(100dvh - var(--topbar-h, 62px));
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .22s var(--ease), transform .26s var(--ease), visibility .26s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 17px; }
  .nav a::after { display: none; }

  .nav a.nav__phone { display: block; font-weight: 600; }
  .nav a.nav__cta {
    display: flex; align-items: center; justify-content: center;
    margin-top: 14px; height: 50px; padding: 0 24px;
    background: var(--fg); color: #fff; border-radius: 999px;
    border-bottom: none; font-size: 16px; font-weight: 500;
  }

  /* Крошки в одну строку: оставляем родителя и текущую страницу */
  .crumbs .container > *:not(:nth-last-child(-n+3)) { display: none; }

  .hero { padding: 46px 0 44px; }
  .hero__facts { margin-top: 40px; padding-top: 24px; }
  .section { padding: 56px 0; }
  .section__head { margin-bottom: 30px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .block { padding: 24px 20px 18px; }
  .cards { grid-template-columns: 1fr; }
  .page__head { padding: 28px 0 26px; }
  .page { padding-bottom: 56px; }
  .others { margin-top: 40px; }
  .crumbs { padding: 10px 0; font-size: 13px; }
  .btn { width: 100%; }
  .btn--sm { width: auto; }
  .footer__inner { gap: 18px; }
  .footer__contacts { margin-left: 0; flex-direction: column; gap: 8px; }
}

/* Узкие телефоны: масштаб чуть мельче, чтобы всё помещалось без «зума» */
@media (max-width: 460px) {
  body { font-size: 15.5px; }
  .container { padding: 0 18px; }

  .header__inner { height: 58px; }
  .topbar.is-scrolled .header__inner { height: 54px; }
  .logo__text { font-size: 17px; }
  .logo__mark { width: 25px; height: 25px; }
  .burger { width: 40px; height: 40px; }
  .crumbs { padding: 9px 0; font-size: 12.5px; }

  .hero { padding: 36px 0 38px; }
  .hero__title { font-size: clamp(1.9rem, 8.6vw, 2.4rem); letter-spacing: -0.035em; }
  .hero__lead { font-size: 15.5px; margin-top: 18px; }
  .hero__actions { margin-top: 26px; gap: 10px; }
  .hero__facts { margin-top: 34px; padding-top: 22px; gap: 14px; }
  .hero__facts li { font-size: 14.5px; }

  .section { padding: 46px 0; }
  .section__title { font-size: clamp(1.5rem, 6.8vw, 1.9rem); }
  .section__sub { font-size: 15px; }

  .page__head { padding: 24px 0 22px; }
  .page__title { font-size: clamp(1.65rem, 7.6vw, 2.1rem); letter-spacing: -0.03em; }
  .page__lead { font-size: 15.5px; }
  .page__meta { gap: 10px; margin-top: 22px; }

  .btn { height: 50px; padding: 0 24px; font-size: 15px; }
  .price-tag { height: 40px; padding: 0 16px; font-size: 14px; }

  .block { padding: 22px 18px 16px; }
  .block__title { font-size: 21px; }
  .block__price b { font-size: 23px; }
  .item summary { font-size: 15.5px; padding: 15px 0; }

  .card, .sub { padding: 20px 18px; }
  .card__title, .sub__title { font-size: 17.5px; }
  .subitems__title { font-size: 1.35rem; }
  .catalog__title { font-size: 1.45rem; }

  .step__num { width: 40px; height: 40px; font-size: 16px; }
  .step { gap: 16px; }

  .contact__questions { font-size: 15px; }
  .field input, .field select, .field textarea, .sel__btn { font-size: 16px; }
  .others__link { font-size: 15.5px; padding: 15px 2px; }
  .footer { padding: 30px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero__anim { opacity: 1; animation: none; }
}
