/* ==========================================================================
   Общие компоненты: шапка, меню, список услуг, форма заявки, портфолио
   «до/после», FAQ, виджет, блок с картой. Используются на разных страницах.
   ========================================================================== */

/* ---------- Шапка: парящая стеклянная панель ---------- */
.site-header {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 50%;
  width: min(1600px, calc(100% - 24px));
  transform: translateX(-50%);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.site-header.is-hidden { transform: translate(-50%, calc(-100% - 16px)); }

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 10px 0 22px;
  background: linear-gradient(180deg, rgba(28, 29, 38, 0.62), rgba(12, 12, 18, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  transition: height 0.45s var(--ease), background 0.45s var(--ease), border-color 0.45s var(--ease);
}
/* Тонкий блик по нижней кромке панели */
.site-header__bar::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 60, 54, 0.7), transparent);
  opacity: 0.6;
  pointer-events: none;
}
/* После прокрутки панель становится компактнее и плотнее */
.site-header.is-scrolled .site-header__bar {
  height: 50px;
  background: linear-gradient(180deg, rgba(20, 21, 29, 0.82), rgba(10, 10, 15, 0.78));
  border-color: rgba(255, 255, 255, 0.07);
}

.site-header__left,
.site-header__right {
  display: flex;
  align-items: center;
}
.site-header__left { gap: 28px; }
.site-header__right { gap: 18px; }

.site-header__nav { display: flex; align-items: center; gap: clamp(14px, 1.45vw, 24px); }
.site-header__nav a {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.3s var(--ease);
}
.site-header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--c-accent-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] { color: #fff; }
.site-header__nav > a[aria-current="page"]::after { transform: scaleX(1); }
.site-header__nav a:hover::after { transform: scaleX(1); }

.site-header__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s var(--ease);
}
.site-header__logo img { width: 104px; height: auto; aspect-ratio: 197 / 63; }
.site-header__logo:hover { opacity: 0.85; }

