/* --- Variables --- */
:root {
  --green: #2d3a2a;
  --green-bg: #2d3a2a;
  --black: #0f0f0f;
  --white: #f5f5f2;
  --text: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.75);
  --script-font: 'Cormorant Garamond', serif;
  --sans-font: 'Montserrat', sans-serif;
  --radius: 999px;
  --radius-box: 12px;
  --seal-color: #4a5d4a;
}

/* --- Конверт: оверлей до открытия приглашения --- */
#envelope-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f5f5f0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease 1s, visibility 1s ease 1s;
}

#envelope-overlay.hidden-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-container {
  position: relative;
  width: 300px;
  height: 200px;
  cursor: pointer;
  perspective: 1000px;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #dcdcdc;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.envelope-letter {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 280px;
  height: 180px;
  background: #fff;
  transition: transform 1s ease;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--script-font), serif;
  color: #333;
  font-size: 1.2rem;
  font-style: italic;
}

.flap {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.flap--top {
  top: 0;
  left: 0;
  border-width: 100px 150px 0 150px;
  border-color: #cfcfcf transparent transparent transparent;
  z-index: 5;
  transform-origin: top;
  transition: transform 0.6s ease;
}

.flap--right {
  top: 0;
  right: 0;
  border-width: 100px 150px 100px 0;
  border-color: transparent #d6d6d6 transparent transparent;
  z-index: 3;
}

.flap--bottom {
  bottom: 0;
  left: 0;
  border-width: 0 150px 100px 150px;
  border-color: transparent transparent #e0e0e0 transparent;
  z-index: 4;
}

.flap--left {
  top: 0;
  left: 0;
  border-width: 100px 0 100px 150px;
  border-color: transparent transparent transparent #d6d6d6;
  z-index: 3;
}

.envelope-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20%);
  width: 50px;
  height: 50px;
  background: var(--seal-color);
  border-radius: 50%;
  z-index: 6;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #3e4f3e;
  transition: opacity 0.4s ease;
}

.envelope-seal::after {
  content: "🌿";
  font-size: 24px;
  color: #2c3a2c;
}

.envelope-container.open .flap--top {
  transform: rotateX(180deg);
  z-index: 2;
}

.envelope-container.open .envelope-seal {
  opacity: 0;
  pointer-events: none;
}

.envelope-container.open .envelope-letter {
  transform: translateY(-100px);
  z-index: 6;
}

.envelope-hint {
  text-align: center;
  margin-top: 30px;
  color: #888;
  font-family: var(--sans-font), sans-serif;
  font-size: 0.8rem;
}

/* Основная страница: скрыта до открытия конверта */
#main-content {
  opacity: 0;
  transition: opacity 1.5s ease 1s;
  display: none;
  max-width: 100%;
  overflow-x: hidden;
}

