*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background-color: #F2EDE6;
  overflow-x: hidden;
}

/* Все секции центрируем одинаково */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background-color: #F2EDE6;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Все секции центрируем одинаково */
.intro,
.date-place,
.dresscode,
.details,
.rsvp {
  width: 390px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  
}

.hero {
  position: relative;
  width: 100%;
  height: 780px;
  overflow: hidden;
  background-image: url('HERO.JPG');
  background-size: cover;
  background-position: center;
}

.wedding-day {
  position: absolute;
  top: 152.5px;
  width: 100%;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 7.3px;
  text-transform: uppercase;
  color: #7A6E65;
  white-space: nowrap;
  transform: translateY(-50%);
}

/* Overlapping grid — точно как в Figma */
.hero-names {
  position: absolute;
  left: 50%;
  top: 438px;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
}

.hero-name {
  grid-area: 1 / 1;
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 72px;
  line-height: 79.2px;
  color: #4A5040;
  white-space: nowrap;
}

.hero-andrey {
  margin-left: 0;
  margin-top: 0;
}

.hero-amp {
  grid-area: 1 / 1;
  margin-left: 71px;
  margin-top: 95px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: normal;
  font-size: 36px;
  line-height: 1;
  color: #B08A81;
  white-space: nowrap;
}

.hero-lina {
  margin-left: 0;
  margin-top: 154px;
}

.hero-date {
  position: absolute;
  left: 184px;
  top: 652.5px;
  transform: translate(-50%, -50%);
  width: 306px;
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 32px;
  letter-spacing: 2.6px;
  color: #5D4F48;
  text-align: center;
}

/* Анимация */
.wedding-day,
.name,
.amp,
.date {
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wedding-day      { animation-delay: 0.2s; }
.name:first-child { animation-delay: 0.5s; }
.amp              { animation-delay: 0.75s; }
.name:last-child  { animation-delay: 0.9s; }
.date             { animation-delay: 1.1s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}






/* ── SECTION INTRO ── */

.intro {
  width: 390px;
  margin: 0 auto;
  background-color: #F2EDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 60px;
}

/* Цитата */
.quote-block {
  width: 338px;
  padding-top: 62px;
  text-align: center;
}

.quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 27.2px;
  color: #955f37;
  margin-bottom: 6px;
}

.quote-ref {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  line-height: 27.2px;
  color: #955f37;
  text-align: right;
  text-transform: capitalize;
}

/* Фото */
.couple-photo {
  width: 308px;
  height: 364px;
  margin-top: 18px;
  border-radius: 4px;
  overflow: hidden;
}

.couple-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Заголовок */
.greeting {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 48.4px;
  color: #4A5040;
  text-align: center;
  margin-top: 32px;
}

/* Текст */
.body-text {
  width: 340px;
  margin-top: 18px;
  padding-left: 30px;
}

.body-text p {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 22px;
  line-height: 30.5px;
  color: #3A3028;
  letter-spacing: 1.32px;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.body-text p:last-child {
  margin-bottom: 0;
}

/* Программа */
.program-list {
  list-style: none;
  width: 340px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.program-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.prog-circle {
  width: 90px;
  height: 90px;
  border-radius: 45px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #F2EDE6;
}

.prog-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.prog-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-time {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  color: #666956;
}

.prog-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: #3A3028;
}




/* ── SECTION DATE-PLACE ── */

.date-place {
  width: 390px;
  margin: 0 auto;
  background-color: #F2EDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 60px;
}

.place-label {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 3.06px;
  color: #4A5040;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 14px;
}

.venue-illustration {
  width: 252px;
  height: 129px;
  overflow: hidden;
}

.venue-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-address {
  margin-top: 16px;
  text-align: center;
}

.venue-address p {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 23.8px;
  letter-spacing: 0.7px;
  color: #3A3028;
}

.map-link {
  display: inline-block;
  margin-top: 20px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #4A5040;
  text-decoration: none;
  border-bottom: 1px solid #666956;
  padding-bottom: 3px;
}

/* ── SECTION DRESSCODE ── */

.dresscode {
  width: 390px;
  margin: 0 auto;
  background-color: #F2EDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 20px;
}

.dresscode-title {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 48.4px;
  color: #4A5040;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 20px;
}

.palette-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.swatch-circle {
  width: 54px;
  height: 54px;
  border-radius: 27px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.swatch-circle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.swatch-shadow {
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
}

.swatch-inset::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
}

.swatch-border {
  border: 1px solid #E0D0CF;
}

.dresscode-desc {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 22px;
  line-height: 38px;
  letter-spacing: 0.66px;
  color: #3A3028;
  text-align: center;
  width: 360px;
  padding: 40px 24px;
}




/* ── SECTION DETAILS ── */

.details {
  width: 390px;
  margin: 0 auto;
  background-color: #F2EDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 30px 60px;
  gap: 40px;
}

.details-heading {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 48.4px;
  color: #4A5040;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 0;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.detail-title {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  color: #666956;
  text-align: center;
  white-space: nowrap;
}

.detail-body {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: normal;
  font-size: 18px;
  line-height: 26.6px;
  color: #3A3028;
  text-align: center;
}





/* ── SECTION RSVP ── */

.rsvp {
  width: 390px;
  margin: 0 auto;
  background-color: #F2EDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 60px;
}

.rsvp-title {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 48.4px;
  color: #4A5040;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 8px;
}

.rsvp-info {
  max-width: 320px;
  margin-bottom: 32px;
  text-align: center;
}

.rsvp-info p {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
  line-height: 26.6px;
  color: #3A3028;
}
#rsvpForm {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.field-label {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 22px;
  line-height: 38px;
  letter-spacing: 0.66px;
  color: #666956;
}

