/* ==========================================================================
   RO МЕБЕЛЬ — корпусная мебель на заказ
   Тёмный графит + тёплый беж. Никаких зависимостей.
   ========================================================================== */

/* --- Шрифт ---------------------------------------------------------------
   Self-hosted: Google Fonts в РФ отдаётся нестабильно, а первый экран
   держится на типографике — ждать чужой CDN здесь нельзя.                  */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-cyrillic.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Токены -------------------------------------------------------------- */

:root {
  --bg:        #14120F;
  --bg-2:      #1C1A17;
  --bg-3:      #24211C;
  --line:      #2E2A24;
  --fg:        #F2EDE4;
  --fg-dim:    #A79E90;
  --accent:    #C9A227;
  --accent-soft: #8C7A4B;
  --sand:      #D8CBB4;

  --shell: 1280px;
  --gut: clamp(20px, 5vw, 72px);

  --track: .22em;
  --ease: cubic-bezier(.4, 0, .2, 1);

  --hero-slide-ms: 7000ms;

  color-scheme: dark;
}

/* --- Сброс --------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 clamp(15px, .55vw + 13px, 17px)/1.65 'Manrope', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: #14120F;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* --- Типографика --------------------------------------------------------- */

.eyebrow {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.section__title {
  max-width: 20ch;
  font-size: clamp(1.55rem, 3.2vw, 2.9rem);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section__title--narrow { max-width: 17ch; }

.subhead {
  margin-top: clamp(56px, 7vw, 96px);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--fg);
}
.subhead__note {
  margin-top: 12px;
  max-width: 52ch;
  color: var(--fg-dim);
  font-size: .93rem;
}

.link { color: var(--sand); text-underline-offset: 3px; }
.link:hover { color: var(--accent); }

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

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 1.05em 1.7em;
  border: 1px solid var(--btn-bd);
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease);
}
/* Как в референсе: белая пилюля, инвертирующаяся на ховере. */
.btn--solid { --btn-bg: var(--fg); --btn-fg: #14120F; --btn-bd: var(--fg); }
.btn--solid:hover,
.btn--solid:focus-visible { --btn-bg: var(--accent); --btn-bd: var(--accent); }

.btn--line:hover,
.btn--line:focus-visible { --btn-bd: var(--fg); background: rgba(242, 237, 228, .08); }

.btn--ghost { padding: .8em 1.25em; --btn-bd: rgba(242, 237, 228, .3); }
.btn--ghost:hover { --btn-bd: var(--fg); }

.btn--wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(20, 18, 15, .88);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  min-height: 74px;
  padding-block: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: var(--track);
  text-transform: uppercase;
  font-size: .82rem;
}
/* Знак живёт в латуни, слово — в тёплом белом: акцент один, как и положено. */
.logo__sign {
  width: 1.85em;
  height: 1.85em;
  flex: none;
  color: var(--accent);
  transition: color .22s var(--ease);
}
.logo:hover .logo__sign { color: var(--fg); }
.logo__name { font-weight: 800; margin-inline-start: .1em; }
.logo__word { font-weight: 300; }

.site-nav {
  display: flex;
  gap: clamp(14px, 2.2vw, 34px);
  margin-inline-start: auto;
}
.site-nav a {
  position: relative;
  padding-block: 6px;
  color: var(--fg-dim);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .28s var(--ease);
}
.site-nav a:hover { color: var(--fg); }
.site-nav a:hover::after { right: 0; }

.site-header__actions { display: flex; align-items: center; gap: 14px; }

.icon-link {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  color: var(--fg-dim);
  transition: color .2s var(--ease);
}
.icon-link:hover { color: var(--accent); }
.icon-link svg {
  width: 21px; height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.icon-link .icon-dot { fill: currentColor; stroke: none; }

/* --- 1. Первый экран ------------------------------------------------------
   Устройство повторяет референс: полноэкранный кадр, затемняющий слой,
   разрежённый заглавный текст внизу слева и белая CTA.
   Вместо видео — кросс-фейд кадров с эффектом Кена Бёрнса.               */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;      /* иначе панель мобильного браузера срезает кнопки */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero__stage { position: absolute; inset: 0; z-index: -2; background: var(--bg-2); }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero__slide.is-active { opacity: 1; }

.hero__slide img { width: 100%; height: 100%; object-fit: cover; }

/* Съёмка объекта проявляется поверх кадра — кадрирование и грейд у них
   совпадают, поэтому подмена не заметна. Пока видео не готово (или его
   отключил prefers-reduced-motion, Save-Data, слабая сеть) виден кадр. */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s var(--ease);
  pointer-events: none;
}
.hero__slide.has-video .hero__video { opacity: 1; }

