/* =========================================================================
   Bartkevich Event — глобальные стили
   Дизайн-токены и значения взяты из design_reference/README.md (hi-fi).
   ========================================================================= */

:root {
  /* --- Цвета --- */
  --bg:            #0c0b09; /* фон страницы */
  --surface:       #161410; /* плитки фото, карточки, инпуты */
  --surface-dark:  #13110d; /* низ CTA-градиента */
  --surface-form:  #100f0c; /* поверхность формы */

  --text:          #f3efe6; /* заголовки / основной текст */
  --text-light:    #e7e2d8; /* светлый текст */
  --text-list:     #cfc9bd; /* текст списков */
  --text-muted:    #a39d92; /* приглушённые параграфы */
  --nav-text:      #9a948a; /* неактивная навигация */
  --dim:           #7a7468; /* подвал */
  --dim2:          #6b6457; /* плейсхолдеры */
  --dimmest:       #524d44; /* копирайт */

  --gold:          #c4a056; /* акцент */
  --gold-hover:    #d4b269; /* акцент при наведении */

  --hairline:        rgba(196,160,86,.16); /* золотые разделители */
  --hairline-strong: rgba(196,160,86,.30); /* линии под цифрами */
  --input-border:    rgba(196,160,86,.20); /* бордюры инпутов */
  --ghost-border:    rgba(231,226,216,.25); /* ghost-кнопка */

  --danger:        #c2603f; /* ошибки валидации */

  /* --- Раскладка --- */
  --pad: 56px;                /* горизонтальные поля контента */
  --max: 1320px;              /* предел ширины на больших экранах */

  /* --- Шрифты --- */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Manrope', system-ui, -apple-system, sans-serif;
  --mono:  ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

/* Горизонтальной прокрутки на сайте быть не должно ни на одной ширине:
   сетки ниже умеют сжиматься, а это — страховка от случайных выносов. */
html { overflow-x: clip; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-light);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--gold); color: var(--bg); }

/* Ограничиваем ширину контента на очень широких экранах, сохраняя поля 56px */
.wrap { max-width: var(--max); margin: 0 auto; }

/* сетки на узких экранах: колонка не должна быть шире экрана */
.grid-3, .masonry, .values, .steps, .services, .svc-list, .contact-grid, .footer,
.duo, .stats, .partners__row { min-width: 0; }
.grid-3 > *, .masonry > *, .values > *, .steps > *, .svc-list > *,
.contact-grid > *, .footer > *, .duo > *, .stats > * { min-width: 0; }
h1, h2, h3, p, a, span, li { overflow-wrap: break-word; }

/* =========================================================================
   Типографика-помощники
   ========================================================================= */
.eyebrow {
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
}
.accent { font-style: italic; color: var(--gold); }

.h1-hero {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 66px;
  line-height: 1.08;
  margin: 0 auto 26px;
  max-width: 800px;
  color: var(--text);
}
.h1-page {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 56px;
  line-height: 1.08;
  margin: 0 auto 22px;
  max-width: 740px;
  color: var(--text);
}
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  margin: 0;
  color: var(--text);
}
.lead {
  max-width: 540px;
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
}

/* =========================================================================
   Кнопки
   ========================================================================= */
.btn {
  display: inline-block;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, filter .2s;
  font-family: var(--sans);
}
.btn--gold {
  background: var(--gold);
  color: var(--bg);
  padding: 15px 34px;
  font-weight: 600;
}
.btn--gold:hover { background: var(--gold-hover); }
.btn--ghost {
  border: 1px solid var(--ghost-border);
  color: var(--text-light);
  padding: 15px 34px;
}
.btn--ghost:hover { border-color: var(--text-light); color: #fff; }
.btn--lg { padding: 16px 40px; }

/* =========================================================================
   Навигация (sticky, blur)
   ========================================================================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  background: rgba(12,11,9,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 20;
}
.nav__logo {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text);
  white-space: nowrap;
}
.nav__logo-accent { font-style: italic; color: var(--gold); }
.footer__logo .nav__logo-accent { font-style: italic; color: var(--gold); }
.nav__links {
  display: flex;
  gap: 34px;
  font-size: 12.5px;
  letter-spacing: .06em;
}
.nav__links a {
  color: var(--nav-text);
  transition: color .2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--gold); }

.nav__cta {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 9px 20px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--gold); color: var(--bg); }

.nav__right { display: flex; align-items: center; gap: 16px; }

/* бургер */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.nav__toggle span {
  width: 22px; height: 1.5px;
  background: var(--text-light);
  transition: transform .25s, opacity .25s;
}

/* =========================================================================
   Hero / шапки страниц
   ========================================================================= */
.hero {
  padding: 104px var(--pad) 88px;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(196,160,86,.07), transparent 60%);
}
.hero .eyebrow { display: block; margin-bottom: 30px; }
.hero .lead { margin-bottom: 40px; }
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.page-header {
  padding: 88px var(--pad) 64px;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(196,160,86,.06), transparent 60%);
}
.page-header .eyebrow { display: block; margin-bottom: 24px; }
.page-header .lead { max-width: 520px; }

