/* ============================================================================
   Свадебное приглашение — стили.
   Mobile-first: базовые правила рассчитаны на ~360px, десктоп — в конце файла.
   Цвета только через переменные из :root.
   ========================================================================== */

/* --- Шрифты (самохостинг, assets/fonts) ------------------------------------
   Cormorant — заголовки и акцентный курсив, Inter — текст.
   Обе гарнитуры вариативные: один файл на подмножество.
   cyrillic-ext обязателен: в нём живут казахские ә ғ қ ң ө ү һ.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  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;
}
/* Курсив Cormorant — акцентные подписи.
   Каллиграфические шрифты вроде Great Vibes здесь не годятся: в них нет
   казахских ә ғ қ ң ө ұ ү һ, и слово «Күні» набиралось бы двумя шрифтами
   сразу. Курсив той же гарнитуры покрывает весь алфавит. */
@font-face {
  font-family: 'Cormorant';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-italic-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-italic-latin.woff2') format('woff2');
  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:        #FCF7EE;   /* тёплый кремовый */
  --bg-warm:   #F3E7D3;   /* песочный — для чередования секций */
  --surface:   #FFFFFF;
  --text:      #221F1A;
  --muted:     #776F62;
  --accent:    #C08A2E;   /* насыщенное золото */
  --accent-dp: #96651A;   /* тёмное золото для текста и мелких деталей */
  --deep:      #24352B;   /* глубокий зелёный — тёмные блоки, футер */
  --line:      #E4D6BE;
  --on-photo:  #FFFDF8;   /* текст поверх фотографий */
  --overlay:   rgba(24, 30, 26, .94);
  --overlay-btn: rgba(36, 53, 43, .5);
  --radius:    14px;
  --maxw:      560px;

  --serif:  'Cormorant', 'Times New Roman', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --space:   20px;
  --section: 64px;
  --ease:    cubic-bezier(.22, .61, .36, 1);
}

/* --- База ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2 { margin: 0; font-weight: 400; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

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

/* --- Переключатель языка -------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 14px var(--space);
  /* поверх фото — лёгкая подложка, чтобы кнопки читались */
  background: linear-gradient(to bottom, rgba(252, 247, 238, .94), rgba(252, 247, 238, 0));
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}

/* Ниже первого экрана шапка едет по контенту — ей нужен плотный фон,
   иначе текст секций просвечивает сквозь кнопки языка. */
.topbar.is-solid {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .14em;
}

.lang__btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color .25s var(--ease);
}

.lang__btn.is-active { color: var(--accent-dp); }
.lang__sep { color: var(--line); }

/* --- Общая раскладка ------------------------------------------------------ */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space);
}

.section {
  position: relative;
  padding: var(--section) 0;
  overflow: hidden;
  text-align: center;
}

/* Чередование фонов: тёплый — белый — тёплый */
.section--calendar,
.section--map,
.section--rsvp { background: var(--bg-warm); }

.section__title {
  margin-bottom: 26px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--deep);
}

.section__title--light {
  color: var(--on-photo);
  text-shadow: 0 2px 20px rgba(28, 26, 24, .5);
}

/* Акцентные строки — курсив Cormorant */
.script {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--accent-dp);
}

.script--md { font-size: 30px; }
.script--lg { font-size: clamp(32px, 9vw, 42px); margin-bottom: 20px; }
.script--xl { font-size: clamp(38px, 11vw, 54px); }
.script--light {
  color: var(--on-photo);
  text-shadow: 0 2px 22px rgba(28, 26, 24, .55);
}

/* Разделитель: линия — ромб — линия */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px auto;
  color: var(--accent);
}

.divider__line {
  width: 46px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.divider__mark {
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

.divider--light { color: var(--on-photo); }

/* --- Декоративные орнаменты ------------------------------------------------ */

.ornament {
  position: absolute;
  width: 108px;
  height: 108px;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease) .3s;
}

.is-visible .ornament { opacity: .28; }

.ornament svg { width: 100%; height: 100%; }

.ornament--tl { top: 12px; left: 10px; }
.ornament--tr { top: 12px; right: 10px; transform: scaleX(-1); }
.ornament--bl { bottom: 12px; left: 10px; transform: scaleY(-1); }
.ornament--br { bottom: 12px; right: 10px; transform: scale(-1); }

/* --- Первый экран --------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 80px var(--space) 96px;
  justify-content: flex-end;
  text-align: center;
  color: var(--on-photo);
  background: var(--text);   /* пока фото не загрузилось */
}

.hero__bg,
.photoblock__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.hero__bg.is-loaded,
.photoblock__bg.is-loaded { opacity: 1; }

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  /* Лёгкий тёплый тон: снимки от разных авторов приводим к одной гамме,
     иначе холодное фото выбивается из тёплой палитры сайта. */
  filter: sepia(.14) saturate(1.12) contrast(1.06) brightness(1.02);
}