#main-content.visible {
  opacity: 1;
  display: block;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  font-family: var(--sans-font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
.script {
  font-family: var(--script-font);
  font-weight: 400;
  font-style: italic;
}

.text {
  color: var(--text);
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

.text--mt {
  margin-top: 1rem;
}

.title-sans {
  font-family: var(--sans-font);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

/* --- Sections --- */
.block {
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  min-height: 40vh;
}

.block--green {
  background: var(--green-bg);
}

.block--black {
  background: var(--black);
}

.block--photo,
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.block-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.block-bg--dim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1;
}

.block--green .script,
.block--green .text,
.block--black .script,
.block--black .text,
.block--black .title-sans {
  position: relative;
  z-index: 2;
}

/* Секция «Дорогие родные и друзья» — отдельно выделена */
.block--intro {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.block--intro-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.block h2.script {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin: 0 0 1rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.block .text {
  margin: 0 auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.block .text + .text {
  margin-top: 1rem;
}

/* --- Hero (Start) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 4rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hero-content--centered {
  text-align: center;
  width: 100%;
  max-width: 100%;
}

/* Хедер: фиксированная высота экрана, картинка не растягивается, текст по центру */
.hero--start {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
}

.hero--start .hero-bg {
  background-size: cover;
  background-position: center 25%;
}

.hero--start .hero-content {
  align-self: stretch;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-names {
  font-family: var(--script-font);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 400;
  font-style: italic;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.hero-date {
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin: 0;
}

.hero-date.script {
  font-family: var(--script-font);
  font-style: italic;
}

/* --- Calendar block --- */
.block--photo .block-bg {
  z-index: 0;
}

.calendar-box {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 2.5rem 3rem;
  border-radius: var(--radius-box);
  margin-top: 2rem;
  min-width: 280px;
}

.calendar-box--transparent {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  color: #1a1a1a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.calendar-month {
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.calendar-month.script {
  font-family: var(--script-font);
  font-style: italic;
}

.calendar-year {
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
}

.calendar-day {
  font-family: var(--sans-font);
  font-size: 2.5rem;
  font-weight: 500;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  line-height: 2.75rem;
  margin: 0 auto 0.5rem;
}

.calendar-date {
  font-size: 1.15rem;
  margin: 0;
  margin-top: 1rem;
}

/* Календарь: фото вписывается в секцию, «Наш май» script; таймер под календарём */
.block--calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  padding: 3rem 1.5rem;
}

.block-bg--calendar {
  background-size: cover !important;
  background-position: center 25% !important;
  background-repeat: no-repeat !important;
  background-color: var(--green-bg);
}

.calendar-box--transparent .calendar-weekdays,
.calendar-box--transparent .calendar-year,
.calendar-box--transparent .calendar-date,
.calendar-box--transparent .calendar-month {
  color: #1a1a1a;
}

.calendar-box--transparent .calendar-grid span {
  color: #1a1a1a;
}

.calendar-box--transparent .calendar-day-num {
  border-color: #1a1a1a;
  background: rgba(26, 26, 26, 0.2);
  color: #1a1a1a;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.6rem;
  text-align: center;
}

.calendar-box--transparent .calendar-weekdays {
  color: #1a1a1a;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  font-size: 1.15rem;
  text-align: center;
  min-width: 260px;
}

.calendar-grid span {
  padding: 0.4em 0.4em;
}

.calendar-day-num {
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  font-weight: 600;
  background: #1a1a1a;
  color: #fff;
}

/* Таймер обратного отсчёта в секции календаря */
.calendar-timer {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
  text-align: center;
  color: #fff;
}

.calendar-timer-title {
  font-family: var(--script-font);
  font-style: italic;
  font-size: clamp(2rem, 2.5vw, 1.25rem);
  margin: 0 0 0.75rem;
}

.calendar-timer-units {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  font-family: var(--serif-font);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.calendar-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.5em;
}

.calendar-timer-label {
  font-family: var(--sans-font);
  font-size: 0.7em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2em;
  opacity: 0.85;
}

.calendar-timer-done {
  font-family: var(--script-font);
  font-style: italic;
  font-size: 1.1em;
}

/* --- Локация: заголовок, картинка дома, адрес и кнопка — один блок на чёрном фоне --- */
.block--location {
  background: var(--black);
}

.block--location .block-bg:not(.block-bg--dali),
.block--location::after {
  display: none;
}

.block--location-dali {
  padding: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Заголовок сверху — свой отступ, текст не наезжает на картинку */
.block--location-header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.block--location-header .script,
.block--location-dali .block--location-subtitle {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.block--location-subtitle {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  max-width: 100%;
}

/* Картинка дома в потоке — занимает место, под неё идёт адрес */
.block--location-dali-img {
  width: 100%;
  min-height: 45vh;
  background-color: var(--black);
  background-size: 98%;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Адрес и кнопка под картинкой — такой же отступ, как у надписи сверху */
.block--location-address {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--black);
}

.block--location-address .block--address-addr {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.block--location-address .btn {
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .block--location-dali-img {
    min-height: 40vh;
    background-size: 120% auto;
    background-position: center;
  }
}

@media (max-width: 480px) {
  .block--location-dali-img {
    min-height: 35vh;
    background-size: 140% auto;
  }
}

.block--location-subtitle {
  margin: 0 0 2rem;
  font-size: 2rem;
  letter-spacing: 0.02em;
  max-width: 100%;
}
/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--sans-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-top: 1rem;
}

.btn--outline:hover {
  background: var(--white);
  color: var(--black);
}

/* Секция адреса / транспорт: одинаковый отступ сверху и снизу (как верхний) */
.block--address {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.block--address .block--address-addr {
  font-size: 1.5rem;
}

.block--address-addr {
  margin-bottom: 0rem;
}

.block--address .btn {
  margin-top: 1rem;
  margin-bottom: 0;
}

.block--address-transport {
  margin-bottom: 1rem;
}

.block--address .btn + .btn,
.block--address .text + .btn {
  margin-top: 1.5rem;
}

.btn--submit {
  margin-top: 1.5rem;
  background: #8b7355;
  border-color: #8b7355;
  color: var(--white);
  width: 100%;
  max-width: 320px;
}

.btn--submit:hover {
  background: #a08060;
  border-color: #a08060;
}

/* --- Form (Anketa) --- */
.block--form {
  padding-bottom: 4rem;
}

.form-intro {
  position: relative;
  z-index: 2;
  margin-bottom: 2rem;
}

.form-rings-img {
  display: none;
}

.form-rings {
  display: block;
  margin: 0 auto 1rem;
  width: 80px;
  height: auto;
  opacity: 0.95;
}

.form-intro .script {
  margin-bottom: 0.5rem;
}

.form-intro .text {
  margin: 0 auto;
  max-width: 36ch;
}

.anketa-form {
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: left;
  color-scheme: dark;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.required {
  color: #e8a0a0;
}

.field-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--sans-font);
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

/* Кастомный дропдаун — всегда тёмный фон списка */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23f5f5f2' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  padding-right: 2.25rem;
  color: var(--white);
  font-family: var(--sans-font);
  font-size: 1rem;
}

.custom-select-trigger:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
}

.custom-select-dropdown[hidden] {
  display: none !important;
}

.custom-select-option {
  padding: 0.65rem 0.9rem;
  color: #f5f5f2;
  cursor: pointer;
  transition: background 0.15s;
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.custom-select-option--placeholder {
  display: none;
}

.custom-select-option:nth-child(2) {
  border-radius: 8px 8px 0 0;
}

.custom-select-option:last-child {
  border-radius: 0 0 8px 8px;
}

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

.field-checkgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.35rem;
}

.field-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
}

.field-check input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  accent-color: #8b7355;
  cursor: pointer;
}

.btn--submit {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.4em;
}

.form-message.success {
  color: #8fbc8f;
}

.form-message.error {
  color: #e8a0a0;
}

/* --- Timeline: фон — фото, тайминги не наезжают (скрин 3) --- */
.block--timing {
  overflow-x: hidden;
  overflow-y: visible;
}

.block--timing .block-bg {
  z-index: 0;
}

.block--timing .block-bg--dim::after {
  z-index: 1;
}

/* Отступы как у остальных секций: симметричные, по брейкпоинтам как .block */
#timing {
  padding: 4rem 1.5rem;
}

.timing-title {
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 2;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Специфичность выше, чем у .block h2.script — иначе перекрывает margin: 0 0 1rem */
#timing .timing-title {
  margin: 0 0 3.5rem;
}

.timing-title.script {
  font-family: var(--script-font);
  font-style: italic;
}

.timeline-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 400 / 500;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.timeline-heart {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  color: #e8a0a0;
  z-index: 3;
  pointer-events: none;
  transition: none;
  will-change: transform;
  /* left/top задаются в % из js по положению на path */
}

.timeline-heart svg {
  display: block;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.5));
}

.timeline-items {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}

.timeline-item {
  position: absolute;
  font-size: clamp(0.75rem, 2.2vw, 0.9rem);
  color: var(--text);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0 1.25rem;
  transform-origin: center center;
  white-space: normal;
  pointer-events: auto;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
}
/* Текст справа от точки (1-й, 3-й): маркер слева, потом время и название */
.timeline-items .timeline-item--right .timeline-marker { order: 0 !important; }
.timeline-items .timeline-item--right .timeline-item-left { order: 1 !important; }
.timeline-items .timeline-item--right .timeline-item-right { order: 2 !important; }

/* Текст слева от точки (2-й, 4-й): название и время, потом маркер */
.timeline-item--left {
  gap: 0 1.5rem;
}
.timeline-items .timeline-item--left .timeline-item-left { order: 2 !important; }
.timeline-items .timeline-item--left .timeline-item-right { order: 1 !important; }
.timeline-items .timeline-item--left .timeline-marker { order: 3 !important; }

.timeline-item-left,
.timeline-item-right {
  font-family: inherit;
  font-style: normal;
  max-width: 180px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.timeline-item-left {
  font-weight: 500;
}
.timeline-item-right {
  font-weight: 400;
}

.timeline-marker {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  visibility: hidden;
  pointer-events: none;
}
.timeline-line .timeline-dot {
  pointer-events: none;
}

/* --- Dress code palette --- */
.palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2;
}

.palette-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

/* --- Дресс-код: лесной фон --- */
.block--dresscode .block-bg {
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-color: #0d1a0f;
}

.block-bg--forest {
  background-image: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%), url('../resources/wood.jpg');
}

.block--dresscode .block-bg--dim::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

.block--dresscode h2,
.block--dresscode .text,
.block--dresscode .palette {
  position: relative;
  z-index: 2;
}

/* --- Пожелания + Анкета: единый фон (без рваного) --- */
.block--wishes-anketa {
  padding-bottom: 4rem;
}

.block-bg--single {
  background-size: cover;
  background-position: center;
}

.block--wishes {
  position: relative;
  z-index: 2;
  padding-top: 2rem;
}

.block--wishes .text + .text {
  margin-top: 1rem;
}

.block--form-inner {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
}

.block--form-inner .form-intro {
  margin-bottom: 2rem;
}

/* --- Футер: центрирование + фон фото --- */
.hero--footer {
  height: 100vh;
  min-height: 600px;
  justify-content: stretch;
  padding: 0;
}

.hero--footer .hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  width: 100%;
  padding-bottom: 18%;
}

/* Фон футера — так же, как в других секциях (inline url в HTML) */
.hero-bg--footer {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-overlay--footer {
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.4) 0%,
    transparent 25%,
    transparent 75%,
    rgba(0,0,0,0.4) 100%);
}

