@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Chewy", serif;
  font-family: "Sour Gummy", serif;
}

:root {
  --btn-color: #805557;
}

body {
  background: blanchedalmond;
}

.preload {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f6f6e2;
}
.preload {
  z-index: 999;
  gap: 10px;
}
.preload > div {
  height: 10px;
  width: 10px;
  border-radius: 1px;
  background: var(--btn-color);
  animation: anm-preload 1s linear infinite;
}
.preload > div:nth-child(2) {
  animation-delay: 0.15s;
}
.preload > div:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes anm-preload {
  0%,
  25%,
  75%,
  100% {
    height: 10px;
  }
  50% {
    height: 25px;
  }
}

.main {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  padding-top: 50px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  font-family: sans-serif;

  background-size: cover;
}

.elements {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;

  /* background-image: url("aset/bg2.png");
  background-size: cover; */
  background-position: center;
  z-index: -1;

  /* display: none; */
}

.elements > img {
  position: absolute;
}

.bg {
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
}

.butterfly {
  position: absolute;
  transform: rotateZ(-15deg);
  top: 15px;
  left: 10px;
}

.butterfly img {
  width: 110px;
  animation: butterfly 1s ease infinite;
}

.flower {
  width: 100px;
  bottom: -10px;
  right: 2px;
  animation: flower 2s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes butterfly {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.6);
  }
}

@keyframes flower {
  0%,
  100% {
    transform: rotateZ(-3deg) skewX(2deg);
  }
  50% {
    transform: rotateZ(3deg);
  }
}

/* Book */
.book {
  /* border: 1px solid black; */
  position: relative;
  width: 44.5vw;
  max-width: 250px;
  aspect-ratio: 360/540;
  transition: all 0.5s linear;
  border-radius: 2px 10px 10px 2px;
  box-shadow: -10px 7px 15px rgba(0, 0, 0, 0);
}
.book .paper:nth-child(1) {
  transition: box-shadow 0.5s linear;
  box-shadow: -6px 5px 12px rgba(0, 0, 0, 0);
  border-radius: 2px 10px 10px 2px;
}
.book.fs .paper:nth-child(1) {
  box-shadow: -6px 5px 12px rgba(0, 0, 0, 0.5);
}

.book .paper:last-child .back::after {
  position: absolute;
  content: "";
  height: 100%;
  width: 100%;
  top: 0;
  transition: box-shadow 0.5s linear;
  box-shadow: 6px 5px 12px rgba(0, 0, 0, 0);
  border-radius: 2px 10px 10px 2px;
}
.book.bs .paper:last-child .back::after {
  box-shadow: 6px 5px 12px rgba(0, 0, 0, 0.5);
}

.paper {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  perspective: 1500px;
  perspective-origin: left;
}

.front,
.back {
  background: white;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left;
  transition: all 0.5s linear;
  /* box-shadow: 0 0 10px black; */
  background-image: linear-gradient(-100deg, rgba(0, 0, 0, 0.5), white);
  border-radius: 2px 10px 10px 2px;
  border-right: 2px solid white;
  /* overflow: hidden; */

  /* box-shadow: 10px 0 10px rgba(0, 0, 0, 0.3); */
}

.front {
  z-index: 1;
  backface-visibility: hidden;
  /* border-left: 3px solid powderblue; */
  /* background-image: linear-gradient(100deg, rgba(0, 0, 0, 0.5), white); */
  overflow: hidden;
}

.back {
  z-index: 0;
}

.front-content,
.back-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;

  /* background-image: url("img/p1.png"); */

  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2)), var(--bg);
  background-size: cover;
  background-position: right;
  background-position: -100%;
  border-radius: 2px 9px 9px 2px;
}

.back-content {
  transform: rotateY(180deg);
  background-position: left;
  background-position: 0;
  border-radius: 9px 2px 2px 9px;
}

.flipped .front,
.flipped .back {
  transform: rotateY(-180deg);
}

/* Custom */

