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

:root {
  --olive: #7a8465;
  --olive-dark: #5e6650;
  --olive-light: #939e7e;
  --cream: #f5f0e8;
  --cream-dark: #ebe5d8;
  --gold: #c9a96e;
  --text-dark: #3d3d3d;
  --text-medium: #5a5a5a;
  --text-light: #999;
  --white: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--olive);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heartbeat {
  0%, 100% { transform: translate(-50%, -46%) scale(1); }
  14% { transform: translate(-50%, -46%) scale(1.12); }
  28% { transform: translate(-50%, -46%) scale(1); }
  42% { transform: translate(-50%, -46%) scale(1.12); }
  70% { transform: translate(-50%, -46%) scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== WRAPPER ===== */
.invitation-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

/* ===== BLOCKS ===== */
.block {
  background: var(--cream);
  padding: 60px 45px;
  text-align: center;
}



/* ===== SECTION TITLES ===== */
.block-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 24px;
}


/* ===== HERO / PHOTO BLOCK ===== */
.hero-block {
  position: relative;
  padding: 0;
  min-height: 570px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-block .hero-bg-wrapper {
  position: absolute;
  top: -15%; left: 0;
  width: 100%;
  height: 130%;
  will-change: transform;
}

.hero-block .hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 10s ease-out forwards;
}

@keyframes heroZoom {
  0% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.hero-block .hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 30px 30px 45px;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.65) 100%);
  text-align: center;
}

.hero-block .save-the-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 9px;
}

.hero-block .couple-names {
  font-family: 'Cormorant SC', serif;
  font-size: 38px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* ===== DEAR GUESTS ===== */
.guests-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  line-height: 1.9;
  color: var(--text-medium);
  font-style: italic;
}

/* ===== ORNAMENT ===== */
.ornament-border {
  width: 100%;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='20' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 Q25,0 50,10 Q75,20 100,10 Q125,0 150,10 Q175,20 200,10' fill='none' stroke='%23c9a96e' stroke-width='0.8' opacity='0.4'/%3E%3C/svg%3E") repeat-x center;
  opacity: 0.5;
  margin: 10px 0;
}

.ornament-line {
  display: block;
  width: 75px;
  height: 2px;
  background: var(--gold);
  margin: 18px auto;
  opacity: 0.6;
}

/* ===== FLOWER ===== */
.flower-block {
  padding: 0;
  overflow: hidden;
}

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

/* ===== CALENDAR ===== */
.calendar-block .month-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.calendar-block .year-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  letter-spacing: 4px;
  color: var(--text-light);
  margin-bottom: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  max-width: 420px;
  margin: 0 auto;
}

.cal-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 0;
  text-align: center;
}

.cal-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  color: var(--text-medium);
  padding: 6px 0;
  text-align: center;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cal-day.empty { visibility: hidden; }

.cal-day.highlight {
  background: none;
  color: var(--white);
  font-weight: 700;
  font-size: 22px;
  z-index: 1;
}

.cal-day.highlight::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 51px;
  height: 48px;
  transform: translate(-50%, -46%);
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237a8465'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: heartbeat 2.5s ease-in-out infinite;
}

/* ===== COUNTDOWN ===== */
.countdown-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 21px;
}

.cd-item { text-align: center; }

.cd-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 39px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1;
}

.cd-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-top: 3px;
}

/* ===== PROGRAM / TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.timeline-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

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

.timeline-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 39px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.timeline-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* ===== DRESSCODE ===== */
.dresscode-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  line-height: 1.8;
  color: var(--text-medium);
  font-style: italic;
  margin-bottom: 30px;
}

.color-palette {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.color-swatch {
  width: 57px;
  height: 27px;
  border-radius: 1px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}

.color-swatch:hover {
  transform: scaleY(1.4);
}

/* ===== VENUE ===== */
.venue-block {
  padding: 60px 0 30px;
}

.venue-block .block-title {
  padding: 0 30px;
}

.venue-block .ornament-line {
  margin-bottom: 20px;
}

.venue-photo-wrap {
  position: relative;
  overflow: hidden;
}

.venue-photo-wrap img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.venue-photo-wrap:hover img {
  transform: scale(1.04);
}

.venue-photo-wrap .venue-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  text-align: center;
}

.venue-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.1;
}

.venue-address {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 300;
  opacity: 0.85;
  margin-top: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 0 45px;
  color: var(--olive-dark);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-style: italic;
  transition: color 0.3s ease;
}

.map-link:hover { color: var(--gold); }

/* ===== DETAILS ===== */
.details-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  line-height: 1.8;
  color: var(--text-medium);
  font-style: italic;
}

.details-text strong {
  color: var(--text-dark);
  font-weight: 600;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--olive-dark);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 19px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.phone-link:hover { color: var(--gold); }

.phone-link svg {
  width: 21px;
  height: 21px;
}

/* ===== FOOTER ===== */
.footer-block {
  background: var(--olive-dark);
  text-align: center;
  padding: 45px 30px;
  color: rgba(255,255,255,0.5);
}

.footer-block .footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  line-height: 1;
}

.footer-block .footer-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  letter-spacing: 4px;
}

.footer-block .heart {
  color: var(--gold);
  font-size: 24px;
  display: inline-block;
  margin: 9px 0;
}

/* ===== RSVP BUTTON ===== */
.rsvp-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 15px 42px;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.rsvp-btn:hover {
  background: var(--olive-dark);
  transform: translateY(-1px);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--cream);
  max-width: 700px;
  width: 100%;
  padding: 54px 45px 40px;
  border-radius: 3px;
  text-align: center;
  transform: translateY(30px);
  transition: transform 0.4s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  display: block;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  font-size: 36px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal .modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 9px;
}

.modal .modal-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 36px;
}

.yandex-form-container {
  width: 100%;
  margin-top: 20px;
  overflow: hidden;
  flex-grow: 1;
}

.yandex-form-container iframe {
  border: none;
  background: transparent;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .block {
    padding: 32px 22px;
  }

  .hero-block {
    min-height: 320px;
  }

  .hero-block .save-the-date {
    font-size: 30px;
  }

  .block-title {
    font-size: 28px;
  }

  .timeline-time {
    font-size: 22px;
  }

  .cd-number {
    font-size: 22px;
  }

  .color-swatch {
    width: 32px;
    height: 15px;
  }

  .venue-block {
    padding: 32px 0 16px;
  }

  .venue-block .block-title {
    padding: 0 22px;
  }

  .map-link {
    padding: 0 22px;
  }

  .modal {
    padding: 28px 22px;
  }
}
