:root {
  --lila: #b88ae8;
  --lila-oscuro: #7652a6;
  --lavanda: #f1e6ff;
  --rosa: #ffd9f2;
  --perla: #fff8ff;
  --texto: #38284d;
  --muted: #766985;
  --blanco: #ffffff;
  --shadow: 0 24px 70px rgba(83, 43, 122, 0.18);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--texto);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,.95), transparent 25%),
    radial-gradient(circle at 85% 12%, rgba(255,217,242,.85), transparent 28%),
    linear-gradient(135deg, #f8edff 0%, #ead7ff 40%, #d8bdff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.75) 1px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.45) 2px, transparent 3px);
  background-size: 42px 42px, 76px 76px;
  pointer-events: none;
  opacity: .45;
}

.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #f7e8ff, #dcc1ff);
  display: grid;
  place-items: center;
  z-index: 999;
  transition: opacity .5s ease, visibility .5s ease;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  padding: 34px;
  border-radius: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid rgba(255,255,255,.8);
}
.loader-shell { font-size: 54px; animation: bounce 1.2s infinite; }
.loader p { font-weight: 700; color: var(--lila-oscuro); }

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 24px;
  position: relative;
  z-index: 1;
}

.section-card {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 54px);
  margin-bottom: 28px;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 36px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '✨';
  position: absolute;
  right: 28px;
  top: 18px;
  font-size: 52px;
  opacity: .28;
  transform: rotate(12deg);
}
.eyebrow {
  color: var(--lila-oscuro);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .8rem;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(3.4rem, 9vw, 7.4rem);
  line-height: .88;
  margin: 0;
  color: var(--lila-oscuro);
  letter-spacing: -0.06em;
}
.hero h1 span {
  font-family: 'Great Vibes', cursive;
  font-size: 1.25em;
  color: #a863de;
  text-shadow: 0 8px 0 rgba(255,255,255,.8);
}
.hero h2, .section-heading h2, .intro-card h2, .closing-card h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 16px 0;
}
.hero-text, .intro-card p, .section-heading p, .closing-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}
.hero-date {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f7e9ff);
  border: 1px solid rgba(184,138,232,.35);
  margin: 18px 0 24px;
}
.hero-date span { font-size: .82rem; color: var(--muted); }
.hero-date strong { font-size: 1.4rem; color: var(--lila-oscuro); }

.main-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #a863de, #7d55c6);
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(118,82,166,.28);
  transition: transform .25s ease, box-shadow .25s ease;
}
.main-btn:hover { transform: translateY(-3px); box-shadow: 0 24px 45px rgba(118,82,166,.36); }

.hero-visual { display: flex; justify-content: center; }

.birthday-photo-card {
  width: min(430px, 100%);
  border-radius: 44px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,239,255,.76)),
    radial-gradient(circle at top, #fff, #ead6ff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), var(--shadow);
  position: relative;
  overflow: hidden;
  padding: 24px 24px 28px;
  transform: rotate(1.5deg);
}
.birthday-photo-card::before,
.birthday-photo-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(184,138,232,.16);
  pointer-events: none;
}
.birthday-photo-card::before { width: 190px; height: 190px; left: -72px; top: -68px; }
.birthday-photo-card::after { width: 230px; height: 230px; right: -90px; bottom: -90px; }
.photo-frame {
  position: relative;
  z-index: 2;
  border-radius: 34px;
  overflow: hidden;
  background: #fff;
  padding: 10px;
  box-shadow: 0 20px 48px rgba(68,38,88,.18);
  transform: rotate(-1.5deg);
}
.leslie-photo {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: center;
  border-radius: 26px;
}
.photo-caption {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  color: var(--lila-oscuro);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 12px 28px rgba(80,46,120,.08);
}
.photo-caption strong { display: block; color: var(--texto); margin-bottom: 4px; }
.mini-pug {
  position: absolute;
  z-index: 3;
  width: 96px;
  right: 6px;
  bottom: 8px;
  filter: drop-shadow(0 10px 18px rgba(68,38,88,.18));
  transform: rotate(-8deg);
}

.moon-card {
  width: min(390px, 100%);
  min-height: 480px;
  border-radius: 44px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(250,239,255,.65)),
    radial-gradient(circle at top, #fff, #ead6ff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 28px;
}
.moon-card::before, .moon-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(184,138,232,.18);
}
.moon-card::before { width: 170px; height: 170px; left: -60px; top: -40px; }
.moon-card::after { width: 220px; height: 220px; right: -80px; bottom: -70px; }
.age-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b98af0, #fff);
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--lila-oscuro);
  z-index: 2;
}
.pug-img {
  width: 100%;
  max-width: 310px;
  z-index: 2;
  filter: drop-shadow(0 18px 30px rgba(68,38,88,.2));
}
.moon-card p {
  z-index: 2;
  font-weight: 800;
  color: var(--lila-oscuro);
  text-align: center;
}

