/* Карточка-приглашение — бежевая элегантность */
:root {
  --sand: #F8F1E5;
  --sand-dark: #E8DDD0;
  --taupe: #B7A99A;
  --taupe-light: #D6C9BC;
  --dusty-rose: #C89F9F;
  --brown-sugar: #A6896E;
  --chocolate: #6B4F3F;
  --cream: #FFF9F2;
  --white-soft: #f8f5f5;
  --text-dark: #3D2E24;
  --text-soft: #5E4B3C;
  
  --font-body: 'Lora', Georgia, serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Caveat', cursive;
}

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

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--sand);
  min-height: 100vh;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

/* Центрирование всего контента */
.page-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Карточка */
.card {
  width: 100%;
  background: var(--cream);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 40px -15px rgba(107, 79, 63, 0.2);
  border: 1px solid var(--taupe-light);
  margin-bottom: 40px;
}

/* Сердечко */
.card-top {
  text-align: center;
  margin-bottom: 16px;
}

.heart {
  display: block;
  color: var(--dusty-rose);
  font-size: 24px;
  line-height: 1;
  margin-bottom: 12px;
}

/* Волнистая линия */
.wavy-line {
  width: 100%;
  height: 20px;
  color: var(--dusty-rose);
  opacity: 0.6;
}

.subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-soft);
  text-align: center;
  margin: 8px 0 4px;
  letter-spacing: 0.5px;
}

.headline {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  text-align: center;
  margin: 0 0 32px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* Цитаты - над фотографиями */
.quotes {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 10px;
  margin-top: -20px;
  position: relative;
  z-index: 10;
  padding: 0 50px;
  width: 100%;
}

.quote {
  font-family: var(--font-script);
  font-size: 22px;
  color: var(--chocolate);
  max-width: 45%;
  line-height: 1.2;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(255, 249, 242, 0.9);
  white-space: normal;
  background: transparent;
}

.quote-left {
  text-align: left;
  transform: rotate(-5deg);
}

.quote-right {
  text-align: right;
  transform: rotate(5deg);
}

/* Фото в стиле фотоплёнки / полароид */
.photos.polaroid-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0 0 40px;
  padding: 0;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.polaroid {
  background: var(--white-soft);
  padding: 24px 20px 20px;
  box-shadow: 0 10px 25px -8px rgba(107, 79, 63, 0.25);
  border: 1px solid var(--taupe-light);
  position: relative;
  transition: transform 0.2s ease;
}

.polaroid-left {
  transform: rotate(-5deg);
}

.polaroid-right {
  transform: rotate(5deg);
}

.polaroid-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-script);
  font-size: 18px;
  font-weight: 600;
  color: var(--dusty-rose);
  white-space: nowrap;
  background: var(--cream);
  padding: 4px 16px;
  border-radius: 30px;
  border: 1px solid var(--taupe-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  z-index: 4;
}

.polaroid-img-wrap {
  width: 200px;
  height: 200px;
  overflow: hidden;
  background: var(--taupe-light);
  border: 1px solid var(--taupe);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(20%) brightness(1.02);
}

.polaroid-name.script {
  font-family: var(--font-script);
  font-size: 28px;
  font-weight: 600;
  color: var(--chocolate);
  text-align: center;
  margin: 16px 0 4px;
  line-height: 1;
}

/* Полоса приглашения */
.invitation-band {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--text-dark);
  color: var(--cream);
  font-family: var(--font-script);
  font-size: 20px;
  font-weight: 500;
  padding: 0px 0px;
  margin: 0px 0px 20px 0px;
  letter-spacing: 0.5px;
  /* border-radius: 60px; */
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
  width: 100%;
}

/* Текст приглашения */
.message {
  text-align: center;
  margin-bottom: 40px;
}

.message p {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--text-soft);
  line-height: 1.6;
}

.wedding-date {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  margin: 20px 0 0 !important;
  letter-spacing: 1px;
}

