/* =========================================================
   FONTS
========================================================= */
@font-face {
  font-family: 'Goznak';
  src: url('fonts/Goznak/Gosznak-Semi%20Bold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter/Inter_18pt-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter/Inter_18pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter/Inter_18pt-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter/Inter_18pt-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   RESET & BASE
========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: #363B34;
  background: #EBDBCC;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Скролл к якорю и offset под шапкой делает JS — это надёжнее
   чем CSS scroll-behavior + scroll-margin-top, которые ломаются
   из-за transform: scale на родителе .page */
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* =========================================================
   RESPONSIVE WRAPPER — пропорциональное масштабирование
   1920px-макета под любой viewport (от мобильного до десктопа).
   Реальный scale выставляется JS в index.html (надёжнее cross-browser)
========================================================= */
.page-wrap {
  position: relative;
  width: 100%;
  height: 7510px; /* стартовая высота, JS пересчитывает на ресайзе */
  margin: 0 auto;
  overflow: hidden;
  background: #EBDBCC;
}

/* =========================================================
   PAGE — оригинальная ширина 1920 как в Figma,
   высота определяется содержимым; JS пересчитывает обёртку
========================================================= */
.page {
  position: relative;
  width: 1920px;
  /* высота автоматическая — JS измеряет scrollHeight */
  background: #EBDBCC;
  transform-origin: top left;
}

/* =========================================================
   ЭФФЕКТ ШУМА / GRAIN — заметное зерно поверх всех секций,
   включая тёмную секцию "Дорогие гости"
========================================================= */
.page-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.32; /* усилили */
  mix-blend-mode: overlay; /* overlay даёт зерно и на светлом, и на тёмном */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.15  0 0 0 0 0.15  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  background-repeat: repeat;
}

/* =========================================================
   HEADER / MENU  — фиксированная шапка над всей страницей,
   масштабируется JS пропорционально макету 1920px
========================================================= */
.menu-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 100px; /* JS пересчитывает */
  pointer-events: none;
}
.menu-fixed-inner {
  position: absolute;
  top: 0; left: 0;
  width: 1920px;
  height: 100px;
  background: #363B34;
  display: flex;
  align-items: center;
  pointer-events: auto;
  transform-origin: top left;
  /* transform: scale(...) выставит JS */
}

.menu-logo {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-logo img { width: 100%; height: 100%; object-fit: contain; }

.menu-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Все кнопки шапки одинаковые: outline, без заливки */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 100px;
  border: 1px solid #EBDBCC;
  background: transparent;
  color: #EBDBCC;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 0.99;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.menu-btn:hover {
  background: rgba(235, 219, 204, 0.12);
}

.menu-meta {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 40px;
  align-items: center;
  color: #EBDBCC;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 0.99;
  white-space: nowrap;
}

/* =========================================================
   HERO — высота до начала Main_content (top:2353)
   Здесь карточки, центральная картинка, заголовок
========================================================= */
.hero {
  position: relative;
  width: 1920px;
  height: 2253px; /* 2353 - 100 (header) */
  background: #EBDBCC;
}

.hero-title {
  position: absolute;
  left: 50%;
  top: 160px; /* 260 - 100 header offset */
  transform: translateX(-50%);
  width: 1264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 5;
}
.hero-title h1 {
  font-family: 'Goznak', serif;
  font-weight: 600;
  font-size: 130px;
  line-height: 1;
  text-align: center;
  color: #363B34;
  width: 100%;
  white-space: nowrap;
}
.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.99;
  text-align: center;
  color: #363B34;
  width: 1094px;
}

.hero-badge {
  position: absolute;
  left: 1125px;
  top: 156px;
  width: 147.795px;
  height: 69.733px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-badge > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #363B34;
  color: #EBDBCC;
  border-radius: 100px;
  padding: 12px 22px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 0.99;
  transform: rotate(-9.9deg);
  white-space: nowrap;
}

