/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream, #FFF8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__inner {
  text-align: center;
}

.preloader__rings {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  height: 80px;
}

.preloader__ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 5px solid #F4C2C2;
  position: absolute;
  animation: ring-swing 1.6s ease-in-out infinite;
}

.preloader__ring--left  { left: calc(50% - 44px); animation-delay: 0s; border-color: #F4C2C2; }
.preloader__ring--right { left: calc(50% - 20px); animation-delay: 0.15s; border-color: #B2C9AD; }

@keyframes ring-swing {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.preloader__names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-style: italic;
  color: #7a5c4e;
  margin-bottom: 0.4rem;
}

.preloader__names span { color: #F4C2C2; }

.preloader__date {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #B2C9AD;
  text-transform: uppercase;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:    #F4C2C2;
  --pink-dk: #e8a0a0;
  --cream:   #FFF8F0;
  --sage:    #B2C9AD;
  --sage-dk: #8faa8a;
  --brown:   #7a5c4e;
  --brown-dk:#5c3d35;
  --text:    #4a3a30;
  --radius:  16px;
}

html { scroll-behavior: smooth; }

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; }

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--brown);
  text-align: center;
  margin-bottom: 2rem;
  font-style: italic;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 2.4rem;
  border-radius: 50px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--pink);
  color: var(--brown-dk);
}
.btn--primary:hover { background: var(--pink-dk); }

.btn--secondary {
  background: transparent;
  color: var(--sage-dk);
  border: 2px solid var(--sage);
}
.btn--secondary:hover { background: var(--sage); color: #fff; }

.btn--full { width: 100%; text-align: center; }
.btn--sm { padding: 0.6rem 1.4rem; font-size: 0.85rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at top left, #fce4ec 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, #e8f5e9 0%, transparent 60%),
    var(--cream);
  overflow: hidden;
}

/* Video background */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.28;
}

/* Dark/light overlay so text stays readable over video */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,248,240,0.55) 0%,
    rgba(255,248,240,0.35) 50%,
    rgba(255,248,240,0.55) 100%
  );
  z-index: 0;
}

.hero__flowers {
  position: absolute;
  top: 0; bottom: 0;
  width: 280px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.18;
  pointer-events: none;
}
.hero__flowers--left  { left: -60px;  background-image: url('/static/images/flowers-left.svg'); background-position: left center; z-index: 1; }
.hero__flowers--right { right: -60px; background-image: url('/static/images/flowers-right.svg'); background-position: right center; transform: scaleX(-1); z-index: 1; }

.hero__content { position: relative; z-index: 2; max-width: 680px; }

.hero__pre {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dk);
  margin-bottom: 1.2rem;
}

.hero__names {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-style: italic;
  color: var(--brown);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero__ampersand {
  color: var(--pink-dk);
  font-size: 0.85em;
}

.hero__date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--sage-dk);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero__divider {
  font-size: 1.5rem;
  color: var(--pink-dk);
  margin: 1rem 0;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.12); opacity: 0.75; }
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--brown);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-style: italic;
}

/* ===== COUNTDOWN ===== */
.countdown {
  background: linear-gradient(135deg, var(--pink) 0%, #fde8e8 100%);
  padding: 4rem 2rem;
  text-align: center;
}

.countdown__label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--brown);
  margin-bottom: 2rem;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 600;
  color: var(--brown-dk);
  line-height: 1;
}

.countdown__unit {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
  margin-top: 0.4rem;
}

.countdown__sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: var(--brown);
  padding-bottom: 1rem;
}

/* ===== FLORAL DIVIDER ===== */
.floral-divider {
  text-align: center;
  font-size: 1.8rem;
  color: var(--pink-dk);
  padding: 1.5rem 0;
  letter-spacing: 1rem;
  opacity: 0.6;
}

/* ===== STORY ===== */
.story {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.story__text {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text);
  font-style: italic;
}

.story__hearts {
  font-size: 2rem;
  margin-top: 1.5rem;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 2rem 0 4rem;
  overflow: hidden;
}

.gallery__carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
  perspective: 1000px;
}

.gallery__slide {
  position: absolute;
  width: 320px;
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery__slide--active {
  transform: translateX(0) scale(1);
  z-index: 3;
  filter: none;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.gallery__slide--prev {
  transform: translateX(-280px) scale(0.78);
  z-index: 2;
  filter: blur(3px) brightness(0.75);
}

.gallery__slide--next {
  transform: translateX(280px) scale(0.78);
  z-index: 2;
  filter: blur(3px) brightness(0.75);
}

.gallery__slide--hidden {
  transform: translateX(0) scale(0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.gallery__dot--active {
  background: var(--pink-dk);
  transform: scale(1.3);
}


/* ===== SCHEDULE ===== */
.schedule {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.schedule__list { display: flex; flex-direction: column; align-items: flex-start; }

.schedule__item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  width: 100%;
}

.schedule__icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
}

.schedule__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0;
}

.schedule__time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brown);
}

