@font-face {
  font-family: "MyWeddingFont";
  src: url("./fonts/Monotype-Corsiva-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #761121;
  font-family: "MyWeddingFont", cursive;
  overflow-x: hidden;
}

/* CARD */
.card {
  width: 80%;
  max-width: 600px;
  min-height: 100dvh;
  background: #fff4e6;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.main {
  position: relative;
  width: 100%;
  height: 100dvh;
}

.names {
  position: absolute;
  left: 2rem;
  top: 12rem;
  font-family: "MyWeddingFont", cursive;
  font-size: 3rem;
  line-height: 1.2;
  color: red;
}

.names .and {
  font-family: "Courier New", cursive;
  margin-left: 48px;
}

.names .otje {
  margin-left: 50px;
}

.dates {
  position: absolute;
  right: 2.5rem;
  top: 13rem;
  font-size: 2.5rem;
  line-height: 1.3;
  padding-right: 10px;
  color: red;
}

.heart-container {
  width: 100%;
  position: absolute;
  bottom: 4rem;
}

.heart-bg {
  margin-top: 2rem;
  position: relative;
  width: 100%;
  height: 25vh;
  max-height: 165px;
  background-image: url("./images/heart.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.heart-footer {
  margin-top: 2rem;
  position: relative;
  width: 100%;
  height: 13vh;
  max-height: 165px;
  background-image: url("./images/heart_bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.gold-text {
  background: linear-gradient(
    135deg,
    #d4af37 0%,
    #f6e27a 20%,
    #d4af37 40%,
    #f6e27a 60%,
    #b8962e 80%,
    #fff4b0 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0.5px 0.5px rgba(0, 0, 0, 0.2),
    0 1px 1px rgba(0, 0, 0, 0.1);
}

.scrollBtn {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;

  opacity: 1;
  transition: opacity 0.4s ease;

  animation: float 2.5s ease-in-out infinite;
}

.scrollBtn.hidden {
  opacity: 0;
  pointer-events: none;
}

.scrollBtn svg {
  width: 36px;
  height: 36px;
  stroke: #d4af37;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;

  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5));
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 10px);
  }
}

.scrollBtn:hover svg {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.second-section,
.third-section {
  font-size: 1.5rem;
  position: relative;
  color: #b8962e;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: "MyWeddingFont", cursive;
  opacity: 0;
  transition: opacity 1.5s ease-in;
}

.fade-section.visible {
  opacity: 1 !important;
}

#secondSection h1,
#thirdSection h1 {
  margin: 0;
  margin-top: 1.5rem;
  font-size: 2.5rem;
}

.second-section,
.third-section {
  padding: 0 1.5rem;
}

.info {
  width: 80%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-direction: column;
  flex: 1;
  padding: 2rem;
  padding-bottom: 4rem;
}

