@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;600;700&display=swap");

/* Резкая геометрия, полноэкранные блоки, тёмная палитра под автосъёмку */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --border: #2a2a2e;
  --text: #e8e8ea;
  --muted: #8b8b93;
  /* Единый акцент: rgb(212, 175, 95) — в т.ч. rgba(…, 0.5) */
  --accent-gold-rgb: 212, 175, 95;
  --accent: rgb(var(--accent-gold-rgb));
  --accent-2: rgb(var(--accent-gold-rgb));
  --violet: #7a5cff;
  --danger: #c44;
  --header-h: 56px;
  --page-pad-x: 1rem;
  --page-pad-y: 2.5rem;
  --content-max: 1100px;
  --bp-md: 640px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --radius-btn: 999px;
  --radius-thumb: 0.45rem;
  /* Кикеры (подзаголовки секций): отдельный шрифт от основного текста */
  --font-kicker: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Страница 404 */
.error404-page .page-404 {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 1.5rem) var(--page-pad-x) 3rem;
  max-width: 36rem;
  margin-inline: auto;
}

.page-404__code {
  margin: 0 0 0.5rem;
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
}

.page-404__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-404__lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.55;
}

.page-404__actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* Страница политики */
.privacy-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.25rem) var(--page-pad-x) 3rem;
}

.privacy-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.15rem 1rem;
}

.privacy-card h2 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.privacy-card p,
.privacy-card li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.privacy-card ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.privacy-lead {
  margin: 0.45rem 0 0.9rem;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  height: var(--header-h);
  padding: 0 calc(var(--page-pad-x) + env(safe-area-inset-right, 0px)) 0
    calc(var(--page-pad-x) + env(safe-area-inset-left, 0px));
  background: rgba(10, 10, 11, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  text-transform: none;
}

.logo-nik {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.logo-rpm {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-accent {
  color: var(--accent-2);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a[aria-current="page"],
.site-footer-nav a[aria-current="page"],
.nav a.nav-link--current,
.site-footer-nav a.nav-link--current {
  color: var(--accent-2);
  font-weight: 600;
}

/* Страница contact.html: пункт «Контакты» — текущий */
body.contact-page .nav a[href*="#contact"],
body.contact-page .site-footer-nav a[href*="#contact"] {
  color: var(--accent-2);
  font-weight: 600;
}

/* Нажатие на «Контакты» (шапка / подвал главной) */
.nav a[href="#contact"]:active,
.nav a[href="#contact"]:active,
.nav a[href="index#contact"]:active,
.site-footer-nav a[href="index#contact"]:active {
  color: var(--accent-2);
}

/* Нажатие на «Главная» */
.nav a[href="index"]:active,
.site-footer-nav a[href="index"]:active {
  color: var(--accent-2);
}

main {
  padding-top: var(--header-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Главная: без отступа у main — иначе над первым блоком полоса фона body под фиксированной шапкой */
body.home-page .home-page-main {
  padding-top: 0;
}

.block-fullscreen {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .block-fullscreen {
    min-height: calc(100dvh - var(--header-h));
  }
}

/* Главная: каждая секция ровно один экран по высоте; длинный контент скроллится внутри */
body.home-page .home-page-main .block-fullscreen {
  --home-screen-h: calc(100svh - var(--header-h));
  height: var(--home-screen-h);
  min-height: var(--home-screen-h);
  max-height: var(--home-screen-h);
  overflow: hidden;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 100vw;
  margin-inline: auto;
  box-sizing: border-box;
}

@supports (height: 100dvh) {
  @media (min-width: 768px) {
    body.home-page .home-page-main .block-fullscreen {
      --home-screen-h: calc(100dvh - var(--header-h));
    }
  }
}

/* Первый экран: полная высота окна, отступ под шапку внутри блока — фон и снэп без «чёрной щели» */
body.home-page .home-page-main > .block-fullscreen:first-child {
  padding-top: var(--header-h);
  box-sizing: border-box;
  --home-screen-h: 100svh;
  height: var(--home-screen-h);
  min-height: var(--home-screen-h);
  max-height: var(--home-screen-h);
}

@supports (height: 100dvh) {
  @media (min-width: 768px) {
    body.home-page .home-page-main > .block-fullscreen:first-child {
      --home-screen-h: 100dvh;
    }
  }
}

body.home-page .home-page-main .block-fullscreen > * {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

body.home-page .home-page-main .home-section.contact-block.block-fullscreen > .contact-inner {
  flex: 0 1 auto;
  max-height: none;
  overflow: visible;
  overflow-y: visible;
}

body.home-page .home-page-main .hero .hero-inner,
body.home-page .home-page-main .home-section-inner {
  margin-inline: auto;
}

.galleries-anchor {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  width: 100%;
  padding: var(--page-pad-y) var(--page-pad-x) calc(var(--page-pad-y) + 0.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-kicker);
  font-size: clamp(0.88rem, 2.1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-cell {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.hero-cell-accent {
  background: linear-gradient(135deg, #1a1a1d 0%, #2a2418 100%);
}

.hero-lead {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--text);
  max-width: 38rem;
  width: 100%;
  line-height: 1.55;
}

.hero-quote {
  margin: 0 0 1.15rem;
  padding: 1rem 1.35rem 1.15rem;
  max-width: 38rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(var(--accent-gold-rgb), 0.28);
  border-radius: 0.4rem;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(18, 16, 12, 0.42) 50%,
    rgba(0, 0, 0, 0.32) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero-quote p {
  margin: 0;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--text);
}

.hero-quote p::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin: 0 auto 0.65rem;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-gold-rgb), 0.85),
    rgba(var(--accent-gold-rgb), 0.15)
  );
  border-radius: 1px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.hero-actions .btn {
  flex: 1 1 auto;
  min-height: 48px;
}

.hero-note {
  margin: 2rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-note a {
  color: var(--accent-2);
}

.hero-note a:hover {
  color: var(--text);
}

/* Фоновые фото на главной (переменная --home-bg-url задаётся в разметке) */
.home-block-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-block-bg::before {
  content: "";
  position: absolute;
  top: -16%;
  left: 50%;
  width: 104%;
  max-width: none;
  height: 132%;
  margin-left: -52%;
  background-image: var(--home-bg-url);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  transform: translate3d(0, var(--home-parallax-y, 0px), 0) scale(0.96);
  transform-origin: center center;
  will-change: transform;
}

.home-block-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0.7) 0%,
    rgba(10, 10, 11, 0.78) 50%,
    rgba(10, 10, 11, 0.82) 100%
  );
}

.home-block-bg.hero::after {
  background: linear-gradient(
    115deg,
    rgba(10, 10, 11, 0.67) 0%,
    rgba(10, 10, 11, 0.48) 42%,
    rgba(10, 10, 11, 0.74) 100%
  );
}

.home-block-bg > * {
  position: relative;
  z-index: 2;
}

.home-block-bg .focus-card {
  background: rgba(10, 10, 11, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.home-block-bg .stat-card {
  background: rgba(10, 10, 11, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

/* «Подсчёт стоимости»: без фонового фото — монотонный градиент */
#estimate.estimate-section--solid {
  position: relative;
  isolation: isolate;
  background: linear-gradient(
    155deg,
    var(--bg-elevated) 0%,
    #101012 42%,
    var(--bg) 100%
  );
}

/* Блок «Форматы»: сцена с фото, описание, меню форматов внизу */
#focus.focus-section--interactive {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  padding: 0;
}

#focus.focus-section--interactive > .focus-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

#focus .focus-stage__bgs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#focus .focus-stage__bg--layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.55s ease;
  will-change: opacity, transform;
}

#focus .focus-stage__bgs[data-active="a"] .focus-stage__bg--a,
#focus .focus-stage__bgs[data-active="b"] .focus-stage__bg--b {
  opacity: 1;
  z-index: 1;
}

#focus .focus-stage__bg--layer.focus-stage__bg--empty {
  background-image: none !important;
  background: linear-gradient(
    155deg,
    var(--bg-elevated) 0%,
    #101012 50%,
    var(--bg) 100%
  );
}

@keyframes focus-bg-enter {
  from {
    transform: scale(1.07);
  }

  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  #focus .focus-stage__bg--layer.focus-stage__bg--enter {
    animation: focus-bg-enter 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  #focus .focus-stage__bg--layer {
    transition: none;
  }
}

#focus .focus-stage__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0.55) 0%,
    rgba(10, 10, 11, 0.82) 55%,
    rgba(10, 10, 11, 0.9) 100%
  );
}

#focus .focus-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-thumb);
  background: rgba(8, 8, 10, 0.45);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

#focus .focus-nav-btn:hover {
  background: rgba(24, 24, 28, 0.72);
  border-color: rgba(var(--accent-gold-rgb), 0.35);
}