.intro-card { text-align: center; }
.mode-section { margin: 36px 0; }
.section-heading { text-align: center; margin-bottom: 24px; }
.joke-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.joke-card {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 14px 35px rgba(85,54,120,.12);
  font-weight: 700;
  min-height: 100px;
  display: flex;
  align-items: center;
  transition: transform .25s ease;
}
.joke-card:hover { transform: translateY(-5px) rotate(-1deg); }

.rsvp-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 800; color: var(--texto); }
input, textarea {
  width: 100%;
  border: 1px solid rgba(118,82,166,.22);
  border-radius: 18px;
  padding: 15px 16px;
  font-family: inherit;
  font-size: .98rem;
  color: var(--texto);
  background: rgba(255,255,255,.9);
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
input:focus, textarea:focus {
  border-color: var(--lila);
  box-shadow: 0 0 0 4px rgba(184,138,232,.18);
}
textarea { resize: vertical; }
small { color: var(--muted); }
.error-message { color: #c03a67; font-weight: 700; min-height: 18px; }
.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.option-card {
  background: rgba(255,255,255,.82);
  border: 2px solid transparent;
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  min-height: 120px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all .25s ease;
  box-shadow: 0 10px 25px rgba(80,46,120,.08);
}
.option-card:hover, .option-card.selected {
  border-color: var(--lila);
  transform: translateY(-3px);
  background: #fff;
}
.option-card input { width: auto; margin-top: 4px; }
.option-card span { font-weight: 700; line-height: 1.45; }
.selected-message {
  display: none;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(184,138,232,.14);
  color: var(--lila-oscuro);
  font-weight: 800;
}
.selected-message.show { display: block; }
.submit-btn { grid-column: 1 / -1; justify-self: center; min-width: 240px; }
.response-box {
  display: none;
  margin-top: 22px;
  padding: 18px;
  border-radius: 22px;
  font-weight: 800;
  text-align: center;
}
.response-box.show { display: block; }
.response-box.success { background: #f0fff5; color: #287a44; border: 1px solid rgba(40,122,68,.18); }
.response-box.error { background: #fff0f5; color: #b72f63; border: 1px solid rgba(183,47,99,.18); }

.closing-card { text-align: center; }
.closing-card span {
  display: inline-block;
  margin-top: 12px;
  font-weight: 900;
  color: var(--lila-oscuro);
}
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  padding: 20px;
}
.floating-decor {
  position: fixed;
  z-index: 0;
  font-size: 44px;
  opacity: .45;
  animation: float 6s ease-in-out infinite;
}
.decor-1 { left: 5%; top: 18%; }
.decor-2 { right: 7%; top: 34%; animation-delay: 1s; }
.decor-3 { left: 8%; bottom: 16%; animation-delay: 2s; }
.decor-4 { right: 12%; bottom: 9%; animation-delay: 1.6s; }

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

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: center; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .joke-grid, .option-grid, .rsvp-form { grid-template-columns: 1fr; }
  .submit-btn { width: 100%; }
  
.birthday-photo-card {
  width: min(430px, 100%);
  border-radius: 44px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,239,255,.76)),
    radial-gradient(circle at top, #fff, #ead6ff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), var(--shadow);
  position: relative;
  overflow: hidden;
  padding: 24px 24px 28px;
  transform: rotate(1.5deg);
}
.birthday-photo-card::before,
.birthday-photo-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(184,138,232,.16);
  pointer-events: none;
}
.birthday-photo-card::before { width: 190px; height: 190px; left: -72px; top: -68px; }
.birthday-photo-card::after { width: 230px; height: 230px; right: -90px; bottom: -90px; }
.photo-frame {
  position: relative;
  z-index: 2;
  border-radius: 34px;
  overflow: hidden;
  background: #fff;
  padding: 10px;
  box-shadow: 0 20px 48px rgba(68,38,88,.18);
  transform: rotate(-1.5deg);
}
.leslie-photo {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: center;
  border-radius: 26px;
}
.photo-caption {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  color: var(--lila-oscuro);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 12px 28px rgba(80,46,120,.08);
}
.photo-caption strong { display: block; color: var(--texto); margin-bottom: 4px; }
.mini-pug {
  position: absolute;
  z-index: 3;
  width: 96px;
  right: 6px;
  bottom: 8px;
  filter: drop-shadow(0 10px 18px rgba(68,38,88,.18));
  transform: rotate(-8deg);
}

.moon-card { min-height: 390px; }
  .pug-img { max-width: 260px; }
}

@media (max-width: 520px) {
  .page { width: min(100% - 20px, 1120px); padding-top: 18px; }
  .section-card { padding: 24px 18px; border-radius: 24px; }
  .hero h1 { font-size: 4rem; }
  .birthday-photo-card { padding: 16px 16px 22px; border-radius: 30px; }
  .photo-frame { border-radius: 24px; padding: 7px; }
  .leslie-photo { border-radius: 18px; }
  .photo-caption { font-size: .9rem; padding-right: 84px; }
  .floating-decor { display: none; }
}