/* Медленный наезд камеры — движение почти незаметное, только «дыхание». */
.hero__bg .photo { transform: scale(1.12); }
.hero__bg.is-loaded .photo { animation: heroZoom 26s var(--ease) forwards; }

@keyframes heroZoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

/* Затемнение снизу — под текст; сверху лёгкое, под переключатель языка. */
.hero__veil,
.photoblock__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(24, 30, 26, .3) 0%, rgba(24, 30, 26, 0) 24%),
    linear-gradient(to top, rgba(24, 30, 26, .78) 0%, rgba(24, 30, 26, .35) 38%, rgba(24, 30, 26, .05) 62%);
}

/* На фото-блоках текст лежит по центру — там нужна отдельная затемнённая
   середина, иначе светлые участки кадра съедают белые буквы. */
.photoblock__veil {
  background:
    radial-gradient(120% 70% at 50% 50%, rgba(28, 26, 24, .62) 0%, rgba(28, 26, 24, .28) 60%, rgba(28, 26, 24, .2) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
}

.hero__kicker {
  color: var(--on-photo);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .85;
}

.hero__names {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(46px, 16vw, 72px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: .01em;
  text-shadow: 0 2px 24px rgba(28, 26, 24, .35);
}

.hero__date {
  font-family: var(--serif);
  font-size: 23px;
  font-variant-numeric: lining-nums;
}

.hero__city {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .8;
}

/* Подсказка «листайте вниз» */
.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 1;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: rgba(255, 253, 248, .3);
  transform: translateX(-50%);
}

.hero__scroll span {
  display: block;
  width: 100%;
  height: 16px;
  background: var(--on-photo);
  animation: scrollHint 2.4s var(--ease) infinite;
}

@keyframes scrollHint {
  0%   { transform: translateY(-16px); }
  60%  { transform: translateY(46px); }
  100% { transform: translateY(46px); }
}

/* --- Обращение ------------------------------------------------------------ */

.invite__body {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
}

/* --- Календарь ------------------------------------------------------------ */

.calendar {
  max-width: 340px;
  margin: 0 auto;
  padding: 22px 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.calendar__month {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--accent-dp);
  font-variant-numeric: lining-nums;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 2px;
}

.calendar__wd {
  padding-bottom: 6px;
  color: var(--accent-dp);
  font-size: 10px;
  letter-spacing: .08em;
}

.calendar__day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  font-family: var(--serif);
  font-size: 17px;
  font-variant-numeric: lining-nums;
}

.calendar__day--empty { visibility: hidden; }

/* День торжества — золотой круг с пульсирующим кольцом. */
.calendar__day--event {
  z-index: 0;   /* свой стековый контекст, чтобы круг лёг под цифру, а не под карточку */
  color: var(--surface);
  font-weight: 500;
}

.calendar__day--event::before {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  z-index: -1;
}

.calendar__day--event::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: datePulse 2.8s ease-out infinite;
}

@keyframes datePulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

.calendar__time {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .04em;
}

/* --- Фото-блоки (таймер, финальная надпись) -------------------------------- */

.section--photo {
  display: flex;
  align-items: center;
  /* Кадры вертикальные: чем выше блок, тем меньше обрезается фотография. */
  min-height: 64svh;
  padding: 84px 0;
  background: var(--deep);
}

.photoblock__inner { position: relative; z-index: 1; }

/* Кадрируем так, чтобы лица оказались выше текстового блока, а не под ним. */
.section--countdown .photo { object-position: 50% 26%; }
.section--final .photo { object-position: 50% 42%; }

/* В финальном блоке текста нет — затемнять кадр не нужно, оставляем лёгкую
   виньетку только чтобы края не спорили с фоном страницы. */
.section--final .photoblock__veil {
  background: radial-gradient(120% 80% at 50% 50%, rgba(24, 30, 26, 0) 45%, rgba(24, 30, 26, .22) 100%);
}

/* --- Обратный отсчёт ------------------------------------------------------ */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Кольцо вокруг цифры — как на пригласительных «шақыру». */
.countdown__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 253, 248, .55);
  border-radius: 50%;
}