#focus .focus-nav-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

#focus .focus-nav-btn--prev {
  left: max(0.4rem, env(safe-area-inset-left, 0px));
}

#focus .focus-nav-btn--next {
  right: max(0.4rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 720px) {
  #focus .focus-nav-btn {
    width: 3.15rem;
    height: 3.15rem;
    font-size: 1.55rem;
  }

  #focus .focus-nav-btn--prev {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
  }

  #focus .focus-nav-btn--next {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}

#focus .focus-stage__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  /* Меню выше низа экрана (сильнее, чем в «Процессе») */
  padding: clamp(1.25rem, 4vh, 2.5rem) var(--page-pad-x)
    calc(1.35rem + 52px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

#focus .focus-hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  max-width: 40rem;
  width: 100%;
  min-height: 0;
  padding: 0.5rem 0 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#focus .focus-hero .home-kicker {
  margin: 0 0 0.5rem;
  font-size: clamp(0.88rem, 2.1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

#focus .focus-hero .focus-hero__title {
  margin: 0 0 0.85rem;
}

#focus .focus-hero__desc {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 2.1vw, 1.05rem);
  line-height: 1.55;
}

#focus .focus-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding-top: 0.5rem;
  flex-shrink: 0;
}

#focus .focus-menu-btn {
  flex: 1 1 calc(50% - 0.55rem);
  min-width: min(10.5rem, 100%);
  margin: 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-thumb);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font: inherit;
  font-size: clamp(0.78rem, 1.85vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.28;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    font-size 0.2s ease,
    padding 0.2s ease;
}

#focus .focus-menu-btn:hover {
  border-color: rgba(var(--accent-gold-rgb), 0.45);
  background: rgba(0, 0, 0, 0.55);
}

#focus .focus-menu-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

#focus .focus-menu-btn.is-active {
  border-color: var(--accent-2);
  background: rgba(var(--accent-gold-rgb), 0.12);
  color: var(--accent);
  font-size: clamp(0.88rem, 2.05vw, 1.05rem);
  padding: 0.88rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-gold-rgb), 0.2);
}

@media (min-width: 720px) {
  #focus .focus-menu-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.78rem 0.95rem;
  }

  #focus .focus-menu-btn.is-active {
    padding: 0.95rem 1.1rem;
  }
}

#focus .focus-menu-btn:not(.is-active) {
  opacity: 0.88;
  transform: scale(0.97);
}

