/* --------------------------------------------- */
/* CURTAIN REVEAL */
/* --------------------------------------------- */

#curtainLeft, #curtainRight {
  position: fixed;
  top: 0;
  width: 50%;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transition: transform 1.4s ease-in-out;
}

/* Input wrapper and validation tooltip */
.input-wrapper{position:relative;display:block}
.input-wrapper .field-tooltip{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  background:linear-gradient(90deg,#ffeee6,#fff6f0);
  color:#7a2b2b;
  border-radius:6px;
  padding:6px 8px;
  font-size:13px;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  white-space:nowrap;
  display:none;
  z-index:30;
}
.input-wrapper.invalid .field-tooltip{display:block}

/* Date wrapper - make the whole wrapper clickable and slightly larger touch target */
.date-wrapper input[type="date"]{
  cursor:pointer;
}

/* Modern-ish date input styling fallback */
input[type="date"], input[type="text"], textarea{
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

/* RSVP specific inputs */
.rsvp-input, .rsvp-textarea {
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#10211a;
  font-family:inherit;
}

/* placeholder styling for subtle grey helper text */
.rsvp-input::placeholder, .rsvp-textarea::placeholder, input::placeholder, textarea::placeholder {
  color: #9ea9a1;
  opacity:1;
}

/* ensure textarea height and resize behaviour similar to inputs */
.rsvp-textarea{ min-height:90px; resize:vertical; }

/* small responsive tweak for tooltips */
@media (max-width:600px){
  .input-wrapper .field-tooltip{right:6px;font-size:12px;padding:6px 6px}
}

/* flatpickr theming overrides to match site palette */
.flatpickr-calendar {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}
.flatpickr-months .flatpickr-month {
  background: linear-gradient(90deg,#f7faf7,#f1f7f3);
  color: #073b2f; /* dark green for headers */
}
.flatpickr-weekday { color: #2f6b5a; }
.flatpickr-day {
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}
/* Hovered day - pastel green */
.flatpickr-day:hover:not(.flatpickr-disabled){
  background: #dff3e9; /* pastel green */
  color: #0b3f2e;
  transform: translateY(-2px);
}
/* Selected day - dark green with gold text */
.flatpickr-day.selected, .flatpickr-day.selected:focus {
  background: #064022 !important; /* dark green */
  color: #d4af37 !important; /* gold */
  box-shadow: 0 6px 18px rgba(6,64,34,0.18);
}
/* Today indicator subtle */
.flatpickr-day.today {
  box-shadow: inset 0 0 0 1px rgba(6,64,34,0.08);
}
/* Disabled days subdued */
.flatpickr-day.flatpickr-disabled{ color:#b7cbbf }


/* RSVP overlay + confetti */
.rsvp-overlay{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:2000;background:rgba(4,8,6,0.45);
}
.rsvp-overlay[aria-hidden="false"]{ display:flex }
.rsvp-overlay-inner{ background:linear-gradient(180deg,#fff,#fbfdfb);padding:28px;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,0.2);text-align:center;max-width:520px;width:90%;position:relative}
.rsvp-overlay-inner p{ font-size:18px;color:#073b2f;margin:0 0 12px }

/* confetti container - we'll inject small elements via JS */
.rsvp-confetti{ position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none;overflow:hidden }
.rsvp-confetti .confetto{ position:absolute;width:10px;height:16px;opacity:0;transform-origin:center;}

@keyframes confetti-fall{
  0%{ transform: translateY(-30vh) rotate(0deg); opacity:1 }
  100%{ transform: translateY(120vh) rotate(720deg); opacity:0.95 }
}

/* Spinner style */
.rsvp-spinner{ width:60px;height:60px;margin:8px auto 4px;display:block }
.spinner-circle{ width:100%;height:100%;border-radius:50%;border:6px solid rgba(255,255,255,0.08);border-top-color:#064022;animation:spin 1.8s linear infinite;box-shadow:0 6px 18px rgba(6,64,34,0.12) }
@keyframes spin{ to{ transform:rotate(360deg) } }


#curtainLeft {
  left: 0;
  transform: translateX(0);
}

#curtainRight {
  right: 0;
  transform: translateX(0);
}

body.reveal #curtainLeft {
  transform: translateX(-100%);
}

body.reveal #curtainRight {
  transform: translateX(100%);
}

/* --------------------------------------------- */
/* HERO SECTION */
/* --------------------------------------------- */

#heroSection {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#heroImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Name box */
#heroNames {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 248, 235, 0.55);
    padding: 18px 34px;
    border-radius: 12px;
    backdrop-filter: blur(4px);

    /* Inset gold border */
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.85);

    /* Fade-in animation */
    opacity: 0;
    animation: fadeInHero 1.4s ease-out forwards;
    animation-delay: 0.3s;
}


#heroNames h1 {
    margin: 0;
    font-family: "Alex Brush", cursive;

    /* Responsive font size: scales between 1.8rem and 3rem */
    font-size: clamp(1.8rem, 6vw, 3rem);

    color: #333;
    text-align: center;
    letter-spacing: 2px;
    white-space: nowrap; /* prevents wrapping */
}

.heart-divider {
    margin-top: 0px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.heart-divider svg {
    width: 100px;   /* adjust size here */
    height: auto;
}





/* Mobile adjustments */
@media (max-width: 640px) {
  #heroNames h1 {
    font-size: 2.8rem;
  }

  /* Shrink the nav bar padding slightly */
    #topNav {
        padding: 10px 0;
        width: 90%;
        left: 5%;
    }

    /* A & B brand tighter + smaller */
    .nav-brand {
        font-size: 0.95rem;
        letter-spacing: 0.1em; /* was 0.2em */
    }

    /* Nav inner layout stays horizontal but tighter */
    .nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* Links closer together */
    .nav-links {
        display: flex;
        gap: 16px; /* was 40px on desktop */
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    /* RSVP button fits neatly */
    .nav-rsvp-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
        border-radius: 6px;
        white-space: nowrap;
    }

    /* Ensure right side stays compact */
    .nav-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
}

/* --------------------------------------------- */
/* MODULE 2 — Scroll Reveal Invitation Text */
/* --------------------------------------------- */

#invitationSection {
    margin-top: 100px;
    padding: 20px 20px;
    text-align: center;
    background: #ffffff;
}