/* ===== Карусель с карточками-воспоминаниями ===== */
.hero-carousel {
  position: absolute;
  left: 0; right: 0;
  top: 410px;
  height: 720px;
  z-index: 2;
  /* По вертикали разрешаем выход — повёрнутые углы карточек не должны клипаться.
     По горизонтали скрываем — иначе соседние карточки будут торчать за viewport. */
  overflow-x: hidden;
  overflow-y: visible;
}
.hero-carousel-track {
  height: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 50px 120px;
  overflow-x: auto;
  /* НЕ ставим scroll-behavior: smooth — иначе любая установка scrollLeft
     анимируется и ломает wrap-around логику. Smooth используется
     точечно через scrollBy({ behavior: 'smooth' }) в обработчиках стрелок */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero-carousel-track::-webkit-scrollbar { display: none; }

/* ===== Карточка-фрейм 457×550 ===== */
.card-photo-frame {
  flex: 0 0 auto;
  width: 457px;
  height: 550px;
  background: #F1E5DB;
  border: 1px solid rgba(170, 164, 156, 0.35); /* было #AAA49C 1.0 — теперь ~35% */
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
  font-family: 'Inter', sans-serif;
  color: #363B34;
  cursor: pointer;
  text-align: left;
  --rot: 0deg;
  /* Старт скрыта, видимая отдельным keyframe */
  opacity: 0;
  transform: rotate(var(--rot));
}
/* Через JS добавляется .is-in — играет keyframe-анимация появления */
.card-photo-frame.is-in {
  animation: cardIn 0.55s cubic-bezier(.22,.9,.3,1.05) both;
}
@keyframes cardIn {
  0%   { opacity: 0; transform: translateY(40px) rotate(var(--rot)); }
  100% { opacity: 1; transform: translateY(0)    rotate(var(--rot)); }
}

/* Когда анимация появления завершилась — фиксируем стейт через .is-done.
   Hover работает через transition (без keyframe-конфликта). */
.card-photo-frame.is-done {
  animation: none;
  opacity: 1;
  transform: translateY(0) rotate(var(--rot));
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.card-photo-frame.is-done:hover {
  /* Чуть сильнее: больше подъёма + больше доворота */
  transform: translateY(-12px) rotate(calc(var(--rot) + 3deg));
}
.card-photo-frame:active { filter: brightness(0.97); }

/* Фото внутри карточки — высота 386 как в Figma */
.card-photo-frame-img {
  width: 100%;
  height: 386px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: #EBDBCC;
}
.card-photo-frame-img img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.card-photo-frame-img img.object-cover  { object-fit: cover; object-position: center; }
.card-photo-frame-img img.object-bottom { object-fit: cover; object-position: bottom; }

/* Текстовый блок 104px */
.card-photo-frame-text {
  flex-shrink: 0;
  height: 104px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.card-photo-frame-title {
  font-size: 22px;
  line-height: 1.05;
  margin: 0;
  color: #363B34;
}
.card-photo-frame-title .title-medium { font-weight: 500; }
.card-photo-frame-title .title-light  { font-weight: 300; }
.card-photo-frame-desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.2;
  color: #363B34;
  margin: 0;
}

/* ===== HERO: центральная иллюстрация с датой =====
   Img_decor_1.png — единая иллюстрация: арка наверху + балюстрада внизу
   с пустым местом посередине, куда ложится текст «12 июля 2026».
   z-index: 0 — арка ВСЕГДА на заднем плане. */
.hero-center {
  position: absolute;
  left: 50%;
  top: 1207px; /* 1307 - 100 */
  width: 641px;
  height: 881px;
  margin-left: -320.5px; /* центрирование 641/2 */
  /* НЕТ z-index здесь — иначе .hero-center создаёт свой стэкинг-контекст
     и текст внутри (z:4) окажется ниже правой ветки (z:1) */
}
.hero-center-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  position: relative;
  z-index: 0;        /* арка САМА — на заднем плане в .hero */
}
.hero-center-text {
  position: absolute;
  left: 50%;
  /* Визуальный центр пустого пространства в Img_decor_1.png:
     арка кончается на 41%, балюстрада начинается на 68.6% — центр на 54.8% */
  top: 55%;
  transform: translate(-50%, -50%);
  width: 838px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  z-index: 1; /* НА ЗАДНЕМ ПЛАНЕ — за голубями */
}
.hero-date {
  font-family: 'Goznak', serif;
  font-weight: 600;
  font-size: 130px;
  line-height: 1;
  color: #363B34;
  width: 100%;
  white-space: nowrap;     /* дата всегда в одну строку */
}
.hero-day {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.99;
  color: #363B34;
  width: 100%;
}

/* ===== Стрелки карусели — теперь внутри .hero-carousel ===== */
.hero-arrows {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 6;
  pointer-events: none;
}
.arrow {
  width: 32px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.arrow:hover { opacity: 1; transform: scale(1.18); }
.arrow:active { transform: scale(0.95); }
.arrow svg { width: 100%; height: 100%; }

/* ===== Боковые декоративные картинки (голуби на ветках) =====
   Точные позиции из Figma. Анимация: выезжают из-за края + плавно
   покачиваются по часовой/против как ветка под лёгким ветром.
*/
.hero-side {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  object-fit: contain;
  object-position: top left;
  opacity: 0;          /* до запуска анимации */
}
.hero-side--left {
  left: -37px;
  top: 1552px;
  width: 900px;
  height: 592px;
  transform-origin: right center;
  z-index: 3;            /* ЛЕВАЯ ветка — поверх текста и правой */
}
.hero-side--right {
  left: 1082px;
  top: 1408px;
  width: 964px;
  height: 595px;
  transform-origin: left center;
  z-index: 2;            /* ПРАВАЯ ветка — поверх текста (текст z:1) */
}
/* Запуск keyframe-анимации — JS просто добавляет .is-in.
   Для плавной анимации без рывка используем cubic-bezier с встроенным
   мягким overshoot — без ручных keyframe-точек, которые "снэпают".
   Стартовое положение умеренное, чтобы ветка не уходила далеко за экран
   и не казалась обрубленной. */
.hero-side--left.is-in  {
  animation: branchLeft  1.4s cubic-bezier(.16,.84,.32,1.08) both,
             swayLeft    8s   ease-in-out 1.4s infinite;
}
.hero-side--right.is-in {
  animation: branchRight 1.4s cubic-bezier(.16,.84,.32,1.08) both,
             swayRight   8.5s ease-in-out 1.4s infinite;
}

@keyframes branchLeft {
  from { opacity: 0; transform: translateX(-110px) rotate(-2deg); }
  to   { opacity: 1; transform: translateX(0)      rotate(0deg); }
}
@keyframes branchRight {
  from { opacity: 0; transform: translateX(110px)  rotate(2deg); }
  to   { opacity: 1; transform: translateX(0)      rotate(0deg); }
}
/* Качание ветки — амплитуда побольше, естественный ритм.
   Стартуем и заканчиваем на rotate(0) для бесшовного перехода с branchIn. */
@keyframes swayLeft {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(1.6deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(-1.2deg); }
  100% { transform: rotate(0deg); }
}
@keyframes swayRight {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-1.6deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(1.2deg); }
  100% { transform: rotate(0deg); }
}

/* ===== Медленный fade-in для блоков-секций ===== */
.fade-in {
  opacity: 0;
}
.fade-in.is-in {
  animation: fadeUp 1.2s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Дочерние блоки секции — stagger чуть медленнее, без мерцания.
   Скрываем стартово через visibility, не только opacity, чтобы не было
   мигающего мерцания при переходе. */
.fade-stagger > * {
  opacity: 0;
}
.fade-stagger.is-in > * {
  animation: fadeUp 1.4s cubic-bezier(.2,.8,.2,1) both;
}
.fade-stagger.is-in > *:nth-child(1) { animation-delay: 0s; }
.fade-stagger.is-in > *:nth-child(2) { animation-delay: 0.30s; }
.fade-stagger.is-in > *:nth-child(3) { animation-delay: 0.60s; }
.fade-stagger.is-in > *:nth-child(4) { animation-delay: 0.90s; }

/* =========================================================
   PROGRAM SECTIONS — секции под hero
========================================================= */
.program-section {
  background: #F1E5DB;
  padding: 160px 40px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  width: 1920px;
}

/* ===== Главная карточка секции (большая картинка справа, текст слева) ===== */
.card-main {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
}
.card-main-text {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-main-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.99;
  color: #363B34;
}
.card-main-time {
  font-family: 'Goznak', serif;
  font-weight: 600;
  font-size: 130px;
  line-height: 1;
  color: #363B34;
  margin-top: 0;
}
.card-main-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 572px;
  margin-top: 30px;
}
.address-intro {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  color: #363B34;
  width: 100%;
}
.address {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.address-name {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 0.99;
  color: #363B34;
  white-space: nowrap;
}
.address-line {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 22px;
  line-height: 0.99;
  color: #363B34;
  white-space: nowrap;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start;
  width: 100%;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  line-height: 0.99;
  text-align: center;
  white-space: nowrap;
}
.pill--bordered {
  border: 1px solid #AAA49C;
  color: #363B34;
  font-weight: 300;
}
.pill--dark {
  background: #363B34;
  color: #F1E5DB;
  font-weight: 500;
}

.card-main-img {
  width: 1220px;
  height: 490px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.card-main-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-main-img img.object-bottom { object-position: bottom; }

/* ===== Карточка "несколько слов про наряды" (выровнена справа) ===== */
.card-clothing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}
.card-clothing-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 600px;
}
.card-clothing-icon {
  flex-shrink: 0;
  width: 67px;
  height: 125px;
  overflow: hidden;
  position: relative;
}
.card-clothing-icon img {
  width: 87.63%;
  height: 98.51%;
  position: absolute;
  left: 13.94%;
  top: -0.87%;
  object-fit: contain;
}
.card-clothing-text {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  color: #363B34;
}
.card-clothing-text h3 {
  font-weight: 500;
  font-size: 40px;
  line-height: 0.95;
}
.card-clothing-text p {
  font-weight: 300;
  font-size: 22px;
  line-height: 1.2;
}
.card-clothing-text p strong { font-weight: 500; }
.card-clothing-text p:not(:last-child) { margin-bottom: 11px; }

/* ===== Timeline 3 карточки (10:30 / 11:00 / 12:00 и др.) ===== */
.timeline {
  display: flex;
  gap: 20px;
  align-items: stretch;
  width: 100%;
  height: 585px;
}
.timeline-card {
  flex: 1 0 0;
  min-width: 0;
  height: 100%;
  border: 1px solid #AAA49C;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.timeline-card-img {
  position: absolute;
  left: -1px; right: -1px;
  top: -1px;
  height: 339px;
  border-radius: 15px;
  overflow: hidden;
}
.timeline-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.timeline-card-text {
  position: absolute;
  left: -1px; right: -1px;
  top: 358px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-family: 'Inter', sans-serif;
  color: #363B34;
}
.timeline-card-text h4 {
  font-weight: 500;
  font-size: 40px;
  line-height: 0.95;
  white-space: pre-wrap;
}
.timeline-card-text p {
  font-weight: 300;
  font-size: 22px;
  line-height: 1.2;
}

/* ===== Блок "Если вы планируете остаться с ночевой" ===== */
.stay-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}
.stay-block h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.99;
  color: #363B34;
  width: 600px;
}
.stay-block-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 572px;
}
.stay-block-text p {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  color: #363B34;
}
.stay-block-text .pill {
  align-self: flex-start;
}