@keyframes focus-menu-tap {
  0% {
    filter: brightness(1.18);
  }

  45% {
    filter: brightness(0.88);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes focus-hero-swap {
  from {
    opacity: 0.45;
    transform: translate3d(0, 0.4rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  #focus .focus-menu-btn.focus-menu-btn--tap {
    animation: focus-menu-tap 0.42s ease;
  }

  #focus .focus-hero.focus-hero--swap .focus-hero__title,
  #focus .focus-hero.focus-hero--swap .focus-hero__desc {
    animation: focus-hero-swap 0.48s ease;
  }
}

/* Главная: скролл-снэп и появление блоков */
@media (prefers-reduced-motion: no-preference) {
  /* mandatory + always: каждый жест доводит до начала следующего/предыдущего экрана, без «перескока» через блоки */
  /* Без scroll-padding-top: отступ шапки уже в main (padding-top) и в высоте блока; лишний padding ломал snap и давал «щель» с куском предыдущего блока */
  html.home-scroll {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    scroll-behavior: auto;
  }

  body.home-page .home-page-main .block-fullscreen {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Иначе mandatory-снэп «цепляется» только за секции main — до подвала нельзя доскроллить */
  body.home-page .site-footer {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  html.home-js body.home-page .home-section .home-section-inner,
  html.home-js body.home-page .home-section .focus-stage__inner,
  html.home-js body.home-page .home-section.contact-block .contact-inner {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
    transition:
      opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  html.home-js body.home-page .home-section.home-block--visible .home-section-inner,
  html.home-js body.home-page .home-section.home-block--visible .focus-stage__inner,
  html.home-js body.home-page .home-section.contact-block.home-block--visible .contact-inner {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.home-scroll {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  body.home-page .home-page-main .block-fullscreen,
  body.home-page .site-footer {
    scroll-snap-align: none;
  }

  .home-block-bg::before {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    transform: none !important;
    will-change: auto;
  }

  body.home-page .home-section .home-section-inner,
  body.home-page .home-section.contact-block .contact-inner {
    opacity: 1;
    transform: none;
  }
}

/* Главная: мобильная версия — без snap, фиксированная логическая высота, нативный скролл */
@media (max-width: 767px) {
  html {
    scroll-behavior: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  main {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .block-fullscreen {
    min-height: calc(var(--mobile-vh, 100vh) - var(--header-h));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  html.home-scroll {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  body.home-page .home-page-main .block-fullscreen,
  body.home-page .site-footer {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  /* Высота от --mobile-vh (mobile-viewport-lock.js): фиксируется при загрузке/повороте, не «плывёт» с адресной строкой */
  body.home-page .home-page-main .block-fullscreen {
    --home-screen-h: auto;
    min-height: calc(var(--mobile-vh, 100vh) - var(--header-h));
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.home-page .home-page-main > .block-fullscreen:first-child {
    --home-screen-h: auto;
    min-height: var(--mobile-vh, 100vh);
    height: auto;
    max-height: none;
    padding-top: var(--header-h);
    box-sizing: border-box;
  }

  body.home-page .home-page-main .block-fullscreen > * {
    overflow: visible;
    overflow-y: visible;
    max-height: none;
  }

  #focus.focus-section--interactive > .focus-stage {
    min-height: calc(var(--mobile-vh, 100vh) - var(--header-h));
    max-height: none;
    height: auto;
  }

  #process.home-section.block-fullscreen > .home-section-inner.process-gallery {
    min-height: calc(var(--mobile-vh, 100vh) - var(--header-h));
    height: auto;
    max-height: none;
  }

  #process {
    --process-transition-dur: 0s;
  }

  #process .process-track-wrap {
    min-height: calc(var(--mobile-vh, 100vh) - 12rem);
    height: calc(var(--mobile-vh, 100vh) - 12rem);
  }

  .home-block-bg::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin-left: 0;
    transform: none;
    will-change: auto;
  }

  html.home-js body.home-page .home-section .home-section-inner,
  html.home-js body.home-page .home-section .focus-stage__inner,
  html.home-js body.home-page .home-section.contact-block .contact-inner {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero .hero-note {
    display: none;
  }

  #estimate .estimate-layout__intro .home-lead,
  .estimate-calc-hours-note {
    display: none;
  }

  .site-header {
    transition: none;
    will-change: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header.site-header--scroll-hidden {
    transform: none;
    pointer-events: auto;
  }

  /* Меньше слоёв композитинга при скролле */
  .home-block-bg::before {
    will-change: auto;
  }

  .home-block-bg .focus-card,
  .home-block-bg .stat-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .gallery-thumb img {
    transition: none;
  }

  .gallery-thumb:hover img {
    transform: none;
  }

  .gallery-collapsible-toggle {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #focus .focus-menu-btn.focus-menu-btn--tap {
    animation: none;
  }

  #focus .focus-hero.focus-hero--swap .focus-hero__title,
  #focus .focus-hero.focus-hero--swap .focus-hero__desc {
    animation: none;
  }
}

/* Главная: дополнительные блоки */
.home-section {
  scroll-margin-top: calc(var(--header-h) + 8px);
  justify-content: center;
}

/* «Процесс»: контент от верха экрана, чтобы слайд занял всю высоту секции */
/* Единая длительность анимации слайдов и индикатора шагов */
#process {
  --process-transition-dur: 0.5s;
  --process-transition-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

#process.home-section.block-fullscreen {
  justify-content: flex-start;
}

.home-section-alt {
  background: var(--bg-elevated);
}

.home-section-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) calc(var(--page-pad-y) + 0.75rem);
}

.home-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-kicker);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-lead {
  margin: 0 0 2rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.focus-card {
  margin: 0;
  padding: 1.35rem 1.25rem;
  background: var(--bg);
}

.home-section-alt .focus-card {
  background: var(--bg-elevated);
}

.focus-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.focus-card-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Блок «Процесс»: галерея на весь экран секции (без полей и max-width) */
#process.home-section.block-fullscreen > .home-section-inner.process-gallery {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.process-gallery-head {
  position: absolute;
  top: calc(clamp(0.55rem, 2vh, 1.15rem) + 68px);
  left: 0;
  right: 0;
  z-index: 8;
  text-align: center;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0.35rem max(var(--page-pad-x), env(safe-area-inset-right, 0px)) 0.45rem
    max(var(--page-pad-x), env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.process-gallery-head .home-kicker,
.process-gallery-head .home-title {
  pointer-events: auto;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 4px 28px rgba(0, 0, 0, 0.75);
}

#process .process-gallery-head .home-kicker {
  margin: 0 0 0.35rem;
  font-weight: 300;
  color: #fff;
}

#process .process-gallery-head > h2.home-title {
  margin: 0;
}

.process-gallery {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#process .process-slide.home-block-bg {
  --home-bg-url: none;
}

#process .process-slide.home-block-bg::after {
  background: linear-gradient(
    to top,
    rgba(10, 10, 11, 0.97) 0%,
    rgba(10, 10, 11, 0.88) 22%,
    rgba(10, 10, 11, 0.74) 40%,
    rgba(10, 10, 11, 0.52) 58%,
    rgba(10, 10, 11, 0.22) 78%,
    rgba(10, 10, 11, 0) 98%
  );
}

#process .process-track-wrap {
  border: none;
  background: transparent;
  /* pan-y отрезал горизонтальные жесты — свайп шагов и pointer-события работали плохо на телефонах */
  touch-action: manipulation;
}

.process-track-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
}

.process-track.process-track--fade {
  --process-fade-dur: var(--process-transition-dur);
  --process-fade-ease: var(--process-transition-ease);
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

#process .process-track--fade .process-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  margin: 0;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transform: translateX(0);
  transition:
    opacity var(--process-fade-dur) var(--process-fade-ease),
    transform var(--process-fade-dur) var(--process-fade-ease);
}

#process .process-track--fade .process-slide.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

/* Переход к следующему шагу — «свайп влево»; к предыдущему — «свайп вправо» */
@keyframes process-leave-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-22%);
  }
}