.site-header__tel {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.site-header__tel svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.site-header__tel:hover { border-color: var(--c-accent-hover); background: var(--c-accent); transform: translateY(-2px); }
.site-header__phone { font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; }
.site-header__phone:hover { color: var(--c-muted); }
.site-header__callback {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header__callback:hover { color: #fff; border-color: var(--c-accent-hover); }
.site-header__cta { gap: 0.32em; height: 40px; min-height: 0; padding-inline: 20px; border-radius: 0; font-size: 13px; text-transform: none; letter-spacing: 0.01em; }

.socials { display: flex; gap: 8px; }
.socials a { display: block; transition: opacity 0.2s var(--ease); }
.socials a:hover { opacity: 0.8; }
.socials img { width: 27px; height: 27px; }
/* Контурные иконки мессенджеров в стеклянных кружках */
.socials--line { gap: 6px; }
.socials--line a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.socials--line a:hover { opacity: 1; border-color: rgba(226, 60, 54, 0.8); background: rgba(226, 60, 54, 0.14); }
.socials--line svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }

/* Логотипы мессенджеров в фирменных цветах */
.socials--brand { gap: 8px; align-items: center; }
.socials--brand a { display: block; width: 30px; height: 30px; transition: transform 0.3s var(--ease), filter 0.3s var(--ease); }
.socials--brand a:hover { opacity: 1; transform: translateY(-2px); filter: brightness(1.12); }
.socials--brand svg { display: block; width: 100%; height: 100%; }
.footer-brand .socials--brand a { width: 32px; height: 32px; }

/* Бургер */
.burger {
  position: relative;
  width: 22px;
  height: 18px;
  flex: none;
}
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--c-text);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease), width 0.3s var(--ease);
}
.burger span:nth-child(1) { top: 3px; }
.burger span:nth-child(2) { top: 8.5px; width: 70%; }
.burger span:nth-child(3) { top: 14.5px; }
.burger:hover span:nth-child(2) { width: 100%; }
.menu-open .burger span:nth-child(1) { top: 8.5px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { top: 8.5px; transform: rotate(-45deg); }

/* Выпадающее меню: такое же стекло, как панель */
.site-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(360px, 100%);
  padding: 24px 28px 28px;
  background: linear-gradient(180deg, rgba(22, 23, 31, 0.97), rgba(11, 11, 17, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.menu-open .site-menu { opacity: 1; visibility: visible; transform: none; }

.site-menu__list { display: grid; gap: 14px; }
.site-menu__list a {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}
.site-menu__list a:hover,
.site-menu__list a[aria-current="page"] { color: var(--c-accent-hover); }

.site-menu__extra { display: none; margin-top: 24px; gap: 16px; flex-direction: column; align-items: flex-start; }

/* На десктопе логотип слева, за ним все разделы в одну строку; бургер только на узких экранах */
@media (min-width: 1241px) {
  .site-header .burger { display: none; }
  .site-header__left { gap: clamp(22px, 2.6vw, 40px); }
  .site-header__logo { position: relative; left: auto; top: auto; transform: none; flex: none; }
}
@media (min-width: 1241px) and (max-width: 1599px) {
  .site-header .site-header__right .socials a { width: 26px; height: 26px; }
  .site-header .site-header__right .socials { gap: 6px; }
  .site-header__tel { width: 26px; height: 26px; }
  .site-header__tel svg { width: 12px; height: 12px; }
}
/* На ноутбуках сжимаем шапку, чтобы все разделы поместились в одну строку */
@media (min-width: 1241px) and (max-width: 1599px) {
  .site-header__nav { gap: 12px; }
  .site-header__left { gap: 22px; }
  .site-header__right { gap: 12px; }
  .site-header__cta { padding-inline: 16px; }
  .site-header__cta-tail { display: none; }
}
@media (max-width: 1240px) {
  .site-header__nav { display: none; }
}

/* Подменю «Услуги» */
.nav-drop { position: relative; }
.nav-drop__trigger { display: inline-flex; align-items: center; gap: 8px; }
.nav-drop__caret { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform 0.35s var(--ease); }
.nav-drop__menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -24px;
  min-width: 280px;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(22, 23, 31, 0.97), rgba(11, 11, 17, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
/* Невидимый мостик, чтобы меню не закрывалось, пока курсор идёт к нему */
.nav-drop__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop:hover .nav-drop__caret,
.nav-drop:focus-within .nav-drop__caret { transform: rotate(180deg); }
.nav-drop__menu a {
  display: block;
  padding: 9px 24px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.75);
  border-left: 2px solid transparent;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-drop__menu a::after { display: none; }
.nav-drop__trigger.is-active { color: #fff; }
.nav-drop__trigger.is-active::after { transform: scaleX(1); }
.nav-drop__menu a[aria-current="page"] { color: #fff; border-left-color: var(--c-accent-hover); }
.nav-drop__menu a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); border-left-color: var(--c-accent-hover); }
.nav-drop__all { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.nav-drop__all a { color: var(--c-accent-hover); }
/* Мега-меню услуг: три колонки по группам каталога */
.nav-drop__menu--mega { display: grid; grid-template-columns: repeat(3, max-content); column-gap: 8px; padding: 22px 8px 14px; min-width: 0; }
.nav-drop__group { display: flex; flex-direction: column; }
.nav-drop__label { padding: 0 24px 10px; white-space: nowrap; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.nav-drop__menu--mega a { padding: 8px 24px; font-size: 13px; letter-spacing: 0.01em; text-transform: none; }
.nav-drop__menu--mega .nav-drop__all { grid-column: 1 / -1; margin: 10px 16px 0; padding-top: 10px; }
.nav-drop__menu--mega .nav-drop__all a { padding-inline: 8px; }
/* Мобильное меню: услуги раскрываются списком */
.site-menu { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
.site-menu__sub summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s var(--ease); }
.site-menu__sub summary::-webkit-details-marker { display: none; }
.site-menu__sub summary::after { content: ""; width: 8px; height: 8px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 0.3s var(--ease); }
.site-menu__sub details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.site-menu__sub summary:hover { color: var(--c-accent-hover); }
.site-menu__sub ul { display: grid; gap: 10px; margin: 12px 0 4px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.12); }
.site-menu__list .site-menu__sub ul a { font-size: 13px; letter-spacing: 0.01em; text-transform: none; color: rgba(255, 255, 255, 0.72); }
.site-menu__list .site-menu__sub ul a:hover, .site-menu__list .site-menu__sub ul a[aria-current="page"] { color: var(--c-accent-hover); }
@media (max-width: 1100px) {
  .site-header__tel,
  .site-header .site-header__right .socials { display: none; }
  .site-menu__extra { display: flex; }
  .site-menu__extra .socials { display: flex; }
}
@media (max-width: 640px) {
  .site-header { top: 8px; width: calc(100% - 16px); }
  .site-header__bar { height: 52px; padding: 0 16px; }
  .site-header__right .btn { display: none; }
  /* Логотип слева, меню справа */
  .site-header__logo { left: 16px; right: auto; transform: translateY(-50%); }
  .site-header .burger { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
  .site-menu { width: 100%; }
}

/* ---------- Популярные услуги ---------- */
.services { padding-bottom: 77px; overflow: clip; }
.services__title { margin-bottom: 18px; }
.services__count {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}
.services__count [data-svc-num] { color: var(--c-text); }
.services__total { opacity: 0.5; }

.services-list { display: grid; gap: 14px; }

.svc {
  --mx: 50%;
  --my: 50%;
  --p: 0;
  --a: 0; /* насколько карточка «активна»: 0…1, плавно меняется со скроллом */
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas: "num body" ". btn";
  align-items: start;
  column-gap: 20px;
  padding: 26px 28px 26px 24px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, calc(0.08 + 0.08 * var(--a)));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  opacity: calc(0.62 + 0.38 * var(--a));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, calc(0.9 * var(--a))), inset 0 1px 0 rgba(255, 255, 255, calc(0.2 * var(--a)));
}
/* Подсветка активной карточки: градиенты не анимируются, поэтому проявляем слой прозрачностью */
.svc::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012) 50%, rgba(255, 255, 255, 0.04));
  opacity: var(--a);
  pointer-events: none;
}
/* Подсветка под курсором */
.svc::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.svc:hover::before { opacity: 1; }
.svc__num {
  grid-area: num;
  font-size: 44px;
  line-height: 1;
  font-weight: 200;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  background: var(--metal-text, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 100% 300%;
  background-position: 0 100%;
  transition: background-position 1.6s var(--ease), -webkit-text-stroke-color 1.4s var(--ease);
}
.svc__body { grid-area: body; padding-top: 6px; }
.svc__title { transition: color 1.4s var(--ease); }
/* Описание всегда на месте, чтобы карточки не прыгали по высоте; у активной оно проявляется */
.svc__text {
  max-width: none;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--c-muted);
  opacity: calc(0.45 + 0.55 * var(--a));
}
.svc__btn {
  grid-area: btn;
  justify-self: start;
  margin-top: 18px;
  opacity: calc(0.35 + 0.65 * var(--a));
  transition: box-shadow 0.3s var(--ease);
}
/* Световой скан проходит по карточке, когда она становится активной */
.svc__scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.04) 40%, rgba(255, 220, 215, 0.08) 50%, rgba(255, 255, 255, 0.04) 60%, transparent);
  transform: skewX(-14deg);
  opacity: 0;
  pointer-events: none;
}
/* Полоска снизу заполняется, пока карточка проходит через центр экрана */
.svc__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--gloss-accent, var(--c-accent));
  box-shadow: 0 0 14px rgba(211, 50, 45, 0.7);
  transform: scaleX(var(--p));
  transform-origin: left;
  opacity: var(--a);
}

