@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Dancing+Script:wght@700&family=Montserrat:wght@500;700;800;900&display=swap');

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 25%),
    linear-gradient(125deg, #ff3d9a 0%, #8a3ffc 26%, #1cc7ff 54%, #32e875 78%, #ffd166 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
  animation: gridFloat 12s linear infinite;
}

.birthday-home {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.aurora {
  position: fixed;
  z-index: -3;
  width: 46vmax;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.72;
  animation: drift 10s ease-in-out infinite alternate;
}

.aurora-one {
  top: -16vmax;
  left: -12vmax;
  background: #ffec3d;
}

.aurora-two {
  right: -16vmax;
  bottom: -18vmax;
  background: #00ffe0;
  animation-delay: -3s;
}

.aurora-three {
  top: 24%;
  right: 18%;
  width: 24vmax;
  background: #ff4fcb;
  animation-delay: -6s;
}

.video-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.video-scene::before,
.video-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.video-scene::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.34)),
    linear-gradient(180deg, rgba(12, 0, 38, 0.46), rgba(8, 0, 28, 0.16) 42%, rgba(8, 0, 28, 0.58));
}

.video-scene::after {
  z-index: 3;
  opacity: 0.2;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.2) 0 1px,
    transparent 1px 7px
  );
  animation: scanLines 4s linear infinite;
}

.film-strip {
  position: absolute;
  left: 50%;
  display: flex;
  gap: clamp(12px, 3vw, 30px);
  width: max-content;
  opacity: 0.62;
  transform: translateX(-50%) rotate(-7deg);
  animation: slideLeft 18s linear infinite;
}

.film-strip img {
  width: clamp(140px, 21vw, 300px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 54px rgba(15, 0, 40, 0.42);
}

.strip-one {
  top: 6%;
}

.strip-two {
  bottom: 4%;
  transform: translateX(-50%) rotate(8deg);
  animation-name: slideRight;
  animation-duration: 21s;
}

.spotlight {
  position: absolute;
  inset: 7% 10%;
  border-radius: 48px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.36), transparent 28%),
    conic-gradient(from 160deg, rgba(255, 217, 61, 0.24), rgba(0, 255, 224, 0.22), rgba(255, 79, 203, 0.28), rgba(255, 217, 61, 0.24));
  filter: blur(10px);
  opacity: 0.72;
  animation: pulseScene 4s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  width: min(1120px, 100%);
  max-width: calc(100vw - 48px);
  min-width: 0;
  padding: clamp(28px, 7vw, 72px) clamp(18px, 5vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  background: rgba(13, 9, 40, 0.28);
  box-shadow:
    0 28px 80px rgba(23, 0, 54, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(13px);
  animation: heroIn 900ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fff4a3;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 5px 18px rgba(60, 0, 75, 0.38);
  animation: floatText 2.8s ease-in-out infinite;
}

.typing-title {
  width: min(21ch, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  overflow: hidden;
  color: #fff;
  font-family: "Dancing Script", cursive;
  font-size: clamp(3.2rem, 7.6vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #ff3d9a,
    0 5px 0 #6e38ff,
    0 18px 45px rgba(0, 0, 0, 0.36);
  border-right: 0.08em solid #fff4a3;
  animation:
    typing 3.2s steps(21, end) 500ms both,
    caret 720ms step-end infinite;
}

.birthday-slogan {
  width: min(760px, 100%);
  margin: clamp(18px, 3vw, 28px) auto 0;
  color: #fff;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.2rem, 3.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 0 8px 26px rgba(23, 0, 54, 0.56);
  animation: sloganIn 900ms ease 3s both;
}

.surprise-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(82vw, 260px);
  min-height: 62px;
  margin-top: clamp(24px, 5vw, 42px);
  padding: 0 34px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  color: #221032;
  background: linear-gradient(135deg, #fff96b, #ff9f1c 35%, #ff4fcb 68%, #65ffdc);
  box-shadow:
    0 16px 36px rgba(255, 65, 160, 0.36),
    0 0 0 9px rgba(255, 255, 255, 0.16);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(0);
  animation: buttonPop 700ms ease 3.45s both, buttonBeat 1.7s ease-in-out 4.2s infinite;
}

.surprise-btn:hover,
.surprise-btn:focus-visible {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 22px 48px rgba(255, 65, 160, 0.46),
    0 0 0 11px rgba(255, 255, 255, 0.22);
}

.btn-shine {
  position: absolute;
  inset: -40% auto -40% -42%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  transform: rotate(18deg);
  animation: shine 2.2s ease-in-out infinite;
}

.surprise-btn span:last-child {
  position: relative;
}

.opening-surprise .birthday-home {
  animation: openSurprise 850ms cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

@keyframes typing {
  from {
    width: 0;
  }
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.96);
  }
}

@keyframes sloganIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes buttonPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
}

@keyframes buttonBeat {
  50% {
    transform: translateY(-2px) scale(1.025);
  }
}

@keyframes shine {
  45%,
  100% {
    left: 120%;
  }
}

@keyframes drift {
  to {
    transform: translate3d(6vw, 4vh, 0) scale(1.16);
  }
}

@keyframes slideLeft {
  from {
    translate: 18vw 0;
  }
  to {
    translate: -18vw 0;
  }
}

@keyframes slideRight {
  from {
    translate: -18vw 0;
  }
  to {
    translate: 18vw 0;
  }
}

@keyframes pulseScene {
  50% {
    opacity: 0.44;
    transform: scale(1.06);
  }
}

@keyframes scanLines {
  to {
    transform: translateY(28px);
  }
}

@keyframes gridFloat {
  to {
    background-position: 42px 42px;
  }
}

@keyframes floatText {
  50% {
    transform: translateY(-5px);
  }
}

@keyframes openSurprise {
  55% {
    opacity: 1;
    transform: scale(1.08) rotate(1deg);
    filter: saturate(1.6) brightness(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.45) rotate(-3deg);
    filter: blur(18px) brightness(1.9);
  }
}

@media (max-width: 720px) {
  body {
    overflow-y: auto;
  }

  .birthday-home {
    min-height: 100svh;
    padding: 18px;
  }

  .hero-copy {
    width: 100%;
    max-width: calc(100vw - 32px);
    padding: 34px 14px;
    border-radius: 22px;
  }

  .typing-title {
    white-space: normal;
    width: auto;
    border-right: 0;
    animation: mobileTitleIn 950ms ease both;
  }

  .birthday-slogan {
    width: min(300px, 100%);
    font-size: 0.98rem;
  }

  .film-strip {
    opacity: 0.42;
  }

  .strip-one {
    top: 1%;
  }

  .strip-two {
    bottom: 0;
  }
}

@media (max-width: 430px) {
  .birthday-slogan {
    font-size: 0.94rem;
  }

  .surprise-btn {
    min-height: 56px;
    padding: 0 24px;
  }
}

@keyframes mobileTitleIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
  }
}
