* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #160c18;
  color: #fff7fb;
  font-family: "DM Sans", Arial, sans-serif;
  overflow-x: hidden;
}
.aurora {
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, #ff5ca8 0, transparent 28%),
    radial-gradient(circle at 80% 10%, #a94cff 0, transparent 25%),
    radial-gradient(circle at 70% 80%, #ff9bd0 0, transparent 25%),
    linear-gradient(135deg, #190b1d, #351027 50%, #120914);
  filter: blur(25px);
  animation: aurora 14s ease-in-out infinite alternate;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.07;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.8) 1px,
    transparent 1px
  );
  background-size: 4px 4px;
}
.birthday-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
}
.glass {
  display: block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 32px;
}
.hero-card {
  width: min(820px, 100%);
  text-align: center;
  padding: 70px 50px;
  position: relative;
  z-index: 2;
  animation: heroIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.03em;
}
h1 {
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.9;
  margin: 18px 0 28px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #fff, #ffb5db, #ff63ac);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.12rem;
  line-height: 1.8;
  color: #f6dce9;
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: #ffb2d6;
  margin: 0;
}
.glow-button,
.soft-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.glow-button {
  color: #351025;
  background: linear-gradient(135deg, #fff, #ffb6dc);
  box-shadow: 0 10px 40px rgba(255, 91, 170, 0.4);
}
.glow-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 55px rgba(255, 91, 170, 0.6);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: float 7s ease-in-out infinite;
}
.orb-one {
  width: 160px;
  height: 160px;
  background: #ff5eac;
  opacity: 0.35;
  top: 15%;
  left: 8%;
}
.orb-two {
  width: 220px;
  height: 220px;
  background: #b74dff;
  opacity: 0.25;
  right: 5%;
  bottom: 15%;
  animation-delay: -3s;
}
.floating-stickers span {
  position: fixed;
  font-size: clamp(20px, 3vw, 42px);
  z-index: 0; /* Lo enviamos al fondo (detrás de las tarjetas y secciones) */
  pointer-events: none; /* Asegura que no bloquee los clics */
  animation: stickerFloat 9s ease-in-out infinite;
  opacity: 0.4; /* (Opcional) Una ligera transparencia para que quede más sutil */
}
.floating-stickers span:nth-child(1) {
  left: 5%;
  top: 35%;
}
.floating-stickers span:nth-child(2) {
  right: 7%;
  top: 25%;
  animation-delay: -2s;
}
.floating-stickers span:nth-child(3) {
  left: 15%;
  bottom: 15%;
  animation-delay: -4s;
}
.floating-stickers span:nth-child(4) {
  right: 15%;
  bottom: 28%;
  animation-delay: -6s;
}
.floating-stickers span:nth-child(5) {
  left: 48%;
  top: 8%;
  animation-delay: -1s;
}
.floating-stickers span:nth-child(6) {
  right: 35%;
  top: 45%;
  animation-delay: -5s;
}
.floating-stickers span:nth-child(7) {
  left: 45%;
  bottom: 8%;
  animation-delay: -3s;
}
.section {
  max-width: 1150px;
  margin: 0 auto;
  padding: 100px 20px;
}
.section-title {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 42px;
}
.section-title > span {
  font-size: 0.8rem;
  color: #ff87bd;
  font-weight: 700;
  padding-top: 8px;
}
.section-title h2 {
  margin-top: 8px;
}
.photo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.memory-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: cardIn 0.8s both;
}
.memory-card.wide {
  grid-column: span 2;
}
.memory-card.tall {
  grid-row: span 2;
}
.memory-card img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
  transition:
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.7s;
}
.memory-card:hover img {
  transform: scale(1.08) rotate(1deg);
  filter: saturate(1.15);
}
.memory-card:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgba(20, 5, 18, 0.85));
  pointer-events: none;
}
.memory-card figcaption {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  bottom: 18px;
  font-weight: 600;
}
.video-card {
  overflow: hidden;
}
.video-card video {
  width: 100%;
  display: block;
  max-height: 680px;
  background: #090509;
}
.video-caption {
  padding: 22px 25px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.video-caption span {
  color: #e8cbd9;
}
.message-card,
.surprise-box,
.music-player,
.final-card {
  padding: 55px;
}
.message-card {
  max-width: 900px;
  margin: auto;
}
.message-card p:not(.eyebrow),
.surprise-box p:not(.eyebrow),
.final-card p:not(.eyebrow) {
  font-size: 1.08rem;
  line-height: 1.9;
  color: #f2dbe7;
}
.signature {
  margin-top: 28px;
  font-family: "Playfair Display";
  font-size: 1.5rem;
  color: #ffafd5;
}
.sticker-board {
  height: 420px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sticker-board p {
  max-width: 500px;
  text-align: center;
  color: #f2dbe7;
}
.sticker {
  position: absolute;
  font-size: 80px;
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.25));
  animation: stickerDance 5s ease-in-out infinite;
}
.s1 {
  left: 12%;
  top: 20%;
}
.s2 {
  right: 13%;
  top: 16%;
  animation-delay: -1s;
}
.s3 {
  left: 28%;
  bottom: 18%;
  animation-delay: -2s;
}
.s4 {
  right: 29%;
  bottom: 18%;
  animation-delay: -3s;
}
.s5 {
  left: 48%;
  top: 8%;
  animation-delay: -4s;
}
.s6 {
  right: 5%;
  bottom: 35%;
  animation-delay: -1.5s;
}
.surprise-text {
  margin-top: 28px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffd6e8;
  animation: pop 0.5s;
}
.hidden {
  display: none;
}
.music-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.disc {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: radial-gradient(
    circle,
    #fff 0 7%,
    #ff9dcc 8% 25%,
    #ff4e9e 26% 100%
  );
  box-shadow: 0 0 50px rgba(255, 82, 165, 0.45);
  animation: spin 5s linear infinite;
  animation-play-state: paused;
}
.disc.playing {
  animation-play-state: running;
}
.music-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.final-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.confetti {
  font-size: 2rem;
  word-spacing: 20px;
  animation: confetti 3s ease-in-out infinite;
}
.final-card strong {
  color: #ffb3d6;
}
.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@keyframes aurora {
  to {
    transform: scale(1.15) rotate(8deg);
  }
}
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  50% {
    transform: translateY(-30px) translateX(20px);
  }
}
@keyframes stickerFloat {
  50% {
    transform: translateY(-25px) rotate(12deg);
    opacity: 0.7;
  }
}
@keyframes stickerDance {
  50% {
    transform: translateY(-22px) rotate(12deg) scale(1.08);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes confetti {
  50% {
    transform: scale(1.08) rotate(1deg);
  }
}
@media (max-width: 800px) {
  .hero-card {
    padding: 48px 25px;
  }
  .photo-wall {
    grid-template-columns: repeat(2, 1fr);
  }
  .memory-card.wide {
    grid-column: span 2;
  }
  .memory-card.tall {
    grid-row: span 1;
  }
  .music-player {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .music-actions {
    justify-content: center;
  }
  .video-caption {
    flex-direction: column;
  }
  .message-card,
  .surprise-box,
  .music-player,
  .final-card {
    padding: 35px 24px;
  }
  .floating-stickers span:nth-child(n + 5) {
    display: none;
  }
}
@media (max-width: 520px) {
  .section {
    padding: 70px 15px;
  }
  .photo-wall {
    display: grid;
    grid-template-columns: 1fr;
  }
  .memory-card,
  .memory-card.wide {
    grid-column: auto;
    min-height: clamp(340px, 92vw, 420px);
  }
  .memory-card img {
    min-height: clamp(340px, 92vw, 420px);
  }
  .hero-card {
    border-radius: 24px;
  }
  .sticker-board {
    height: 330px;
  }
  .sticker {
    font-size: 55px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
/* Bloqueo inicial de scroll */
body.locked {
  overflow: hidden;
  height: 100vh;
}

/* El hero/bienvenida ocupa la pantalla completa */
.birthday-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* Transición suave para la tarjeta inicial al desaparecer */
.hero-card {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease, filter 0.7s ease;
}

/* Estado al hacer clic: la tarjeta se encoge ligeramente y desaparece con un fundido */
body.unlocking .hero-card {
  opacity: 0;
  transform: scale(0.92);
  filter: blur(8px);
  pointer-events: none;
}

/* Transición suave de entrada para el contenido principal */
main {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

/* Estado visible del contenido */
body.unlocked main {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Reactivación del scroll */
body.unlocked {
  overflow-y: auto;
  height: auto;
}