.svc.is-active .svc__num { background-position: 0 0; -webkit-text-stroke-color: transparent; }
.svc.is-active .svc__scan { animation: svc-scan 3s cubic-bezier(0.45, 0, 0.25, 1) 0.2s; }
@keyframes svc-scan {
  0% { left: -40%; opacity: 0; }
  30% { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

/* Широкий экран: слева закреплены заголовок и 3D-часы, справа идут карточки */
@media (min-width: 1321px) {
  .services__layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(32px, 4vw, 72px);
  }
  .services__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-block: 90px 40px;
  }
  .services__anchor { flex: 1; }
  .services__main { padding-top: 60px; }
  /* Карточки чуть уже, текст в них занимает всю ширину */
  .services-list { max-width: 600px; }
  .services__count { margin-bottom: 14vh; }
  .services-list { padding-bottom: 10vh; }
}
@media (max-width: 1320px) {
  .services__title { margin-bottom: 8px; }
  .services__count { margin-bottom: clamp(24px, 2.6vw, 36px); }
}
@media (max-width: 640px) {
  .svc { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 20px 16px; }
  .svc__num { font-size: 30px; }
  .svc__btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .svc.is-active .svc__scan { animation: none; }
}

/* ---------- Шаги + форма заявки ---------- */
.steps { padding-top: 79px; padding-bottom: 79px; }
.steps__title { max-width: 728px; margin-bottom: 26px; }