@keyframes process-leave-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(22%);
  }
}

@keyframes process-enter-from-right {
  from {
    opacity: 0.4;
    transform: translateX(28%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes process-enter-from-left {
  from {
    opacity: 0.4;
    transform: translateX(-28%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#process .process-slide.process-slide--leave-left {
  z-index: 2;
  transition: none;
  animation: process-leave-left var(--process-transition-dur) var(--process-transition-ease) forwards;
}

#process .process-slide.process-slide--leave-right {
  z-index: 2;
  transition: none;
  animation: process-leave-right var(--process-transition-dur) var(--process-transition-ease) forwards;
}

#process .process-slide.process-slide--enter-right {
  z-index: 3;
  pointer-events: none;
  transition: none;
  animation: process-enter-from-right var(--process-transition-dur) var(--process-transition-ease) forwards;
}

#process .process-slide.process-slide--enter-left {
  z-index: 3;
  pointer-events: none;
  transition: none;
  animation: process-enter-from-left var(--process-transition-dur) var(--process-transition-ease) forwards;
}

#process .process-track--animating .process-deck-btn,
#process .process-track--animating .process-step-btn {
  pointer-events: none;
}

.process-slide-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(0.75rem, 2vh, 1.25rem);
  padding: clamp(3.5rem, 13vh, 6.25rem)
    max(var(--page-pad-x), calc(3.25rem + env(safe-area-inset-right, 0px)), env(safe-area-inset-right, 0px))
    clamp(6.25rem, 14vh, 8rem)
    max(var(--page-pad-x), calc(3.25rem + env(safe-area-inset-left, 0px)), env(safe-area-inset-left, 0px));
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

/* Стрелки ‹ › по бокам на середине экрана — как в блоке «Форматы» */
#process .process-deck-btn.process-deck-btn--side {
  position: absolute;
  top: 50%;
  z-index: 7;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-thumb);
  background: rgba(8, 8, 10, 0.45);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

#process .process-deck-btn.process-deck-btn--side:hover:not(:disabled) {
  background: rgba(24, 24, 28, 0.72);
  border-color: rgba(var(--accent-gold-rgb), 0.35);
}

#process .process-deck-btn.process-deck-btn--side:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

#process .process-deck-btn.process-deck-prev {
  left: max(0.4rem, env(safe-area-inset-left, 0px));
}

#process .process-deck-btn.process-deck-next {
  right: max(0.4rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 720px) {
  #process .process-deck-btn.process-deck-btn--side {
    width: 3.15rem;
    height: 3.15rem;
    font-size: 1.55rem;
  }

  #process .process-deck-btn.process-deck-prev {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
  }

  #process .process-deck-btn.process-deck-next {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}

.process-steps-bar {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: calc(1.1rem + 52px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  flex-wrap: nowrap;
  pointer-events: none;
  box-sizing: border-box;
  padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.35rem, env(safe-area-inset-right, 0px));
}

#process .process-steps-bar {
  width: 100vw;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: 100vw;
}

.process-steps-bar .process-step-btn {
  pointer-events: auto;
}

/* Как у прежнего .process-deck-nav: ряд шагов на всю ширину между отступами */
.process-steps-bar .process-steps {
  flex: 1 1 auto;
  min-width: 0;
  pointer-events: auto;
}

.process-deck-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: none;
  background: rgba(8, 8, 10, 0.35);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}

.process-deck-btn:hover:not(:disabled) {
  background: rgba(24, 24, 28, 0.65);
}

.process-deck-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.process-deck-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* Параллелограммы шагов — без скругления */
#process .process-step-btn {
  border-radius: 0;
}

.process-steps {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.15rem;
}

.process-steps__indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(var(--accent-gold-rgb), 0.55);
  background: linear-gradient(
    165deg,
    rgba(var(--accent-gold-rgb), 0.28) 0%,
    rgba(48, 36, 20, 0.92) 48%,
    rgba(24, 20, 14, 0.96) 100%
  );
  box-shadow:
    0 0 0 1px rgba(var(--accent-gold-rgb), 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(0) skewX(-14deg);
  transform-origin: center center;
  transition: transform var(--process-transition-dur) var(--process-transition-ease);
  will-change: transform;
}

.process-steps--no-indicator-transition .process-steps__indicator {
  transition: none;
}

.process-step-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 3rem;
  padding: 0 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(12, 12, 15, 0.5);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  transform: skewX(-14deg);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.process-step-btn__label {
  display: inline-block;
  transform: skewX(14deg);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(0, 0, 0, 0.65);
}

.process-step-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(28, 28, 32, 0.88);
}

.process-step-btn.is-active {
  border-color: rgba(var(--accent-gold-rgb), 0.5);
  color: var(--accent);
  background-color: rgba(12, 12, 15, 0.2);
  box-shadow: none;
}

.process-step-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #process .process-track--fade .process-slide {
    transition: none;
    transform: none !important;
    animation: none !important;
  }

  .process-steps__indicator {
    transition: none !important;
  }
}