.countdown__value {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  color: var(--on-photo);
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown__label {
  color: var(--on-photo);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: lowercase;
  opacity: .8;
}

.countdown__over {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  color: var(--on-photo);
}

/* --- Детали --------------------------------------------------------------- */

.details {
  margin: 0;
  text-align: center;
}

.details__row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.details__row:last-child { border-bottom: 0; }

.details__label {
  margin-bottom: 4px;
  color: var(--accent-dp);
  font-size: 27px;
  line-height: 1.2;
}

.details__value {
  margin: 0;
  font-size: 16px;
}

.details__value--script {
  font-family: var(--serif);
  font-size: 21px;
}

.details__venue { display: block; }

.details__address {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

/* --- Карта ---------------------------------------------------------------- */

.mapcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mapcard__pin { color: var(--accent); line-height: 0; }

.mapcard__name {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 23px;
}

.mapcard__address {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .05em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              transform .25s var(--ease), opacity .25s var(--ease);
}

.btn--outline {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-dp);
}

.btn--solid {
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.btn--solid:disabled { cursor: default; opacity: .7; }

/* Спиннер появляется только на время отправки формы. */
.btn__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.btn.is-sending .btn__spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Лента-разделитель ----------------------------------------------------- */

.band {
  position: relative;
  height: 170px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.band[hidden] { display: none; }
.band.is-loaded { opacity: 1; }

.band .photo {
  transform: scale(1.16);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 34%, #000 66%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 34%, #000 66%, transparent);
}

/* --- Галерея -------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gallery__item {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
  cursor: pointer;
}

.gallery__img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .6s var(--ease), opacity .4s var(--ease);
}

/* --- Лайтбокс ------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 12px;
  background: var(--overlay);
}

.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  object-fit: contain;
}

.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--overlay-btn);
  color: var(--surface);
  cursor: pointer;
}

.lightbox__btn--close { top: 8px; right: 8px; }
.lightbox__btn--prev  { left: 4px;  top: 50%; transform: translateY(-50%); }
.lightbox__btn--next  { right: 4px; top: 50%; transform: translateY(-50%); }

/* --- Форма RSVP ----------------------------------------------------------- */

.rsvp__hint {
  margin-top: -14px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13.5px;
}

.rsvp {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field[hidden] { display: none; }

.field__label {
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;   /* 16px, чтобы iOS не зумил поле при фокусе */
  transition: border-color .25s var(--ease);
}

.field__input::placeholder { color: var(--muted); }
.field__input:focus { border-color: var(--accent); }
.field__input--area { min-height: 96px; resize: vertical; }
.field__input--num { max-width: 110px; }

.field__error { color: var(--accent-dp); font-size: 13px; }
.field__error[hidden] { display: none; }

/* Радио-кнопки: свой кружок вместо системного. */
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice__mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.choice__text { font-size: 15px; }

.choice input:checked ~ .choice__mark {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.choice:has(input:checked) { border-color: var(--accent); }
.choice:has(input:focus-visible) { border-color: var(--accent); }

.rsvp__status { font-size: 15px; }
.rsvp__status[hidden] { display: none; }
.rsvp__status--error { color: var(--accent-dp); text-align: center; }

.rsvp__status--ok {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--accent-dp);
}

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

.contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.contact .btn[hidden] { display: none; }

/* --- Футер ---------------------------------------------------------------- */

.footer {
  padding: 48px var(--space) calc(96px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--on-photo);
  background: var(--deep);
}

.footer .script { color: var(--accent); }
.footer .divider { color: var(--accent); }

.footer__meta {
  margin-top: 10px;
  color: rgba(255, 253, 248, .65);
  font-size: 12px;
  letter-spacing: .08em;
}

/* --- Плеер ---------------------------------------------------------------- */

.player {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
}

.player[hidden] { display: none; }
.player__icon { line-height: 0; }
.player__pause { display: none; }
.player.is-playing .player__play { display: none; }
.player.is-playing .player__pause { display: block; }

/* ===========================================================================
   Анимации
   ======================================================================== */

/* Секция целиком поднимается и проявляется. */
.reveal { opacity: 0; transition: opacity 1s var(--ease); }
.reveal.is-visible { opacity: 1; }

/* Содержимое подтягивается следом, по очереди. */
.reveal .page > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.reveal.is-visible .page > * { opacity: 1; transform: none; }

.reveal.is-visible .page > *:nth-child(1) { transition-delay: .1s; }
.reveal.is-visible .page > *:nth-child(2) { transition-delay: .25s; }
.reveal.is-visible .page > *:nth-child(3) { transition-delay: .4s; }
.reveal.is-visible .page > *:nth-child(4) { transition-delay: .5s; }

/* Части текста, созданные в js/main.js: появляются волной слева направо. */
.anim-part {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) scale(.96);
  filter: blur(6px);
}

body.is-ready .hero__inner .anim-part,
.reveal.is-visible .anim-part {
  animation: partIn 1.1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 90ms);
}

/* Заголовок секции ждёт, пока сама секция проявится. */
.reveal.is-visible .section__title .anim-part,
.reveal.is-visible .script .anim-part {
  animation-delay: calc(.25s + var(--i) * 90ms);
}

body.is-ready .hero__kicker .anim-part {
  animation-duration: .8s;
  animation-delay: calc(var(--i) * 30ms);
}

body.is-ready .hero__names .anim-part {
  animation-delay: calc(.45s + var(--i) * 150ms);
}

@keyframes partIn {
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* Первый экран: разделитель и подписи проявляются последними. */
.hero .divider { opacity: 0; transform: scaleX(.4); transition: opacity .9s var(--ease) 1.1s, transform 1.1s var(--ease) 1.1s; }
body.is-ready .hero .divider { opacity: 1; transform: none; }

.hero__date,
.hero__city {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.hero__date { transition-delay: 1.35s; }
.hero__city { transition-delay: 1.55s; }

body.is-ready .hero__date,
body.is-ready .hero__city { opacity: 1; transform: none; }

.hero__scroll { opacity: 0; transition: opacity 1s var(--ease) 2s; }
body.is-ready .hero__scroll { opacity: 1; }

/* Кольца таймера «раскрываются», цифра сменяется с подсветкой. */
.reveal .countdown__ring { transform: scale(.86); transition: transform .8s var(--ease); }
.reveal.is-visible .countdown__ring { transform: none; }

.countdown__unit:nth-child(1) .countdown__ring { transition-delay: .3s; }
.countdown__unit:nth-child(2) .countdown__ring { transition-delay: .42s; }
.countdown__unit:nth-child(3) .countdown__ring { transition-delay: .54s; }
.countdown__unit:nth-child(4) .countdown__ring { transition-delay: .66s; }

.countdown__value.is-tick { animation: tickIn .5s var(--ease); }

@keyframes tickIn {
  from { opacity: .3; transform: translateY(-6px); }
  to   { opacity: 1;  transform: none; }
}

/* Клетки календаря проступают волной. */
.calendar__day {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.is-visible .calendar__day { opacity: 1; transform: none; }

/* Плитки галереи выезжают по очереди. */
.gallery__item {
  opacity: 0;
  transform: translateY(22px) scale(.96);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i) * 110ms);
}

.is-visible .gallery__item { opacity: 1; transform: none; }

.gallery__item:hover .gallery__img { transform: scale(1.05); opacity: .94; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn--outline:hover { background: var(--surface); }
.lang__btn:hover { color: var(--accent-dp); }

/* Лайтбокс проявляется вместе с картинкой. */
.lightbox { animation: fadeIn .3s var(--ease); }
.lightbox__img { animation: zoomIn .45s var(--ease); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}

.lightbox__btn { transition: background-color .25s var(--ease); }
.lightbox__btn:hover { background: var(--accent); }

/* Плеер: появление и мягкое «дыхание», пока играет музыка. */
.player { animation: fadeIn .5s var(--ease); transition: transform .3s var(--ease); }
.player:hover { transform: scale(1.06); }
.player.is-playing { animation: playerPulse 2.6s ease-in-out infinite; }

@keyframes playerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169, 136, 95, .3); }
  50%      { box-shadow: 0 0 0 9px rgba(169, 136, 95, 0); }
}

/* --- Десктоп -------------------------------------------------------------- */

@media (min-width: 720px) {
  :root { --section: 88px; }

  .hero__names { font-size: 80px; }
  .hero__date { font-size: 27px; }

  .section__title { font-size: 38px; }
  .section--photo { min-height: 78svh; padding: 120px 0; }

  .calendar { max-width: 420px; padding: 28px 22px 24px; }
  .calendar__day { height: 42px; font-size: 19px; }
  .calendar__day--event::before,
  .calendar__day--event::after { width: 40px; height: 40px; }
  .calendar__month { font-size: 26px; }

  .countdown { gap: 14px; }
  .countdown__ring { width: 92px; height: 92px; }
  .countdown__value { font-size: 34px; }
  .countdown__label { font-size: 11px; }

  .details__label { font-size: 32px; }

  .band { height: 260px; }

  .gallery { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .ornament { width: 150px; height: 150px; }

  .lightbox { padding: 72px; }
  .lightbox__btn--prev { left: 16px; }
  .lightbox__btn--next { right: 16px; }
  .lightbox__btn--close { top: 16px; right: 16px; }

  .contact { flex-direction: row; justify-content: center; }
  .btn--solid { width: auto; align-self: center; min-width: 230px; }

  .player { right: 24px; bottom: 24px; }
}

/* --- Уважаем настройку «меньше движения» ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms;
    animation-iteration-count: 1;
    transition-duration: .01ms;
  }
  .reveal,
  .reveal .page > *,
  .gallery__item,
  .calendar__day,
  .hero__date,
  .hero__city,
  .hero .divider,
  .hero__scroll { opacity: 1; transform: none; }
  .hero__scroll { display: none; }
}