.steps__list {
  display: grid;
  grid-template-columns: 359.5fr 497.5fr 403fr;
  margin-bottom: 49px;
}
.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}
.step + .step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 68px;
  background: var(--c-line-soft);
}
.step:nth-child(2) { padding-left: 89px; }
.step:nth-child(3) { padding-left: 69px; }
.step__num {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  background: var(--c-chip);
  color: var(--c-accent);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.8px;
}

.request-form {
  display: grid;
  grid-template-columns: 357fr 356fr 446fr;
  column-gap: 46px;
  row-gap: 17px;
}
.request-form .btn { width: 100%; }
.request-form__consent {
  align-self: center;
  max-width: 426px;
  font-size: 13px;
  font-weight: 200;
}
.request-form__consent a { text-decoration: underline; text-underline-offset: 2px; }

.field--file { position: relative; cursor: pointer; }
.field--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field--file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field--textarea { padding-left: 29px; resize: none; padding-top: 22px; line-height: 1.208; }

.request-form__status { grid-column: 1 / -1; font-size: 13px; color: var(--c-muted); min-height: 16px; }

@media (max-width: 1100px) {
  .steps__list { grid-template-columns: 1fr; gap: 12px; }
  .step { min-height: 0; }
  .step:nth-child(n) { padding-left: 0; }
  .step + .step::before { display: none; }
  .request-form { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .request-form .btn,
  .request-form__consent { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .request-form { grid-template-columns: 1fr; }
}

/* ---------- Портфолио «до/после» ---------- */
.portfolio__title { margin-bottom: 33px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  margin-bottom: 37px;
}
.chip {
  height: 28px;
  padding: 0 8px;
  border: 0.4px solid var(--c-line-chip);
  font-size: 13px;
  font-weight: 200;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { border-color: var(--c-text); }
.chip.is-active { background: var(--c-accent); border-color: var(--c-accent); font-weight: 600; }

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 605.6px));
  justify-content: space-between;
  gap: 47px;
}
.compare-grid__empty { grid-column: 1 / -1; padding: 80px 0; text-align: center; color: var(--c-muted); font-weight: 300; }

