@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: black;
  animation: opacity 2s linear forwards;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: background-color 0.5s ease;
}

p {
  text-align: center;
  display: absolute;
  margin-top: 20px;
}

.greet .bday-vid {
  height: 700px;
  width: 450px;
  display: flex;
  background: white;
  justify-content: center;
  animation: vid-transition 2s linear forwards;
  border: solid 20px white;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
  padding: 10px 10px 40px;
  flex-direction: column;
}

.greet .bday-vid video {
  height: 90%;
  width: 100%;
  object-fit: cover;
}

.greet {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: background-color 0.5s ease;
  flex-direction: column;
}

.hidden {
  display: none;
}

.click-me {
  display: flex;
  align-items: center;
}

.click-me a {
  text-decoration: none;
}

@keyframes opacity {
  0% {
    background-color: black;
    opacity: 0.9;
  }
  100% {
    background: linear-gradient(#eabde6, #b7b1f2);
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
  }
}

@keyframes vid-transition {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.memory {
  margin-inline: auto;
  position: relative;
  height: 600px;
  padding-top: 5rem;
  padding-bottom: 5rem;
  margin-bottom: 5rem;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1) 20%,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0)
  );
}

.memory:hover .item {
  animation-play-state: paused;
}

.item {
  height: 500px;
  width: 350px;
  position: absolute;
  left: max(calc(400px * 21), 100%);
  animation: scrollLeft 80s linear infinite;
  background-color: white;
  padding: 15px 15px 45px 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.item:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 10;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

img {
  height: calc(100% - 30px);
  width: 100%;
  object-fit: cover;
}

@keyframes scrollLeft {
  to {
    left: -400px;
  }
}

.caption {
  display: block;
  height: 30px;
  width: 100%;
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  padding-top: 10px;
  font-size: 14px;
  color: #333;
}

.item1 {
  animation-delay: calc(80s / 21 * (21 - 1) * -1);
  transform: rotate(2deg);
}

.item2 {
  animation-delay: calc(80s / 21 * (21 - 2) * -1);
  transform: rotate(-1deg);
}

.item3 {
  animation-delay: calc(80s / 21 * (21 - 3) * -1);
  transform: rotate(1deg);
}

.item4 {
  animation-delay: calc(80s / 21 * (21 - 4) * -1);
  transform: rotate(-2deg);
}

.item5 {
  animation-delay: calc(80s / 21 * (21 - 5) * -1);
  transform: rotate(1.5deg);
}

.item6 {
  animation-delay: calc(80s / 21 * (21 - 6) * -1);
  transform: rotate(-1.5deg);
}

.item7 {
  animation-delay: calc(80s / 21 * (21 - 7) * -1);
  transform: rotate(0.5deg);
}

.item8 {
  animation-delay: calc(80s / 21 * (21 - 8) * -1);
  transform: rotate(-0.5deg);
}

.item9 {
  animation-delay: calc(80s / 21 * (21 - 9) * -1);
  transform: rotate(2deg);
}

.item10 {
  animation-delay: calc(80s / 21 * (21 - 10) * -1);
  transform: rotate(-2deg);
}

.item11 {
  animation-delay: calc(80s / 21 * (21 - 11) * -1);
  transform: rotate(1deg);
}

.item12 {
  animation-delay: calc(80s / 21 * (21 - 12) * -1);
  transform: rotate(-1.5deg);
}

.item13 {
  animation-delay: calc(80s / 21 * (21 - 13) * -1);
  transform: rotate(0.5deg);
}

.item14 {
  animation-delay: calc(80s / 21 * (21 - 14) * -1);
  transform: rotate(-0.5deg);
}

.item15 {
  animation-delay: calc(80s / 21 * (21 - 15) * -1);
  transform: rotate(1.5deg);
}

.item16 {
  animation-delay: calc(80s / 21 * (21 - 16) * -1);
  transform: rotate(-1deg);
}

.item17 {
  animation-delay: calc(80s / 21 * (21 - 17) * -1);
  transform: rotate(2deg);
}

.item18 {
  animation-delay: calc(80s / 21 * (21 - 18) * -1);
  transform: rotate(-2deg);
}

.item19 {
  animation-delay: calc(80s / 21 * (21 - 19) * -1);
  transform: rotate(0deg);
}

.item20 {
  animation-delay: calc(80s / 21 * (21 - 20) * -1);
  transform: rotate(1deg);
}

.item21 {
  animation-delay: calc(80s / 21 * (21 - 21) * -1);
  transform: rotate(-1deg);
}

button {
  position: relative;
  margin: 0;
  padding: 0.8em 1em;
  outline: none;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  background-color: #eabde6;
  border-radius: 10px;
  color: black;
  font-weight: 300;
  font-size: 18px;
  font-family: inherit;
  z-index: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.02, 0.01, 0.47, 1);
}

button:hover {
  animation: sh0 0.5s ease-in-out both;
}

@keyframes sh0 {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }

  25% {
    transform: rotate(7deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(-7deg) translate3d(0, 0, 0);
  }

  75% {
    transform: rotate(1deg) translate3d(0, 0, 0);
  }

  100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
}

button:hover span {
  animation: storm 0.7s ease-in-out both;
  animation-delay: 0.06s;
}

button::before,
button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: transform 0.15s cubic-bezier(0.02, 0.01, 0.47, 1),
    opacity 0.15s cubic-bezier(0.02, 0.01, 0.47, 1);
  z-index: -1;
  transform: translate(100%, -25%) translate3d(0, 0, 0);
}

button:hover::before,
button:hover::after {
  opacity: 0.15;
  transition: transform 0.2s cubic-bezier(0.02, 0.01, 0.47, 1),
    opacity 0.2s cubic-bezier(0.02, 0.01, 0.47, 1);
}

button:hover::before {
  transform: translate3d(50%, 0, 0) scale(0.9);
}

button:hover::after {
  transform: translate(50%, 0) scale(1.1);
}