.schedule__event {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.schedule__place {
  font-size: 0.85rem;
  color: #999;
}

.schedule__calendar {
  text-align: center;
  margin-top: 2.5rem;
}

.schedule__calendar-label {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.9rem;
  letter-spacing: 0.05em;
}

.schedule__calendar-btns {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.schedule__connector {
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--pink), var(--sage));
  margin-left: 1.45rem;
  margin: 0.3rem 0 0.3rem 1.45rem;
}

/* ===== LOCATION ===== */
.location {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.location__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.location__address {
  color: #888;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.location__photo {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  /* Fallback gradient when image not loaded */
  background: linear-gradient(135deg, #e8d5c4 0%, #c9b8a8 100%);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location__photo img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.location__map {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* ===== RSVP ===== */
.rsvp {
  max-width: 560px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.rsvp__subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.rsvp__form {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--brown);
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group textarea {
  border: 1.5px solid #e8e0d8;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  border-color: var(--pink-dk);
  box-shadow: 0 0 0 3px rgba(244,194,194,0.3);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1.5px solid #e8e0d8;
  background: var(--cream);
  transition: border-color 0.2s, background 0.2s;
}

.radio-label:has(input:checked) {
  border-color: var(--pink-dk);
  background: #fef0f0;
}

.radio-label input { accent-color: var(--pink-dk); width: 1.1rem; height: 1.1rem; }

/* ===== CONTACTS ===== */
.contacts {
  max-width: 480px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.contacts__text {
  color: #888;
  font-size: 1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.contacts__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.contacts__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border: 1.5px solid var(--pink);
  border-radius: 50px;
  text-decoration: none;
  color: var(--brown);
  font-size: 1.05rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.contacts__item:hover {
  background: #fef0f0;
  transform: translateY(-2px);
}

.contacts__icon { font-size: 1.3rem; }

.contacts__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--brown);
  margin-top: 0.5rem;
}

/* ===== THANK YOU ===== */
.thank-you {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at top left, #fce4ec 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, #e8f5e9 0%, transparent 60%),
    var(--cream);
}

.thank-you__card {
  background: #fff;
  border-radius: var(--radius);
  padding: 3.5rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.thank-you__icon { font-size: 4rem; margin-bottom: 1rem; }

.thank-you__title {
  font-size: 2.5rem;
  color: var(--brown);
  font-style: italic;
  margin-bottom: 1.2rem;
}

.thank-you__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--brown);
  color: #f5ddd5;
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
}

.footer__quote,
.footer__quote:visited,
.footer__quote:active {
  display: block;
  font-size: 0.8rem;
  font-family: 'Raleway', sans-serif;
  color: #f5ddd5;
  opacity: 0.55;
  font-style: italic;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer__quote:hover { opacity: 0.9; color: #f5ddd5; text-decoration: underline; }

.footer__date {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  /* Hero */
  .hero__flowers { display: none; }
  .hero { padding: 1.5rem 1rem; }
  .hero__pre { font-size: 0.78rem; letter-spacing: 0.12em; }
  .hero__subtitle { font-size: 0.95rem; }

  /* Countdown */
  .countdown { padding: 2.5rem 1rem; }
  .countdown__grid { gap: 0.2rem; }
  .countdown__item { min-width: 60px; }
  .countdown__num { font-size: clamp(2.2rem, 9vw, 3.5rem); }
  .countdown__unit { font-size: 0.65rem; }
  .countdown__sep { font-size: 1.8rem; padding-bottom: 0.8rem; }

  /* Story */
  .story { padding: 2.5rem 1.2rem; }
  .story__text { font-size: 1rem; }

  /* Schedule */
  .schedule { padding: 2.5rem 1.2rem; }
  .schedule__icon { font-size: 1.6rem; width: 2.4rem; }
  .schedule__time { font-size: 1.25rem; }
  .schedule__connector { margin-left: 1.1rem; height: 1.8rem; }
  .schedule__calendar { margin-top: 2rem; }
  .schedule__calendar-btns {
    flex-direction: row;
    gap: 0.6rem;
  }
  .schedule__calendar-btns .btn--sm {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Gallery */
  .gallery__carousel { height: 300px; }
  .gallery__slide { width: 220px; height: 260px; }
  .gallery__slide--prev { transform: translateX(-180px) scale(0.78); }
  .gallery__slide--next { transform: translateX(180px) scale(0.78); }

  /* Location */
  .location { padding: 2.5rem 1.2rem; }
  .location__name { font-size: 1.4rem; }
  .location__photo img { height: 220px; }

  /* RSVP */
  .rsvp { padding: 2.5rem 1rem; }
  .rsvp__form { padding: 1.5rem 1.2rem; }
  .radio-label { padding: 0.55rem 0.8rem; font-size: 0.9rem; }

  /* Contacts */
  .contacts { padding: 2.5rem 1.2rem; }
  .contacts__item { font-size: 0.95rem; padding: 0.85rem 1rem; }

  /* Preloader */
  .preloader__names { font-size: 1.8rem; }
  .preloader__ring { width: 48px; height: 48px; }
  .preloader__ring--left  { left: calc(50% - 38px); }
  .preloader__ring--right { left: calc(50% - 16px); }
}