.process-num {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.process-title {
  margin: 0;
  font-size: clamp(1.65rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 22ch;
}

.process-text {
  margin: 0;
  font-size: clamp(0.98rem, 2.1vw, 1.2rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 36rem;
}

/* Слот под форму расчёта стоимости (главная) */
.estimate-slot {
  max-width: 42rem;
  margin-inline: auto;
  margin-top: 0.35rem;
  flex: 1 1 auto;
  min-height: 0;
}

/* Калькулятор стоимости (главная) */
.estimate-calculator {
  margin: 0;
  text-align: left;
}

.estimate-calc-card {
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: calc(var(--radius-thumb) + 4px);
  border: 1px solid var(--border);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0) 42%
  ),
    var(--bg-elevated);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.estimate-calc-fieldset {
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
}

.estimate-calc-legend {
  padding: 0;
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Заголовки секций калькулятора — по центру колонки с формой (без «вылезания» за сетку) */
#estimate .estimate-calc-legend,
#estimate .estimate-calc-hours-label {
  text-align: center;
}

.estimate-calc-billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

@media (max-width: 420px) {
  .estimate-calc-billing-grid {
    grid-template-columns: 1fr;
  }
}

.estimate-calc-choice {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  border-radius: var(--radius-thumb);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.estimate-calc-choice:hover {
  border-color: rgba(var(--accent-gold-rgb), 0.45);
}

.estimate-calc-choice:has(input:focus-visible) {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.estimate-calc-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.estimate-calc-choice__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  min-height: 100%;
}

.estimate-calc-choice--billing .estimate-calc-choice__body {
  padding: 0.6rem 0.7rem;
}

.estimate-calc-choice__title {
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.estimate-calc-choice__desc {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
}

.estimate-calc-choice__meta {
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
}

.estimate-calc-choice__meta--wrap {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.estimate-calc-choice:has(input:checked) {
  border-color: var(--accent-2);
  background: linear-gradient(
    135deg,
    rgba(var(--accent-gold-rgb), 0.14) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(var(--accent-gold-rgb), 0.25);
}

.estimate-calc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.estimate-calc-choice--compact .estimate-calc-choice__body {
  padding: 0.5rem 0.55rem;
  align-items: center;
  text-align: center;
}

.estimate-calc-packages {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.estimate-calc-pkg .estimate-calc-choice__body {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.estimate-calc-pkg .estimate-calc-choice__title {
  flex: 1 1 auto;
  min-width: 8rem;
}

.estimate-calc-pkg .estimate-calc-choice__meta {
  flex: 0 0 auto;
  text-align: right;
}

.estimate-calc-locations {
  margin: 0 0 0.15rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-thumb);
  border: 1px dashed rgba(var(--accent-gold-rgb), 0.35);
  background: rgba(var(--accent-gold-rgb), 0.06);
}

.estimate-calc-locations .estimate-calc-hours-row {
  margin-bottom: 0;
}

.estimate-calc-locations .estimate-calc-hours-input {
  width: 5.5rem;
  max-width: 100%;
}

.estimate-calc-hours-wrap {
  padding: 0.35rem 0 0.15rem;
}

.estimate-calc-hours-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.estimate-calc-hours-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 16rem;
  margin: 0 auto 0.65rem;
}

.estimate-calc-hours-input {
  width: 4.5rem;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-thumb);
  background: var(--bg);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.2;
}

.estimate-calc-hours-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(var(--accent-gold-rgb), 0.25);
}

.estimate-calc-step {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.estimate-calc-step:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.estimate-calc-step:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.estimate-calc-hours-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.estimate-calc-flow[hidden] {
  display: none !important;
}

/* Итог — нижняя зона той же карточки (без отдельной «вложенной» рамки) */
.estimate-calc-total {
  margin-top: 0.85rem;
  margin-left: calc(-1 * 0.9rem);
  margin-right: calc(-1 * 0.9rem);
  margin-bottom: calc(-1 * 0.95rem);
  padding: 0.85rem 0.9rem 0.95rem;
  border: none;
  border-top: 1px solid rgba(var(--accent-gold-rgb), 0.28);
  border-radius: 0 0 calc(var(--radius-thumb) + 4px) calc(var(--radius-thumb) + 4px);
  background: rgba(var(--accent-gold-rgb), 0.06);
  text-align: center;
}

.estimate-calc-total-label {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.estimate-calc-total-sum {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent);
}

.estimate-calc-total-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

#estimate.home-section.block-fullscreen > .home-section-inner.estimate-section-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-items: stretch;
  text-align: left;
}

/* Две колонки: слева заголовок и текст, справа калькулятор */
.estimate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 900px) {
  .estimate-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
  }
}

.estimate-layout__intro {
  text-align: left;
  max-width: 32rem;
}

@media (min-width: 901px) {
  .estimate-layout__intro {
    text-align: center;
    justify-self: center;
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
  }
}

.estimate-layout__intro .home-kicker {
  margin: 0 0 0.45rem;
}

.estimate-layout__intro .home-title {
  margin: 0 0 0.65rem;
}

.estimate-layout__intro .home-lead {
  margin: 0;
  max-width: none;
}

.estimate-layout__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

#estimate .estimate-slot {
  width: 100%;
  max-width: none;
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}

#estimate .estimate-actions {
  width: 100%;
  max-width: none;
  align-self: stretch;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.5rem;
}

@media (max-height: 760px) {
  .estimate-layout__intro .home-kicker {
    margin-bottom: 0.25rem;
  }

  .estimate-layout__intro .home-title {
    margin-bottom: 0.35rem;
    font-size: clamp(1.1rem, 3.2vw, 1.55rem);
  }

  .estimate-layout__intro .home-lead {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  #estimate .estimate-actions {
    padding-top: 0.6rem;
  }
}

#estimate .estimate-section-inner > .estimate-actions {
  margin-top: auto;
}

.estimate-actions {
  padding-top: 0;
  flex-shrink: 0;
}

/* Выезжающая снизу панель «Прайскурант» */
.pricelist-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.pricelist-sheet-root.is-open {
  pointer-events: auto;
}