/* =========================================================================
   Плейсхолдеры фото (заменяются на <img>)
   ========================================================================= */
.ph {
  background: var(--surface);
  background-image: repeating-linear-gradient(135deg, rgba(196,160,86,.05) 0 2px, transparent 2px 11px);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim2);
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 14px;
}
.ph--hero   { height: 420px; margin: 0 var(--pad); }
.ph--4x3    { aspect-ratio: 4 / 3; }
.ph--4x5    { aspect-ratio: 4 / 5; }
.ph--square { aspect-ratio: 1 / 1.15; }

/* реальные фото (замена плейсхолдеров .ph) */
.photo {
  display: block;
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface);
}
.photo--4x3 { aspect-ratio: 4 / 3; }
.photo--4x5 { aspect-ratio: 4 / 5; }
.hero-photo { margin: 0 var(--pad); }
.hero-photo .photo { height: 420px; }

/* hero: триптих — фото | вертикальное видео | фото, все ячейки 9:16 */
.hero-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.hero-media__cell {
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.hero-media__cell img,
.hero-media__cell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 640px) {
  .hero-media { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-media__cell--video { grid-column: 1 / -1; grid-row: 1; }  /* видео сверху, фото парой ниже */
  .hero-media__cell--photo { aspect-ratio: 3 / 4; }
  .hero-media__cell--photo img { object-position: center 25%; }  /* верх кадра важнее: бутылки, тент */
}

/* галерея: фото без обрезки, естественные пропорции */
.photo-grid {
  /* колонки считаются сразу по всей ленте, а не по мере загрузки картинок */
  padding: 24px var(--pad) 96px;
  columns: 3;
  column-gap: 14px;
}
.photo-grid__item {
  display: block;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}
.photo-grid__item img {
  width: 100%;
  height: auto;          /* пропорции берутся из width/height в разметке */
  display: block;
  transition: opacity .25s;
}
.photo-grid__item:hover img { opacity: .88; }
@media (max-width: 820px) { .photo-grid { columns: 2; } }
@media (max-width: 520px) { .photo-grid { columns: 1; } }

/* =========================================================================
   Заголовок секции с ссылкой-стрелкой
   ========================================================================= */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.link-arrow {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  transition: opacity .2s;
}
.link-arrow:hover { opacity: .7; }

/* двухколоночный блок «чем занимаемся / как работает» */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 56px var(--pad) 0;
}
.duo__card {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 28px 30px;
  background: var(--surface);
}
.duo__card .eyebrow { display: block; margin-bottom: 14px; letter-spacing: .22em; }
.duo__card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 300;
}
.duo__card strong { color: var(--gold); font-weight: 600; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } }

