@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Montserrat:wght@100&family=Quicksand:wght@300;700&family=Roboto:wght@400;700&family=Sacramento&family=Zeyada&family=Rancho&display=swap");

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

:root {
  --vh: 1vh;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: radial-gradient(
    circle,
    #fffdfa,
    #fffbf7,
    #fff8f4,
    #fff6f2,
    #fff3f0,
    #fff2ef,
    #fff1ee,
    #fff0ed,
    #fff1eb,
    #fff2e9,
    #fff4e8,
    #fff6e7
  );
  position: relative;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 30%;
  left: 30%;
  width: 40%;
  height: 40%;
  background-image: url("./images/bg1.jpg");
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: -1;
  mask: linear-gradient(
      to right,
      transparent 0%,
      black 20%,
      black 80%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      black 20%,
      black 80%,
      transparent 100%
    );
  mask-composite: intersect;
  -webkit-mask: linear-gradient(
      to right,
      transparent 0%,
      black 20%,
      black 80%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      black 20%,
      black 80%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
}

/* Main Container */
section {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Decorative Images */
section .top-left-decoration,
section .top-right-decoration {
  position: absolute;
  top: 0;
  width: 52%;
}

section .top-left-decoration {
  left: 30px;
}
section .top-right-decoration {
  right: 30px;
}
section .center-bottom-decoration {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
}

section .bottom-right-decoration {
  position: absolute;
  bottom: 0;
  right: 30px;
  width: 20%;
  transform: translateX(-50%);
  rotate: -10deg;
}
section .bottom-left-decoration {
  position: absolute;
  bottom: 0;
  left: 30px;
  width: 20%;
  transform: translateX(50%);
  rotate: 10deg;
}
section .bottom-center-decoration {
  position: absolute;
  bottom: -5;
  right: 35%;
  width: 10%;
  transform: translateX(50%);
  rotate: 10deg;
}

section .bottom-center-first-decoration {
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 10%;
  transform: translateX(50%);
  rotate: 10deg;
}

section .bottom-last-decoration {
  position: absolute;
  bottom: -10px;
  right: 25;
  width: 10%;
  transform: scaleX(-1);
  rotate: 10deg;
}

section .bottom-last-first-decoration {
  position: absolute;
  bottom: -10px;
  left: 25;
  width: 10%;
  rotate: -10deg;
  transform: scaleX(-1);
}

/* Lantern Decorations */
section .latern-first-decoration,
section .latern-last-decoration,
section .latern-second-last-decoration,
section .latern-second-first-decoration {
  position: absolute;
  width: 5%;
  z-index: -100;
}

section .latern-first-decoration {
  top: 80px;
  left: 25%;
  transform: translateX(-50%);
}

section .latern-last-decoration {
  top: 50px;
  right: 25%;
  transform: translateX(-50%);
}

section .latern-second-last-decoration {
  top: 50px;
  right: 15%;
  transform: translateX(-50%);
}

section .latern-second-first-decoration {
  top: 30px;
  left: 15%;
  transform: translateX(-50%);
}

.main-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bride-groom-text-separator {
  display: none;
}

a {
  text-decoration: none;
  color: rgb(128, 94, 22);
}

.creator-link {
  color: brown;
}

.venue-address:hover {
  color: rgb(128, 63, 22);
}

.flip-horizontal {
  transform: scaleX(-1);
}

.flip-vertical {
  transform: scaleY(-1);
}

.flip-both {
  transform: scale(-1, -1);
}

.blink {
  animation: blink-animation 4s ease-in-out infinite;
}

@keyframes blink-animation {
  0%,
  50% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0.5;
  }
}

.swing {
  animation: swing-animation 3s ease-in-out infinite;
}

.swing-slow {
  animation: swing-animation 4s ease-in-out infinite;
}

.swing-fast {
  animation: swing-animation 2s ease-in-out infinite;
}

@keyframes swing-animation {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

.pendulum-swing {
  transform-origin: top center;
  animation: pendulum-animation 3s ease-in-out infinite;
}

.pendulum-slow {
  transform-origin: top center;
  animation: pendulum-animation 4s ease-in-out infinite;
}

.pendulum-fast {
  transform-origin: top center;
  animation: pendulum-animation 2s ease-in-out infinite;
}

@keyframes pendulum-animation {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(3deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}

.wedding-invitation-text {
  font-family: "Rancho", cursive;
  font-size: 24px;
  color: rgba(176, 18, 18, 0.983);
}

.couple-names-text {
  display: none;
}

@media screen and (max-width: 768px) {
  /* Prevent zoom on input focus */
  input, textarea, select {
    font-size: 16px;
  }

  /* Better mobile viewport handling */
  body {
    height: calc(var(--vh, 1vh) * 100);
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-y: auto;
  }

  section {
    height: calc(var(--vh, 1vh) * 100);
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-y: auto;
  }

  body::before {
    top: 10%;
    left: 40%;
    width: 30%;
    height: 30%;
    z-index: -9;
  }

  .bride-groom-text-separator {
    display: block;
    font-family: "Dancing Script", cursive;
    font-size: 24px;
    color: rgba(176, 18, 18, 0.983);
  }

  section .bottom-last-first-decoration {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 35%;
    rotate: -10deg;
  }

  section .center-bottom-decoration {
    display: none;
  }

  section .bottom-right-decoration {
    display: none;
  }
  section .bottom-left-decoration {
    display: none;
  }
  section .bottom-center-decoration {
    position: absolute;
    bottom: -5;
    right: 31%;
    width: 20%;
    transform: translateX(50%);
    rotate: 10deg;
  }

  section .bottom-center-first-decoration {
    position: absolute;
    bottom: -5;
    left: 11%;
    width: 20%;
    transform: translateX(50%);
    rotate: 10deg;
  }

  section .bottom-last-decoration {
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 35%;
    /* transform: scaleX(-1); */
    rotate: 8deg;
  }

  .main-container {
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 0 20px 0;
    min-height: calc(var(--vh, 1vh) * 100);
    box-sizing: border-box;
    overflow-y: auto;
  }

  section .latern-first-decoration {
    top: 60px;
  }

  .wedding-invitation-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }

  .wedding-invitation-text {
    width: 80%;
    font-size: clamp(19px, 4.5vw, 23px);
    text-align: center;
    margin-bottom: 8px;
  }

  .couple-names {
    margin-top: 5px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
  }

  .bride-groom-text {
    font-family: "Dancing Script", cursive;
    font-weight: 700;
    font-size: clamp(38px, 8vw, 48px);
    color: rgba(176, 18, 18, 0.983);
  }

  .bride-groom-text-separator {
    font-family: "Dancing Script", cursive;
    font-size: clamp(21px, 5vw, 25px);
    color: rgba(176, 18, 18, 0.983);
  }

  .bride-groom {
    mix-blend-mode: multiply;
    width: clamp(55%, 65vw, 75%);
    margin: 8px 0;
  }

  .event-details {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 400px;
    font-family: "Rancho", cursive;
    color: rgba(176, 18, 18, 0.983);
    gap: 3px;
    flex: 0 0 auto;
    margin-bottom: 15px;
  }

  .event-date {
    font-size: clamp(18px, 4vw, 22px);
    text-align: center;
  }

  .event-time {
    font-size: clamp(16px, 3.5vw, 20px);
    text-align: center;
  }

  .venue-address {
    font-size: clamp(16px, 3.5vw, 20px);
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
    word-break: break-word;
    hyphens: auto;
  }

  .creator {
    width: 15%;
    font-family: "Quicksand", sans-serif;
    position: absolute;
    bottom: -20px;
    text-align: center;
    font-size: clamp(6px, 2vw, 7px);
    margin-bottom: 25px;
    align-items: center;
    justify-items: center;
    white-space: unset;
  }

  /* Extra small screens */
  @media screen and (max-height: 600px) {
    .main-container {
      padding: 20px 0 10px 0;
    }
    
    .wedding-invitation-text-container {
      margin-top: 10px;
    }
    
    .wedding-invitation-text {
      font-size: clamp(15px, 3vw, 18px);
      margin-bottom: 5px;
    }
    
    .couple-names {
      margin-top: 3px;
      margin-bottom: 5px;
      gap: 3px;
    }
    
    .bride-groom-text {
      font-size: clamp(25px, 6vw, 33px);
    }
    
    .bride-groom-text-separator {
      font-size: clamp(18px, 4vw, 22px);
    }
    
    .bride-groom {
      width: clamp(45%, 55vw, 65%);
      margin: 5px 0;
    }
    
    .event-details {
      margin-top: 5px;
      margin-bottom: 8px;
      gap: 2px;
    }
    
    .event-date {
      font-size: clamp(15px, 3vw, 18px);
    }
    
    .event-time {
      font-size: clamp(13px, 2.5vw, 16px);
    }
    
    .venue-address {
      font-size: clamp(13px, 2.5vw, 16px);
      margin-top: 2px;
      line-height: 1.1;
    }
  }
}

@media screen and (min-width: 1200px) {
  .bride-groom {
    position: absolute;
    bottom: 100;
    mix-blend-mode: multiply;
    width: 60%;
  }

  .bride-groom {
    position: absolute;
    bottom: 100;
    mix-blend-mode: multiply;
    width: 60%;
  }

  .bride-groom-and-text {
    display: none;
  }

  .bride-groom-text {
    font-family: "Dancing Script", cursive;
    font-weight: 700;
    font-size: 60px;
    color: rgba(176, 18, 18, 0.983);
  }

  .groom {
    position: absolute;
    top: 375px;
    left: 200px;
  }

  .bride {
    position: absolute;
    top: 375px;
    right: 140px;
  }

  section {
    height: 100vh;
    width: 60%;
  }

  section .top-left-decoration,
  section .top-right-decoration {
    width: 30%;
  }

  .creator {
    font-size: 10px;
  }

  .event-details {
    width: 60%;
    max-width: 500px;
  }

  .event-date {
    font-size: 28px;
  }

  .event-time {
    font-size: 20px;
  }

  .venue-address {
    font-size: 20px;
  }

  .wedding-invitation-text {
    position: absolute;
    top: 200;
  }

  .event-date {
    font-size: 24px;
    margin-bottom: 5px;
  }

  .event-time {
    font-size: 18px;
    margin-bottom: 5px;
  }

  .venue-address {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .event-details {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    max-width: 400px;
    font-family: "Rancho", cursive;
    color: rgba(176, 18, 18, 0.983);
  }
  .creator {
    font-family: "Quicksand", sans-serif;
    position: absolute;
    bottom: 0;
    text-align: center;
    font-size: 8px;
    margin-bottom: 25px;
    align-items: center;
    justify-items: center;
    white-space: unset;
  }
}
