@import url('https://googleapis.com');

:root {
  --navy: #040d1b;
  --navy-mid: #0e2947;
  --ice: #bfe3fb;
  --ice-bright: #f2faff;
  --silver: #d8e9f5;
  --ink: #10263d;
  --muted: #5b7388;
  --border: #cfe0ed;
  --accent: #163b5c;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: #f7fbff;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, .serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; }

#magicFlash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #c8ebff 38%, rgba(16, 48, 82, 0.35) 72%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 55;
  transform: scale(0.65);
  transition: opacity 0.85s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}
#magicFlash.active { opacity: 0.96; transform: scale(1.7); }

/* ================= PORTADA / ESCENA DEL SOBRE ================= */
#intro {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 44%, rgba(44, 102, 152, 0.58) 0%, rgba(13, 38, 66, 0.88) 42%, #030914 82%);
  isolation: isolate;
}

.sky-glow {
  position: absolute;
  width: min(760px, 110vw);
  height: min(760px, 110vw);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166, 219, 255, 0.22) 0%, rgba(72, 134, 189, 0.08) 45%, transparent 72%);
  filter: blur(18px);
  animation: skyPulse 6s ease-in-out infinite alternate;
  z-index: -2;
  pointer-events: none;
}
@keyframes skyPulse {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  to { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.aurora-ribbons {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 65% 28% at 25% 25%, rgba(145, 214, 255, 0.2), transparent 70%),
    radial-gradient(ellipse 70% 30% at 78% 68%, rgba(185, 228, 255, 0.16), transparent 70%),
    linear-gradient(125deg, transparent 25%, rgba(226, 246, 255, 0.14) 50%, transparent 75%);
  animation: auroraDrift 12s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}
@keyframes auroraDrift {
  to { transform: translateX(6%) rotate(3.5deg) scale(1.05); filter: brightness(1.35); }
}

.vignette-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(191, 227, 251, 0.22);
  box-shadow: inset 0 0 110px rgba(2, 7, 17, 0.75);
  pointer-events: none;
}