/* Календарь */
.calendar-block {
  position: relative;
  background: var(--white-soft);
  border: 1px solid var(--taupe-light);
  border-radius: 24px;
  padding: 32px 24px 28px;
  box-shadow: 0 10px 25px -12px var(--brown-sugar);
  margin-bottom: 40px;
  width: 100%;
}

.calendar-tape {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 40%;
  height: 18px;
  background: var(--taupe);
  opacity: 0.4;
  border-radius: 20px;
}

.calendar-month.script {
  font-family: var(--font-script);
  font-size: 36px;
  font-weight: 500;
  color: var(--chocolate);
  text-align: center;
  margin: 16px 0 20px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
}

.calendar-weekdays.script {
  font-family: var(--font-script);
  font-size: 20px;
  font-weight: 500;
  color: var(--taupe);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: lowercase;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  width: 100%;
  padding: 0;
}

.calendar-weekdays.script span {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Числа в календаре */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  font-size: 18px;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 36px;
  width: 100%;
}

.calendar-grid span {
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-grid span.wedding-day {
  color: var(--cream);
  font-weight: 600;
  background: var(--dusty-rose);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(200, 159, 159, 0.4);
}

.save-the-date.script {
  font-family: var(--font-script);
  font-size: 20px;
  font-weight: 500;
  color: var(--taupe);
  position: absolute;
  bottom: 20px;
  right: 24px;
  transform: rotate(3deg);
  margin: 0;
  opacity: 0.9;
  background: var(--cream);
  padding: 4px 16px;
  border-radius: 30px;
  border: 1px dashed var(--taupe-light);
}

/* Блок Место */
.location-block {
  margin-top: 20px;
  margin-bottom: 40px;
  padding: 0;
  text-align: center;
  width: 100%;
}

.location-title.script {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  margin: 0 0 32px;
}

.polaroid.polaroid-straight {
  display: block;
  width: 100%;
  transform: none;
  margin: 0 0 24px;
  padding: 20px 20px 24px;
  background: var(--white-soft);
  border-radius: 20px;
}

.polaroid-straight .polaroid-img-wrap {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 350px;
  border-radius: 8px;
  overflow: hidden;
}

.polaroid-straight .photo-img {
  filter: sepia(15%) brightness(1.02);
}

.polaroid-straight .location-address {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  margin: 16px 0 8px;
  line-height: 1.5;
}

.location-address:last-of-type {
  color: var(--dusty-rose);
  font-style: italic;
}

.location-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--cream);
  background: var(--taupe);
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(166, 137, 110, 0.3);
  border: none;
  letter-spacing: 0.5px;
  margin: 16px 0 8px;
}

.location-btn:hover {
  background: var(--brown-sugar);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(166, 137, 110, 0.4);
}

/* Секции */
.section {
  margin-bottom: 60px;
  width: 100%;
}

.section-title.script {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  text-align: center;
  margin: 0 0 24px;
}

/* Тайминг */
.section-timing {
  position: relative;
  background: var(--white-soft);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 25px -12px var(--brown-sugar);
  border: 1px solid var(--taupe-light);
  width: 100%;
}

.section-note.script {
  font-family: var(--font-script);
  font-size: 22px;
  font-weight: 500;
  color: var(--taupe);
  margin: -8px 0 32px 0;
  display: block;
  text-align: center;
  transform: rotate(-1deg);
}

.timeline-wrap {
  position: relative;
  padding: 8px 0;
}

.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.timeline-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--taupe-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-heart {
  color: var(--dusty-rose);
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.timeline-time {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--chocolate);
  min-width: 80px;
  flex-shrink: 0;
}

.timeline-desc {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-soft);
  flex: 1;
  text-align: left;
}

/* Дресс-код */
.section-dresscode {
  background: var(--white-soft);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 25px -12px var(--brown-sugar);
  border: 1px solid var(--taupe-light);
  width: 100%;
}

