:root {
  --bg: #06131f;
  --gold: #ffd166;
  --orange: #ff8a1d;
  --purple: #8c4dd8;
  --text: #f7fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 216, 255, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(255, 138, 29, 0.24), transparent 26rem),
    radial-gradient(circle at 50% 80%, rgba(140, 77, 216, 0.18), transparent 32rem),
    linear-gradient(135deg, #03101a 0%, var(--bg) 50%, #102741 100%);
}

#confetti {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.welcome {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 80px 24px 32px;
  text-align: center;
}

.welcome-eyebrow {
  position: absolute;
  top: 28px;
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gift-stage {
  position: relative;
  z-index: 10;
  display: grid;
  place-items: center;
  width: min(320px, 84vw);
  height: min(320px, 84vw);
  border-radius: 32px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.12), transparent 70%);
}

.gift-wrap {
  position: relative;
  z-index: 2;
  width: min(260px, 72vw);
  height: min(260px, 72vw);
  cursor: pointer;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.45));
  transition: transform 700ms ease;
}

.gift-wrap.is-open {
  transform: scale(1.06);
}

.gift-box {
  position: relative;
  width: 100%;
  height: 100%;
}

.gift-body {
  position: absolute;
  inset: 22% 10% 10%;
  z-index: 2;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffb347, #ff7a18 55%, #e85d00);
  box-shadow:
    inset 0 -16px 30px rgba(0, 0, 0, 0.18),
    0 20px 40px rgba(0, 0, 0, 0.28);
}

.gift-ribbon-v,
.gift-ribbon-h {
  position: absolute;
  z-index: 3;
  background: linear-gradient(135deg, #ffe08a, #ffb347);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.gift-ribbon-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 30px;
  transform: translateX(-50%);
}

.gift-ribbon-h {
  top: 50%;
  right: 0;
  left: 0;
  height: 30px;
  transform: translateY(-50%);
}

.gift-lid {
  position: absolute;
  top: 10%;
  right: 6%;
  left: 6%;
  z-index: 4;
  height: 32%;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(145deg, #ffc857, #ff922b 60%, #ef6c00);
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.28),
    0 16px 34px rgba(0, 0, 0, 0.28);
  transform-origin: top center;
  transition: transform 900ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.gift-bow {
  position: absolute;
  top: -20px;
  left: 50%;
  z-index: 5;
  width: 76px;
  height: 44px;
  transform: translateX(-50%);
}

.gift-bow::before,
.gift-bow::after {
  position: absolute;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 10% 50%;
  content: "";
  background: linear-gradient(135deg, #b377ff, #5b2a96);
  box-shadow: 0 8px 20px rgba(91, 42, 150, 0.35);
}

.gift-bow::before {
  left: 0;
  transform: rotate(-28deg);
}

.gift-bow::after {
  right: 0;
  transform: rotate(28deg) scaleX(-1);
}

.gift-wrap.is-open .gift-lid {
  transform: translateY(-130%) rotateX(70deg);
}

.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.welcome-copy.is-hidden {
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
}

.welcome-title {
  margin: 0 0 8px;
  max-width: 100%;
  padding: 0 0.08em 0.1em;
  font-family: "Marck Script", cursive;
  font-size: clamp(38px, 9.5vw, 68px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff, #ffd166 70%, #ff8a1d);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}

.welcome-sub {
  margin: 0;
  color: rgba(247, 251, 255, 0.72);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  font-size: clamp(17px, 4vw, 20px);
}

.welcome-button {
  position: relative;
  z-index: 11;
  min-width: 240px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #07111a;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(255, 138, 29, 0.32);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.welcome-button:hover {
  transform: translateY(-2px);
}

.welcome-button:disabled,
.welcome-button.is-hidden {
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
}

.birthday-reveal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 9, 14, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.birthday-reveal[hidden] {
  display: none !important;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: linear-gradient(135deg, #06131f, #102741);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 650ms ease,
    visibility 650ms ease;
}

.page-transition.is-active {
  opacity: 1;
  visibility: visible;
}

.birthday-reveal p {
  max-width: min(94vw, 720px);
  margin: 0;
  padding: 0.12em 0.16em 0.18em;
  overflow: visible;
  font-family: "Marck Script", cursive;
  font-size: clamp(40px, 12vw, 88px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
  background: linear-gradient(135deg, #ffd166, #fff 52%, #ffeaa8);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.42));
  animation: revealPop 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.birthday-reveal span {
  font: inherit;
  letter-spacing: inherit;
  background: inherit;
  background-clip: inherit;
  -webkit-background-clip: inherit;
  color: inherit;
}

@keyframes revealPop {
  0% {
    transform: scale(0.88);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .welcome-eyebrow {
    left: 16px;
    right: 16px;
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: 0.12em;
  }

  .gift-stage {
    width: min(280px, 88vw);
    height: min(280px, 88vw);
  }

  .gift-wrap {
    width: min(220px, 76vw);
    height: min(220px, 76vw);
  }

  .welcome-title {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.12;
  }

  .birthday-reveal p {
    font-size: clamp(36px, 11vw, 56px);
    line-height: 1.14;
    padding-inline: 0.1em;
  }

  .welcome-button {
    width: 100%;
    max-width: 320px;
  }
}
