*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1118;
  --bg-soft: #171a24;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #f4f0ea;
  --text-muted: #a8a3b8;
  --accent: #e85d4a;
  --accent-light: #ff8a75;
  --gold: #e8b84a;
  --gift-red: #c94b4b;
  --gift-green: #3d8b6e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(232, 93, 74, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(232, 184, 74, 0.12), transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.bg-shapes {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite;
}

.shape-1 {
  width: 420px;
  height: 420px;
  background: var(--accent);
  top: -120px;
  left: -80px;
}

.shape-2 {
  width: 320px;
  height: 320px;
  background: var(--gold);
  bottom: 10%;
  right: -60px;
  animation-delay: -6s;
}

.shape-3 {
  width: 260px;
  height: 260px;
  background: var(--gift-green);
  top: 45%;
  left: 55%;
  animation-delay: -12s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Floating gifts */
.gift-scene {
  position: relative;
  width: 100%;
  height: 120px;
  margin-bottom: 0.5rem;
}

.gift {
  position: absolute;
  bottom: 0;
  animation: float 4s ease-in-out infinite;
}

.gift-left {
  left: 18%;
  animation-delay: 0s;
}

.gift-right {
  right: 18%;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

.gift-box {
  position: relative;
  width: 56px;
  height: 48px;
  transform: scale(0.9);
}

.gift-box-alt .gift-body { background: var(--gift-green); }
.gift-box-alt .gift-lid { background: #4da583; }
.gift-box-alt .gift-ribbon-v,
.gift-box-alt .gift-ribbon-h,
.gift-box-alt .gift-bow { background: var(--gold); }

.gift-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70%;
  background: var(--gift-red);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gift-lid {
  position: absolute;
  top: 18%;
  left: -4%;
  width: 108%;
  height: 22%;
  background: #d85a5a;
  border-radius: 4px 4px 2px 2px;
  animation: lidWiggle 4s ease-in-out infinite;
  transform-origin: bottom center;
}

.gift-left .gift-lid { animation-delay: 0.2s; }
.gift-right .gift-lid { animation-delay: 2.2s; }

@keyframes lidWiggle {
  0%, 85%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(-8deg) translateY(-2px); }
  91% { transform: rotate(6deg) translateY(-1px); }
  94% { transform: rotate(-3deg); }
}

.gift-ribbon-v,
.gift-ribbon-h {
  position: absolute;
  background: var(--gold);
  z-index: 2;
}

.gift-ribbon-v {
  left: 50%;
  top: 18%;
  width: 10px;
  height: 82%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.gift-ribbon-h {
  top: 52%;
  left: 0;
  width: 100%;
  height: 10px;
  border-radius: 2px;
}

.gift-bow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 22px;
  height: 14px;
  transform: translateX(-50%);
  background: var(--gold);
  border-radius: 50% 50% 40% 40%;
  z-index: 3;
  box-shadow: -14px 0 0 -4px var(--gold), 14px 0 0 -4px var(--gold);
}

/* Hero entrance */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.8rem, 10vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-word:first-child {
  animation-delay: 0.5s;
}

.title-accent {
  color: var(--accent-light);
  animation-delay: 0.7s;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card */
.card {
  width: 100%;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  animation: cardIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 1.2s;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite 2s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1rem;
}

.progress {
  margin: 1.5rem 0 0.5rem;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
  animation: loadBar 2.5s ease-out forwards 1.8s;
}

@keyframes loadBar {
  to { width: 68%; }
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 2.2s;
}

.footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 2.5s;
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.footer a:hover {
  border-bottom-color: var(--accent-light);
}

@media (max-width: 480px) {
  .gift-scene {
    height: 90px;
  }

  .gift-left { left: 8%; }
  .gift-right { right: 8%; }

  .gift-box {
    transform: scale(0.75);
  }

  .card {
    padding: 1.5rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #confetti {
    display: none;
  }
}