.compare {
  --pos: 50%;
  position: relative;
  display: flex;
  aspect-ratio: 605.6 / 373.3;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.compare[hidden] { display: none; }
/* Вертикальные пары фото: карточка квадратная, в ряд по три */
.compare--square { aspect-ratio: 1 / 1; }
.compare__img { height: 100%; flex: none; overflow: hidden; }
.compare__img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__img--before { width: var(--pos); }
.compare__img--after { width: calc(100% - var(--pos)); }

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--c-text);
}
.compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7.77px;
  height: 51.78px;
  transform: translate(-50%, -50%);
  background: var(--c-text);
}
.compare__grip::before,
.compare__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  transform: translateY(-50%);
}
.compare__grip::before { right: calc(100% + 4px); border-right: 5px solid var(--c-text); }
.compare__grip::after { left: calc(100% + 4px); border-left: 5px solid var(--c-text); }
/* Сенсорный экран: карточка листается пальцем, шторка тянется за широкую ручку */
@media (hover: none), (pointer: coarse) {
  .compare { touch-action: pan-x pan-y; cursor: default; }
  .compare__handle { touch-action: none; }
  .compare__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -28px; width: 58px; }
  .compare__grip { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
  .compare__grip::before { right: auto; left: 7px; border-right-color: #111; }
  .compare__grip::after { left: auto; right: 7px; border-left-color: #111; }
}
.compare__label {
  position: absolute;
  bottom: 12px;
  padding: 4px 8px;
  background: rgba(6, 5, 11, 0.6);
  font-size: 11px;
  text-transform: uppercase;
  pointer-events: none;
}
.compare__label--before { left: 12px; }
.compare__label--after { right: 12px; }
.portfolio__cta { margin-top: 40px; }
@media (max-width: 640px) { .portfolio__cta { width: 100%; white-space: normal; text-align: center; padding-block: 12px; font-size: 14px; } }

@media (max-width: 900px) {
  .compare-grid { grid-template-columns: 1fr; gap: 24px; }
  .chips { gap: 8px; }
  .chip { white-space: normal; height: auto; min-height: 28px; padding-block: 4px; text-align: left; }
}

/* ---------- FAQ ---------- */
.faq { padding-top: 79px; }
.faq__title { margin-bottom: clamp(28px, 3vw, 46px); }
.faq__list { margin: 0 33px 0 5px; border-bottom: 1px solid var(--c-line-soft); }
@media (max-width: 900px) { .faq__list { margin-inline: 0; } }

.faq-item { border-top: 1px solid var(--c-line-soft); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  padding: 21px 0 20px;
  list-style: none;
  cursor: pointer;
  font-size: clamp(16px, 1.61vw, 22px);
  line-height: normal;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item__icon {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.25s var(--ease), transform 0.3s var(--ease);
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--c-text);
  transform: translate(-50%, -50%);
  transition: background-color 0.25s var(--ease);
}
.faq-item__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-item__icon { background: var(--c-text); transform: rotate(45deg); }
.faq-item[open] .faq-item__icon::before,
.faq-item[open] .faq-item__icon::after { background: var(--c-accent); width: 20px; }

.faq-item__body {
  padding-bottom: 20px;
  font-size: 14px;
  font-weight: 300;
  line-height: normal;
  max-width: 1180px;
}
.faq-item__body p + p { margin-top: 1em; }

/* ---------- Виджет (отзывы и т.п.) ---------- */
.widget-section { min-height: 660px; display: grid; place-items: center; padding-block: var(--section-pad); }
.reviews { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 32px; }
/* Место под виджет занято сразу, чтобы страница не прыгала, а сам виджет проявляется после загрузки
   в тёмной схеме, как и карта: без белой вспышки */
.reviews__frame { width: 100%; max-width: 760px; height: 560px; border: 1px solid var(--c-line-soft); background: var(--c-card); }
.reviews__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  filter: invert(0.9) hue-rotate(180deg) saturate(0.75) brightness(0.95);
}
.reviews__frame iframe.is-loaded { opacity: 1; }
.widgets-blocked .reviews__frame { display: none; }
.reviews__link { min-height: 52px; max-width: 100%; padding: 0 28px; font-size: 14px; white-space: normal; text-align: center; }

/* ---------- Карта и как добраться ---------- */
.location__title { margin-bottom: 40px; }
.location__grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.location__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 32px 32px;
  background: var(--c-card);
}
/* Красная черта сверху, как у плашек второго экрана */
.location__card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  width: 56px;
  height: 2px;
  background: var(--gloss-accent, var(--c-accent));
  box-shadow: 0 0 14px rgba(226, 60, 54, 0.75);
}
.location__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.location__address { font-size: clamp(20px, 1.7vw, 26px); font-weight: 300; line-height: 1.25; }
.location__facts { margin: 28px 0 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--c-line-soft); }
.location__facts li { font-size: 14px; font-weight: 300; line-height: 1.45; }
.location__facts li + li { margin-top: 18px; }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 32px; }
.location__actions .btn { flex: 1 1 140px; }
.location__frame {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--c-line-soft);
  /* Статичная карта под живой: видна, пока виджет грузится или если его нельзя показать */
  background: var(--c-card) url("../assets/img/map.png") center / cover no-repeat;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