.pricelist-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  transition: opacity 0.38s ease;
}

.pricelist-sheet-root.is-open .pricelist-sheet-backdrop {
  opacity: 1;
}

.pricelist-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  max-height: min(88vh, 920px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-thumb) var(--radius-thumb) 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.pricelist-sheet-root.is-open .pricelist-sheet {
  transform: translate3d(0, 0, 0);
}

.pricelist-sheet-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.pricelist-sheet-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricelist-sheet-close {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pricelist-sheet-close:hover {
  background: #1e1e22;
  border-color: #3a3a42;
}

.pricelist-sheet-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.pricelist-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.pricelist-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.45;
}

.pricelist-table th,
.pricelist-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
  vertical-align: top;
}

.pricelist-table thead th {
  background: var(--bg);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pricelist-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.pricelist-table tbody tr.pricelist-section-head {
  background: transparent;
}

.pricelist-table tbody tr.pricelist-section-head td {
  background: var(--bg);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.9rem;
}

.pricelist-table tbody tr.pricelist-section-head:first-child td {
  padding-top: 0.65rem;
}

.pricelist-table-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

body.pricelist-sheet-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .pricelist-sheet-backdrop,
  .pricelist-sheet {
    transition: none;
  }

  .pricelist-sheet-root.is-open .pricelist-sheet {
    transform: none;
  }

  .pricelist-sheet-root:not(.is-open) .pricelist-sheet {
    transform: translate3d(0, 100%, 0);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  margin: 0;
  padding: 1.75rem 1.25rem;
  background: var(--bg);
  text-align: center;
}

.home-section-alt .stat-card {
  background: var(--bg-elevated);
}

.stat-value {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
}

/* Подвал сайта */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.75rem var(--page-pad-x) calc(1.75rem + env(safe-area-inset-bottom, 0px));
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.site-footer-logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-transform: none;
  color: var(--text);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .site-footer-nav {
    justify-content: flex-end;
  }
}

.site-footer-nav-tg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0.05em;
  color: #5eb5e8;
}

.site-footer-nav-tg:hover {
  color: #7ec8f0;
}

.site-footer-nav-tg-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.site-footer-copy {
  margin: 0;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

.site-footer-copy-powered {
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .site-footer-copy-powered {
    white-space: normal;
    display: inline;
  }
}

/* Подпись Powered by */
.site-footer-knv {
  text-decoration: none;
}

.site-footer-knv:hover {
  text-decoration: none;
}

.site-footer-knv:focus-visible {
  outline: 2px solid rgba(var(--accent-gold-rgb), 0.7);
  outline-offset: 3px;
  border-radius: 3px;
}

.site-footer-knv__shine {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.04em;
  background-image: linear-gradient(135deg, var(--violet), #6046df);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 2px rgba(122, 92, 255, 0.35));
}

@media (prefers-reduced-motion: reduce) {
  .site-footer-knv__shine {
    filter: none;
  }
}

@media (min-width: 640px) {
  .site-footer-copy {
    width: auto;
    flex: 1 1 100%;
    text-align: center;
    order: 3;
  }
}

/* Кнопки — скругление «таблетка» */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  background: #1e1e22;
  border-color: #3a3a42;
}

.btn-primary {
  background: var(--accent);
  color: #12100c;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: rgba(var(--accent-gold-rgb), 0.88);
  border-color: rgba(var(--accent-gold-rgb), 0.95);
  filter: brightness(1.06);
}

.btn-telegram {
  border-color: #229ed9;
  color: #e8f7ff;
  background: #0d2a3a;
}

.btn-telegram:hover {
  background: #103548;
  border-color: #3db4e8;
}

/* Вторичная кнопка Telegram (напр. «Наш канал») — контур */
.btn-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-color: rgba(34, 158, 217, 0.55);
  color: #c8eaff;
  background: rgba(13, 42, 58, 0.35);
}

.btn-channel:hover {
  background: rgba(16, 53, 72, 0.65);
  border-color: #3db4e8;
  color: #e8f7ff;
}

.btn-channel-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

/* Галерея-блок */
.gallery-block {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* Страница галерей: секция по высоте контента (без «лишнего экрана» под свёрнутым блоком) */
.gallery-block.block-fullscreen {
  min-height: 0;
}

/* Небольшая серия: не тянем экран на полную высоту и не оставляем пустую сетку */
.gallery-block.gallery-block--compact.block-fullscreen {
  min-height: 0;
}

.gallery-grid.gallery-grid--compact {
  min-height: 0;
}

.gallery-head {
  padding: var(--page-pad-y) var(--page-pad-x) 1rem;
  max-width: 56rem;
  margin-inline: auto;
}

.gallery-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.gallery-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-grid {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  align-items: stretch;
  gap: 1px;
  box-sizing: border-box;
  width: 100%;
  background: var(--border);
  border-top: 1px solid var(--border);
  min-height: 0;
}

.gallery-thumb {
  position: relative;
  display: block;
  min-width: 0;
  box-sizing: border-box;
  flex: 0 1 calc((100% - 1px) / 2);
  max-width: calc((100% - 1px) / 2);
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--radius-thumb);
  background: var(--bg-elevated);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) {
  .gallery-thumb {
    flex: 0 1 calc((100% - 2px) / 3);
    max-width: calc((100% - 2px) / 3);
  }
}

@media (min-width: 1024px) {
  .gallery-thumb {
    flex: 0 1 calc((100% - 3px) / 4);
    max-width: calc((100% - 3px) / 4);
  }
}

.gallery-thumb:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
  z-index: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: contrast(1.02);
}

.gallery-thumb:hover {
  box-shadow: 0 0 0 1px rgba(var(--accent-gold-rgb), 0.4);
  z-index: 1;
}

.gallery-thumb:hover img {
  transform: scale(1.04);
}