/* зимний баннер (сезонное предложение) */
.winter-banner { padding: 40px var(--pad) 0; }
.winter-banner__inner {
  display: flex;
  gap: 22px;
  align-items: center;
  border: 1px solid rgba(159,196,222,.28);
  border-radius: 8px;
  padding: 26px 30px;
  background: linear-gradient(120deg, rgba(159,196,222,.07), transparent 65%);
}
.winter-banner__snow { font-size: 34px; color: #9fc4de; line-height: 1; }
.winter-banner__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 6px;
}
.winter-banner__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 640px;
}
.winter-banner__btn { white-space: nowrap; border-color: rgba(159,196,222,.4); }
.winter-banner__btn:hover { border-color: #9fc4de; color: #dcebf5; }
@media (max-width: 820px) {
  .winter-banner__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* «Нам доверяют» — логотипы партнёров */
.partners { padding: 40px 0 0; }
.partners__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 44px;
  padding: 10px var(--pad) 72px;
}
.partners__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  opacity: .72;
  filter: grayscale(1);
  transition: opacity .2s, filter .2s;
}
.partners__item:hover { opacity: 1; filter: none; }
.partners__item img { max-height: 56px; max-width: 160px; width: auto; }
.partners__name {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.2;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-align: center;
  max-width: 190px;
}
@media (max-width: 520px) {
  .partners__row { gap: 14px 28px; }
  .partners__item { height: 44px; }
  .partners__item img { max-height: 44px; max-width: 130px; }
  .partners__name { font-size: 15px; max-width: 140px; }
}

/* блоки-заголовки с отступами */
.pad-head        { padding: 96px var(--pad) 30px; }
.pad-head--flush { padding-top: 0; }              /* если выше уже есть отступ */
.center-head     { text-align: center; padding: 96px var(--pad) 30px; }
.center-head--sm { padding: 30px var(--pad) 40px; }
.center-head .eyebrow { display: block; margin-bottom: 14px; }

/* =========================================================================
   Превью услуг (главная) — кликабельные строки
   ========================================================================= */
.svc-list {
  padding: 24px var(--pad) 96px;
  display: flex;
  flex-direction: column;
}
.svc-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--hairline);
  color: inherit;
}
.svc-row:last-child { border-bottom: 1px solid var(--hairline); }
.svc-row__num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold);
}
.svc-row__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  margin: 0 0 8px;
  color: var(--text);
  transition: color .2s;
}
.svc-row__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 560px;
}
.svc-row__arrow {
  color: var(--gold);
  font-size: 22px;
  transition: transform .2s;
}
.svc-row:hover .svc-row__title { color: var(--gold); }
.svc-row:hover .svc-row__arrow { transform: translateX(6px); }

/* =========================================================================
   Сетка превью галереи (главная)
   ========================================================================= */
.grid-3 {
  padding: 24px var(--pad) 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* реальные фото в превью на главной сохраняют квадратную пропорцию */
.grid-3 .preview-tile { aspect-ratio: 1 / 1.15; }

/* =========================================================================
   Услуги — чередующиеся двухколонники
   ========================================================================= */
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 64px var(--pad);
  border-top: 1px solid var(--hairline);
}
.service:last-of-type { border-bottom: 1px solid var(--hairline); }
.services { padding-top: 40px; }
.service--reverse .photo { order: -1; }   /* фото слева в чётных рядах */
.service .btn { margin-top: 4px; }
.service__num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold);
  margin-bottom: 16px;
}
.service__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  margin: 0 0 16px;
  color: var(--text);
}
.service__text {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 460px;
}
.bullets { display: flex; flex-direction: column; gap: 12px; }
.bullet {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--text-list);
}
.bullet::before { content: "—"; color: var(--gold); }

/* «Как мы работаем» */
.steps {
  padding: 40px var(--pad) 96px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step {
  padding-top: 24px;
  border-top: 1px solid var(--hairline-strong);
}
.step__num {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin: 0 0 8px; color: var(--text); font-weight: 600; }
.step p  { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); font-weight: 300; }

/* =========================================================================
   Галерея — фильтры + masonry
   ========================================================================= */
.filters {
  padding: 0 var(--pad) 40px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.chip {
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 12px;
  letter-spacing: .06em;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text-list);
  cursor: pointer;
  font-family: var(--sans);
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
  font-weight: 600;
}

.masonry {
  padding: 0 var(--pad) 96px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 14px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  background-image: repeating-linear-gradient(135deg, rgba(196,160,86,.05) 0 2px, transparent 2px 11px);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: var(--dim2);
  font: 500 10px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tile--r2 { grid-row: span 2; }
.tile--c2 { grid-column: span 2; }
/* поведение для реальных фото (когда плейсхолдер заменят на <img>) */
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.tile__cap {
  position: relative;
  z-index: 2;
  transition: color .2s;
}
.tile:hover img { transform: scale(1.03); }
.tile.has-img::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(12,11,9,.72));
  opacity: 0; transition: opacity .3s;
}
.tile.has-img:hover::after { opacity: 1; }
/* на реальных фото подпись — только при наведении, обычным регистром */
.tile.has-img .tile__cap {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-light);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}
.tile.has-img:hover .tile__cap { opacity: 1; transform: none; }
.tile.is-hidden { display: none; }