/* Края карты мягко уходят в тон сайта */
.location__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px 10px rgba(10, 9, 14, 0.75);
}
.location__map { position: absolute; inset: 0; }
.location__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Карта в тон сайту: тёмная схема, красная метка остаётся красной */
  filter: invert(0.9) hue-rotate(180deg) saturate(0.75) brightness(0.95);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.location__map iframe.is-loaded { opacity: 1; }
/* Ссылка на карту нужна, только если живую карту показать нельзя */
.location__open { display: none; align-self: flex-start; margin-top: 22px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text); border-bottom: 1px solid var(--c-accent); }
.widgets-blocked .location__open { display: inline-block; }
.widgets-blocked .location__map { display: none; }
.widgets-blocked .widget-section { min-height: 0; }

@media (max-width: 900px) {
  .widget-section { min-height: 320px; }
  .location__title { margin-bottom: 24px; }
  .location__grid { grid-template-columns: 1fr; }
  .location__frame { order: -1; min-height: 320px; }
  .location__card { padding: 32px 22px 24px; }
  .location__card::after { left: 22px; }
}

/* ---------- Подвал ---------- */
.btn--ghost { border-color: var(--c-line); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-text); }

.site-footer {
  position: relative;
  overflow: hidden;
  padding: 72px 0 28px;
  /* Подвал плавно темнеет из общего фона, без линии и ступеньки сверху */
  background: linear-gradient(180deg, rgba(5, 4, 10, 0) 0%, rgba(5, 4, 10, 0.7) 45%, rgba(5, 4, 10, 0.9) 100%);
}
.site-footer a { transition: color 0.2s var(--ease); }

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  margin-bottom: 64px;
  background: var(--c-card);
  border-left: 3px solid var(--c-accent);
}
.footer-cta__title { margin-bottom: 8px; font-size: clamp(20px, 2vw, 26px); text-transform: uppercase; }
.footer-cta__text { font-size: 14px; font-weight: 300; color: var(--c-muted); }
.footer-cta__actions { display: flex; gap: 16px; flex: none; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 64px;
  padding-bottom: 48px;
}

.footer-brand__logo img { width: 140px; height: auto; aspect-ratio: 197 / 63; }
.footer-brand__text { max-width: 300px; margin: 20px 0 28px; font-size: 14px; font-weight: 300; line-height: 1.41; color: var(--c-muted); }