.location {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon {
  width: 4rem;
  height: 4rem;
}

.location-icon {
  background-image: url("./images/location.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.gift-icon {
  background-image: url("./images/gift.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 7rem;
  height: 5rem;
}

.third-section .icon {
  background-image: url("./images/gift.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.third-section .icon.cake {
  background-image: url("./images/cake.svg");
}
.third-section .icon.bell {
  background-image: url("./images/bell.svg");
}
.third-section .icon.music {
  background-image: url("./images/music.svg");
}
.third-section .icon.glasses {
  background-image: url("./images/glasses.svg");
}
.third-section .icon.rings {
  background-image: url("./images/rings.svg");
}

.item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.item p {
  margin: 0;
}

.item:nth-of-type(odd) {
  align-self: flex-start;
  text-align: left;
  transform: translateX(-40px);
}
.item:nth-of-type(even) {
  align-self: flex-end;
  text-align: right;
  transform: translateX(40px);
}
.item:nth-of-type(even).location {
  flex-direction: row-reverse;
}

.item {
  opacity: 0;
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.item:nth-of-type(odd) {
  transform: translateX(-40px);
}
.item:nth-of-type(even) {
  transform: translateX(40px);
}

.item.visible {
  opacity: 1;
  transform: translateX(0);
}

.item.rsvp,
.item.gift {
  display: block;
}
.item.gift {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.item.gift p {
  margin: 0;
}
.gift-info {
  display: flex;
  gap: 4px;
}
.gift-info p {
  width: 44%;
}
.item.gift .iban {
  width: 100%;
  margin-left: 21px;
}
.item.rsvp {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px;
}

.item.rsvp button {
  border: 1px solid #761121;
  font-family: "MyWeddingFont", cursive;
  color: #761121;
  font-size: 1.2rem;
  letter-spacing: 4px;
  background: transparent;
  padding: 10px 45px;
  cursor: pointer;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.item.rsvp button:hover {
  background: #761121;
  color: #ffffff;
}

.item.visible {
  opacity: 1;
  transform: translateX(0);
}

.item:nth-of-type(1) {
  transition-delay: 0.1s;
}
.item:nth-of-type(2) {
  transition-delay: 0.2s;
}
.item:nth-of-type(3) {
  transition-delay: 0.3s;
}
.item:nth-of-type(4) {
  transition-delay: 0.4s;
}

.timeline {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
}

.timeline-path {
  position: absolute;
  top: 4rem;
  left: 50%;
  width: 200px;
  height: 90%;
  transform: translateX(-50%);
  pointer-events: none;
}

.timeline-path path {
  fill: none;
  stroke: #d4af37;
  stroke-width: 2;

  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 4s ease;
}

.timeline.visible .timeline-path path {
  stroke-dashoffset: 0;
}

.timeline-items {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 4rem;
}

.timeline-item {
  position: relative;
  left: 50%;
  transform: translate(-50%, 30px);
  opacity: 0;
  transition: all 0.6s ease;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: left;
  gap: 4px;
}

.timeline-item .content {
  width: 27%;
  color: #000000;
  font-size: 1.2rem;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
}

.timeline-item.visible {
  opacity: 1;
}

.timeline-item:nth-child(odd).visible {
  transform: translate(-107%, 0);
}

.timeline-item:nth-child(even).visible {
  transform: translate(7%, 0);
}

.rsvp-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  min-width: 300px;
}

.rsvp-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dialog-content {
  background: #fff4e6;
  padding: 1rem;
  border-radius: 20px;
  text-align: center;
  font-family: "MyWeddingFont", cursive;
  position: relative;
  color: #761121;
}

.step {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.step.active {
  display: flex;
}

.choice-btn,
.submit-btn {
  border: 1px solid #761121;
  background: transparent;
  color: #761121;
  font-family: "MyWeddingFont", cursive;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
}

.choice-btn:hover,
.submit-btn:hover {
  background: #761121;
  color: #fff;
}

/* INPUTS */
.dialog-content input,
.dialog-content textarea {
  border: 1px solid #b8962e;
  border-radius: 10px;
  padding: 10px;
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #761121;
}

.attendance {
  display: flex;
  gap: 10px;
}

.attend-btn {
  flex: 1;
  border: 1px solid #761121;
  background: transparent;
  color: #761121;
  font-family: "MyWeddingFont", cursive;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
}

.attend-btn.active {
  background: #761121;
  color: #fff;
}

#optionalFields:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media only screen and (max-width: 500px) {
  body {
    background: #fff4e6;
  }
  .card {
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0;
  }

  .heart-container {
    margin-top: 9rem;
  }
  .names,
  .dates {
    font-size: 2.5rem;
    top: 17rem;
  }
  .item.rsvp {
    align-items: center;
  }
  .item.rsvp button {
    width: 100%;
  }
  .item {
    font-size: 1.5rem;
  }
  .fade-section {
    transform: translateY(40px);
    transition:
      opacity 1.2s ease,
      transform 1.2s ease;
  }
  .fade-section.visible {
    opacity: 1 !important;
    transform: translateY(0);
  }
  .item:nth-of-type(even) {
    text-align: center;
  }

  #secondSection h1,
  #thirdSection h1 {
    margin-top: 3rem;
  }

  .gift-info p {
    width: 100%;
  }
  .item.gift .iban {
    margin-left: 0;
    width: 100%;
  }

  .scrollBtn {
    bottom: 0;
  }

  .third-section .icon {
    width: 3rem;
    height: 4rem;
  }

  .rsvp-dialog {
    width: 80%;
    min-width: none;
  }
}