#invitationWrapper {
    display: inline-block;
    font-family: "Alice", serif;
    font-size: 1.8rem;
    line-height: 2.6rem;
    color: var(--text-dark);
    max-width: 600px;
}

.animated-words span {
  opacity: 0;
  transform: translateY(10px);
  display: inline-block;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animated-words.visible span {
  opacity: 1;
  transform: translateY(0);
}

.animated-words.visible span:nth-child(1) { transition-delay: 0.1s; }
.animated-words.visible span:nth-child(2) { transition-delay: 0.2s; }
.animated-words.visible span:nth-child(3) { transition-delay: 0.3s; }
.animated-words.visible span:nth-child(4) { transition-delay: 0.4s; }
.animated-words.visible span:nth-child(5) { transition-delay: 0.5s; }
.animated-words.visible span:nth-child(6) { transition-delay: 0.6s; }
.animated-words.visible span:nth-child(7) { transition-delay: 0.7s; }
.animated-words.visible span:nth-child(8) { transition-delay: 0.8s; }

.reveal-word {
    opacity: 0;
    display: inline-block;
    margin: 0 4px;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal-word.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-title {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.highlight {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--pastel-pink);
}


@keyframes fadeInHero {
    0% {
        opacity: 0;
        transform: translate(-50%, -45%); /* slight upward drift */
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}


/* --------------------------------------------- */
/* MODULE 6 — COUNTDOWN */
/* --------------------------------------------- */

.countdown-section {
  text-align: center;
  margin: 0px auto;
  padding: 60px 20px;
  border-radius: 0px;
  background: linear-gradient(to bottom, #F3F7FF 0%, #eefbf1 100%);
  animation: fadeIn 1.2s ease forwards;
  opacity: 0;
}

.countdown-heading {
  font-family: 'Alex Brush', cursive;
  font-size: 3rem;
  color: #000;
  margin-bottom: 6px;
}

.countdown-date {
  font-family: 'Alice', serif;
  font-size: 3.5rem;
  letter-spacing: 1px;
  margin-bottom: 14px;
  color: #333;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: nowrap; /* force single line */
}

.cd-box {
  background: rgba(255, 255, 255, 0.7);
  font-family: "Alice", serif;
  padding: 12px 6px;
  border-radius: 14px;
  min-width: 65px; /* narrower for mobile */
  border: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  animation: floatPulse 5s ease-in-out infinite;
  text-align: center;
}

.cd-box span {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: #000;
}

.cd-box small {
  font-size: 0.75rem;
  color: #555;
  letter-spacing: 0.5px;
}

.cd-box:nth-child(1) {
  box-shadow: 0 0 18px rgba(255, 235, 150, 0.6); /* yellow glow */
}

.cd-box:nth-child(2) {
  box-shadow: 0 0 18px rgba(180, 230, 180, 0.6); /* green glow */
}

.cd-box:nth-child(3) {
  box-shadow: 0 0 18px rgba(255, 190, 210, 0.6); /* pink glow */
}

.cd-box:nth-child(4) {
  box-shadow: 0 0 18px rgba(180, 210, 255, 0.6); /* blue glow */
}


.countdown-message {
  font-size: 1rem;
  font-family: "Alice", serif;
  color: #444;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 1.4s ease forwards 0.6s;
}

.countdown-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.divider-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: #ccc;
}

.divider-heart {
  font-size: 1.1rem;
  color: #000;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .cd-box {
    min-width: 70px;
    padding: 12px 8px;
  }

  .cd-box span {
    font-size: 1.4rem;
  }

  .cd-box small {
    font-size: 0.65rem;
  }

  .countdown-grid {
    gap: 12px;
  }
}

/* Animations */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/***********************/
/*     VENUE      */
/***********************/

.venue-section {
  max-width: 700px;
  background: linear-gradient(to bottom, #eefbf1 0%, #fffedd 100%);
  text-align: center;
  padding: 0 20px;
}

.venue-image-wrapper {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  margin-bottom: 30px;
}

.venue-image {
  width: 100%;
  height: auto;
  display: block;
}

.venue-title {
  font-family: 'Alice', serif;
  font-size: 1.8rem;
  margin-bottom: 6px;
  color: #000;
}

.venue-location {
    font-family: 'Alice', serif;
  font-size: 1rem;
  color: #555;
  margin-bottom: 0px;
  letter-spacing: 0.5px;
}

.venue-info p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #444;
}

/* Fade-in on scroll */
.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------- */
/* MODULE 6 — STORYLINE */
/* --------------------------------------------- */

.story-section {
  height: 320vh; /* reduced further so scrolling ends sooner */
  background: linear-gradient(to bottom, #FDF8F3, #F3F7FF);
  position: relative;
  padding-top: 0px;
  padding-bottom: 0px;
}

.story-sticky {
  position: sticky;
  top: 60px; /* leave space for the nav bar */
  height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* stack polaroids above description */
  gap: 10vh;
  overflow: hidden; /* contain absolutely positioned polaroids */
}

.polaroid-stack {
  position: relative;
  width: min(360px, 90vw);
  height: 420px;
  margin: 0 auto;
}

.polaroid {
  position: absolute !important;
  /* center each polaroid in the stack container */
  top: 55%;
  left: 50%;
  width: 320px;
  padding: 12px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translate(-50%, -50%) translateX(120px) rotate(3deg);
  transition: opacity 0.8s ease, transform 0.8s ease;
  cursor: pointer;
}

.polaroid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.polaroid-caption {
  font-family: 'Alex Brush', cursive;
  font-size: 2rem;
  text-align: center;
  margin-top: 10px;
}

/* Slight visibility of next polaroid */
.polaroid.behind {
  opacity: 0.25;
  transform: translate(-50%, -50%) scale(0.95) rotate(-2deg);
}

/* Active polaroid */
.polaroid.active {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0) rotate(2deg);
  z-index: 100;
}

/* Alternate directions */
.polaroid[data-index="1"],
.polaroid[data-index="3"],
.polaroid[data-index="5"] {
  transform: translate(-50%, -50%) translateX(-120px) rotate(-3deg);
}
.polaroid[data-index="2"],
.polaroid[data-index="4"],
.polaroid[data-index="6"] {
  transform: translate(-50%, -50%) translateX(120px) rotate(3deg);
}
.polaroid[data-index="1"].active,
.polaroid[data-index="3"].active,
.polaroid[data-index="5"].active {
  transform: translate(-50%, -50%) translateX(0) rotate(-2deg);
}

/* Description area under stack */
.polaroid-description {
  top: 40%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 1rem;
  color: #444;
  opacity: 0;
  transform: translateX(-0%) translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.polaroid-description.visible {
  opacity: 1;
  transform: translateX(-0%) translateY(0);
}

/* Sticky section header for 'Our Love Story' */
.story-header {
  position: sticky;
  top: 64px; /* beneath nav */
  z-index: 60;
  width: 100%;
  background: transparent; /* keep transparent to show section gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
}

.story-header .invite-title {
  margin: 0;
   font-size: clamp(1.8rem, 4vw, 2.6rem);
  background: rgba(255,255,255,0.85);
  padding: 8px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

/* Polaroid description boxed style with glow variants */
.polaroid-description-box {
  padding: 14px 16px;
  border-radius: 12px;
font-family: 'Alice', serif;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  width: min(360px, 92vw);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Glow variants mapped to polaroid index for brand colours */
.polaroid-description-box.glow-0 { box-shadow: 0 10px 30px rgba(255, 235, 150, 0.6); }
.polaroid-description-box.glow-1 { box-shadow: 0 10px 30px rgba(180, 230, 180, 0.6); }
.polaroid-description-box.glow-2 { box-shadow: 0 10px 30px rgba(255, 190, 210, 0.6); }
.polaroid-description-box.glow-3 { box-shadow: 0 10px 30px rgba(180, 210, 255, 0.6); }
.polaroid-description-box.glow-4 { box-shadow: 0 10px 30px rgba(211, 196, 242, 0.6); }
.polaroid-description-box.glow-5 { box-shadow: 0 10px 30px rgba(255, 58, 137, 0.6); }

@media (max-width: 640px) {
  .story-sticky { top: 56px; }
  .story-header { top: 56px; padding: 12px; }
  .story-header .invite-title { font-size: 1.8rem; padding: 6px 12px; }

.polaroid-description-box {

    width: 40vh;
}

  /* Make stack and polaroids smaller on narrow screens */
  .polaroid-stack {
  width: min(300px, 86vw);
  height: 340px;
  margin-bottom: 18px; /* create explicit gap for description */
  }

  .polaroid {
  width: min(260px, 84vw);
  top: 46%; /* lift polaroids slightly higher so description clears */
  transform: translate(-50%, -50%) translateX(40px) rotate(3deg);
  }

  /* Reduce how far left/right alternate cards are pushed so they stay in viewport */
  .polaroid[data-index="1"],
  .polaroid[data-index="3"],
  .polaroid[data-index="5"] {
  transform: translate(-50%, -50%) translateX(-40px) rotate(-3deg);
  }

  .polaroid[data-index="1"].active,
  .polaroid[data-index="3"].active,
  .polaroid[data-index="5"].active {
  transform: translate(-50%, -50%) translateX(0) rotate(-2deg);
  }

  .polaroid[data-index="2"],
  .polaroid[data-index="4"],
  .polaroid[data-index="6"] {
  transform: translate(-50%, -50%) translateX(40px) rotate(-3deg);
  }

  .polaroid[data-index="2"].active,
  .polaroid[data-index="4"].active,
  .polaroid[data-index="6"].active {
  transform: translate(-50%, -50%) translateX(0px) rotate(-2deg);
  }
}

/************** RSVP SECTION ********************/

/* Full section */
.rsvp-section {
  background: #0F3D2E;
  color: #D4AF37;
  padding: 80px 20px;
  width: 100%;
  text-align: center;
}

/* Container */
.rsvp-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Header */
.rsvp-title {
  font-family: 'Alex Brush', cursive;
  font-size: 3rem;
  margin-bottom: 10px;
  color: #D4AF37;
  letter-spacing: 0.8ch;
  text-align: center;
}

.rsvp-subtitle {
  font-family: 'Alice', serif;
  font-size: 1rem;
  margin-bottom: 20px;
  color: #ffffff;
  text-align: center;
}

/* Divider */
.rsvp-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}

.rsvp-divider-line {
  flex: 1;
  height: 1px;
  max-width: 120px;
  background: #D4AF37;
  opacity: 1;
}

.rsvp-divider-heart {
  font-size: 1.1rem;
  color: #D4AF37;
}

/* Steps */
.rsvp-step {
  display: none;
  animation: fadeIn 0.5s ease;
}

.rsvp-step.active {
  display: block;
}

/* Labels */
.rsvp-label {
  display: block;
  font-family: 'Alice', serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
  text-align: left;
  color: #D4AF37;
}

/* Inputs */
.rsvp-input,
.rsvp-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #10211a;
  background: #fff;
  margin-bottom: 20px;
  font-family: 'Alice', serif;
  font-size: 1.2rem;
}

/* Buttons */
.rsvp-btn,
.choice-btn {
  background: #D4AF37;
  color: #0F3D2E;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: 'Alice', serif;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
}

.choice-btn {
  width: 45%;
}

.choice-btn:hover,
.rsvp-btn:hover {
  background: #0F3D2E;
  color: #D4AF37;
  border: 1px solid #D4AF37;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #FFF9F0;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
}

.modal-inner-border {
  border: 4px solid #0F3D2E;
  padding: 20px;
  border-radius: 10px;
}

.modal-emoji {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.modal-text {
  font-family: 'Alice', serif;
  color: #0F3D2E;
  margin-bottom: 20px;
}

.modal-btn {
  background: #D4AF37;
  color: #0F3D2E;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* Success */
.success-title {
  font-family: 'Alex Brush', cursive;
  font-size: 2.5rem;
  color: #D4AF37;
}

.success-text {
  font-family: 'Alice', serif;
  margin-top: 10px;
  color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