.intro-inner {
  text-align: center;
  padding: 28px 18px 34px;
  max-width: 820px;
  animation: arrive 1.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.kicker { letter-spacing: 0.32em; text-transform: uppercase; font-size: 10px; color: #cde8fc; text-shadow: 0 0 18px rgba(168, 219, 255, 0.45); }
.intro-title { font-size: clamp(44px, 8.2vw, 82px); line-height: 0.95; margin: 12px 0 10px; color: #ffffff; text-shadow: 0 6px 36px rgba(155, 214, 255, 0.45); }
.intro-title span { font-style: italic; color: #dff2ff; }
.intro-sub { font-size: 11px; letter-spacing: 0.26em; color: #cbe3f5; text-transform: uppercase; }

.envelope-stage { position: relative; width: min(360px, 90vw); margin: 30px auto; perspective: 1200px; z-index: 5; }
.envelope-wrap {
  width: 100%;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  animation: floatEnvelope 5s ease-in-out infinite;
  transition: transform 0.2s ease-out, filter 0.3s ease;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)) drop-shadow(0 0 20px rgba(191, 227, 251, 0.4));
}
.envelope-wrap:hover { filter: drop-shadow(0 25px 40px rgba(0,0,0,0.8)) drop-shadow(0 0 40px rgba(191, 227, 251, 0.8)); }
@keyframes floatEnvelope {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.magical-image-container { width: 100%; border-radius: 12px; overflow: hidden; position: relative; }
.real-envelope-img { width: 100%; height: auto; display: block; border-radius: 12px; }

.sparkle-burst { position: absolute; left: 50%; top: 40%; z-index: 10; pointer-events: none; }
.spark {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 0 15px #c8ebff, 0 0 30px #ffffff;
  animation: sparkFly 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1.5); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.1); }
}

.magical-open-btn {
  border: 1px solid rgba(235, 248, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 15px 35px;
  border-radius: 999px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 0 20px rgba(182, 224, 252, 0.4);
  transition: all 0.3s ease;
  margin-top: 10px;
}
.magical-open-btn:hover { background: #ffffff; color: #040d1b; box-shadow: 0 0 40px rgba(255, 255, 255, 0.8); transform: translateY(-2px); }
.hint { font-size: 9.5px; color: #b7d2e8; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 14px; }

#intro.step-seal .envelope-wrap { transform: scale(1.1) rotate(5deg); opacity: 0; transition: all 0.8s ease-in; }
#intro.step-flap .envelope-wrap { opacity: 0; transform: translateY(-50px) scale(1.2); }
#intro.fade { animation: introDissolve 1.1s ease forwards; }
@keyframes introDissolve { to { opacity: 0; transform: scale(1.05); visibility: hidden; } }

/* ================= CARTA INVERNAL (FONDO OSCURO Y NIEVE) ================= */
#invitation[hidden] { display: none; }
#invitation {
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.parchment-sheet {
  position: relative;
  background: linear-gradient(160deg, rgba(10, 26, 45, 0.88) 0%, rgba(4, 13, 27, 0.96) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(191, 227, 251, 0.3);
  border-radius: 12px;
  padding: clamp(32px, 6vw, 60px) clamp(20px, 5vw, 52px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

#invitationSnowContainer { position: fixed; inset: 0; pointer-events: none; z-index: 5; filter: drop-shadow(0 0 10px white); }
#invitationSnowContainer .snow { position: absolute; width: 10px; height: 10px; background: white; border-radius: 50%; top: -10px; opacity: 0; }

.music-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 45;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 999px;
  border: 1px solid rgba(216, 231, 243, 0.55);
  background: rgba(5, 17, 34, 0.88); backdrop-filter: blur(8px);
  color: #f3f9ff; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}
.music-dot { width: 7px; height: 7px; border-radius: 50%; background: #8aa8be; }
.music-btn.is-playing .music-dot { background: #a8e4ff; box-shadow: 0 0 10px #a8e4ff; }

.chapter-dots { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 14px; }
.chapter-dots .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #8eb0ca; background: rgba(255, 255, 255, 0.35); transition: transform 0.25s ease, background-color 0.25s ease; }
.chapter-dots .dot.active { background: #bfe3fb; transform: scale(1.4); box-shadow: 0 0 12px #bfe3fb; }

.hero { min-height: 96svh; position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 52px 22px 44px; overflow: hidden; background: #081a2e; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 10%; filter: saturate(0.88) contrast(1.04); animation: photoBreath 18s ease-in-out infinite alternate; }
@keyframes photoBreath { to { transform: scale(1.08) translateX(-1.5%); } }

.hero-vignette { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 17, 34, 0.96) 0%, rgba(5, 17, 34, 0.52) 45%, rgba(5, 17, 34, 0.14) 100%); pointer-events: none; }
.frost-frame { position: absolute; inset: 16px; border: 1px solid rgba(232, 247, 255, 0.26); pointer-events: none; z-index: 2; }
.hero-copy { position: relative; z-index: 3; text-align: center; color: #ffffff; max-width: 680px; }

.chapter-tag { letter-spacing: 0.28em; text-transform: uppercase; font-size: 10px; color: #d6eaf9; }
.chapter-tag.dark { text-align: center; color: #bfe3fb; }
.hero-name { font-size: clamp(50px, 9.5vw, 88px); line-height: 0.9; margin: 14px 0 6px; text-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); }
.surname { font-size: 12px; letter-spacing: 0.28em; color: #dcebf7; }
.hero-badge { display: inline-block; margin-top: 20px; padding: 8px 20px; border-top: 1px solid rgba(220, 235, 247, 0.45); border-bottom: 1px solid rgba(220, 235, 247, 0.45); letter-spacing: 0.24em; font-size: 11px; }

.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; text-decoration: none; color: #d7ecfc; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; }
.cue-line { display: block; width: 1px; height: 34px; background: linear-gradient(180deg, #e5f5ff, transparent); animation: cuePulse 2s ease-in-out infinite; }
@keyframes cuePulse { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(7px); opacity: 1; } }

.story-thread { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 0; color: #7c9bb4; font-size: 13px; }
.story-thread::before, .story-thread::after { content: ""; width: 1px; height: 26px; background: linear-gradient(180deg, transparent, #9ab7ce, transparent); }
.content { max-width: 860px; margin: 0 auto; padding: 18px 20px; position: relative; z-index: 10; }
.sheet-corner { position: absolute; width: 22px; height: 22px; border-color: #8eb0ca; border-style: solid; pointer-events: none; }
.sheet-corner.tl { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.sheet-corner.tr { top: 12px; right: 12px; border-width: 1px 1px 0 0; }
.sheet-corner.bl { bottom: 12px; left: 12px; border-width: 0 0 1px 1px; }
.sheet-corner.br { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }
.event-title { text-align: center; font-size: clamp(38px, 7vw, 58px); color: #ffffff; margin: 10px 0 28px; text-shadow: 0 0 20px rgba(191, 227, 251, 0.5); }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.info { background: rgba(255, 255, 255, 0.92); border: 1px solid var(--border); border-radius: 4px; padding: 22px 10px; text-align: center; transition: transform 0.25s ease; }
.info:hover { transform: translateY(-3px); }
.info strong { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(24px, 4vw, 32px); font-weight: 600; color: #1c4160; }
.info span { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.countdown { display: flex; justify-content: center; gap: 10px; margin: 30px 0; flex-wrap: wrap; }
.timebox { background: linear-gradient(180deg, #1b4468, #112f4a); color: #ffffff; min-width: 72px; border-radius: 4px; padding: 14px 10px; text-align: center; border: 1px solid rgba(191, 227, 251, 0.25); }
.timebox b { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 30px; font-weight: 500; line-height: 1.05; }
.timebox small { font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: #cfe4f5; }
.venue-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(191, 227, 251, 0.2); border-radius: 6px; padding: 26px 18px; text-align: center; }
.address { line-height: 1.85; color: #d8e9f5; font-size: 14px; margin: 0 auto; max-width: 500px; }
.address strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 600; color: #ffffff; }
.address span { color: #8eb0ca; font-size: 12px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid #8ba9bf; border-radius: 3px; color: #244a66; padding: 13px 20px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; background: #ffffff; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.action:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(191, 227, 251, 0.25); }
.action.primary { background: #bfe3fb; color: #040d1b; font-weight: 500; border-color: #bfe3fb; }
.next-page-link { display: block; text-align: center; margin-top: 30px; text-decoration: none; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 18px; color: #bfe3fb; transition: color 0.2s ease, transform 0.2s ease; }
.next-page-link:hover { color: #ffffff; transform: translateY(2px); text-shadow: 0 0 15px rgba(255, 255, 255, 0.8); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.photo-slot { margin: 0; position: relative; aspect-ratio: 4 / 5; border-radius: 5px; overflow: hidden; border: 1px solid rgba(191, 227, 251, 0.3); background: rgba(10, 26, 45, 0.6); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.photo-slot.has-photo:hover img { transform: scale(1.04); }
.photo-slot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 17px; color: #ffffff; background: linear-gradient(0deg, rgba(5, 17, 34, 0.85), transparent); }
.photo-slot.placeholder img { opacity: 0; position: absolute; }
.placeholder-box { position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; border: 1.5px dashed #8faec6; border-radius: 4px; color: #d8e9f5; background: rgba(255, 255, 255, 0.04); }
.slot-tag { font-size: 9px; letter-spacing: 0.1em; background: #bfe3fb; color: #040d1b; font-weight: 500; padding: 4px 8px; border-radius: 3px; }
.placeholder-box strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; font-weight: 600; color: #ffffff; }
.placeholder-box small { font-size: 11px; color: #8eb0ca; }
.photo-slot.has-photo .placeholder-box { display: none; }
/* CARTA FINAL (CORREGIDA PARA FONDO OSCURO) */
.final-sheet h2 { text-align: center; font-size: clamp(34px, 6vw, 46px); color: #ffffff; margin: 10px 0 28px; text-shadow: 0 0 20px rgba(191, 227, 251, 0.4); }
.final-sheet p { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(20px, 2.5vw, 23px); line-height: 1.65; color: #e6f2fa; margin: 0 0 16px; }
.wax-footer { width: 44px; height: 44px; margin: 28px 0 10px auto; border-radius: 50%; display: grid; place-items: center; font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; color: #040d1b; font-weight: 600; background: radial-gradient(circle at 35% 25%, #ffffff, #bfe3fb); border: 1px solid #ffffff; box-shadow: 0 0 20px rgba(191, 227, 251, 0.5); }
.signature { text-align: right; margin-top: 6px; font-style: italic; color: #bfe3fb; }
footer { text-align: center; padding: 40px 20px 60px; color: #8eb0ca; font-size: 10px; letter-spacing: 0.15em; }
/* MODAL RSVP */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 17, 34, 0.78); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(460px, 100%); background: #ffffff; color: var(--ink); border: 1px solid var(--border); border-radius: 6px; padding: 30px 24px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.modal-close { position: absolute; top: 12px; right: 14px; border: none; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.section-kicker { text-align: center; color: #6f899f; letter-spacing: 0.24em; text-transform: uppercase; font-size: 10px; }
.modal-card h3 { text-align: center; font-size: 34px; color: var(--accent); margin: 6px 0 4px; }
.modal-sub { text-align: center; font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #39556d; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: #f9fcfe; color: var(--ink); font-size: 13px; }
.modal-actions { margin-top: 18px; }
.modal-actions .action { width: 100%; background: var(--accent); color: #ffffff; }
.modal-feedback { margin: 12px 0 0; font-size: 12px; color: #1f537a; text-align: center; min-height: 18px; }
/* NIEVE PORTADA */
.snow-wrapper { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.snow { border-radius: 50%; opacity: 0.8; position: absolute; top: -100vh; animation-name: fall; animation-timing-function: linear; animation-iteration-count: infinite; }
.layer1 { width: 1.5rem; height: 1.5rem; filter: blur(1.5px); animation-duration: 6s; box-shadow: 10vw 20vh 0 0 #fff, 25vw 15vh 0 0 #fff, 40vw 50vh 0 0 #fff, 55vw 80vh 0 0 #fff, 70vw 30vh 0 0 #fff, 85vw 60vh 0 0 #fff, 15vw 90vh 0 0 #fff, 30vw 10vh 0 0 #fff, 45vw 75vh 0 0 #fff, 60vw 40vh 0 0 #fff, 75vw 95vh 0 0 #fff, 90vw 20vh 0 0 #fff; }
.layer2 { width: 1.2rem; height: 1.2rem; filter: blur(3px); animation-duration: 8s; box-shadow: 5vw 30vh 0 0 #fff, 20vw 60vh 0 0 #fff, 35vw 10vh 0 0 #fff, 50vw 80vh 0 0 #fff, 65vw 40vh 0 0 #fff, 80vw 70vh 0 0 #fff, 95vw 20vh 0 0 #fff, 10vw 90vh 0 0 #fff; }
@keyframes fall { 100% { transform: translateY(200vh); } }
@media (max-width: 720px) { .chapter-dots { display: none; } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } .photo-slot { aspect-ratio: 4 / 3; } }
@media (max-width: 520px) { .event-grid { gap: 8px; } .info { padding: 18px 6px; } .info strong { font-size: 20px; } .info span { font-size: 8px; } }
#winterCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}
/* ================= EFECTO CRISTAL Y HIELO ESCARCHADO ================= */

/* 1. El marco principal de cristal helado */
.parchment-sheet {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(191, 227, 251, 0.06) 45%,
    rgba(10, 26, 45, 0.35) 100%
  ) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border: 1.5px solid rgba(225, 246, 255, 0.55) !important;
  border-radius: 18px !important;
  box-shadow:
    0 25px 60px rgba(0, 5, 15, 0.75),
    0 0 35px rgba(168, 225, 255, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.65),
    inset 0 0 28px rgba(191, 227, 251, 0.25) !important;
}

/* 2. Destello diagonal de cristal sobre el cuadro */
.parchment-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.04) 35%,
    transparent 60%
  );
  pointer-events: none;
}

/* 3. Esquinas decorativas estilo cristal tallado */
.sheet-corner {
  width: 28px !important;
  height: 28px !important;
  border-color: #e3f5ff !important;
  filter: drop-shadow(0 0 8px rgba(191, 227, 251, 0.9));
}

/* 4. Tarjetas de Fecha, Hora y Año en hielo translúcido */
.info {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(191, 227, 251, 0.08) 100%
  ) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(225, 246, 255, 0.45) !important;
  border-radius: 10px !important;
  box-shadow:
    0 8px 24px rgba(4, 13, 27, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.info strong {
  color: #ffffff !important;
  text-shadow: 0 0 14px rgba(191, 227, 251, 0.7);
}

.info span {
  color: #cde8fc !important;
}

/* 5. Recuadro de "El lugar del encuentro" en vidrio esmerilado */
.venue-card {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(225, 246, 255, 0.35) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 20px rgba(191, 227, 251, 0.12) !important;
}

/* 5. Recuadro de "El lugar del encuentro" en vidrio esmerilado */
.venue-card {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(225, 246, 255, 0.35) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 20px rgba(191, 227, 251, 0.12) !important;
}

/* 6. Cursor parpadeante para la carta animada */
.typing-cursor::after {
  content: '|';
  display: inline-block;
  margin-left: 3px;
  font-weight: 300;
  color: #bfe3fb;
  text-shadow: 0 0 10px rgba(191, 227, 251, 0.9);
  animation: blinkCursor 0.75s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Evita que las palabras se corten al final de cada línea */
.dance-word {
  display: inline-block;
  white-space: nowrap;
}

/* 6. Efecto de escritura suave y danzante */
.dance-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  filter: blur(2px);
  text-shadow: 0 0 12px rgba(191, 227, 251, 0.9);
  animation: charDanceIn 0.89s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes charDanceIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    text-shadow: none;
  }
}

.typing-cursor::after {
  content: '✦';
  display: inline-block;
  margin-left: 5px;
  font-size: 0.7em;
  vertical-align: middle;
  color: #bfe3fb;
  text-shadow: 0 0 12px rgba(191, 227, 251, 0.95);
  animation: starFloat 1.4s ease-in-out infinite alternate;
}

@keyframes starFloat {
  0% { opacity: 0.35; transform: translateY(-2px) scale(0.85); }
  100% { opacity: 1; transform: translateY(2px) scale(1.15); }
}

/* 7. Aparición mágica del sello y firma al finalizar la carta */
.final-sheet .wax-footer,
.final-sheet .signature {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.final-sheet .wax-footer.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.final-sheet .signature.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s; /* La firma aparece un instante después del sello */
}

/* 8. Visor mágico de Postales (Lightbox con frase desde el centro) */
.photo-slot.has-photo {
  cursor: zoom-in;
}

.postal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 13, 27, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.postal-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.postal-lightbox-frame {
  position: relative;
  max-width: min(92vw, 540px);
  max-height: 82vh;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(225, 246, 255, 0.65);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(191, 227, 251, 0.35);
  transform: scale(0.85);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.postal-lightbox.is-open .postal-lightbox-frame {
  transform: scale(1);
}

.postal-lightbox-frame img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: cover;
  filter: brightness(0.78); /* Oscurece un poco la foto para que la frase resalte */
}

/* Frase emergiendo desde el centro hacia afuera */
.postal-center-quote {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: radial-gradient(circle, rgba(4, 13, 27, 0.62) 0%, transparent 78%);
  pointer-events: none;
}

.postal-center-quote p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 22px rgba(191, 227, 251, 0.9);
  opacity: 0;
  transform: scale(0.25);
  filter: blur(8px);
  transition:
    opacity 0.75s ease 0.25s,
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.25s,
    filter 0.75s ease 0.25s;
}

.postal-lightbox.is-open .postal-center-quote p {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.postal-lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(4, 13, 27, 0.65);
  color: #ffffff;
  font-size: 20px;
  display: grid;
  place-items: center;
}

/* 9. Despedida mágica en el footer */
footer {
  position: relative;
  text-align: center;
  padding: 64px 20px 80px !important;
  font-family: "Great Vibes", "Cormorant Garamond", cursive !important;
  font-size: clamp(32px, 6.5vw, 54px) !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important; /* Para que las mayúsculas y minúsculas luzcan como firma real */
  line-height: 1.3 !important;
  background: linear-gradient(180deg, #ffffff 15%, #bfe3fb 65%, #7ec4f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(191, 227, 251, 0.75)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  animation: magicFarewellGlow 3.5s ease-in-out infinite alternate;
}

/* 9. Despedida mágica y agradecimiento a padrinos en el footer */
footer {
  position: relative;
  text-align: center;
  padding: 54px 20px 80px !important;
}

/* Línea luminosa decorativa superior */
footer::before {
  content: "✦  ❄  ✦";
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  letter-spacing: 0.45em;
  margin-bottom: 22px;
  color: #bfe3fb;
  opacity: 0.85;
}

/* Texto más pequeño para los padrinos */
.godparents-thanks {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 3.2vw, 24px);
  line-height: 1.5;
  color: #d8e9f5;
  letter-spacing: 0.03em;
  margin-bottom: 26px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Despedida caligráfica grande */
.magic-farewell {
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(32px, 6.5vw, 54px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  background: linear-gradient(180deg, #ffffff 15%, #bfe3fb 65%, #7ec4f5 100%);
  -webkit-background-clip: text;
  background-clip: text; /* <-- Agrega esta línea y desaparecerá la advertencia */
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(191, 227, 251, 0.75)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  animation: magicFarewellGlow 3.5s ease-in-out infinite alternate;
}

@keyframes magicFarewellGlow {
  from {
    filter: drop-shadow(0 0 12px rgba(191, 227, 251, 0.55)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
    transform: translateY(0);
  }
  to {
    filter: drop-shadow(0 0 28px rgba(225, 246, 255, 0.95)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
    transform: translateY(-3px);
  }
}


/* 10. Efecto de enfoque cinematográfico (Eye-Focus) en la foto principal */
.hero-photo {
  animation: 
    photoBreath 18s ease-in-out infinite alternate,
    winterEyeFocus 7s ease-in-out infinite alternate !important;
}

@keyframes winterEyeFocus {
  0% {
    filter: blur(0px) saturate(0.95) contrast(1.05);
  }
  70% {
    filter: blur(0px) saturate(0.95) contrast(1.05);
  }
  100% {
    filter: blur(2.5px) saturate(1.1) contrast(1.08);
  }
}

/* Textura sutil de cristal helado sobre los marcos */
.parchment-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.25;
  pointer-events: none;
}

/* 11. Paleta de colores reservados para la quinceañera */
.reserved-colors-box {
  margin: 26px auto 10px;
  padding: 20px 18px;
  max-width: 520px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(225, 246, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.reserved-kicker {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #bfe3fb;
  margin-bottom: 8px;
}

.reserved-text {
  font-size: 13px;
  line-height: 1.6;
  color: #e6f2fa;
  margin: 0 0 18px;
}

.color-swatches {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.swatch-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--swatch-color);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 14px var(--swatch-color);
  position: relative;
}

.swatch-item small {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #cde8fc;
}

/* Ocultar selector de cantidad de personas sin eliminarlo */
.field[hidden],
.field:has(#guestCount) {
  display: none !important;
}