.gallery-empty {
  flex: 1 1 100%;
  min-width: 100%;
  padding: 2rem 1.5rem;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

/* Сворачиваемая сетка галереи */
.gallery-collapsible {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
}

.gallery-collapsible-viewport {
  position: relative;
  overflow: hidden;
  transition: max-height 0.88s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 1px solid var(--border);
}

.gallery-collapsible--collapsed .gallery-collapsible-viewport {
  max-height: min(55vh, 520px);
}

.gallery-collapsible--expanded .gallery-collapsible-viewport,
.gallery-collapsible--static .gallery-collapsible-viewport {
  max-height: none;
  overflow: visible;
}

/* Развёрнутая галерея: плашка с кнопкой «Свернуть» — у нижнего края окна, пока секция в кадре */
.gallery-collapsible--expanded.gallery-collapsible--pin-collapse .gallery-collapsible-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  min-height: 5.25rem;
  padding: 2rem var(--page-pad-x) max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0) 0%,
    rgba(10, 10, 11, 0.45) 28%,
    rgba(10, 10, 11, 0.88) 65%,
    var(--bg) 100%
  );
  pointer-events: none;
  transition: none;
}

.gallery-collapsible--expanded.gallery-collapsible--pin-collapse .gallery-collapsible-viewport {
  padding-bottom: max(5.5rem, calc(4.5rem + env(safe-area-inset-bottom, 0px)));
}

.gallery-collapsible-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  box-sizing: border-box;
  pointer-events: none;
  min-height: 9.5rem;
  padding: 3rem var(--page-pad-x) 1.15rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0) 0%,
    rgba(10, 10, 11, 0.2) 18%,
    rgba(10, 10, 11, 0.47) 42%,
    rgba(10, 10, 11, 0.74) 72%,
    var(--bg) 100%
  );
  transition:
    min-height 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-collapsible--collapsed .gallery-collapsible-fade {
  min-height: min(42vh, 280px);
  padding-top: min(28vh, 200px);
}

.gallery-collapsible--expanded .gallery-collapsible-fade {
  min-height: 7.5rem;
  padding: 1.75rem var(--page-pad-x) 1rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0) 0%,
    rgba(10, 10, 11, 0.28) 35%,
    rgba(10, 10, 11, 0.7) 70%,
    var(--bg) 100%
  );
}

.gallery-collapsible--static .gallery-collapsible-fade {
  display: none;
}

.gallery-collapsible-toggle {
  position: relative;
  pointer-events: auto;
  min-height: 48px;
  min-width: 12rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-btn);
  background: rgba(8, 8, 10, 0.55);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery-collapsible-toggle:hover {
  background: rgba(var(--accent-gold-rgb), 0.12);
  border-color: rgba(var(--accent-gold-rgb), 0.42);
}

.gallery-collapsible-toggle:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.gallery-collapsible-viewport .gallery-grid {
  min-height: 0;
  border-top: none;
}

/* Контакты */
.contact-block {
  background: var(--bg-elevated);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 880px;
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) calc(var(--page-pad-y) + 1rem);
  width: 100%;
}

.contact-col--intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.contact-cta .btn {
  text-transform: none;
  letter-spacing: 0.05em;
}

