html,
body {
  margin: 0;
  background-color: #f1ede3;
  background-image: url("images/paper-texture.png");
  background-repeat: repeat;
  background-size: 300px auto;
  background-attachment: fixed;
}

body {
  overflow-x: hidden;
  overflow-y: hidden;
}

section {

  width: 100vw;
}

/* COVER */
#coverPage {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #f1ede3;
  background-image: url("images/paper-texture.png");
  background-repeat: repeat;
  background-size: 300px auto;
  background-attachment: fixed;

  z-index: 999;

  transition: opacity 1.5s ease, transform 1.5s ease;

  /* FADE IN */
  animation: coverFade 2s ease;
}

/* FADE OUT - smooth gentle fade when the cover is clicked */
#coverPage.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

/* COVER IMAGE - whole image always visible, never cropped */
#coverPage .page-image {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;
}

@keyframes coverFade {

  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }

}

/* SEMUA IMAGE */
section {
  display: flex;
  justify-content: center;

  background-color: transparent;
}

.page-image {
  width: auto;
  height: 100vh;

  display: block;

  margin: auto;
}

/* MAIN PAGE */
#mainPage {
  opacity: 0;

  transition: opacity 1s ease;
}

#mainPage.show {
  opacity: 1;

  /* same entrance feel as the cover when the site first opens */
  animation: mainFade 4.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* gentler entrance for the main page: longer, softer zoom */
@keyframes mainFade {

  from {
    opacity: 0;
    transform: scale(1.03);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }

}

/* FADE IN */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* EVENT SECTION - frame keeps the map overlay locked to the image at any resolution */
.event-section {
  position: relative;

  display: flex;
  justify-content: center;
}

/* fit within both viewport width and height, keeping the event image ratio */
.event-frame {
  position: relative;

  width: min(100vw, calc(100vh * 2000 / 3556));
  aspect-ratio: 2000 / 3556;

  line-height: 0;

  container-type: inline-size;
}

.event-frame .page-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* FIND US HERE - clickable map graphic, positioned over the empty bottom-left area */
.event-map-link {
  position: absolute;

  left: 24.5%;
  top: 82.5%;

  width: 28%;

  transform: translate(-50%, -50%);

  cursor: pointer;

  line-height: 0;
}

.event-map-link img {
  display: block;

  width: 100%;
  height: auto;
}

/* RSVP SECTION */
.rsvp-section {
  position: relative;

  display: flex;
  justify-content: center;
}

/* FORM */
.rsvp-form {
  position: absolute;

  top: 60%;
  left: 50%;

  transform: translateX(-50%);

  width: 70%;
  max-width: 280px;

  display: flex;
  flex-direction: column;

  gap: 8px;
}

/* INPUT */
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  padding: 10px;

  border: none;

  border-radius: 15px;

  background-color: rgba(255,255,255,0.7);

  backdrop-filter: blur(10px);

  font-size: 14px;
}

/* TEXTAREA */
.rsvp-form textarea {
  height: 40px;

  resize: none;
}

/* BUTTON */
.rsvp-form button {
  padding: 10px;

  border: none;

  border-radius: 999px;

  background-color: black;

  color: white;

  cursor: pointer;
}

/* THANKYOU */
.thankyou-section {
  position: relative;

  display: flex;
  justify-content: center;
}

/* FRAME - exact image shape, always fits within the viewport (contain),
   centered, so the account-number overlays track the image at any resolution */
.thankyou-frame {
  position: relative;

  /* fit within both viewport width and height, keeping the 9:16 ratio */
  width: min(100vw, calc(100vh * 10630 / 18898));
  aspect-ratio: 10630 / 18898;

  line-height: 0;

  container-type: inline-size;
}

.thankyou-frame .page-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* ACCOUNT NUMBER BOXES - positioned over the pink boxes */
.rekening-box {
  position: absolute;

  transform: translate(-50%, -50%);

  display: flex;
  align-items: center;
  justify-content: center;

  width: 22%;

  cursor: pointer;

  line-height: normal;
}

.rekening-box.kiri {
  left: 14.9%;
  top: 93.2%;
}

.rekening-box.kanan {
  left: 85.1%;
  top: 93.2%;
}

/* NUMBER TEXT - scales with the image via container units */
.rekening-number {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;

  font-size: 2.4cqw;

  letter-spacing: 0.02em;

  color: #2c2b8c;

  white-space: nowrap;
}

/* POPUP */
#copyPopup,
#rsvpPopup {

  position: fixed;

  bottom: 30px;
  left: 50%;

  transform: translateX(-50%);

  background-color: rgba(0,0,0,0.75);

  color: white;

  padding: 12px 20px;

  border-radius: 999px;

  font-size: 12px;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.3s ease;

  z-index: 9999;
}

/* SHOW */
#copyPopup.show,
#rsvpPopup.show {
  opacity: 1;
}

/* RSVP MODAL */
.rsvp-modal {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: rgba(0, 0, 0, 0.6);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;

  z-index: 10000;
}

.rsvp-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.rsvp-modal-box {
  background-color: #fff;

  max-width: 320px;
  width: 80%;

  padding: 28px 24px;

  border-radius: 16px;

  text-align: center;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);

  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.rsvp-modal.show .rsvp-modal-box {
  transform: scale(1);
}

.rsvp-modal-box p {
  margin: 0 0 20px;

  font-size: 16px;
  color: #333;
}

.rsvp-modal-box button {
  border: none;

  background-color: #333;
  color: #fff;

  padding: 10px 28px;

  border-radius: 999px;

  font-size: 14px;

  cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {

  .page-image {
    width: 100%;
    height: auto;
  }

  #coverPage {
    overflow: hidden;
  }

  #coverPage .page-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
  }

  .rekening-container {
    padding: 0 24px;
  }
}