.footer-contacts { display: grid; gap: 18px; margin-bottom: 24px; }
.footer-contacts li { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.footer-contacts a:hover { color: var(--c-muted); }
.footer-contacts__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); }
.footer-contacts__phone { font-size: 20px; }
.footer-contacts__note { font-size: 12px; font-weight: 300; color: rgba(255, 255, 255, 0.5); line-height: 1.3; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.footer-col__title {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-line-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-col__title a:hover { color: var(--c-accent-hover); }
.footer-col ul { display: grid; gap: 12px; }
.footer-col li a { font-size: 14px; font-weight: 300; color: var(--c-muted); }
.footer-col li a:hover { color: var(--c-text); }
.footer-col__more { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--c-accent-hover); }
.footer-col__more:hover { color: var(--c-text); }

.footer-wordmark {
  margin: 0 0 24px;
  font-size: clamp(30px, 8.3vw, 113px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  user-select: none;
}

.footer-bottom {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom__links { display: flex; gap: 24px; }
.footer-bottom__links a:hover { color: var(--c-text); }
.footer-bottom__note { grid-column: 1 / 3; }
.footer-top {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--c-line);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.footer-top svg { width: 14px; height: 14px; }
.footer-top:hover { background: var(--c-accent); border-color: var(--c-accent); }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .site-footer { padding-top: 48px; }
  .footer-cta { padding: 28px 20px; margin-bottom: 48px; }
  .footer-cta__actions { flex-direction: column; width: 100%; }
  .footer-cta__actions .btn { width: 100%; white-space: normal; text-align: center; font-size: 14px; }
  .footer-nav { gap: 32px 20px; }
  .footer-bottom { grid-template-columns: 1fr auto; }
  .footer-bottom__links { flex-wrap: wrap; gap: 8px 20px; grid-column: 1; }
  .footer-bottom__note { grid-column: 1 / -1; }
  .footer-top { grid-column: 2; grid-row: 1 / 3; }
}

/* ---------- Поп-ап с формой заявки ---------- */
.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(4, 4, 8, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.6s cubic-bezier(.22,.61,.36,1); }
.modal__panel {
  position: relative;
  width: min(1240px, 100%);
  padding: 56px 56px 44px;
  background: linear-gradient(160deg, rgba(30, 31, 40, 0.92), rgba(10, 10, 16, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.6s cubic-bezier(.22,.61,.36,1), transform 0.6s cubic-bezier(.22,.61,.36,1);
}
.modal__panel::before { content: ""; position: absolute; top: 0; left: 56px; width: 72px; height: 2px; background: var(--gloss-accent, var(--c-accent)); box-shadow: 0 0 14px rgba(226, 60, 54, 0.75); }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__body { padding: 0; max-width: none; }
.modal__close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.03); cursor: pointer; transition: border-color 0.3s, background 0.3s; }
.modal__close::before, .modal__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.4px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.modal__close:hover { border-color: rgba(226, 60, 54, 0.8); background: rgba(226, 60, 54, 0.14); }
html.is-modal-open { overflow: hidden; }
@media (max-width: 640px) { .modal__panel { padding: 48px 20px 28px; } .modal__panel::before { left: 20px; } }

/* ---------- Слайдер «Наши работы»: одна строка, листается стрелками ---------- */
.portfolio__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 33px; }
.portfolio__head .portfolio__title { margin-bottom: 0; }
.compare-grid.compare-slider {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 2 * 24px) / 3);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.compare-slider::-webkit-scrollbar { display: none; }
.compare-slider > .compare { scroll-snap-align: start; }
.slider-nav { display: flex; gap: 10px; flex: none; }
.slider-nav__btn {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), opacity 0.4s var(--ease);
}
.slider-nav__btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 1.4px solid #fff;
  border-right: 1.4px solid #fff;
  transform: translate(-65%, -50%) rotate(45deg);
}
.slider-nav__btn--prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
.slider-nav__btn:hover:not(:disabled) { border-color: rgba(226, 60, 54, 0.8); background: rgba(226, 60, 54, 0.14); }
.slider-nav__btn:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 1100px) { .compare-grid.compare-slider { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px) {
  .compare-grid.compare-slider { grid-auto-columns: 86%; gap: 14px; }
  .slider-nav__btn { width: 44px; height: 44px; }
}

/* Знак ™ у логотипов: маленький, у правого верхнего края, не сдвигает вёрстку */
.site-header__logo,
.footer-brand__logo { display: inline-block; }
.footer-brand__logo { position: relative; }
.site-header__logo::after,
.footer-brand__logo::after {
  content: "™";
  position: absolute;
  top: -1px;
  right: -9px;
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}
.footer-brand__logo::after { top: -2px; right: -11px; font-size: 10px; }
.footer-wordmark .tm {
  display: inline-block;
  margin-left: 0.06em;
  font-size: 0.22em;
  font-weight: 400;
  letter-spacing: 0;
  vertical-align: top;
  line-height: 1;
  transform: translateY(0.25em);
  color: rgba(255, 255, 255, 0.75);
}

/* Заявка: способ связи */
.contact-pref { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.contact-pref__label { float: left; margin-right: 6px; font-size: 13px; color: var(--c-muted); }
.contact-pref__opt { position: relative; cursor: pointer; }
.contact-pref__opt input { position: absolute; opacity: 0; pointer-events: none; }
.contact-pref__opt span { display: inline-block; padding: 7px 14px; font-size: 13px; border: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.75); transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease); }
.contact-pref__opt:hover span { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.contact-pref__opt input:checked + span { border-color: var(--c-accent-hover); color: #fff; background: rgba(193, 35, 32, 0.16); }
.contact-pref__opt input:focus-visible + span { outline: 2px solid var(--c-accent-hover); outline-offset: 2px; }
.contact-pref__email { grid-column: 1 / -1; }
.ask__msg { grid-column: 1 / -1; min-height: 72px; resize: vertical; }
.quiz .contact-pref { margin-top: 4px; }

/* ---------- Отзывы с Яндекс Карт (статичные, из карточки WNL) ---------- */
.yrev { width: 100%; display: grid; gap: clamp(20px, 2.4vw, 32px); }
.yrev__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.yrev__score { font-size: clamp(34px, 3.4vw, 48px); font-weight: 300; line-height: 1; }
.yrev__count { font-size: 14px; font-weight: 300; color: var(--c-muted); }
.yrev__stars { display: inline-flex; gap: 3px; }
.yrev__stars svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, 0.18); }
.yrev__stars svg.on { fill: #f5b301; }
.yrev__summary .yrev__stars svg { width: 20px; height: 20px; }
.yrev__card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2vw, 28px); border: 1px solid var(--c-line-soft); background: var(--c-card); }
.yrev__card[hidden] { display: none; }
.yrev__head { display: flex; align-items: center; gap: 12px; }
.yrev__ava { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(193, 35, 32, 0.18); border: 1px solid rgba(193, 35, 32, 0.5); font-size: 16px; }
.yrev__who { display: grid; gap: 2px; }
.yrev__name { font-size: 15px; font-weight: 500; }
.yrev__date { font-size: 12px; font-weight: 300; color: var(--c-muted); }
.yrev__text { font-size: 14px; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, 0.86); }
.yrev__text p + p { margin-top: 0.7em; }
.yrev__text.is-long:not(.is-open) { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.yrev__more { align-self: flex-start; margin-top: auto; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-accent-hover); border-bottom: 1px solid currentColor; }
.yrev__viewport { display: grid; grid-auto-flow: column; grid-auto-columns: max(280px, calc((100% - 2 * 20px) / 3)); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.yrev__viewport::-webkit-scrollbar { display: none; }
.yrev__viewport > .yrev__card { scroll-snap-align: start; }
.yrev__nav { display: flex; justify-content: center; gap: 14px; }
.yrev__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--c-line); border-radius: 50%; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
.yrev__btn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.05); }
.yrev__btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.5; }
.yrev__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.yrev__all { justify-self: center; min-height: 52px; padding: 0 28px; }
.yrev__all[hidden] { display: none; }
@media (max-width: 1000px) { .yrev__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .yrev__viewport { grid-auto-columns: max(260px, calc((100% - 20px) / 2)); } }
@media (max-width: 640px) { .yrev__grid { grid-template-columns: 1fr; } .yrev__viewport { grid-auto-columns: 86%; } }
.reviews:has(.yrev) { align-items: stretch; }
.reviews:has(.yrev) .reviews__link { align-self: center; }
.yrev__title { flex-basis: 100%; margin-bottom: 6px; }