/* =========================================================
   DARK SECTION — Дорогие гости + финал
========================================================= */
.dark-section {
  position: relative;
  background: #363B34;
  padding: 160px 40px;
  width: 1920px;
  display: flex;
  flex-direction: column;
  gap: 160px;
  align-items: center;
}

.card-main--dark .card-main-text {
  gap: 38px;
}
.dark-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 0.99;
  color: #EBDBCC;
  width: 100%;
}
.dark-text {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  color: #EBDBCC;
  width: 551px;
}

.final {
  position: relative;
  width: 1264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.final-title {
  font-family: 'Goznak', serif;
  font-weight: 600;
  font-size: 130px;
  line-height: 0.98;
  color: #EBDBCC;
  text-align: center;
  width: 100%;
  white-space: pre-wrap;
}
.final-badge {
  position: absolute;
  left: 967px;
  top: 254px;
  width: 147.795px;
  height: 69.733px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.final-badge > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EBDBCC;
  color: #363B34;
  border-radius: 100px;
  padding: 12px 22px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 0.99;
  transform: rotate(-9.9deg);
  white-space: nowrap;
}

/* =========================================================
   ЛАЙТБОКС
========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(54, 59, 52, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 60px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Увеличенная копия карточки — гарантированно влезает в viewport */
.card-photo-frame--enlarged {
  cursor: default !important;
  width: min(440px, 80vw);
  height: auto;
  min-height: 0;
  max-height: 88vh;
  overflow: visible;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5));
  animation: lbIn 0.32s ease;
  pointer-events: auto;
  transform: none !important;
  display: flex;
  flex-direction: column;
}
.card-photo-frame--enlarged:hover { transform: none !important; }
.card-photo-frame--enlarged .card-photo-frame-img {
  width: 100%;
  height: auto;
  aspect-ratio: 417 / 386;
  flex-shrink: 0;
}
.card-photo-frame--enlarged .card-photo-frame-text {
  height: auto;
  min-height: 0;
}
@keyframes lbIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.lightbox-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { opacity: 1; transform: scale(1.1); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;       /* было 48 */
  height: 56px;      /* было 80 */
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-nav svg { width: 100%; height: 100%; }
.lightbox-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.15); }
.lightbox-nav--prev { left: 24px; }
.lightbox-nav--next { right: 24px; }
@media (max-width: 600px) {
  .lightbox { padding: 12px; }
  .lightbox-nav { width: 26px; height: 44px; }
  .lightbox-nav--prev { left: 6px; }
  .lightbox-nav--next { right: 6px; }
  .lightbox-close { top: 8px; right: 8px; width: 36px; height: 36px; }
  .lightbox-content { max-width: 100%; max-height: 100%; }
  .card-photo-frame--enlarged {
    width: calc(100vw - 70px); /* оставляем место под стрелки */
    max-width: 360px;
    max-height: 92vh;
  }
}