/* Кен Бёрнс. Направление чередуется, иначе кадры «качаются» как маятник. */
.hero__slide.is-active img { animation: kenburns var(--hero-slide-ms) linear forwards; }
.hero__slide:nth-child(even).is-active img { animation-name: kenburns-alt; }

@keyframes kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.09) translate3d(-1.2%, -1%, 0); }
}
@keyframes kenburns-alt {
  from { transform: scale(1.09) translate3d(1%, .8%, 0); }
  to   { transform: scale(1.02) translate3d(0, 0, 0); }
}

/* Затемнение не запечено в картинку — так контраст текста можно
   подкрутить, не пересобирая ассеты. Низ-слева темнее: там лежит текст. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,   rgba(20,18,15,.92) 0%, rgba(20,18,15,.44) 46%, rgba(20,18,15,.66) 100%),
    linear-gradient(to right, rgba(20,18,15,.62) 0%, rgba(20,18,15,0) 62%);
}

.hero__content {
  position: relative;
  padding-bottom: clamp(120px, 17vh, 190px);
  padding-top: 140px;
}

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5em;
  margin-bottom: clamp(20px, 3vh, 32px);
  color: var(--fg-dim);
  font-size: clamp(.66rem, 1.1vw, .78rem);
  font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

/* Слово стиля меняется вместе с кадром: маска сверху, новое слово
   выезжает снизу. Ширина анимируется, чтобы соседние слова не прыгали. */
.hero__style {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.5em;
  color: var(--accent);
  font-weight: 700;
  transition: width .5s var(--ease);
}
.hero__style-word {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(0);
  opacity: 1;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.hero__style-word.is-out { transform: translateY(-115%); opacity: 0; }
.hero__style-word.is-in  { transform: translateY(115%);  opacity: 0; transition: none; }

.hero__title {
  max-width: 17ch;
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  font-weight: 300;
  line-height: 1.24;
  letter-spacing: -.015em;
}
.hero__title span { display: block; }

.hero__lead {
  margin-top: clamp(20px, 3vh, 30px);
  max-width: 44ch;
  color: var(--sand);
  font-size: clamp(.92rem, 1.3vw, 1.05rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 4vh, 44px);
}

/* Ступенчатое появление на загрузке. */
.hero__kicker,
.hero__title span,
.hero__lead,
.hero__actions {
  animation: rise .9s var(--ease) both;
}
.hero__title span:nth-child(1) { animation-delay: .09s; }
.hero__title span:nth-child(2) { animation-delay: .18s; }
.hero__title span:nth-child(3) { animation-delay: .27s; }
.hero__lead    { animation-delay: .36s; }
.hero__actions { animation-delay: .45s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Переключатель стилей: подписи + полоса, заполняющаяся за длительность слайда. */
.hero__nav {
  position: absolute;
  right: var(--gut);
  bottom: clamp(46px, 7vh, 70px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.hero-tick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--fg-dim);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s var(--ease);
}
.hero-tick:hover { color: var(--fg); }
.hero-tick[aria-selected='true'] { color: var(--fg); }

.hero-tick__bar {
  position: relative;
  width: 46px; height: 1px;
  background: rgba(242, 237, 228, .28);
  overflow: hidden;
}
.hero-tick__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-tick[aria-selected='true'] .hero-tick__bar { width: 74px; }
.hero-tick[aria-selected='true'] .hero-tick__bar::after {
  animation: fill var(--hero-slide-ms) linear forwards;
}
.hero.is-paused .hero-tick__bar::after { animation-play-state: paused; }

@keyframes fill { to { transform: scaleX(1); } }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px; height: 54px;
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--fg-dim));
  animation: scrollcue 2.1s ease-in-out infinite;
}
@keyframes scrollcue {
  0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; }
  50%      { transform: scaleY(1);  transform-origin: top; opacity: 1; }
}

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

