:root {
  --bg-1: #00b4ff;
  --bg-2: #ff9f2d;
  --bg-3: #ff4aa5;
  --card-cream: #fff4d6;
  --accent-pink: #ff4aa5;
  --accent-blue: #0a77d5;
  --accent-green: #2fb34f;
  --text-main: #2d1550;
  --shadow: 0 20px 40px rgba(30, 20, 60, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 78%, rgba(255, 84, 165, 0.35), transparent 38%),
    radial-gradient(circle at 78% 20%, rgba(255, 238, 95, 0.25), transparent 34%),
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.25), transparent 38%),
    radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.3), transparent 42%),
    linear-gradient(120deg, var(--bg-1), var(--bg-2), var(--bg-3));
  overflow-x: hidden;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.18), transparent 35%),
    radial-gradient(circle at 82% 78%, rgba(255, 238, 95, 0.2), transparent 34%),
    linear-gradient(125deg, #19b8ff, #ff8f1f, #ff4aa5);
  transition: opacity .7s ease, visibility .7s ease;
}

.intro-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.08)),
    url("../img/paisaje-fondo.jpg") center 55% / cover no-repeat;
  filter: saturate(1.25) brightness(1.08);
}

.intro-float {
  position: absolute;
  width: clamp(130px, 24vw, 300px);
  border-radius: 0;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22));
  animation: introOrbit 4.6s ease-in-out infinite;
  z-index: 1;
  background: transparent;
}

.intro-dora {
  left: 1%;
  bottom: 9%;
}

.intro-mochila {
  width: clamp(180px, 30vw, 340px);
  left: 52%;
  top: 4%;
  transform: translateX(-50%) scale(0.98);
  animation-delay: .35s;
}

.intro-zorro {
  right: 2%;
  top: 22%;
  animation-delay: .7s;
}