.section-dresscode .polaroid-straight {
  padding: 0;
  /* background: transparent; */
  box-shadow: none;
  margin-bottom: 0;
}

.section-dresscode .polaroid-img-wrap {
  /* border-radius: 16px; */
  /* border: 1px solid var(--taupe-light); */
  max-height: 300px;
}

.section-dresscode .location-address {
  font-size: 18px;
  color: var(--text-soft);
  padding: 24px 12px 12px;
  margin: 0;
  /* background: var(--cream); */
  /* border-radius: 0 0 20px 20px; */
  /* line-height: 1.6; */
}

/* Пожелания */
.section-wishes {
  background: var(--white-soft);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 25px -12px var(--brown-sugar);
  border: 1px solid var(--taupe-light);
  width: 100%;
}

.line-heart-sep {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.line-heart-sep .line {
  flex: 1;
  height: 1px;
  background: var(--taupe-light);
}

.line-heart-sep .heart {
  margin: 0;
  font-size: 20px;
  color: var(--dusty-rose);
}

.wishes-text {
  font-size: 18px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 36px;
  text-align: center;
  font-style: italic;
  padding: 0 12px;
}

.envelope-block {
  position: relative;
  background: var(--white-soft);
  border: 1px solid var(--taupe-light);
  border-radius: 20px;
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.8);
}

.envelope-icon {
  font-size: 4rem;
  color: var(--taupe);
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.7;
}

.envelope-watermark.script {
  font-family: var(--font-script);
  font-size: 18px;
  color: var(--taupe-light);
  position: absolute;
  bottom: 20px;
  right: 24px;
  margin: 0;
  opacity: 0.8;
  transform: rotate(-2deg);
}