/* =========================================================================
   О нас
   ========================================================================= */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 40px var(--pad) 80px;
  align-items: center;
}
.story__lead {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 400;
}
.story p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 300;
}
.story p:last-child { margin-bottom: 0; }

.values {
  padding: 40px var(--pad) 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.value {
  padding-top: 26px;
  border-top: 1px solid var(--hairline-strong);
}
.value h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 500;
}
.value p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-muted); font-weight: 300; }

.stats {
  margin: 0 var(--pad) 80px;
  padding: 56px 48px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
  background: linear-gradient(180deg, #0e0d0a, #13110d);
}
.stat__num {
  font-family: var(--serif);
  font-size: 50px;
  color: var(--gold);
  line-height: 1;
}
.stat__num span { font-size: 30px; }
.stat__label {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--nav-text);
}
.stat--bordered {
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}

/* =========================================================================
   Контакты — форма + инфо + карта
   ========================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  padding: 30px var(--pad) 90px;
  align-items: start;
}
.form-card {
  background: var(--surface-form);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 40px;
}
.form-stack { display: flex; flex-direction: column; gap: 20px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--nav-text);
  margin-bottom: 9px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  padding: 13px 14px;
  color: var(--text-light);
  font-size: 14px;
  font-family: var(--sans);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--dim2); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--gold); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--danger); }
.field__error {
  display: none;
  margin: 7px 0 0;
  font-size: 11px;
  color: var(--danger);
  letter-spacing: .02em;
}
.field.is-invalid .field__error { display: block; }

.consent { margin: 0; font-size: 11px; line-height: 1.5; color: var(--dim2); }

.thanks { text-align: center; padding: 40px 10px; }
.thanks__title {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--gold);
  margin-bottom: 14px;
}
.thanks p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-muted); font-weight: 300; }
.is-hidden { display: none !important; }

.info { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 24px 26px;
}
.info-card__k {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--nav-text);
  margin-bottom: 8px;
}
.info-card__v {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--text);
}
.info-card__v--gold { color: var(--gold); }
.info-card__v--small {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-list);
  line-height: 1.5;
}
a.info-card { transition: border-color .2s; }
a.info-card:hover { border-color: var(--gold); }

/* honeypot — антиспам: скрыто от людей, но остаётся в DOM для ботов */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ошибка отправки формы */
/* выбор мессенджера — пилюли */
.msgr { display: flex; gap: 8px; flex-wrap: wrap; }
.msgr__opt { position: relative; cursor: pointer; }
.msgr__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.msgr__opt span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--input-border);
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-light);
  background: var(--surface);
  transition: border-color .2s, background .2s, color .2s;
}
.msgr__opt:hover span { border-color: var(--gold); }
.msgr__opt input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }
.msgr__opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.form-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}
.form-error a { color: var(--gold); }

/* =========================================================================
   CTA-блок
   ========================================================================= */
.cta {
  padding: 88px var(--pad);
  text-align: center;
  background: linear-gradient(180deg, #0c0b09, #13110d);
  border-top: 1px solid var(--hairline);
}
.cta__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  margin: 0 0 18px;
  color: var(--text);
}
.cta p {
  margin: 0 auto 34px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
}

/* =========================================================================
   Подвал
   ========================================================================= */
.footer {
  padding: 60px var(--pad) 40px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer__logo {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text);
  margin-bottom: 14px;
}
.footer__about {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--dim);
  font-weight: 300;
  max-width: 280px;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13px;
  color: var(--nav-text);
}
.footer__col a { transition: color .2s; }
.footer__col a:hover { color: var(--gold); }
.footer__col .gold { color: var(--gold); letter-spacing: .06em; }
.copyright {
  padding: 18px var(--pad) 30px;
  font-size: 11px;
  color: var(--dimmest);
  letter-spacing: .04em;
  line-height: 1.8;
}
.copyright__req { opacity: .75; }