/* =========================================================
   БУРГЕР-МЕНЮ (показывается только на мобильной)
========================================================= */
.menu-burger {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 220;
}
.menu-burger span {
  width: 22px;
  height: 2px;
  background: #EBDBCC;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-burger.is-open span:nth-child(2) { opacity: 0; }
.menu-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   МОБИЛЬНАЯ ВЁРСТКА (≤ 767px)
   Перестраиваем layout: вертикальный flow.
   Голуби и арка остаются, но компактнее.
========================================================= */
@media (max-width: 767px) {
  body { overflow-x: hidden; }

  /* Шапка — компактная, во всю ширину */
  .menu-fixed {
    height: 64px;
  }
  .menu-fixed-inner {
    width: 100%;
    height: 64px;
    transform: none !important;
    padding: 0 60px 0 60px;
    display: block;
  }
  .menu-logo { left: 16px; width: 36px; height: 30px; }
  .menu-logo img { width: 100%; height: 100%; }

  /* Скрываем "Екатеринбург / 12 июля" — место только под бургер */
  .menu-meta { display: none; }

  /* Бургер показывается только на мобиле */
  .menu-burger { display: flex; }

  /* Навигация — выезжает сверху как dropdown.
     Display:none по умолчанию убирает её из layout полностью */
  .menu-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: #363B34;
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
    z-index: 199;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    align-items: center;        /* pills по центру, не на всю ширину */
    transform: none;
  }
  .menu-nav.is-open {
    display: flex;
    animation: navDrop 0.28s cubic-bezier(.2,.8,.2,1) both;
  }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  /* Pills в бургере — совпадают по размеру с .pill (как доехать и др.) на мобиле:
     padding 9px 16px, font-size 13px, такой же border 1px, line-height 1 */
  .menu-nav .menu-btn {
    width: auto;
    min-width: 0;
    text-align: center;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    border-radius: 100px;
  }

  /* Page wrap — натуральный flow */
  .page-wrap {
    width: 100%;
    height: auto !important;
    padding-top: 64px !important;
    margin: 0 !important;
    background: #EBDBCC;
  }
  .page {
    width: 100%;
    min-height: 0;
    transform: none !important;
  }

  .page-wrap::after { opacity: 0.18; }

  /* HERO — вертикальный flow, голуби и арка компактные */
  .hero {
    position: relative;
    width: 100%;
    height: auto;
    padding: 32px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* чтобы голуби не выбегали по бокам */
  }
  .hero-title {
    position: static;
    width: 100%;
    transform: none;
    text-align: center;
    margin-bottom: 8px;
  }
  /* Перенос: "Владимир / и Валерия" */
  .hero-title h1 {
    font-size: 56px;
    line-height: 1;
    white-space: normal;
  }
  .title-break { display: block; height: 0; line-height: 0; font-size: 0; }
  .hero-subtitle {
    font-size: 18px;
    width: 100%;
  }
  /* Бабл «Шуйские» — как в подвале (final-badge): центрировано под заголовком,
     с лёгким поворотом */
  .hero-badge {
    position: relative;
    left: auto; top: auto;
    margin-top: 14px;
    width: auto; height: auto;
    align-self: center;
  }
  .hero-badge > span {
    font-size: 14px;
    padding: 8px 18px;
    transform: rotate(-9.9deg);     /* такой же поворот как в final-badge */
  }
  .final-badge {
    position: relative;
    left: auto; top: auto;
    margin-top: 16px;
    width: auto; height: auto;
  }
  .final-badge > span {
    font-size: 14px;
    padding: 8px 18px;
    transform: rotate(-9.9deg);
  }

  /* Карусель — ПРОБИВАЕТ horizontal padding у .hero (16px с каждой стороны),
     чтобы карточки доходили до края экрана без полей */
  .hero-carousel {
    position: relative;
    top: auto;
    margin-top: 24px;
    margin-bottom: 24px;
    margin-left: -16px;
    margin-right: -16px;
    height: 360px;
    width: calc(100% + 32px);
    left: 0; right: 0;
    overflow: hidden;
  }
  .hero-carousel-track {
    /* НЕТ боковых отступов вообще — карточки идут от края до края.
       JS подвигает scroll так, чтобы средняя карточка была по центру */
    padding: 24px 0;
    gap: 8px;
    overflow-x: auto;
  }
  /* Карточки — пропорциональная копия десктопа в масштабе 240/457 = 0.525.
     Все значения = десктопные × 0.525. Фиксированные px вместо cqw,
     потому что cqw на самом элементе берёт значение от viewport, а не от ширины */
  .card-photo-frame {
    width: 240px;
    max-width: 70vw;
    aspect-ratio: 457 / 550;     /* фиксирует пропорции карточки */
    height: auto;
    padding: 10.5px;             /* 20 × 0.525 */
    gap: 10.5px;                 /* 20 × 0.525 */
    border-radius: 8px;          /* 15 × 0.525 */
    border: 1px solid rgba(170, 164, 156, 0.35);
  }
  .card-photo-frame-img {
    width: 100%;
    aspect-ratio: 417 / 386;     /* пропорции фото = ширина_внутр / высота_фото */
    height: auto;
    flex-shrink: 0;
    border-radius: 4px;          /* 7 × 0.525 */
  }
  .card-photo-frame-text {
    flex: 1;
    min-height: 0;
    height: auto;
    gap: 5px;                    /* 10 × 0.525 */
  }
  .card-photo-frame-title {
    font-size: 11.5px;           /* 22 × 0.525 */
    line-height: 1.05;
  }
  .card-photo-frame-desc  {
    font-size: 8px;              /* 15 × 0.525 */
    line-height: 1.2;
    width: 100%;
  }

  /* Стрелки — как в десктопе, только мельче для мобилы */
  .hero-arrows {
    position: absolute;
    top: 50%;
    left: 12px;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 6;
  }
  .arrow {
    width: 16px;
    height: 36px;
  }
  .arrow svg { width: 100%; height: 100%; }
  .arrow svg path { stroke-width: 3; }

  /* Центральная иллюстрация — арка с датой, пропорции точно как в десктопе
     (Img_decor_1.png 641×881 → ratio 0.728) */
  .hero-center {
    position: relative;
    left: auto; top: auto;
    width: 280px;
    aspect-ratio: 641 / 881;   /* высота сама подстраивается */
    height: auto;
    margin: 40px auto 280px;
    /* НЕТ z-index — текст внутри (z:4) должен быть выше веток (z:1)
       которые сидят в стэкинг-контексте .hero */
  }
  .hero-center-text {
    position: absolute;
    left: 50%;
    /* Визуальный центр пустого пространства внутри арки.
       Замерила Питоном по самой картинке: пустое место с 41% до 68.6% высоты,
       визуальный центр на 54.8%. Округляем до 55% */
    top: 55%;
    width: 100%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;                      /* НА ЗАДНЕМ ПЛАНЕ — за голубями */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .hero-date {
    font-size: 56px;                 /* такой же как h1 заголовка */
    line-height: 1;
    white-space: normal;             /* "2026" уходит на новую строку */
    word-spacing: 0;
    margin: 0;
  }
  .hero-day  { font-size: 18px; line-height: 1; margin: 0; }

  /* Голуби — пропорции к арке как в десктопе (1.4× ширины арки),
     правая ветка немного выше левой (как в figma — асимметрия) */
  .hero-side {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    object-fit: contain;
  }
  /* Пропорции к арке: левая ветка 1.40 × ширины арки, правая 1.50 × (как в десктопе)
     Арка 220 → левая 308, правая 330 */
  .hero-side--left {
    left: -40px;
    top: auto;
    bottom: 16px;
    width: 392px;
    max-width: 110vw;
    height: auto;
    z-index: 3;       /* ЛЕВАЯ ветка — поверх текста и правой */
  }
  .hero-side--right {
    left: auto;
    right: -45px;
    top: auto;
    bottom: 70px;     /* +54px = выше левой (асимметрия как в figma) */
    width: 420px;
    max-width: 110vw;
    height: auto;
    z-index: 2;       /* ПРАВАЯ ветка — поверх текста */
  }


  /* Секции программы — единый padding и gap для одинаковых отступов */
  .program-section,
  .dark-section {
    width: 100%;
    padding: 64px 16px;
    gap: 48px;
  }

  /* Главные карточки секций */
  .card-main {
    flex-direction: column;
    gap: 20px;
  }
  .card-main-text { width: 100%; }
  .card-main-tag { font-size: 22px; }
  .card-main-time { font-size: 64px; line-height: 1.05; }
  .card-main-info { width: 100%; gap: 24px; margin-top: 14px; }
  .address-name, .address-line, .address-intro { font-size: 14px; white-space: normal; }

  /* Pills — унифицированный размер: одинаковый padding, шрифт, высота */
  .pills { gap: 8px; }
  .pill {
    font-size: 13px;
    padding: 9px 16px;
    line-height: 1;
    white-space: normal;
    text-align: center;
  }

  .card-main-img {
    width: 100%;
    height: 220px;
    border-radius: 12px;
  }

  /* Карточка «Несколько слов про наряды» — петушок размером с 2 строки заголовка */
  .card-clothing { justify-content: flex-start; }
  .card-clothing-inner { width: 100%; gap: 10px; align-items: flex-start; }
  .card-clothing-icon {
    width: 26px;
    height: 48px;        /* высота ~ под 2 строки заголовка 22px */
    flex-shrink: 0;
    margin-top: 0;       /* без сдвига — верх иконки = верх текста */
    overflow: visible;
  }
  .card-clothing-icon img {
    /* перекрываем десктопные absolute-позиции, чтобы изображение влезло компактно */
    position: static;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    left: auto; top: auto;
  }
  .card-clothing-text h3 { font-size: 22px; line-height: 1.05; }
  .card-clothing-text p  { font-size: 14px; }

  /* Timeline — стек сверху вниз, высота подгоняется под контент */
  .timeline {
    flex-direction: column;
    height: auto;
    gap: 16px;
  }
  .timeline-card {
    width: 100%;
    height: auto;          /* было 380px — теперь по контенту */
    min-height: 360px;
    flex: none;
  }
  .timeline-card-img {
    height: 200px;
    position: absolute;
  }
  .timeline-card-text {
    position: relative;     /* без top — текст идёт сразу под картинкой */
    top: auto;
    padding: 220px 16px 20px;  /* отступ сверху = высоте картинки + 20 */
    gap: 8px;
  }
  .timeline-card-text h4 { font-size: 22px; }
  .timeline-card-text p  { font-size: 14px; }

  /* Stay block */
  .stay-block h3 { width: 100%; font-size: 22px; }
  .stay-block-text { width: 100%; gap: 20px; }
  .stay-block-text p { font-size: 14px; }

  /* Тёмная секция */
  .dark-section { gap: 60px; }
  .dark-heading { font-size: 22px; }
  .dark-text { font-size: 14px; width: 100%; }
  .final-title { font-size: 56px; line-height: 1.1; }
  .final {
    width: 100%;
  }
  .final-badge {
    position: relative;
    left: auto; top: auto;
    width: auto; height: auto;
    margin-top: 12px;
  }
  .final-badge > span { font-size: 14px; padding: 8px 16px; }

  /* Лайтбокс — карточка во всю ширину */
  .card-photo-frame--enlarged {
    width: min(92vw, 360px);
  }
}

/* ===== Широкая мобила / маленький планшет (700-767px) =====
   Бургер не нужен — 3 pills влазят в шапку. Карточки крупнее, ветки внизу.
*/
@media (min-width: 700px) and (max-width: 767px) {

  /* На широких экранах место под 3 pills + лого, бургер не нужен */
  .menu-fixed-inner { padding: 0 16px; }
  .menu-burger { display: none; }
  .menu-nav {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: auto;
    transform: translate(-50%, -50%);
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 8px;
    z-index: auto;
    animation: none;
  }
  .menu-nav.is-open { display: flex; animation: none; }
  .menu-nav .menu-btn {
    width: auto;
    min-width: 0;
    padding: 8px 16px;
    font-size: 14px;
  }

  /* Карусель — убираем боковые "полосы фона" (peek соседних карточек):
     padding по бокам минимизирован, чтобы 3 главные карточки занимали
     всю видимую область, а соседние карточки скрывались за overflow */
  .hero-carousel-track {
    padding: 24px 4vw;
    gap: 12px;
  }
  /* Карточки покрупнее (как в макете Валерии) */
  .card-photo-frame {
    width: 240px;
    max-width: 32vw;          /* 3 карточки в ширину 100vw - padding */
  }

  /* Арка на широкой мобильной — крупнее, чтобы дата помещалась в одну строку */
  .hero-center {
    width: 420px;
    max-width: 92vw;
    margin: 48px auto 72px;
  }
  .hero-date { font-size: 56px; white-space: nowrap; }
  .hero-day  { font-size: 18px; }
  /* Арка 280 → ветки: 392 (1.40×) и 420 (1.50×) — ОБЕ внизу как сейчас */
  .hero-side--left {
    left: -38px;
    width: 392px;
    max-width: 100vw;
    bottom: 40px;
    top: auto;
  }
  .hero-side--right {
    right: -45px;
    width: 420px;
    max-width: 100vw;
    bottom: 100px;
    top: auto;
  }
  .hero-title h1 { font-size: 80px; }
  .hero-subtitle { font-size: 22px; }
}

/* ===== Узкая мобила (<700px) =====
   Композиция как в макете Валерии: заголовок сверху, карточки, потом
   арка с датой по центру, и ОБЕ ветки внизу под аркой — правая чуть
   выше левой (асимметрия). Z-index: левая поверх текста, правая под.
*/
@media (max-width: 699px) {
  /* Заголовок крупнее как в макете */
  .hero-title h1 { font-size: 64px; line-height: 0.95; }
  .hero-subtitle  { font-size: 17px; }

  /* Карточки — оригинальный размер как было */
  .card-photo-frame {
    width: 240px;
    max-width: 70vw;
  }

  /* Арка крупнее — чтобы текстовый блок (дата + воскресенье) помещался
     внутри пустого пространства между верхней аркой и балюстрадой */
  .hero-center {
    width: 360px;
    max-width: 92vw;
    margin: 56px auto 60px;
  }

  /* ОБА голубя ВНИЗУ под аркой, правый чуть выше (асимметрия как в figma) */
  .hero-side--left {
    left: -40px;
    right: auto;
    top: auto;
    bottom: 8px;
    width: 320px;
    max-width: 95vw;
    height: auto;
    transform-origin: right center;
    z-index: 3;                    /* поверх текста и правой ветки */
  }
  .hero-side--right {
    left: auto;
    right: -45px;
    top: auto;
    bottom: 70px;                  /* выше левой на ~62px */
    width: 360px;
    max-width: 100vw;
    height: auto;
    z-index: 2;                    /* поверх текста (текст z:1) */
  }
}