.intro-content {
  background: linear-gradient(145deg, #1dc9ff, #ff7fd0, #ffd24f);
  border: 3px dashed #4c1d95;
  border-radius: 1.4rem;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 18px 34px rgba(43, 19, 70, 0.42);
  animation: introBounce 1s ease-out both;
  z-index: 2;
}

.intro-kicker {
  margin: 0;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff9a8;
  letter-spacing: .08em;
  text-shadow: 0 2px 0 rgba(41, 6, 67, 0.55);
}

.intro-content h1 {
  margin: 0.25rem 0 0;
  font-family: "Baloo 2", cursive;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 0 rgba(113, 9, 92, 0.7);
}

.intro-sub {
  margin: 0.2rem 0 .8rem;
  font-weight: 700;
  color: #2b0d58;
}

.click-hint {
  margin-top: .65rem;
  font-weight: 700;
  color: #23104e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.intro-stars {
  position: absolute;
  bottom: .7rem;
  font-size: 1.35rem;
  letter-spacing: .2rem;
  animation: drift 4s ease-in-out infinite;
  z-index: 2;
}

@keyframes introBounce {
  from { transform: translateY(18px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes introOrbit {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.invitation-wrap {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(25px) scale(0.98);
  transition: opacity .8s ease, transform .8s ease;
}

body.revealed .invitation-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.invitation-card {
  background: #ffeecf;
  backdrop-filter: none;
  border-radius: 2rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid #fff9ee;
  transform-origin: center;
  animation: introDrop 900ms cubic-bezier(.17,.67,.33,1.2) both;
}

@keyframes introDrop {
  from {
    transform: translateY(-30px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.artwork-panel {
  position: relative;
  min-height: 420px;
  padding: 1.2rem;
  overflow: hidden;
  background:
    linear-gradient(to top, #4cd466 0%, #89e88b 24%, #8edfff 24%, #95e9ff 100%),
    url("../img/paisaje-fondo.jpg") center 42% / cover no-repeat;
}

.scene-item {
  position: absolute;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 10px rgba(28, 23, 66, 0.24));
  object-fit: cover;
  animation: heroFloat 4.8s ease-in-out infinite;
  background: transparent;
  z-index: 2;
}

.scene-dora {
  width: clamp(170px, 40%, 310px);
  left: -8px;
  bottom: 88px;
}

.scene-mochila {
  width: clamp(220px, 54%, 400px);
  right: 20px;
  top: 34px;
  animation-delay: .55s;
}

.scene-zorro {
  width: clamp(120px, 24%, 200px);
  right: 8px;
  bottom: 104px;
  animation-delay: 1.05s;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1.4deg); }
}

.pulse-btn {
  font-weight: 700;
  border-radius: 999px;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 166, 0, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(255, 166, 0, 0); }
}

.rainbow {
  position: absolute;
  width: 340px;
  height: 180px;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 180px 180px 0 0;
  background:
    linear-gradient(to bottom,
      #ff4b6e 0 14%,
      #ff8f1f 14% 28%,
      #ffd028 28% 42%,
      #4dd365 42% 56%,
      #2fb8ff 56% 70%,
      #8067ff 70% 84%,
      transparent 84%);
  opacity: 0.92;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.18));
  animation: rainbowFloat 5s ease-in-out infinite;
}

@keyframes rainbowFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.sun {
  position: absolute;
  width: 88px;
  height: 88px;
  top: 18px;
  right: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8af, #ffd11a);
  box-shadow: 0 0 35px rgba(255, 228, 90, 0.8);
  animation: spinSun 12s linear infinite;
}

@keyframes spinSun {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(1px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud-1 {
  width: 120px;
  height: 38px;
  top: 90px;
  left: 34px;
  animation: cloudMove 16s linear infinite;
}

.cloud-1::before { width: 42px; height: 42px; top: -16px; left: 16px; }
.cloud-1::after { width: 58px; height: 58px; top: -24px; right: 12px; }

.cloud-2 {
  width: 132px;
  height: 42px;
  top: 145px;
  right: 42px;
  animation: cloudMove 20s linear infinite reverse;
}

.cloud-2::before { width: 44px; height: 44px; top: -18px; left: 22px; }
.cloud-2::after { width: 62px; height: 62px; top: -22px; right: 14px; }

@keyframes cloudMove {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(18px); }
}

.floating-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-badges span {
  position: absolute;
  font-size: 2rem;
  animation: drift 4.5s ease-in-out infinite;
}

.floating-badges span:nth-child(1) { top: 14%; left: 11%; animation-delay: 0.2s; }
.floating-badges span:nth-child(2) { top: 30%; right: 13%; animation-delay: 0.6s; }
.floating-badges span:nth-child(3) { bottom: 38%; left: 22%; animation-delay: 1.2s; }
.floating-badges span:nth-child(4) { bottom: 19%; right: 18%; animation-delay: 1.7s; }

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

.details-panel {
  padding: 1rem;
  background: linear-gradient(180deg, #fff8e6 0%, #ffd4f0 100%);
}

.paper-frame {
  height: 100%;
  background: var(--card-cream);
  border: 3px solid #d39b4f;
  border-radius: 1.6rem;
  padding: 1.45rem .9rem .9rem;
  position: relative;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.paper-frame::before,
.paper-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff75bc;
  top: 8px;
}

.paper-frame::before { left: 14px; }
.paper-frame::after { right: 14px; }

.tagline {
  font-family: "Baloo 2", cursive;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--accent-pink);
  line-height: 1.1;
}

h2 {
  margin: 0.4rem 0 0;
  font-family: "Baloo 2", cursive;
  color: var(--accent-blue);
  font-size: 3rem;
  line-height: 1;
}

.age-highlight {
  display: block;
  width: fit-content;
  margin: .4rem auto 0;
  padding: .28rem 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff36e, #ffb347, #ff77c8);
  color: #0058a8;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 14px rgba(255, 129, 36, 0.28);
  animation: agePop 1.4s ease-in-out infinite;
}

@keyframes agePop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.paper-frame .mt-4 {
  margin-top: .7rem !important;
}

.details-grid article {
  background: #fff;
  border-radius: 1rem;
  border: 2px solid #ffd37f;
  padding: 0.55rem;
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
}

.details-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(88, 55, 16, 0.15);
}

.details-grid h3,
.countdown h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent-green);
}

.countdown {
  position: relative;
  border-radius: 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, #ffeff8, #eefbff);
  border: 2px solid transparent;
  box-shadow: 0 12px 20px rgba(101, 49, 122, 0.22);
  overflow: hidden;
}

.countdown::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  z-index: 0;
  background: conic-gradient(from 50deg, #ff5eab, #ffd028, #31d671, #28c9ff, #ff5eab);
  animation: spinBorder 5.5s linear infinite;
}

.countdown::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #ffeff8, #eefbff);
  z-index: 0;
}

