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

:root {
  --text: #ffffff;
  --overlay-color: rgba(0, 0, 0, 0.52);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: #111;
  direction: ltr;
}

/* ── Fixed background shared by intro + pager ── */
.pager-bg, .pager-bg2 {
  position: fixed;
  inset: -5%;
  background: center center / cover no-repeat;
  will-change: transform;   /* GPU layer — keeps opacity changes from disturbing the animation */
  animation: kenburns 20s ease-in-out infinite alternate;
}
.pager-bg {
  background-image: url("hug.jpg");
  z-index: 0;
}
.pager-bg2 {
  z-index: 1;               /* sits above bgA */
  opacity: 0;
  /* transition set dynamically in JS to allow abort */
}

/* Gentle scale drift only — no translate, stays perfectly sharp */
@keyframes kenburns {
  0%   { transform: scale(1.00); }
  100% { transform: scale(1.05); }
}

.pager-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-color);
  z-index: 2;   /* above both .pager-bg (0) and .pager-bg2 (1) */
}

/* ── Intro screen ── */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.5s ease;
}
.intro-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.beloved-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 6vw, 4rem);
  color: white;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  line-height: 1.3;
  visibility: hidden;
  max-width: 80vw;
}

/* ── Shared outlined button style ── */
.outline-btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  backdrop-filter: blur(4px);
}
.outline-btn:active { transform: scale(0.96); background: rgba(255,255,255,0.1); }
.outline-btn:hover { background: rgba(255,255,255,0.08); border-color: white; }

/* Map buttons full width */
a.outline-btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* Submit button full width */
.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
}
.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Pager ── */
.pager {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: row;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.pager::-webkit-scrollbar { display: none; }
.pager.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Slides ── */
.slide {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
}

.slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
  color: white;
}

/* ── Quote ── */
blockquote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  line-height: 1.6;
  color: white;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
#quoteAuthor {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.82em;
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  opacity: 0.7;
}

/* ── Hosts ── */
.hosts-label {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  opacity: 0.75;
  line-height: 1.8;
}
.body-text {
  font-size: clamp(0.88rem, 3vw, 1.05rem);
  line-height: 1.65;
  opacity: 0.9;
}
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
}

/* ── Names ── */
.couple-names {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}
.couple-names .name,
.couple-names .amp {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  color: white;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
  line-height: 1;
}
.wedding-date {
  font-size: clamp(0.88rem, 3.5vw, 1.15rem);
  font-weight: 500;
  opacity: 0.88;
}

/* ── Countdown ── */
.countdown {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.countdown .box {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}
.countdown .num {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 700;
  color: white;
  line-height: 1;
}
.countdown .lbl {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ── Headings ── */
h2 {
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 600;
  color: white;
}
h3 {
  font-size: clamp(1rem, 4vw, 1.45rem);
  font-weight: 600;
  color: white;
}

/* ── Gift ── */
.account-num {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

/* ── RSVP ── */
.rsvp-form-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.rsvp-form-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.35rem;
  text-align: left;
  opacity: 0.85;
}
[dir="rtl"] .rsvp-form-card label { text-align: right; }

.rsvp-form-card select {
  appearance: none;
  width: 100%;
  padding: 0.65rem 2rem 0.65rem 0.9rem;
  font-size: clamp(0.85rem, 3vw, 0.95rem);
  font-family: "Montserrat", sans-serif;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  background: rgba(255,255,255,0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 1rem;
  color: white;
  margin-bottom: 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}
.rsvp-form-card select option { color: #333; background: white; }
.rsvp-form-card select:focus { outline: none; border-color: white; }
.rsvp-form-card select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.rsvp-form-card select.single-guest { background-image: none; cursor: default; }
[dir="rtl"] .rsvp-form-card select {
  background-position: left 0.75rem center;
  padding: 0.65rem 0.9rem 0.65rem 2rem;
}

/* ── Dot indicators ── */
.pager-dots {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.45rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pager-dots.visible { opacity: 1; }
.pager-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.pager-dots .dot.active {
  background: white;
  transform: scale(1.5);
}

@media (min-width: 600px) {
  .slide { padding: 2.5rem 2rem 5rem; }
  .slide-content { max-width: 520px; }
}