.section { padding-block: clamp(72px, 11vw, 150px); }
.section--about { background: var(--bg); }
.section--geo { background: var(--bg-2); }
.section--contacts { background: var(--bg); }

/* --- 2. О нас ------------------------------------------------------------ */

.about__head {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
}
.about__text { display: grid; gap: 1.1em; color: var(--fg-dim); }
.about__text p { max-width: 54ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: clamp(48px, 6vw, 84px);
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; gap: 8px; padding: clamp(22px, 3vw, 34px); background: var(--bg); }
.stat__value {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 200;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--fg-dim); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }

.works {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  margin-top: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.work { scroll-snap-align: start; display: grid; gap: 12px; }
.work picture { overflow: hidden; background: var(--bg-3); }
.work img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.work:hover img { transform: scale(1.04); }
/* min-height держит нижний край карточек на одной линии, когда часть
   подписей переносится на вторую строку. */
.work__caption {
  min-height: 2.7em;
  color: var(--fg-dim);
  font-size: .8rem;
  letter-spacing: .04em;
}

/* --- 3. География -------------------------------------------------------- */

/* Карта во всю ширину: в узкой колонке силуэт РФ ужимается так, что
   перестаёт читаться, а он здесь — главный аргумент блока. */
.geo {
  display: grid;
  gap: clamp(30px, 4vw, 56px);
  justify-items: start;
  margin-top: clamp(34px, 5vw, 60px);
}

.geo__map { position: relative; width: 100%; min-height: 180px; }
.geo__map svg { width: 100%; height: auto; overflow: visible; }

/* Слой подписей: координаты в процентах от viewBox, размеры — в пикселях. */
.geo__pins { position: absolute; inset: 0; pointer-events: none; }

/* Города-кнопки: сбрасываем оформление, иначе браузер рисует серые плашки. */
.geo-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.geo-pin__dot {
  display: block;
  width: 9px; height: 9px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--sand);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.geo__map.is-live .geo-pin__dot { opacity: 1; transition-delay: calc(1.3s + var(--i) * .1s); }

.geo-pin--home .geo-pin__dot { width: 13px; height: 13px; background: var(--fg); }
.geo-pin--primary .geo-pin__dot { width: 13px; height: 13px; background: var(--accent); }

/* Пульсирующее кольцо — только у производства и приоритетного города. */
.geo-pin--home .geo-pin__dot::after,
.geo-pin--primary .geo-pin__dot::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: inherit;
}
.geo__map.is-live .geo-pin--home .geo-pin__dot::after,
.geo__map.is-live .geo-pin--primary .geo-pin__dot::after {
  animation: halo 3s ease-out infinite;
  animation-delay: calc(1.8s + var(--i) * .15s);
}
@keyframes halo {
  0%   { opacity: .55; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(3.4); }
  100% { opacity: 0;   transform: scale(3.4); }
}

.geo-pin__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  /* Подписи лежат прямо на точках карты — тень отделяет их от фона. */
  text-shadow: 0 1px 3px var(--bg), 0 0 8px var(--bg);
  transition: opacity .6s var(--ease);
}
/* Москва лежит прямо над Новочеркасском: разводим подписи в разные стороны,
   иначе они наезжают друг на друга. */
.geo-pin--primary .geo-pin__label { top: auto; bottom: calc(100% + 8px); }

/* У краёв карты подпись прижимается к точке, а не центрируется по ней. */
.geo-pin--align-left .geo-pin__label { left: -2px; transform: none; text-align: left; }
.geo-pin--align-right .geo-pin__label { left: auto; right: -2px; transform: none; text-align: right; }
.geo__map.is-live .geo-pin__label { opacity: 1; transition-delay: calc(1.5s + var(--i) * .1s); }