.field-sublabel {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
  color: #7A6E65;
  margin-top: -6px;
}

.field-input {
  border: none;
  border-bottom: 1px solid rgba(102, 105, 86, 0.4);
  background: transparent;
  padding: 10px 0 11px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 17px;
  color: #3A3028;
  width: 100%;
  outline: none;
}

.field-input::placeholder {
  color: #757575;
}

/* Кнопки приду/не смогу */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-attend {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  padding: 11px 23px;
  border: 1px solid #8D8E7C;
  background: transparent;
  color: #7A6E65;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-attend.btn-active {
  background-color: #666956;
  border-color: #666956;
  color: #ffffff;
}

/* Счётчик */
.counter-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 8px;
}

.counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid #8D8E7C;
  background: transparent;
  font-size: 20px;
  line-height: 20px;
  color: #3A3028;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.counter-display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  color: #3A3028;
  text-align: center;
  min-width: 32px;
}

/* Кнопка отправить */
.submit-wrap {
  padding-top: 16px;
}

.submit-btn {
  width: 100%;
  border: 1px solid #4A5040;
  background: transparent;
  padding: 17px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 3.3px;
  text-transform: uppercase;
  color: #4A5040;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.submit-btn:hover {
  background-color: #4A5040;
  color: #F2EDE6;
}


/* ── DESKTOP ── */

@media (min-width: 600px) {
  body {
    background-color: #ddd5c8;
    background-image: url('HERO.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
  }

  .hero,
  .intro,
  .date-place,
  .dresscode,
  .details,
  .rsvp {
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.12);
  }
}

@media (min-width: 600px) {
  .hero {
    max-width: 390px;
    margin-left: auto;
    margin-right: auto;
  }
}


@media (prefers-reduced-motion: reduce) {
  .quote-block,
  .couple-photo,
  .greeting,
  .body-text,
  .program-item,
  .place-label,
  .venue-illustration,
  .venue-address,
  .map-link,
  .dresscode-title,
  .palette-row,
  .dresscode-desc,
  .details-heading,
  .detail-item,
  .rsvp-title,
  .rsvp-info,
  .form-field,
  .submit-wrap {
    opacity: 1;
    transform: none;
    transition: none;
  }
}




/* ── АНИМАЦИИ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ── */

.quote-block,
.couple-photo,
.greeting,
.body-text,
.program-item,
.place-label,
.venue-illustration,
.venue-address,
.map-link,
.dresscode-title,
.palette-row,
.dresscode-desc,
.details-heading,
.detail-item,
.rsvp-title,
.rsvp-info,
.form-field,
.submit-wrap {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Задержки для каскадного эффекта */
.program-item:nth-child(2) { transition-delay: 0.15s; }
.program-item:nth-child(3) { transition-delay: 0.3s; }
.palette-row               { transition-delay: 0.2s; }
.detail-item:nth-child(2)  { transition-delay: 0.2s; }
.form-field:nth-child(2)   { transition-delay: 0.1s; }
.form-field:nth-child(3)   { transition-delay: 0.2s; }
.submit-wrap               { transition-delay: 0.3s; }


/* Анимация hero */
.wedding-day,
.hero-andrey,
.hero-amp,
.hero-lina,
.hero-date {
  opacity: 0;
  animation: rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wedding-day  { animation-delay: 0.3s; }
.hero-andrey  { animation-delay: 0.7s; animation-name: riseScale; }
.hero-amp     { animation-delay: 1.0s; animation-name: fadeSoft; }
.hero-lina    { animation-delay: 1.2s; animation-name: riseScale; }
.hero-date    { animation-delay: 1.6s; animation-name: riseCenter; }

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes riseScale {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeSoft {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes riseCenter {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}