:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #000000;
  color: #a1a1a1;
  display: grid;
  place-items: center;
}

.page {
  width: min(90vw, 1100px);
  padding: 40px 24px;
}

.video-card {
  text-align: center;
}

.video-card h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.4rem;
}

.video-card p {
  margin: 0 0 1.5rem;
  color: #bfbfbf;
}

.video-card .video-caption {
  font-family: "Tangerine", "Playwrite CZ", "Inter", sans-serif;
  font-weight: 600;
  margin-top: 3rem;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: #a5a5a5;
  letter-spacing: 0.02em;
  text-align: center;
  overflow: visible;
}

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.video-card .caption-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  padding-right: 1.5rem;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: color 0.4s linear;
}

.video-card .caption-text.is-revealing {
  animation: handwritingReveal 8s ease forwards;
}
@keyframes handwritingReveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  8% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.video-card .caption-text.rainbow-text {
  clip-path: inset(0 0 0 0);
}


.video-frame {
  display: flex;
  justify-content: center;
}

.video-frame video {
  width: min(900px, 90vw);
  height: auto;
  display: block;
  border-radius: 16px;
  transition: width 0.4s ease, height 0.4s ease;
}

.video-frame video.video-compact {
  width: min(620px, 82vw);
}

video::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.25);
}