.geo-pin__name {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.geo-pin__note { display: block; margin-top: 2px; color: var(--fg-dim); font-size: .72rem; }

.geo-pin--city .geo-pin__label { opacity: 0 !important; transition-delay: 0s !important; }
.geo-pin--city:hover .geo-pin__label,
.geo-pin--city:focus-within .geo-pin__label { opacity: 1 !important; }
.geo-pin--city .geo-pin__name { font-weight: 400; text-transform: none; letter-spacing: .02em; }

.geo-pin--primary .geo-pin__name { color: var(--accent); }

/* viewBox карты 1400 px, а на экране она около 760 — точки ужимаются почти
   вдвое, поэтому радиус и непрозрачность заданы с запасом. */
/* Точки — подпути нулевой длины внутри 26 <path>: круглый конец линии рисует
   кружок диаметром stroke-width. Так в DOM 26 элементов вместо 4000 <circle>. */
.ru-map__band {
  fill: none;
  stroke: var(--sand);
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0;
}

/* Точки проявляются волной от Новочеркасска: анимируется вся полоса разом. */
.geo__map.is-live .ru-map__band {
  animation: dot-in .7s var(--ease) forwards;
  animation-delay: calc(var(--band) * 45ms);
}
@keyframes dot-in { to { opacity: .5; } }

/* non-scaling-stroke: толщина в пикселях экрана, а не в единицах viewBox —
   иначе при ужатии карты дуги истончаются до невидимости. */
/* Толщина намеренно в единицах viewBox, без non-scaling-stroke: он считает
   штриховку в экранных пикселях, а getTotalLength() отдаёт длину в единицах
   viewBox — из-за расхождения длинные дуги не дорисовывались до конца. */
.ru-map__link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: .5;
}
.ru-map__link--primary { stroke-width: 3.2; opacity: 1; }