/* =========================================================================
   Адаптив
   ========================================================================= */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
  .masonry { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  :root { --pad: 24px; }

  /* бургер-меню */
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 22px;
    padding: 26px var(--pad) 30px;
    background: rgba(12,11,9,.97);
    border-bottom: 1px solid var(--hairline);
    font-size: 15px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s, transform .22s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* типографика */
  .h1-hero { font-size: 40px; }
  .h1-page { font-size: 38px; }
  .h2, .cta__title { font-size: 30px; }
  .service__title { font-size: 30px; }

  /* раскладки в одну колонку */
  .service,
  .story,
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .service__text, .service .ph { max-width: none; }
  .service .ph, .service .photo { order: -1; } /* фото сверху на мобиле */
  .services { padding-top: 16px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps  { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: 1fr; }
  .masonry { grid-template-columns: repeat(2, 1fr); }
  .footer { grid-template-columns: 1fr; gap: 28px; }
  .ph--hero, .hero-photo .photo { height: 300px; }
}

@media (max-width: 520px) {
  :root { --pad: 20px; }
  .hero { padding: 72px var(--pad) 56px; }
  .page-header { padding: 64px var(--pad) 40px; }
  .h1-hero, .h1-page { font-size: 33px; }
  .h2, .cta__title { font-size: 26px; }
  .service__title { font-size: 26px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .stats { grid-template-columns: 1fr; gap: 0; padding: 20px 24px; }
  .stat { padding: 26px 0; border-top: 1px solid var(--hairline); }
  .stat:first-child { border-top: none; }
  .stat--bordered { border-left: none; border-right: none; }

  .svc-row { grid-template-columns: 44px 1fr auto; gap: 14px; }
  .form-card { padding: 26px 22px; }
}

/* Узкие телефоны (Galaxy ~360 px, iPhone SE 320 px): шапка «логотип + кнопка +
   бургер» перестаёт помещаться в строку и распирает страницу вправо —
   отсюда та самая горизонтальная полоса. Ужимаем её элементы. */
@media (max-width: 420px) {
  .nav { padding: 18px var(--pad); gap: 10px; }
  .nav__logo { font-size: 18px; }
  .nav__right { gap: 10px; }
  .nav__cta { padding: 8px 12px; font-size: 10px; letter-spacing: .1em; }
  .nav__toggle { padding: 6px 0; }
}

@media (max-width: 340px) {
  :root { --pad: 16px; }
  .nav__logo { font-size: 17px; }
  .nav__cta { padding: 7px 10px; letter-spacing: .06em; }
}

/* =========================================================================
   Лайтбокс галереи: фото во весь экран поверх ленты
   ========================================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.lightbox.is-open { display: block; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,7,6,.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
/* сцена занимает весь экран: клик мимо фото закрывает просмотр */
.lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 68px 72px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 3px;
  opacity: 1;
  transition: opacity .18s;
}
.lightbox.is-loading .lightbox__img { opacity: .35; }

.lightbox__close,
.lightbox__btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  background: rgba(20,18,15,.72);
  color: var(--text);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.lightbox__close:hover,
.lightbox__btn:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.lightbox__close {
  top: 16px; right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}
.lightbox__btn {
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  padding-bottom: 3px;
}
.lightbox__btn--prev { left: 14px; }
.lightbox__btn--next { right: 14px; }
.lightbox__btn[hidden] { display: none; }

.lightbox__count {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-light);
  pointer-events: none;
}

/* Телефон: фото во всю ширину, листание свайпом — стрелки уводим вниз,
   чтобы не перекрывали снимок. */
@media (max-width: 640px) {
  .lightbox__stage { padding: 56px 10px 78px; }
  .lightbox__close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 21px; }
  .lightbox__btn {
    top: auto; bottom: 14px; transform: none;
    width: 40px; height: 40px; font-size: 22px;
  }
  .lightbox__btn--prev { left: 18px; }
  .lightbox__btn--next { right: 18px; }
  .lightbox__count { bottom: 26px; font-size: 11px; }
}

/* курсор-подсказка, что плитка открывается просмотром */
.photo-grid__item { cursor: zoom-in; }