.countdown > * {
  position: relative;
  z-index: 1;
}

@keyframes spinBorder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.details-grid p {
  margin: 0.3rem 0 0;
  font-size: 1rem;
}

.counter-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .45rem;
}

.counter-boxes div {
  background: linear-gradient(180deg, #ffffff 0%, #dff6ff 100%);
  border-radius: .9rem;
  text-align: center;
  padding: .5rem .35rem;
  border: 2px solid #57bfff;
  box-shadow: 0 6px 14px rgba(34, 144, 207, 0.24);
}

.counter-boxes span {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #005ca8;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
  animation: bounceDigits 1.6s ease-in-out infinite;
}

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

.counter-boxes small {
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #555;
}

.actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.actions .btn {
  border-radius: 999px;
  font-weight: 700;
  padding: .46rem .62rem;
}

.note {
  font-size: .88rem;
  color: #5f4b2f;
}

.countdown-msg {
  font-weight: 700;
  color: #6b2a83;
}

.paw-trail {
  margin-top: 0.6rem;
  font-size: 1.25rem;
  letter-spacing: 0.15rem;
  color: #7a1f66;
}

.jungle-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.jungle-sparkles span {
  position: absolute;
  font-size: 1.6rem;
  animation: sparkleDrift 9s linear infinite;
}

.jungle-sparkles span:nth-child(1) { left: 8%; top: 22%; animation-duration: 7s; }
.jungle-sparkles span:nth-child(2) { left: 16%; top: 68%; animation-duration: 9s; }
.jungle-sparkles span:nth-child(3) { left: 83%; top: 20%; animation-duration: 8s; }
.jungle-sparkles span:nth-child(4) { left: 90%; top: 58%; animation-duration: 10s; }
.jungle-sparkles span:nth-child(5) { left: 47%; top: 10%; animation-duration: 11s; }
.jungle-sparkles span:nth-child(6) { left: 53%; top: 84%; animation-duration: 9.5s; }

@keyframes sparkleDrift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .35; }
  50% { transform: translateY(-15px) rotate(10deg); opacity: .9; }
}

.sky-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.sky-bubbles span {
  position: absolute;
  bottom: -120px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: bubbles 20s linear infinite;
}

.sky-bubbles span:nth-child(1) { left: 6%; animation-duration: 14s; }
.sky-bubbles span:nth-child(2) { left: 22%; animation-duration: 18s; width: 20px; height: 20px; }
.sky-bubbles span:nth-child(3) { left: 45%; animation-duration: 16s; width: 38px; height: 38px; }
.sky-bubbles span:nth-child(4) { left: 65%; animation-duration: 22s; }
.sky-bubbles span:nth-child(5) { left: 84%; animation-duration: 17s; width: 24px; height: 24px; }
.sky-bubbles span:nth-child(6) { left: 93%; animation-duration: 20s; width: 18px; height: 18px; }