/* Обратный отсчет */
.countdown-block {
  width: 100%;
  margin: 40px auto;
  padding: 36px 20px;
  text-align: center;
  background: var(--white-soft);
  border-radius: 24px;
  box-shadow: 0 10px 25px -12px var(--brown-sugar);
  border: 1px solid var(--taupe-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.countdown-title.script {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  margin: 0 0 32px;
  text-align: center;
  width: 100%;
}

.countdown {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch; /* растягиваем элементы по вертикали */
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* центрируем содержимое по вертикали */
  flex: 0 0 auto;
  min-width: 90px;
}

.countdown-value {
  font-family: var(--font-body);
  font-size: 40px;
  font-weight: 600;
  color: var(--dusty-rose);
  line-height: 1;
  background: var(--cream);
  border: 0.5px solid var(--taupe-light);
  padding: 16px 12px;
  border-radius: 16px;
  min-width: 100px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px; /* фиксированная высота для идеального выравнивания */
  box-sizing: border-box;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--taupe);
  margin-top: 12px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px; /* фиксированная высота для подписей */
}

/* Финальная фраза */
.closing-phrase.script {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  color: var(--chocolate);
  text-align: center;
  margin: 40px auto 20px;
  padding: 16px 48px;
  max-width: fit-content;
  line-height: 1.2;
  background: var(--cream);
}

@media (max-width: 900px) {
  .countdown-value {
    font-size: 36px;
    height: 75px;
    min-width: 90px;
    padding: 14px 10px;
  }
  
  .countdown-label {
    font-size: 15px;
    height: 22px;
  }
  
  .countdown-item {
    min-width: 80px;
  }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .calendar-weekdays.script {
    font-size: 18px;
    gap: 4px;
  }
  
  .calendar-grid {
    font-size: 16px;
    gap: 4px;
  }

  .countdown-block {
    padding: 28px 12px;
  }
  
  .countdown-title.script {
    font-size: 26px;
    margin-bottom: 24px;
  }
  
  .countdown {
    gap: 10px;
    justify-content: center;
  }
  
  .countdown-value {
    font-size: 30px;
    height: 65px;
    min-width: 75px;
    padding: 10px 8px;
  }
  
  .countdown-label {
    font-size: 14px;
    height: 20px;
    margin-top: 10px;
  }
  
  .countdown-item {
    min-width: 70px;
  }

  body {
    padding: 12px;
    font-size: 15px;
  }
  
  .page-wrap {
    max-width: 100%;
  }
  
  .card {
    padding: 24px 16px;
    margin-bottom: 24px;
  }
  
  .headline {
    font-size: 36px;
  }
  
  .quotes {
    margin-top: -30px;
    gap: 10px;
  }
  
  .quote {
    font-size: 18px;
  }
  
  .polaroid-img-wrap {
    width: 150px;
    height: 150px;
  }
  
  .polaroid-name.script {
    font-size: 24px;
  }
  
  .wedding-date {
    font-size: 30px;
  }
  
  .calendar-month.script {
    font-size: 30px;
  }
  
  .calendar-weekdays.script {
    font-size: 18px;
  }
  
  .calendar-grid {
    font-size: 16px;
    gap: 4px;
  }
  
  .calendar-grid span.wedding-day {
    width: 32px;
    height: 32px;
  }
  
  .save-the-date.script {
    font-size: 18px;
    bottom: 16px;
    right: 16px;
  }
  
  .location-title.script {
    font-size: 32px;
  }
  
  .polaroid-straight .location-address {
    font-size: 16px;
  }
  
  .section-title.script {
    font-size: 32px;
  }
  
  .section-timing {
    padding: 24px 16px;
  }
  
  .section-note.script {
    font-size: 20px;
  }
  
  .timeline-item {
    gap: 12px;
  }
  
  .timeline-time {
    font-size: 18px;
    min-width: 70px;
  }
  
  .timeline-desc {
    font-size: 16px;
  }
  
  .section-dresscode {
    padding: 24px 16px;
  }
  
  .section-dresscode .location-address {
    font-size: 16px;
  }
  
  .section-wishes {
    padding: 24px 16px;
  }
  
  .wishes-text {
    font-size: 16px;
  }
  
  .envelope-icon {
    font-size: 3.5rem;
  }
  
  .countdown-title.script {
    font-size: 26px;
  }
  
  .countdown-value {
    font-size: 30px;
    padding: 8px 12px;
    min-width: 70px;
  }
  
  .closing-phrase.script {
    font-size: 36px;
    padding: 12px 32px;
  }
}

@media (max-width: 480px) {
  .calendar-weekdays.script {
    font-size: 16px;
  }
  
  .calendar-grid {
    font-size: 15px;
  }

  .countdown {
    gap: 6px;
  }
  
  .countdown-value {
    font-size: 26px;
    height: 60px;
    min-width: 65px;
    padding: 8px 6px;
  }
  
  .countdown-label {
    font-size: 12px;
    height: 18px;
    margin-top: 8px;
  }
  
  .countdown-item {
    min-width: 60px;
  }

  .headline {
    font-size: 32px;
  }
  
  .quote {
    font-size: 16px;
  }
  
  .polaroid-img-wrap {
    width: 130px;
    height: 130px;
  }
  
  .polaroid-name.script {
    font-size: 22px;
  }
  
  .timeline-time {
    font-size: 16px;
    min-width: 60px;
  }
  
  .countdown-item {
    min-width: 70px;
  }
  
  .countdown-value {
    font-size: 26px;
  }
  
  .closing-phrase.script {
    font-size: 30px;
    padding: 10px 24px;
  }

  @media (max-width: 360px) {
    .countdown {
      gap: 4px;
    }
    
    .countdown-value {
      font-size: 22px;
      height: 55px;
      min-width: 55px;
      padding: 6px 4px;
    }
    
    .countdown-label {
      font-size: 11px;
      height: 16px;
    }
    
    .countdown-item {
      min-width: 50px;
    }
  }
}

/* Утилиты */
.script {
  font-family: var(--font-script);
}