@import url("https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap");

body {
  opacity: 0;
  transition: opacity 350ms ease-in;
}

body.loaded {
  opacity: 1;
}

.avatar {
  transform: rotate(6deg);
}

.video-container {
  position: relative !important;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.handwritten-overlay {
  position: absolute;
  left: -6px;
  top: -6px;
  color: #1aff00;
  font-weight: bold;
  font-family: "Indie Flower", "Comic Sans MS", "Comic Sans", cursive,
    sans-serif;
  font-size: 1.4em;
  pointer-events: none;
  transform: translateX(0.15em) rotate(-8deg) scale(1.1);
  text-shadow: 2px 2px 0 #00350d, 2px 2px 2px #0002;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  padding-right: 5px;
}

.handwritten-overlay.stamp-in {
  animation: stampIn 0.4s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
}

.handwritten-overlay.write-in {
  animation: writeIn 1.2s steps(8, end) forwards;
}

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: scale(0.7) rotate(-20deg) translateY(-20px);
  }
  60% {
    opacity: 1;
    transform: scale(1.15) rotate(-8deg) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1.1) rotate(-8deg) translateY(0);
  }
}

@keyframes writeIn {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0% 0 0);
  }
}