.paper:nth-child(1) .front {
  border: none;
}
.paper:nth-child(1) .front .front-content {
  box-sizing: content-box;
  border-right: none;
  box-shadow: inset 2px 0 10px rgb(0, 0, 0, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset -2px 0 3px rgba(255, 255, 255, 0.3), inset 0 -2px 7px rgba(0, 0, 0, 0.473) !important;
}

.paper:nth-child(1) .front::before {
  content: "";
  position: absolute;
  height: calc(100% - 3px);
  width: 2px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 4px rgb(255, 255, 255), 0 0 2px rgba(0, 0, 0, 1);
  left: 12px;
}

.paper:last-child .back {
  border: none;
}
.paper:last-child .back .back-content {
  box-shadow: inset -7px 0 7px rgb(0, 0, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.575), inset 0 -2px 7px rgba(0, 0, 0, 0.473) !important;
  overflow: hidden;
}
.paper:last-child .back .back-content::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 2px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 4px rgb(255, 255, 255), 0 0 2px rgba(0, 0, 0, 1);
  right: 12px;
  z-index: 999;
}

/* Button */

.btn-container {
  margin-top: 40px;
  text-align: center;
  transition: all 0.5s ease;
}

.nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.nav button {
  border: none;
  background: var(--btn-color);
  cursor: pointer;
  height: 40px;
  width: 40px;
  border-radius: 50%;
}

button.open-btn,
button.pesan-btn {
  height: 40px;
  padding: 0 20px;
  letter-spacing: 1px;
  font-size: 1rem;
  background: var(--btn-color);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin: auto;
}

button {
  border: 1px solid white;
  box-shadow: -2px 2px 0 rgba(0, 0, 0, 0.2);
  /* transition: 0.3s ease all; */
  display: block;
}

button:active {
  transform: scale(0.93);
  box-shadow: -1px 1px 0 rgba(0, 0, 0, 0.2);
}

.btn-container .open-btn:not(.show),
.btn-container .nav:not(.show) {
  display: none;
}

.btn-container.hide {
  transform: translateY(50px);
  opacity: 0;
}

.pesan-btn {
  margin-top: 20px !important;
  visibility: hidden;
}

button:active {
  transform: scale(0.93) !important;
  box-shadow: -1px 1px 0 rgba(0, 0, 0, 0.2);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pesan-btn.show {
  visibility: visible;
  animation: fade-up 0.5s ease forwards;
}

/* Love */

.bg-love {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: -50px;
  z-index: -1;
}

.love-item {
  position: absolute;
  top: 0;
  user-select: none;
  pointer-events: none;
  animation-name: fall;
  animation-timing-function: linear;
  z-index: 2;
  opacity: 1;
}

.love-item svg {
  fill: #c18e6a;
  opacity: 0.5 !important;
  width: 100%;
  opacity: 1;
}

@keyframes fall {
  0% {
    transform: translateY(-100px);
  }
  100% {
    transform: translateY(110vh);
  }
}

/* @media only screen and (max-width: 650px) {
} */

.swal2-popup {
  background: #f6f6e2;
  border-radius: 20px;
  padding-top: 10px;
  padding-bottom: 25px;
}
.swal2-title {
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #3c3c3c;
}
.swal2-popup textarea {
  resize: none;
  background: white;
  box-shadow: none !important;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.263), 1px 1px 2px white !important;
  border-radius: 10px;
}
.swal2-actions button {
  height: 40px;
  padding: 0 20px;
  letter-spacing: 1px;
  font-size: 1rem;
  background: var(--btn-color) !important;
  color: white;
  border-radius: 10px !important;

  border: 1px solid white !important;
  box-shadow: -2px 2px 0 rgba(0, 0, 0, 0.2) !important;
}
.swal2-actions button:active {
  transform: scale(0.93) !important;
  box-shadow: -1px 1px 0 rgba(0, 0, 0, 0.2) !important;
}

.swal2-actions button:focus {
  box-shadow: none !important;
}