@media (min-width: 800px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
    justify-items: center;
  }

  /* Центрируем единый блок контактов на десктопе */
  .contact-col--intro {
    justify-self: center;
    width: min(100%, 30rem);
    padding-top: clamp(0.35rem, 1.6vw, 1.1rem);
    box-sizing: border-box;
  }
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-lead {
  margin: 0 auto 1.25rem;
  max-width: 22rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Заголовок блока контактов — крупнее и по центру колонки */
.contact-block .section-title,
.contact-col--intro .section-title,
#contact-heading {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.65rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

.form-status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-ok {
  color: #6c6;
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.lightbox[hidden] {
  display: none !important;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0.5rem 2rem;
}

.lightbox-shell:fullscreen {
  background: #000;
  padding: 2rem 0.5rem;
}

.lightbox-shell:-webkit-full-screen {
  background: #000;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: 100%;
}

.lightbox-shell:fullscreen .lightbox-stage {
  max-height: calc(100vh - 100px);
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}

.lightbox-caption {
  margin: 0.75rem 0 0;
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  max-width: 48rem;
}

.lightbox-btn {
  position: absolute;
  z-index: 5;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.85);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lightbox-btn:hover {
  background: rgba(var(--accent-gold-rgb), 0.14);
  border-color: rgba(var(--accent-gold-rgb), 0.48);
  color: var(--accent-2);
}

.lightbox-close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.75rem;
}

.lightbox-prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-fs {
  top: 0.75rem;
  left: 0.75rem;
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .lightbox-prev {
    left: 0.25rem;
  }
  .lightbox-next {
    right: 0.25rem;
  }
}

/* ========== Мобильная вёрстка (узкий экран) ========== */
@media (max-width: 639px) {
  :root {
    --page-pad-x: 1rem;
    --page-pad-y: 2rem;
    --header-h: 52px;
  }

  .logo {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .nav {
    gap: 0.4rem 0.65rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.12;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-quote {
    padding: 0.85rem 1rem 1rem;
  }

  .hero-quote p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .home-title {
    font-size: 1.28rem;
    line-height: 1.2;
  }

  .home-lead {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .focus-card {
    padding: 1.15rem 1rem;
  }

  .process-slide-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .stat-card {
    padding: 1.35rem 1rem;
  }

  .gallery-grid {
    min-height: auto;
  }

  .gallery-thumb {
    flex: 0 1 calc((100% - 1px) / 2);
    max-width: calc((100% - 1px) / 2);
    aspect-ratio: 1;
  }

  .gallery-head {
    padding-top: 1.75rem;
  }

  .lightbox-shell {
    padding: 3.25rem 0.35rem 1.5rem;
  }

  .lightbox-img {
    max-height: calc(var(--mobile-vh, 100vh) - 140px);
  }

  .lightbox-stage {
    max-height: calc(var(--mobile-vh, 100vh) - 140px);
  }
}

/* ========== Планшет ========== */
@media (min-width: 640px) and (max-width: 1023px) {
  :root {
    --page-pad-x: 1.5rem;
    --page-pad-y: 2.75rem;
  }

  .hero-actions .btn {
    flex: 0 1 auto;
  }
}

/* ========== Компьютер / широкий экран ========== */
@media (min-width: 1024px) {
  :root {
    --page-pad-x: 2rem;
    --page-pad-y: 3.5rem;
    --content-max: 1200px;
    --header-h: 60px;
  }

  .site-header {
    padding-left: calc(2rem + env(safe-area-inset-left, 0px));
    padding-right: calc(2rem + env(safe-area-inset-right, 0px));
  }

  .logo {
    font-size: 0.9rem;
  }

  .nav {
    gap: 2rem;
    font-size: 0.82rem;
  }

  .hero-inner {
    max-width: 46rem;
    padding-top: 4rem;
    padding-bottom: 5rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 3.8vw, 3.5rem);
  }

  .hero-lead {
    font-size: 1.12rem;
  }

  .hero-quote p {
    font-size: 1.14rem;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .hero-actions .btn {
    flex: 0 1 auto;
    min-height: 44px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .home-section-inner {
    padding-bottom: 4.5rem;
  }

  .home-title {
    font-size: clamp(1.5rem, 2vw, 2.1rem);
  }

  .home-lead {
    font-size: 1.02rem;
  }

  .focus-card {
    padding: 1.5rem 1.35rem;
  }

  .gallery-head {
    padding-top: 2.5rem;
    padding-bottom: 1.25rem;
    max-width: 62rem;
  }

  .gallery-empty {
    padding: 2.5rem 2rem;
  }

  .contact-inner {
    gap: 2.5rem 2rem;
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

/* Четыре колонки в блоке «Что снимаем» на больших мониторах */
@media (min-width: 1280px) {
  :root {
    --content-max: 1320px;
  }

  .focus-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Очень узкие экраны: одна колонка в сетке галереи */
@media (max-width: 380px) {
  .gallery-thumb {
    flex: 0 1 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-thumb img {
    transition: none;
  }

  .gallery-thumb:hover img {
    transform: none;
  }
}

/*
 * Мобильные (≤767px): отдельная система движения — короткие переходы, без бесконечных анимаций,
 * без «резиновых» масштабов у табов форматов. Десктоп не затрагивается.
 */
@media (max-width: 767px) {
  :root {
    --motion-mobile: 0.22s;
    --ease-mobile: cubic-bezier(0.28, 0.9, 0.32, 1);
  }

  .pricelist-sheet-root {
    isolation: isolate;
  }

  .pricelist-sheet-backdrop {
    transition: opacity var(--motion-mobile) var(--ease-mobile);
  }

  .site-footer-knv__shine {
    animation: none !important;
  }

  #focus .focus-stage__bg--layer {
    transition: opacity var(--motion-mobile) var(--ease-mobile);
    will-change: auto;
  }

  #focus .focus-stage__bg--layer.focus-stage__bg--enter {
    animation: none !important;
  }

  #focus .focus-menu-btn {
    transition:
      border-color var(--motion-mobile) var(--ease-mobile),
      background var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile);
    transform: none;
  }

  #focus .focus-menu-btn:not(.is-active) {
    opacity: 1;
    transform: none;
  }

  #focus .focus-menu-btn.is-active {
    transition:
      border-color var(--motion-mobile) var(--ease-mobile),
      background var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile),
      box-shadow var(--motion-mobile) var(--ease-mobile);
  }

  .btn,
  .btn-primary,
  .btn-channel {
    transition:
      background var(--motion-mobile) var(--ease-mobile),
      border-color var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile),
      opacity var(--motion-mobile) var(--ease-mobile);
  }

  .btn:active,
  .btn-primary:active {
    opacity: 0.88;
  }

  .site-header .nav a,
  .site-footer-nav a {
    transition: color var(--motion-mobile) var(--ease-mobile), opacity var(--motion-mobile) var(--ease-mobile);
  }

  .lightbox-btn {
    transition:
      background var(--motion-mobile) var(--ease-mobile),
      border-color var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile),
      opacity var(--motion-mobile) var(--ease-mobile);
  }

  .gallery-thumb {
    transition: opacity var(--motion-mobile) var(--ease-mobile);
  }

  .gallery-thumb:active {
    opacity: 0.82;
  }

  .process-step-btn {
    transition:
      border-color var(--motion-mobile) var(--ease-mobile),
      background-color var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile);
  }

  .process-steps__indicator {
    transition: transform var(--motion-mobile) var(--ease-mobile), width var(--motion-mobile) var(--ease-mobile);
  }

  .gallery-collapsible-toggle {
    transition:
      background var(--motion-mobile) var(--ease-mobile),
      border-color var(--motion-mobile) var(--ease-mobile),
      color var(--motion-mobile) var(--ease-mobile);
  }

  .pricelist-sheet {
    max-height: min(calc(var(--mobile-vh, 100vh) * 0.88), 920px);
    transition: transform var(--motion-mobile) var(--ease-mobile);
  }

  .estimate-calc-choice__body {
    transition:
      border-color var(--motion-mobile) var(--ease-mobile),
      background var(--motion-mobile) var(--ease-mobile);
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  #focus .focus-stage__bg--layer,
  .btn,
  .btn-primary,
  .lightbox-btn,
  .gallery-thumb,
  .process-step-btn,
  .process-steps__indicator,
  #focus .focus-menu-btn,
  .gallery-collapsible-toggle,
  .pricelist-sheet-backdrop,
  .pricelist-sheet,
  .estimate-calc-choice__body {
    transition: none !important;
  }

  #focus .focus-menu-btn:active,
  .gallery-thumb:active {
    opacity: 1;
  }
}

/* Баннер cookies */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 220;
  opacity: 0;
  transform: translateY(0.6rem);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner__inner {
  border: 1px solid var(--border);
  background: rgba(13, 13, 15, 0.97);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  padding: 0.95rem;
  border-radius: 0.5rem;
}

.cookie-banner__text {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.cookie-banner__actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-banner__btn {
  min-height: 40px;
  padding: 0.55rem 0.95rem;
}

@media (min-width: 768px) {
  .cookie-banner {
    left: 1.5rem;
    right: auto;
    max-width: min(42rem, calc(100vw - 3rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}