.footer-center {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.footer-center .script {
  margin: 0.25rem 0;
}

.footer-center p.script {
  font-size: 30px;
}

.footer-center .hero-names {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin: 0.5rem 0;
}

/* ========== Адаптив всей страницы ========== */

@media (max-width: 1024px) {
  .block {
    padding: 3rem 1.25rem;
  }
  .block--address {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .block--intro-inner {
    max-width: 90%;
    padding: 1.75rem 2rem;
  }
  .block--calendar {
    min-height: 80vh;
    padding: 2.5rem 1rem;
  }
  .calendar-box {
    padding: 2rem 2.25rem;
    min-width: 260px;
  }
  #timing {
    padding: 3rem 1.25rem;
  }
  .timing-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }
  #timing .timing-title {
    margin-bottom: 2.5rem;
  }
  .timeline-wrap {
    max-width: 340px;
  }
  .timeline-item-left,
  .timeline-item-right {
    max-width: 160px;
    font-size: 0.85rem;
  }
  .anketa-form {
    max-width: 100%;
    padding: 0 0.5rem;
  }
}

@media (max-width: 768px) {
  .block {
    padding: 2.5rem 1rem;
    min-height: 35vh;
  }
  .block--address {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .block--intro {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .block--intro-inner {
    padding: 1.5rem 1.25rem;
  }
  .block h2.script {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  .hero {
    padding-bottom: 3rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-names {
    font-size: clamp(1.75rem, 7vw, 3rem);
  }
  .hero-date {
    font-size: 1.1rem;
  }
  .block--calendar {
    min-height: 75vh;
    padding: 2rem 0.75rem;
  }
  .calendar-box {
    padding: 1.5rem 1.75rem;
    min-width: 240px;
    margin-top: 1.5rem;
  }
  .calendar-grid {
    gap: 6px;
    min-width: 240px;
    font-size: 1rem;
  }
  .calendar-weekdays {
    font-size: 0.85rem;
  }
  .calendar-timer {
    margin-top: 1.5rem;
  }
  .calendar-timer-units {
    gap: 0.75rem 1rem;
  }
  #timing {
    padding: 2.5rem 1rem;
  }
  .timing-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  #timing .timing-title {
    margin-bottom: 2.25rem;
  }
  .timeline-wrap {
    max-width: 280px;
  }
  .timeline-item {
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    gap: 0 1rem;
  }
  .timeline-item--left {
    gap: 0 1.25rem;
  }
  .timeline-item-left,
  .timeline-item-right {
    max-width: 120px;
    font-size: clamp(0.7rem, 2vw, 0.75rem);
  }
  .block--address .block--address-addr {
    font-size: 1.25rem;
  }
  .block--address .btn {
    margin-top: 1rem;
    margin-bottom: 0;
  }
  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }
  .palette {
    gap: 0.5rem;
  }
  .palette-dot {
    width: 38px;
    height: 38px;
  }
  .block--wishes-anketa {
    padding-bottom: 3rem;
  }
  .block--form-inner {
    padding-top: 2rem;
  }
  .form-intro .text {
    max-width: 100%;
  }
  .btn--submit {
    max-width: 100%;
  }
  .hero--footer {
    min-height: 500px;
  }
  .footer-center .hero-names {
    font-size: clamp(1.35rem, 5vw, 2rem);
  }
  .envelope-container {
    width: 260px;
    height: 174px;
  }
  .envelope-letter {
    width: 242px;
    height: 156px;
  }
  .flap--top {
    border-width: 87px 130px 0 130px;
  }
  .flap--right {
    border-width: 87px 130px 87px 0;
  }
  .flap--bottom {
    border-width: 0 130px 87px 130px;
  }
  .flap--left {
    border-width: 87px 0 87px 130px;
  }
}

@media (max-width: 480px) {
  .block {
    padding: 2rem 0.75rem;
  }
  .block--address {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .block--intro-inner {
    padding: 1.25rem 1rem;
  }
  .block--calendar {
    min-height: 70vh;
    padding: 1.5rem 0.5rem;
  }
  .calendar-box {
    padding: 1.25rem 1.25rem;
    min-width: 220px;
  }
  .calendar-grid {
    gap: 4px;
    min-width: 220px;
    font-size: 0.9rem;
  }
  .calendar-month {
    font-size: 1.6rem;
  }
  .calendar-timer-title {
    font-size: 1rem;
  }
  .calendar-timer-units {
    font-size: clamp(1.25rem, 6vw, 1.75rem);
    gap: 0.5rem 0.75rem;
  }
  .calendar-timer-unit {
    min-width: 2em;
  }
  #timing {
    padding: 2rem 0.75rem;
  }
  .timing-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
  #timing .timing-title {
    margin-bottom: 1.75rem;
  }
  .timeline-wrap {
    max-width: 260px;
  }
  .timeline-item {
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    gap: 0 0.75rem;
  }
  .timeline-item--left {
    gap: 0 1rem;
  }
  .timeline-item-left,
  .timeline-item-right {
    max-width: 100px;
    font-size: clamp(0.65rem, 1.8vw, 0.7rem);
  }
  .block--location-subtitle {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .block--location-address .block--address-addr {
    font-size: 1.1rem;
  }
  .block--address .block--address-addr {
    font-size: 1.1rem;
  }
  .palette-dot {
    width: 32px;
    height: 32px;
  }
  .hero--footer {
    min-height: 450px;
  }
  .envelope-container {
    width: 220px;
    height: 147px;
  }
  .envelope-letter {
    width: 204px;
    height: 132px;
    font-size: 1rem;
  }
  .flap--top {
    border-width: 73px 110px 0 110px;
  }
  .flap--right {
    border-width: 73px 110px 73px 0;
  }
  .flap--bottom {
    border-width: 0 110px 73px 110px;
  }
  .flap--left {
    border-width: 73px 0 73px 110px;
  }
  .envelope-seal {
    width: 40px;
    height: 40px;
  }
  .envelope-hint {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .block {
    padding: 1.5rem 0.5rem;
  }
  .block--address {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .calendar-box {
    min-width: 200px;
    padding: 1rem 1rem;
  }
  .calendar-grid {
    min-width: 200px;
  }
  #timing {
    padding: 1.5rem 0.5rem;
  }
  .timing-title {
    font-size: clamp(1.1rem, 5vw, 1.25rem);
  }
  #timing .timing-title {
    margin-bottom: 1.5rem;
  }
  .timeline-wrap {
    max-width: 240px;
  }
  .timeline-item {
    font-size: clamp(0.6rem, 1.6vw, 0.65rem);
    gap: 0 0.5rem;
  }
  .timeline-item--left {
    gap: 0 0.75rem;
  }
  .timeline-item-left,
  .timeline-item-right {
    max-width: 85px;
    font-size: clamp(0.6rem, 1.6vw, 0.65rem);
  }
  .timeline-heart {
    width: 22px;
    height: 22px;
  }
  .timeline-heart svg {
    width: 22px;
    height: 22px;
  }
  .hero-names {
    font-size: 1.5rem;
  }
}