@keyframes bubbles {
  from { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  to { transform: translateY(-120vh) scale(1.4); opacity: 0; }
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.party-shake {
  animation: shake .45s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 991px) {
  .artwork-panel {
    min-height: 360px;
    background:
      linear-gradient(to top, #50d86d 0%, #92ea95 24%, #9ae5ff 24%, #9cecff 100%),
      url("../img/paisaje-fondo.jpg") center 34% / min(460px, 82%) auto no-repeat;
  }

  .scene-dora {
    width: clamp(170px, 40%, 290px);
    left: -18px;
    bottom: 116px;
  }

  .scene-mochila {
    width: clamp(200px, 50%, 360px);
    right: 40px;
    top: 66px;
  }

  .scene-zorro {
    width: clamp(110px, 24%, 180px);
    right: 2px;
    bottom: 128px;
  }

  .tagline {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 575px) {
  .invitation-wrap {
    padding-inline: 0;
  }

  .invitation-card {
    border-radius: 1rem;
    border-left: 0;
    border-right: 0;
  }

  .details-grid,
  .counter-boxes {
    grid-template-columns: 1fr 1fr;
  }

  .artwork-panel {
    min-height: 250px;
    padding: .6rem;
    background:
      linear-gradient(to top, #57db74 0%, #9eee9f 24%, #a5ebff 24%, #a2edff 100%),
      url("../img/paisaje-fondo.jpg") center 38% / cover no-repeat;
  }

  .scene-dora {
    width: 44%;
    left: -10px;
    bottom: 62px;
  }

  .scene-mochila {
    width: 54%;
    right: 14px;
    top: 26px;
  }

  .scene-zorro {
    width: 24%;
    right: 4px;
    bottom: 78px;
  }

  .actions .btn {
    width: 100%;
  }

  .intro-content {
    padding: .95rem;
    width: min(92vw, 420px);
  }

  .intro-float {
    width: clamp(105px, 28vw, 150px);
  }

  .intro-mochila {
    width: clamp(150px, 40vw, 210px);
    top: 14%;
  }

  .details-panel {
    padding: .5rem;
  }

  .paper-frame {
    padding: .7rem;
  }

  .countdown-msg {
    font-size: .95rem;
  }
}

@media (max-width: 430px) {
  .intro-bg {
    background:
      radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 44%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.07)),
      url("../img/paisaje-fondo.jpg") center 50% / cover no-repeat;
  }

  .intro-content {
    width: 92vw;
    max-width: 360px;
    padding: 0.9rem 1rem;
    border-width: 3px;
  }

  .intro-content h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .intro-sub {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .intro-dora {
    width: 38vw;
    min-width: 150px;
    left: 2%;
    bottom: 8%;
  }

  .intro-mochila {
    width: 39vw;
    min-width: 150px;
    top: 1%;
    left: 14%;
    transform: translateX(0) scale(0.98);
  }

  .intro-zorro {
    width: 21vw;
    min-width: 90px;
    right: 4%;
    top: 14%;
  }

  .artwork-panel {
    min-height: 232px;
    padding: .45rem;
    background:
      linear-gradient(to top, #57db74 0%, #9eee9f 24%, #a5ebff 24%, #a2edff 100%),
      url("../img/paisaje-fondo.jpg") center 40% / cover no-repeat;
  }

  .scene-dora {
    width: 36%;
    left: 2px;
    bottom: 40px;
  }

  .scene-mochila {
    width: 45%;
    right: 22px;
    top: 8px;
  }

  .scene-zorro {
    width: 17%;
    right: -2px;
    bottom: 48px;
  }

  .details-panel {
    padding: 0.35rem;
  }

  .paper-frame {
    padding: 1.25rem .62rem .58rem;
    border-radius: 1rem;
  }

  .tagline {
    font-size: 1.78rem;
    line-height: 1.02;
  }

  .age-highlight {
    margin-top: .25rem;
    font-size: 2.15rem;
    padding: .06rem .72rem;
  }

  .details-grid article {
    padding: .44rem;
  }

  .details-grid p {
    line-height: 1.25;
  }

  .details-grid h3,
  .countdown h3 {
    font-size: .9rem;
  }

  .details-grid p {
    font-size: 1rem;
  }

  .counter-boxes span {
    font-size: 1.68rem;
  }

  .countdown-msg {
    font-size: .9rem;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
  }

  .actions .btn {
    width: 100%;
    font-size: .98rem;
    padding: .38rem .52rem;
  }

  .actions a.btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 412px) {
  .intro-content {
    width: 91vw;
    padding: .86rem .95rem;
  }

  .intro-dora {
    width: 39vw;
    min-width: 154px;
    left: 2%;
    bottom: 9%;
  }

  .intro-mochila {
    width: 40vw;
    top: 1%;
    left: 10%;
    transform: translateX(0) scale(0.98);
  }

  .intro-zorro {
    width: 20vw;
    min-width: 88px;
    right: 4%;
    top: 15%;
  }

  .scene-dora {
    width: 35%;
    left: 2px;
    bottom: 42px;
  }

  .scene-mochila {
    width: 44%;
    right: 20px;
    top: 8px;
  }

  .scene-zorro {
    width: 16%;
    right: -2px;
    bottom: 48px;
  }

  .tagline {
    font-size: 1.72rem;
  }

  .age-highlight {
    font-size: 2.05rem;
  }
}
