@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Great+Vibes&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f5efe6;
}

.w-page {
  font-size: clamp(16px, 2.5vw, 18px);
  color: #4a3020;
  background: #f5efe6;
  padding: clamp(10px, 2vw, 20px) 0 48px;
  position: relative;
}

.letter-inner {
  background: #fefcf8;
  padding: clamp(24px, 5vw, 56px);
  width: min(95%, 1280px);
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

/* ----- ТЕКСТ И ЦВЕТА ----- */
.wine-box p,
.address-box p,
.rsvp-box input,
.rsvp-box select,
.rsvp-box textarea,
.countdown-label,
.cal-day-name,
.cal-day,
.invite-line,
.time-line,
.section-title,
.map-label,
.wish-sub {
  color: #4a3020 !important;
  font-size: clamp(16px, 2vw, 16px);
}

.hero p {
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.6;
  font-style: italic;
  font-weight: 300;
  margin: 5%;
  color: #4a3020;
}

.section {
  padding: clamp(20px, 4vw, 40px);
}

.section-title {
  font-size: clamp(13px, 1.8vw, 16px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #7a5a40;
  margin: 0 0 18px;
  text-align: center;
}

.zone-cream { background: #fefcf8; }
.zone-blush { background: #faf0ee; }
.zone-sage  { background: #f2f5f0; }
.zone-ivory { background: #fdf8ee; }
.zone-sand  { background: #f7f2e8; }

/* HERO */
.hero {
  text-align: center;
  padding: clamp(24px, 5vw, 44px) clamp(16px, 4vw, 40px) clamp(20px, 4vw, 40px);
}

.monogram-img {
  display: block;
  margin: 0 auto 8px;
  width: clamp(70%, 15vw, 30%);
  height: clamp(30%, 10vw, 20%);
  object-fit: contain;
  fill: #76220b;
}

.invite-line {
  font-size: clamp(10px, 1.5vw, 11px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #9b6e4c;
  margin: 6px 0 0;
}

.hero h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(36px, 7vw, 56px);
  color: #7a3520;
  font-weight: 400;
  margin: 20px 0 14px;
  line-height: 1.1;
}

.hero .date-big {
  font-size: clamp(20px, 4vw, 27px);
  letter-spacing: 4px;
  color: #7a3520;
  margin: 18px 0 5px;
  font-style: revert;
  margin-bottom: -8%;
}

.hero .time-line {
  font-size: clamp(14px, 2vw, 16px);
  letter-spacing: 4px;
  color: #c0a888;
}

/* COUNTDOWN */
.torn-wrap {
  position: relative;
  margin: 0 calc(-1 * clamp(16px, 3vw, 40px));
  padding: 0 clamp(16px, 3vw, 40px);
}

.torn-top, .torn-bottom {
  display: block;
  width: 100%;
  height: 22px;
  position: relative;
  z-index: 2;
}

.torn-inner {
  background: #fff8f0;
  padding: clamp(16px, 3vw, 28px) 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 18px rgba(160, 100, 60, 0.08);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 10px;
}

.countdown-cell {
  text-align: center;
}

.countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 300;
  color: #7a3520;
  line-height: 1;
  display: block;
}

.countdown-label {
  font-size: clamp(9px, 1.5vw, 11px);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-top: 5px;
}

/* ----- КАЛЕНДАРЬ ----- */
.calendar-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(160, 120, 80, 0.12);
  width: min(100%, 500px);
  margin: 0 auto;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-day-name {
  text-align: center;
  font-size: clamp(10px, 1.5vw, 14px);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: clamp(4px, 1vw, 7px) 2px clamp(3px, 0.8vw, 5px);
  border-bottom: 1px solid rgba(160, 120, 80, 0.07);
}

.cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(50px, 12vw, 100px);
  text-align: center;
  font-size: clamp(12px, 2.5vw, 15px);
  font-weight: 300;
  position: relative;
}

.cal-day.empty {
  color: transparent;
}

.cal-day.heart-date {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-symbol {
  font-size: clamp(50px, 15vw, 100px);
  color: #bc0000;
  line-height: 1;
  font-family: 'Times New Roman', 'Georgia', serif;
  display: inline-block;
}

.heart-number {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: clamp(18px, 5vw, 27px);
  font-weight: bold;
  font-family: 'Cormorant Garamond', serif;
  text-shadow: 0 0 2px rgba(0,0,0,0.3);
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
  padding: 0;
}

/* ----- КАРТА ----- */
.map-box {
  width: 100%;
  height: clamp(120px, 25vw, 160px);
  background: #e8e2d8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s;
  border: none;
}

.map-box:hover {
  opacity: 0.88;
}

.map-grid {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: linear-gradient(rgba(100, 70, 40, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 70, 40, 1) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-pin {
  font-size: clamp(20px, 5vw, 26px);
  position: relative;
  z-index: 1;
}

.map-label {
  position: relative;
  z-index: 1;
  font-size: clamp(11px, 2vw, 13px);
  letter-spacing: 3px;
}

.address-box {
  background: rgba(160, 120, 80, 0.05);
  border-radius: 0 0 16px 16px;
  padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 20px);
  text-align: center;
  border: 1px solid rgba(160, 120, 80, 0.1);
  border-top: none;
}

.address-box .venue {
  font-size: clamp(14px, 2.5vw, 15px);
  font-weight: 500;
  color: #7a3520;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.address-box p {
  font-size: clamp(14px, 2vw, 15px);
  line-height: 1.75;
  font-style: italic;
  font-weight: 300;
}

.time-note {
  font-size: clamp(14px, 2vw, 13px);
  color: #c0a888;
}

/* ВИНО */
.wine-box {
  border-radius: 16px;
  border: 1px solid rgba(160, 120, 80, 0.12);
  padding: clamp(16px, 3vw, 28px);
  text-align: center;
}

.wine-box h3 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(24px, 6vw, 32px);
  color: #7a3520;
  font-weight: 400;
  margin: 0 0 12px;
}

.wine-box p {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.85;
  font-style: italic;
  font-weight: 300;
}

/* КАРУСЕЛЬ */
.carousel-outer {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #fff8f4;
  border: 1px solid rgba(200, 140, 100, 0.15);
  padding: clamp(10px, 2vw, 20px) 0;   /* только вертикальные отступы для стрелок */
}

.carousel-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  text-align: center;
  padding: clamp(20px, 4vw, 36px) clamp(20px, 5vw, 48px) clamp(16px, 3vw, 28px);
  box-sizing: border-box;
  overflow: hidden;   /* на всякий случай */
}

.wish-icon {
  font-size: clamp(20px, 5vw, 26px);
  margin-bottom: 10px;
  opacity: 0.7;
}

.wish-text {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(22px, 6vw, 32px);
  color: #7a3520;
  line-height: 1.3;
  margin-bottom: 6px;
}

.wish-sub {
  font-size: clamp(14px, 2.5vw, 15px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(160, 120, 80, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: #7a3520;
  width: 20px;
  border-radius: 4px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(122, 53, 32, 0.08);
  border: none;
  border-radius: 50%;
  width: clamp(28px, 6vw, 34px);
  height: clamp(28px, 6vw, 34px);
  cursor: pointer;
  font-size: clamp(16px, 4vw, 20px);
  color: #7a3520;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.carousel-nav:hover {
  background: rgba(122, 53, 32, 0.16);
}

.carousel-prev {
  left: clamp(4px, 1.5vw, 8px);
}

.carousel-next {
  right: clamp(4px, 1.5vw, 8px);
}

.wish-icon {
  font-size: clamp(20px, 5vw, 26px);
  margin-bottom: 10px;
  opacity: 0.7;
}

.wish-text {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(22px, 6vw, 32px);
  color: #7a3520;
  line-height: 1.3;
  margin-bottom: 6px;
}

.wish-sub {
  font-size: clamp(14px, 2.5vw, 15px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(160, 120, 80, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: #7a3520;
  width: 20px;
  border-radius: 4px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(122, 53, 32, 0.08);
  border: none;
  border-radius: 50%;
  width: clamp(28px, 6vw, 34px);
  height: clamp(28px, 6vw, 34px);
  cursor: pointer;
  font-size: clamp(16px, 4vw, 20px);
  color: #7a3520;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.carousel-nav:hover {
  background: rgba(122, 53, 32, 0.16);
}

.carousel-prev {
  left: clamp(4px, 1.5vw, 8px);
}

.carousel-next {
  right: clamp(4px, 1.5vw, 8px);
}

/* RSVP */
.rsvp-box {
  border-radius: 16px;
  border: 1px solid rgba(160, 120, 80, 0.13);
  padding: clamp(16px, 3vw, 28px);
  max-width: 500px;
  margin: 0 auto;
}

.rsvp-box input,
.rsvp-box select,
.rsvp-box textarea {
  width: 100%;
  background: #fefcf8 !important;
  border: 1px solid rgba(160, 120, 80, 0.18) !important;
  border-radius: 10px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: clamp(14px, 2vw, 16px) !important;
  color: #5a4030 !important;
  padding: clamp(10px, 2vw, 14px) !important;
  margin-bottom: 12px;
  outline: none;
  -webkit-appearance: none;
}

.rsvp-box input::placeholder,
.rsvp-box textarea::placeholder {
  color: #c8b090 !important;
  font-style: italic;
}

.rsvp-box select {
  appearance: none;
  cursor: pointer;
}

.rsvp-box textarea {
  resize: vertical;
  min-height: 72px;
}

.btn-rsvp {
  width: 100%;
  background: #7a3520 !important;
  color: #fefcf8 !important;
  border: none !important;
  padding: clamp(12px, 2.5vw, 14px) !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: clamp(12px, 2vw, 14px) !important;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 12px !important;
  transition: opacity 0.2s;
}

.btn-rsvp:hover {
  opacity: 0.82;
}

.btn-rsvp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-msg {
  display: none;
  text-align: center;
  padding: 20px;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(24px, 5vw, 28px);
  color: #7a3520;
}

.error-msg {
  color: #b4443c;
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  display: none;
}

.footer-text {
  text-align: center;
  padding: clamp(20px, 4vw, 32px) 0 8px;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(20px, 4vw, 26px);
  color: #c0a888;
}

/* На малых экранах скрываем стрелки карусели */
@media (max-width: 480px) {
  .carousel-nav {
    display: none;
  }
  .hero .date-big {
    margin-bottom: -4%;
  }
}

/* ГОСТИ */
#guests-block {
  margin-bottom: 12px;
}

.guest-card {
  background: #fefcf8;
  border: 1px solid rgba(160, 120, 80, 0.15);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 16px);
  margin-bottom: 12px;
  position: relative;
}

.guest-card .remove-guest {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  color: #b8a080;
  cursor: pointer;
  line-height: 1;
}

.guest-card .remove-guest:hover {
  color: #7a3520;
}

.guest-card input,
.guest-card select {
  width: 100%;
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 16px);
  padding: 10px 14px;
  border: 1px solid rgba(160, 120, 80, 0.18);
  border-radius: 10px;
  background: #fefcf8;
  color: #5a4030;
  outline: none;
}

.btn-add-guest {
  width: 100%;
  background: transparent;
  border: 1px dashed #7a3520;
  color: #7a3520;
  padding: 10px;
  border-radius: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 16px);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add-guest:hover {
  background: rgba(122, 53, 32, 0.05);
}
/* Группа чекбоксов напитков */
.guest-drinks-group {
  margin: 8px 0;
}

.guest-drinks-group .field-label {
  display: block;
  font-size: clamp(13px, 2vw, 15px);
  color: #5a4030;
  margin-bottom: 6px;
  font-style: italic;
}

.guest-drinks-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
  margin-bottom: 4px;
  font-size: clamp(13px, 2vw, 15px);
  color: #4a3020;
  cursor: pointer;
}
/* Убираем видимость соседних слайдов */
.carousel-slide {
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.carousel-outer {
  -webkit-overflow-scrolling: touch;
}

.photo-slide {
  min-width: 100%;
  text-align: center;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;      /* ← картинка и подпись друг под другом */
  align-items: center;
  justify-content: center;
  max-height: 60vh;            /* ограничение высоты, если нужно */
}

.photo-slide img {
  max-width: 100%;
  max-height: 55vh;            /* чуть меньше, чтобы осталось место для подписи */
  object-fit: contain;         /* или cover – на ваш вкус */
  border-radius: 12px;
  display: block;
}

.photo-caption {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(13px, 2vw, 16px);
  color: #7a3520;
  margin-top: 12px;
  font-style: italic;
  text-align: center;
}

/* Кнопка музыки */
.music-toggle {
  position: fixed;            /* всегда на экране */
  bottom: clamp(16px, 5vw, 30px);
  right: clamp(16px, 5vw, 30px);
  z-index: 9999;              /* поверх всего */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fefcf8;
  border: 1px solid rgba(160, 120, 80, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.music-toggle:hover {
  opacity: 0.85;
}

/* ---------- ПРЕЛОАДЕР ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: #fefcf8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
}

.preloader-monogram {
  width: min(30vw, 160px);
  height: auto;
  margin-bottom: 24px;
  animation: shimmer 2s infinite ease-in-out;
  filter: drop-shadow(0 0 12px rgba(122, 53, 32, 0.3));
}

/* Перелив света по монограмме */
@keyframes shimmer {
  0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 12px rgba(122, 53, 32, 0.3)); }
  50% { opacity: 1; filter: drop-shadow(0 0 24px rgba(122, 53, 32, 0.6)); }
}

.preloader-bar {
  width: min(60vw, 260px);
  height: 4px;
  background: rgba(122, 53, 32, 0.1);
  border-radius: 2px;
  margin: 0 auto 16px;
  overflow: hidden;
}

.preloader-progress {
  height: 100%;
  width: 0%;
  background: #7a3520;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.preloader-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: #7a3520;
  font-style: italic;
  letter-spacing: 1px;
}

.dead-line {
  text-align: center;
  font-size: clamp(14px, 2vw, 13px);
  color: #c0a888;
  line-height: 1.75;
  font-style: italic;
  font-weight: 300;
}