/* У дуг стоит pathLength="100", поэтому 100 — это всегда вся дуга целиком. */
.geo__map.is-live .ru-map__link {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 1.1s var(--ease) forwards;
  animation-delay: calc(1150ms + var(--i) * 130ms);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.geo__points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(22px, 3vw, 40px);
  width: 100%;
}
.geo-point { padding-left: 20px; border-left: 1px solid var(--line); }
.geo-point h3 {
  margin-bottom: 8px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.geo-point p { color: var(--fg-dim); font-size: .92rem; }
.geo-point--home { border-left-color: var(--fg); }
.geo-point--primary { border-left-color: var(--accent); }
.geo-point--primary h3 { color: var(--accent); }

/* --- 4. Контакты --------------------------------------------------------- */

.contacts {
  display: grid;
  gap: clamp(30px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  margin-top: clamp(34px, 5vw, 56px);
  align-items: start;
}

.lead { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--fg-dim); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.field__opt { text-transform: none; letter-spacing: 0; opacity: .7; }

.field input[type='text'],
.field input[type='tel'],
.field input[type='email'],
.field textarea {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-2);
  transition: border-color .2s var(--ease);
  resize: vertical;
}
.field input:hover, .field textarea:hover { border-color: var(--bg-3); }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: #C4553D; }
.field ::placeholder { color: #6E6659; }

.field__error { color: #E08872; font-size: .8rem; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 4px;
}
.field--check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); }
.field--check label { text-transform: none; letter-spacing: 0; font-size: .84rem; line-height: 1.5; }
.field--check .field__error { grid-column: 1 / -1; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lead__status { min-height: 1.4em; font-size: .88rem; color: var(--accent); }
.lead__status.is-error { color: #E08872; }

.lead.is-sent { place-items: center; text-align: center; gap: 14px; padding: clamp(34px, 6vw, 64px) 0; }
.lead.is-sent .lead__done-title { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 300; }
.lead.is-sent .lead__done-text { color: var(--fg-dim); max-width: 38ch; }

.contact-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(16px, 2vw, 24px);
  background: var(--bg-2);
  color: var(--fg);
  text-decoration: none;
  transition: background .2s var(--ease);
}
a.contact-row:hover { background: var(--bg-3); }
.contact-row svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.contact-row .icon-dot { fill: var(--accent); stroke: none; }
.contact-row__body { display: grid; gap: 2px; min-width: 0; }
.contact-row__label { color: var(--fg-dim); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.contact-row__value { font-size: .96rem; overflow-wrap: anywhere; }

.contacts__note { margin-top: 30px; }
.contacts__note h3 {
  margin-bottom: 16px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.steps { counter-reset: step; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  color: var(--fg-dim);
  font-size: .92rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent-soft);
  font-size: .78rem;
  letter-spacing: .05em;
}

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

.site-footer { padding-block: 44px; border-top: 1px solid var(--line); background: var(--bg); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(20px, 4vw, 60px);
  align-items: baseline;
  color: var(--fg-dim);
  font-size: .8rem;
}
.site-footer__brand { color: var(--fg); letter-spacing: .06em; }
.site-footer__copy { margin-inline-start: auto; }

.site-footer__legal .link { margin-inline-start: 8px; }

/* --- Политика конфиденциальности ------------------------------------------ */

.policy {
  width: min(760px, calc(100% - 32px));
  max-height: min(86vh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--fg);
  font: inherit;
  overflow: hidden;
}
.policy[open] { display: flex; flex-direction: column; animation: policy-in .35s var(--ease); }
.policy::backdrop { background: rgba(10, 9, 7, .72); backdrop-filter: blur(4px); }
.policy__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.policy__head h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 400; }
.policy__close {
  flex: none; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%;
  background: none; color: var(--fg); font-size: 1.4rem; line-height: 1; cursor: pointer;
  transition: border-color .2s;
}
.policy__close:hover, .policy__close:focus-visible { border-color: var(--accent); outline: none; }
.policy__body {
  overflow-y: auto;
  padding: 24px clamp(20px, 4vw, 40px) 36px;
  color: var(--fg-dim); font-size: .92rem; line-height: 1.65;
}
.policy__body h3 {
  margin: 26px 0 8px;
  color: var(--fg); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.policy__body ul { padding-inline-start: 1.1em; }
.policy__body li + li { margin-top: 4px; }
.policy__meta { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; }
@keyframes policy-in { from { opacity: 0; transform: translateY(16px); } }

/* --- Появление секций ---------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1024px) {
  .about__head, .contacts { grid-template-columns: 1fr; }
  .site-header__cta { display: none; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header__actions { margin-inline-start: auto; }
}

/* На мобильном текст уходит в центр экрана — как и в референсе, иначе
   он утыкается в переключатель стилей. */
@media (max-width: 760px) {
  .hero { align-items: center; }
  .hero__content { padding-top: 100px; padding-bottom: clamp(150px, 26vh, 210px); }
  .hero__title { max-width: none; }
  .hero__scrim {
    background:
      linear-gradient(to top, rgba(20,18,15,.9) 0%, rgba(20,18,15,.5) 50%, rgba(20,18,15,.78) 100%);
  }
  .hero__nav {
    left: var(--gut);
    right: var(--gut);
    bottom: 58px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
  }
  .hero-tick { gap: 8px; font-size: .6rem; }
  .hero-tick__bar { width: 20px; }
  .hero-tick[aria-selected='true'] .hero-tick__bar { width: 34px; }
  .hero__scroll { display: none; }
  .works { grid-auto-columns: minmax(210px, 78vw); }
  .site-footer__copy { margin-inline-start: 0; }

  /* Карта ужимается втрое — точки и подписи иначе теряются. */
  .ru-map__band { stroke-width: 9.2; }
  .geo-pin__dot { width: 7px; height: 7px; }
  .geo-pin--home .geo-pin__dot,
  .geo-pin--primary .geo-pin__dot { width: 10px; height: 10px; }
  .geo-pin--home .geo-pin__dot::after,
  .geo-pin--primary .geo-pin__dot::after {
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
  }
  .geo-pin__name { font-size: .68rem; }
  .geo-pin__note { display: none; }
}

@media (max-width: 460px) {
  .hero__actions .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* --- Уважение к prefers-reduced-motion -----------------------------------
   Всё, что двигалось, просто рендерится в финальном состоянии.           */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__slide.is-active img { animation: none; transform: none; }
  .hero__video { display: none; }
  .hero__scroll-line { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .ru-map__band { opacity: .5; }
  .geo__map.is-live .ru-map__link { stroke-dasharray: none; stroke-dashoffset: 0; }
  .geo__map.is-live .geo-pin__dot,
  .geo__map.is-live .geo-pin__label { opacity: 1; transition-delay: 0s; }
  .geo-pin--home .geo-pin__dot::after,
  .geo-pin--primary .geo-pin__dot::after { display: none; }
}

/* --- Портфолио (portfolio.html) ------------------------------------------ */

.pf { padding-block: clamp(120px, 14vw, 170px) clamp(72px, 10vw, 130px); }
.pf__back { display: inline-block; margin-bottom: 28px; font-size: .85rem; }
.pf .section__title { max-width: 22ch; }

.pf-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.pf-chip {
  padding: .6em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.pf-chip:hover { color: var(--fg); border-color: var(--fg-dim); }
.pf-chip.is-active { color: #14120F; background: var(--sand); border-color: var(--sand); }

.pf-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.pf-filter + .pf-item { margin-top: 40px; }
.pf-item[hidden] { display: none; }
.pf-item.is-target .pf-item__title { color: var(--accent); }

.pf-item__text { align-self: start; position: sticky; top: 100px; }
.pf-item__cat { color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; }
.pf-item__title { margin-top: 12px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 400; line-height: 1.25; }
.pf-item__price { margin-top: 10px; color: var(--sand); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pf-item__desc { margin-top: 18px; color: var(--fg-dim); font-size: .93rem; line-height: 1.65; }
.pf-item__desc p + p { margin-top: .8em; }
.pf-item__tg { display: inline-block; margin-top: 20px; font-size: .85rem; }

.pf-item__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pf-shot { position: relative; display: block; overflow: hidden; background: var(--bg-3); }
.pf-shot[hidden] { display: none; }
.pf-shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease); }
.pf-shot:hover img { transform: scale(1.04); }
.pf-shot__more {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(20, 18, 15, .6);
  color: var(--fg); font-size: 1.4rem; font-weight: 300;
}

.pf-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 56px; border-top: 1px solid var(--line); }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(10, 9, 8, .96);
  color: var(--fg);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 9, 8, .8); }
.lightbox__fig { margin: 0; display: grid; gap: 12px; justify-items: center; }
.lightbox__img { max-width: calc(100vw - 140px); max-height: calc(100vh - 90px); object-fit: contain; }
.lightbox__cap { color: var(--fg-dim); font-size: .82rem; }
.lightbox__btn {
  position: fixed; z-index: 1;
  width: 52px; height: 52px;
  border: 0; background: transparent; color: var(--fg);
  font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .7;
}
.lightbox__btn:hover { opacity: 1; color: var(--accent); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 8px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 8px; top: 50%; translate: 0 -50%; }

.work a { display: grid; gap: 12px; color: inherit; text-decoration: none; }
.work a:hover .work__caption { color: var(--fg); }
.works__all { display: inline-block; margin-top: 18px; font-size: .9rem; }

@media (max-width: 860px) {
  .pf-item { grid-template-columns: 1fr; }
  .pf-item__text { position: static; }
}
@media (max-width: 560px) {
  .pf-item__gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox__img { max-width: 100vw; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; translate: none; }
}

/* --- Плашка cookie ------------------------------------------------------- */

.cookie {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 150;
  max-width: 560px;
  margin-inline: auto;
  padding: 18px 20px;
  display: grid;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.cookie[hidden] { display: none; }
.cookie__text { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--fg-dim); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie__actions .btn { flex: 1 1 140px; padding: .75em 1.25em; }
#cookieSettings[hidden] { display: none; }

/* ───────── Страницы услуг (/kuhni/ и др.) ───────── */
.svc__crumbs { margin-bottom: 28px; color: var(--fg-dim); font-size: .85rem; }
.svc__lead { max-width: 68ch; margin-top: 24px; color: var(--fg-dim); font-size: 1.05rem; line-height: 1.7; }
.svc__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line); }
.svc__facts > div { padding: 20px; background: var(--bg); }
.svc__facts dt { color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; }
.svc__facts dd { margin-top: 8px; font-size: 1.15rem; }
.svc__facts .svc__fact-note { margin-top: 4px; color: var(--fg-dim); font-size: .82rem; line-height: 1.5; }
.svc__cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.svc__block { margin-top: clamp(56px, 8vw, 96px); }
.svc__works { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.svc__works img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg-3); }
.svc__work-price { display: block; margin-top: 4px; color: var(--sand); font-size: .9rem; }
.svc__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 48px; }
.svc__list { display: grid; gap: 10px; margin-top: 24px; color: var(--fg-dim); line-height: 1.6; }
.svc__list li { padding-left: 20px; position: relative; }
.svc__list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--accent); }
.svc__block .steps { margin-top: 24px; }
.svc__faq { max-width: 72ch; margin-top: 24px; }
.svc__faq h3 { margin-top: 28px; font-size: 1.05rem; font-weight: 500; }
.svc__faq h3:first-child { margin-top: 0; }
.svc__faq p { margin-top: 8px; color: var(--fg-dim); line-height: 1.65; }
.svc__more { margin-top: 16px; line-height: 2; }
.site-footer__services { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; }
