/* ==========================================================================
   XV Años · Mishel — Tema Cenicienta (celeste, blanco y dorado)
   Orden: variables → base → utilidades → intro → música → hero → cuenta →
          dedicatoria → galería → tarjeta → RSVP → cierre → lightbox →
          revelado → responsive → movimiento reducido → sin JS
   ========================================================================== */

:root {
  /* Paleta */
  --ink: #22324e;
  --ink-soft: #4c5f7e;
  --navy: #2c4166;
  --celeste-50: #f6fbff;
  --celeste-100: #eaf5ff;
  --celeste-200: #d6ebfd;
  --celeste-300: #b9dbf8;
  --celeste-400: #93c4ee;
  --celeste-500: #6ea6dc;
  --gold: #c9a227;
  --gold-2: #e6c766;
  --gold-3: #8f6f12;
  --gold-soft: #f8efd2;
  --white: #ffffff;
  --ivory: #fdfbf5;

  /* Tipografía */
  --font-script: "Great Vibes", "Segoe Script", cursive;
  --font-script-alt: "Sacramento", "Great Vibes", "Segoe Script", cursive;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-caps: "Cinzel", Georgia, serif;

  /* Medidas */
  --radius: 20px;
  --shadow-soft: 0 24px 60px -32px rgba(58, 96, 145, 0.45);
  --shadow-card: 0 18px 50px -28px rgba(58, 96, 145, 0.4);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --max: 1080px;
}

/* ============================== BASE ============================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background-color: var(--celeste-50);
  background-image:
    radial-gradient(75% 45% at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(90% 55% at 50% 100%, rgba(190, 220, 246, 0.5) 0%, rgba(190, 220, 246, 0) 72%),
    linear-gradient(180deg, #f6fbff 0%, #ffffff 42%, #eef8ff 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}

body.is-lightbox {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Los atributos hidden deben ganar a display: inline-flex de .btn */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--celeste-500);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================ UTILIDADES ============================ */

.gold-text {
  background: linear-gradient(100deg, #a8851f 0%, #e2c363 28%, #b08a1c 50%, #f0d98f 68%, #9a7a18 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShimmer 9s linear infinite;
}

@keyframes goldShimmer {
  from { background-position: 0% 50%; }
  to { background-position: 220% 50%; }
}

.eyebrow {
  font-family: var(--font-caps);
  font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-3);
}

.ornament {
  display: block;
  width: min(300px, 72vw);
  margin-inline: auto;
  opacity: 0.95;
}

.ornament img {
  width: 100%;
  height: auto;
}

.btn {
  --btn-bg: linear-gradient(135deg, #f7e5a6 0%, var(--gold) 52%, #a9821b 100%);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-caps);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn--gold {
  background: var(--btn-bg);
  color: #3a2a05;
  box-shadow: 0 14px 30px -16px rgba(201, 162, 39, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(201, 162, 39, 0.5);
  color: var(--navy);
}

@media (hover: hover) {
  .btn--gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -18px rgba(201, 162, 39, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  .btn--ghost:hover {
    background: var(--gold-soft);
    transform: translateY(-2px);
  }
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

/* ========================== MARCO DECORATIVO ========================== */

/* Marco fijo: las esquinas, líneas y estrellas se quedan en pantalla
   mientras el contenido hace scroll por dentro. */
.marco {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.marco__esquina {
  --marco-esq: clamp(112px, 30vw, 190px);
  position: absolute;
  width: var(--marco-esq);
  height: var(--marco-esq);
  background-image: url("../assets/img/fondo_margen_marco.jpg");
  background-repeat: no-repeat;
  background-size: calc(var(--marco-esq) * 3.2) auto;
  opacity: 0.95;
}

.marco__esquina--tl {
  top: 0;
  left: 0;
  background-position: left top;
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
  mask-image: radial-gradient(circle at 0 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
}

.marco__esquina--tr {
  top: 0;
  right: 0;
  background-position: right top;
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
  mask-image: radial-gradient(circle at 100% 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
}

/* Las esquinas inferiores reutilizan las superiores espejadas:
   así no aparece la zapatilla de la imagen original. */
.marco__esquina--bl {
  bottom: 0;
  left: 0;
  background-position: left top;
  transform: scaleY(-1);
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
  mask-image: radial-gradient(circle at 0 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
}

.marco__esquina--br {
  bottom: 0;
  right: 0;
  background-position: right top;
  transform: scaleY(-1);
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
  mask-image: radial-gradient(circle at 100% 0, #000 64%, rgba(0, 0, 0, 0.55) 82%, transparent 100%);
}

.marco__linea {
  position: absolute;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(201, 162, 39, 0) 0%,
    rgba(201, 162, 39, 0.5) 10%,
    rgba(201, 162, 39, 0.5) 90%,
    rgba(201, 162, 39, 0) 100%
  );
}

.marco__linea--izq {
  left: max(16px, env(safe-area-inset-left));
}

.marco__linea--der {
  right: max(16px, env(safe-area-inset-right));
}

.marco__estrella {
  position: absolute;
  width: clamp(160px, 44vw, 200px);
  height: 46px;
  background: url("../assets/img/fondo_margen_marco.jpg") no-repeat 50% -30px / 525px 926px;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.marco__estrella--top {
  top: max(4px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
}

.marco__estrella--bottom {
  bottom: max(4px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) scaleY(-1);
}

/* Destellos fijos en los márgenes laterales */
.chispas-marco {
  position: fixed;
  inset: 0;
  z-index: 61;
  overflow: hidden;
  pointer-events: none;
}

.chispas-marco i {
  position: absolute;
  width: var(--s, 6px);
  height: var(--s, 6px);
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf3 0%, #e9cd75 42%, rgba(201, 162, 39, 0) 74%);
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.9));
  animation: chispa-marco 4.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  opacity: 0;
}

.chispas-marco i.chispa-estrella {
  border-radius: 0;
  background: radial-gradient(circle, #fffbe8 0%, #e2c363 40%, rgba(226, 199, 102, 0) 72%);
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
  filter: drop-shadow(0 0 10px rgba(201, 162, 39, 1)) drop-shadow(0 0 22px rgba(255, 232, 150, 0.75));
}

@keyframes chispa-marco {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  45%, 55% { opacity: var(--o, 0.95); transform: scale(1); }
}

/* ============================== INTRO ============================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  background: #b7d5f2;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease), filter 0.9s var(--ease);
}

.intro--open {
  opacity: 0;
  visibility: hidden;
  filter: blur(6px);
  transform: scale(1.03);
}

/* Copia desenfocada que rellena los lados en pantallas anchas */
.intro__backdrop {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background: url("../assets/img/portada.jpg") center / cover no-repeat;
  filter: blur(30px) saturate(1.05) brightness(0.92);
  transform: scale(1.06);
  pointer-events: none;
}

/* Portada: en vertical llena la pantalla; en horizontal se ve entera */
.intro__portada {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-aspect-ratio: 3 / 4) {
  .intro__portada {
    object-fit: cover;
  }
}

.intro__video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro__scrim {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(85% 70% at 50% 50%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.5) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.4));
}

.intro--has-video .intro__scrim {
  display: block;
}

/* Nombre y fecha sobre la base de la portada */
.intro__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: clamp(4rem, 16vh, 7rem) 1.25rem max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
  background: linear-gradient(180deg, rgba(190, 220, 246, 0) 0%, rgba(190, 220, 246, 0.5) 45%, rgba(196, 226, 249, 0.9) 100%);
  pointer-events: none;
}

.intro__name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 8px 20px rgba(201, 162, 39, 0.22)) drop-shadow(0 2px 4px rgba(34, 50, 78, 0.18));
}

.intro__date {
  font-family: var(--font-caps);
  font-size: clamp(0.72rem, 3.4vw, 0.9rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--navy);
}

/* Toda la portada es el botón de apertura */
.intro__open {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.intro__open:focus-visible {
  outline: 3px solid rgba(201, 162, 39, 0.85);
  outline-offset: -10px;
  border-radius: 0;
}

/* ============================ MÚSICA ============================ */

.music-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--gold-3);
  box-shadow: 0 12px 30px -14px rgba(58, 96, 145, 0.55);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.music-btn svg {
  width: 24px;
  height: 24px;
}

.music-btn.is-playing {
  animation: musicPulse 2.6s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 12px 30px -14px rgba(58, 96, 145, 0.55); }
  50% { box-shadow: 0 12px 30px -14px rgba(58, 96, 145, 0.55), 0 0 0 6px rgba(201, 162, 39, 0.14); }
}

.music-btn__slash {
  position: absolute;
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity 0.2s;
}

.music-btn:not(.is-playing) .music-btn__slash {
  opacity: 1;
}

/* =============================== HERO =============================== */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(3.5rem, 9vh, 6rem) 1.15rem clamp(6rem, 14vh, 8rem);
  overflow: hidden;
  text-align: center;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
}

/* Entrada escalonada al abrir la invitación (sin foto de fondo) */
body:not(.is-open) .hero__inner > * {
  opacity: 0;
}

body.is-open .hero__inner > * {
  animation: hero-entrar 1s var(--ease) both;
}

body.is-open .hero__inner > *:nth-child(1) { animation-delay: 0.1s; }
body.is-open .hero__inner > *:nth-child(2) { animation-delay: 0.22s; }
body.is-open .hero__inner > *:nth-child(3) { animation-delay: 0.34s; }
body.is-open .hero__inner > *:nth-child(4) { animation-delay: 0.46s; }

html.no-js .hero__inner > * {
  opacity: 1;
  animation: none;
}

@keyframes hero-entrar {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.hero__name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.4rem, 23vw, 8.5rem);
  line-height: 1.28;
  margin: 0.55rem 0 0.35rem;
  filter: drop-shadow(0 8px 26px rgba(255, 255, 255, 0.85));
}

.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0.9rem auto 1.1rem;
  width: min(320px, 84%);
  color: var(--gold);
  font-size: 0.8rem;
}

.hero__rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.8), transparent);
}

/* Placa colonial con filetes dorados para fecha, hora y ciudad */
.hero__placa {
  position: relative;
  margin-top: 0.35rem;
  padding: clamp(0.9rem, 3.4vw, 1.3rem) clamp(0.8rem, 5vw, 2.2rem);
}

.hero__placa::before,
.hero__placa::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(260px, 74%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.8) 18%, rgba(201, 162, 39, 0.8) 82%, transparent);
}

.hero__placa::before {
  top: 0;
}

.hero__placa::after {
  bottom: 0;
  transform: translateX(-50%) scaleY(-1);
}

.hero__date {
  font-family: var(--font-caps);
  font-size: clamp(0.66rem, 3.1vw, 1.02rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--navy);
}

.hero__time {
  margin-top: 0.45rem;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 8vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  color: var(--navy);
}

.hero__place {
  margin-top: 0.5rem;
  font-family: var(--font-caps);
  font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Destellos */
.sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sparkles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e6c766;
  box-shadow: 0 0 10px 2px rgba(201, 162, 39, 0.5);
  animation: twinkle var(--dur, 5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.35); }
  50% { opacity: var(--peak, 0.9); transform: scale(1); }
}

/* ============================== CUENTA ============================== */

.section {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.5rem, 7vw, 3rem);
}

/* Adorno dorado que separa las secciones y refuerza el aire de invitación */
.section:not(.hero)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 3vw, 2rem);
  width: min(220px, 55vw);
  height: 16px;
  transform: translateX(-50%);
  background: url("../assets/img/ornamento.svg") center / contain no-repeat;
  opacity: 0.45;
  pointer-events: none;
}

.section__head {
  max-width: 620px;
  margin: 0 auto clamp(2rem, 6vw, 3rem);
  text-align: center;
}

.section__title {
  margin-bottom: 0.7rem;
  font-family: var(--font-caps);
  font-weight: 400;
  font-size: clamp(1.5rem, 6vw, 2.15rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section__sub {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
}

.countdown {
  background: transparent;
}

.countdown .section__head,
.countdown__grid,
.countdown__done {
  position: relative;
  z-index: 2;
}

.countdown__faltan {
  margin: 0.3rem 0 clamp(1.4rem, 4vw, 2rem);
  font-family: var(--font-script-alt);
  font-weight: 400;
  font-size: clamp(2.7rem, 12vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--navy);
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.9);
}

/* Reloj con vaivén sutil y esquinas desvanecidas */
.countdown__reloj {
  width: clamp(120px, 32vw, 160px);
  margin: 0 auto 0.9rem;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 62%, rgba(0, 0, 0, 0.35) 70%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 62%, rgba(0, 0, 0, 0.35) 70%, transparent 78%);
}

.countdown__reloj img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 10%;
  animation: reloj-swing 6s ease-in-out infinite;
}

@keyframes reloj-swing {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* Chispas y estrellas (cuenta regresiva y mis padres) */
.sparkles--countdown i,
.sparkles--padres i {
  background: #f6e6a8;
  box-shadow: 0 0 14px 3px rgba(201, 162, 39, 0.75);
}

.sparkles .destello {
  left: var(--x);
  top: var(--y);
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: radial-gradient(circle, #fff8dc 0%, #e6c766 38%, rgba(230, 199, 102, 0) 72%);
  box-shadow: none;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.85));
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
  animation: destello-brillo 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes destello-brillo {
  0%, 100% { opacity: 0.18; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.25) rotate(45deg); }
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(720px, 100%);
  margin: 0 auto;
}

.unit {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: clamp(0.9rem, 3.6vw, 1.6rem) 0.35rem;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 30px -24px rgba(58, 96, 145, 0.5), inset 0 1px 0 #ffffff;
}

.unit__num {
  display: block;
  width: 2.2ch;
  margin-inline: auto;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-weight: 600;
  font-size: clamp(1.55rem, 7.4vw, 2.4rem);
  line-height: 1.2;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.unit__num::after {
  content: "";
  display: block;
  width: 1.8em;
  height: 1px;
  margin: 0.5rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.85), transparent);
}

.unit__label {
  font-family: var(--font-caps);
  font-size: clamp(0.5rem, 2.2vw, 0.66rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--gold-3);
}

.countdown__done {
  margin-top: 1.5rem;
  font-family: var(--font-script);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--gold-3);
}

/* ============================ DEDICATORIA ============================ */

.dedicatoria {
  overflow: hidden;
  text-align: center;
  background: transparent;
}

.dedicatoria__frase {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto 1.25rem;
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
  color: #162744;
  text-shadow:
    0 1px 12px rgba(255, 255, 255, 1),
    0 0 5px rgba(255, 255, 255, 0.98),
    0 0 2px rgba(255, 255, 255, 0.9);
}

.padres {
  position: relative;
  margin-top: clamp(2rem, 6vw, 3rem);
}

/* Tarjeta suave para la dedicatoria y los nombres de los padres */
.padres__contenido {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(520px, 100%);
  margin-inline: auto;
  padding: clamp(1.8rem, 6vw, 2.8rem) clamp(1.4rem, 6vw, 2.6rem);
  text-align: center;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 252, 255, 0.84) 100%);
  box-shadow: var(--shadow-card), inset 0 0 60px rgba(147, 196, 238, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.padres__nombres {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  margin: 0.55rem 0 0;
  padding: 0 0.4rem;
  text-align: center;
}

.padres__nombre {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.15;
  white-space: nowrap;
  color: var(--navy);
  text-shadow:
    0 1px 10px rgba(255, 255, 255, 0.98),
    0 0 4px rgba(255, 255, 255, 0.95),
    0 6px 18px rgba(255, 255, 255, 0.75);
}

.padres__y {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1;
  color: var(--gold-3);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.padres__letra {
  display: inline-block;
  white-space: pre;
  opacity: 1;
  transform: none;
}

.padres.is-visible .padres__letra {
  animation: letra-entrar 720ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes letra-entrar {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(-4deg);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* ============================== GALERÍA ============================== */

.galeria {
  background: transparent;
}

.galeria__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  width: min(920px, 100%);
  margin: 0 auto;
}

.galeria__grid--single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.galeria__item {
  position: relative;
  display: block;
  padding: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.38);
  border-radius: 16px;
  background: var(--celeste-100);
  box-shadow: 0 16px 36px -28px rgba(58, 96, 145, 0.55);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.galeria__item::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 11px;
  pointer-events: none;
}

@media (hover: hover) {
  .galeria__item:hover img {
    transform: scale(1.05);
  }
}

/* ============================== EVENTO ============================== */

.evento {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(3.5rem, 8vw, 5rem);
  background: transparent;
}

.card {
  position: relative;
  width: min(560px, 100%);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 3.2rem) clamp(1.25rem, 5vw, 2.75rem);
  border: 1px solid rgba(201, 162, 39, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 252, 255, 0.94) 100%);
  box-shadow: var(--shadow-card), inset 0 0 70px rgba(147, 196, 238, 0.1);
  text-align: center;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
}

.card__icon {
  width: 74px;
  margin: 0 auto 0.6rem;
  opacity: 0.95;
}

.card__title {
  margin: 0.35rem 0 1.4rem;
  font-family: var(--font-caps);
  font-weight: 400;
  font-size: clamp(1.6rem, 6.5vw, 2.2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card__time {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 1.3rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 5.5vw, 1.6rem);
  letter-spacing: 0.18em;
  color: var(--gold-3);
}

.card__place {
  margin-top: 1.35rem;
  font-family: var(--font-caps);
  font-size: clamp(0.82rem, 3.4vw, 1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card__address {
  margin-top: 0.45rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
}

.card__address.is-pending {
  color: rgba(76, 95, 126, 0.55);
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.9rem;
}

.card__note {
  margin-top: 1.1rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ------------------------------ RECEPCIÓN ------------------------------ */

.recepcion {
  container-type: inline-size;
}

/* Destellos alrededor de la tarjeta */
.sparkles--recepcion {
  z-index: 1;
  overflow: hidden;
}

.sparkles--recepcion i {
  background: #fff1b8;
  box-shadow: 0 0 18px 5px rgba(201, 162, 39, 0.85);
}

.sparkles--recepcion .destello {
  width: clamp(22px, 8cqw, 36px);
  height: clamp(22px, 8cqw, 36px);
  filter: drop-shadow(0 0 12px rgba(201, 162, 39, 1)) drop-shadow(0 0 24px rgba(255, 232, 150, 0.9));
  animation: destello-brillo 3.2s ease-in-out infinite;
}

.recepcion .card {
  z-index: 2;
}

.recepcion .card__icon {
  width: clamp(38px, 12cqw, 56px);
  margin-bottom: 0.35rem;
}

.recepcion .eyebrow {
  font-size: clamp(0.58rem, 2.4cqw, 0.74rem);
  letter-spacing: 0.32em;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.recepcion .card__title {
  margin: 0.25rem 0 clamp(0.6rem, 2.4cqw, 1rem);
  font-size: clamp(1.15rem, 6cqw, 1.75rem);
  letter-spacing: 0.1em;
}

/* Entrada de la palabra completa: sin filter para no romper el degradado */
.recepcion .card.is-visible .card__title {
  animation: titulo-entrar 760ms var(--ease) both, goldShimmer 9s linear infinite;
  animation-delay: 120ms, 0s;
}

@keyframes titulo-entrar {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Hora con el mismo estilo de los números de la cuenta regresiva */
.recepcion .card__time {
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-weight: 600;
  font-size: clamp(1.45rem, 9cqw, 2.5rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.recepcion .card__time::after {
  content: "";
  display: block;
  width: 1.8em;
  height: 1px;
  margin: 0.35rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.85), transparent);
}

.recepcion .card__place {
  margin-top: clamp(0.7rem, 2.8cqw, 1.1rem);
  font-size: clamp(0.68rem, 3cqw, 0.88rem);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.card__reference {
  margin-top: 0.35rem;
  font-size: clamp(0.72rem, 2.9cqw, 0.92rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--navy);
  text-wrap: balance;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.recepcion .card__address {
  margin-top: 0.35rem;
  font-size: clamp(0.68rem, 2.7cqw, 0.85rem);
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.recepcion .card__actions {
  gap: 0.5rem;
  margin-top: clamp(0.8rem, 3cqw, 1.2rem);
}

.recepcion .btn {
  padding: 0.55rem 1.1rem;
  font-size: clamp(0.58rem, 2.4cqw, 0.7rem);
  letter-spacing: 0.14em;
}

.recepcion .card__note {
  margin-top: 0.6rem;
  font-size: clamp(0.65rem, 2.6cqw, 0.82rem);
  line-height: 1.35;
}

.card__letra {
  display: inline-block;
  white-space: pre;
  opacity: 1;
  transform: none;
}

.recepcion .card.is-visible .card__letra {
  animation: letra-entrar 720ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

/* =============================== RSVP =============================== */

.rsvp {
  background: transparent;
}

.rsvp__card {
  position: relative;
  width: min(620px, 100%);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
  border: 1px solid rgba(201, 162, 39, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 251, 255, 0.94) 100%);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.rsvp__card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
}

.rsvp__title {
  margin-top: 0.5rem;
  font-family: var(--font-caps);
  font-weight: 400;
  font-size: clamp(1.6rem, 6.5vw, 2.2rem);
  letter-spacing: 0.12em;
}

.rsvp__text {
  max-width: 30rem;
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
}

.rsvp__btn {
  margin-top: 1.7rem;
}

.rsvp__icon {
  width: 18px;
  height: 18px;
}

.rsvp__limite {
  margin-top: 0.9rem;
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-3);
}

/* ============================== CIERRE ============================== */

.cierre {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 7vw, 3rem) clamp(4rem, 10vw, 7rem);
  overflow: hidden;
  text-align: center;
  background: transparent;
}

.cierre__carroza {
  position: relative;
  width: min(300px, 74vw);
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 24px 60px rgba(201, 162, 39, 0.24));
}

.cierre__eyebrow {
  position: relative;
  margin-top: 0.6rem;
}

.cierre__frase {
  position: relative;
  max-width: 620px;
  margin: 0.8rem auto 0;
  font-size: clamp(1.28rem, 4.6vw, 1.75rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.cierre__firma {
  margin-top: 1.5rem;
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 1;
}

.footer {
  padding: 2rem 1.5rem 5rem;
  text-align: center;
  background: transparent;
}

.footer p {
  font-family: var(--font-caps);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(76, 95, 126, 0.62);
}

/* ============================= LIGHTBOX ============================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 3.5rem 1rem;
  background: rgba(20, 38, 66, 0.93);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox__img {
  max-width: min(92vw, 900px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav--prev {
  left: max(0.6rem, env(safe-area-inset-left));
}

.lightbox__nav--next {
  right: max(0.6rem, env(safe-area-inset-right));
}

.lightbox__count {
  position: absolute;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.78);
}

/* ============================ REVELADO ============================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ============================ RESPONSIVE ============================ */

@media (min-width: 720px) {
  body {
    font-size: 1.125rem;
  }

  .hero__rule {
    margin: 1.15rem auto 1.35rem;
  }

  .countdown__grid {
    gap: 1rem;
  }

  .galeria__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .galeria__grid--single {
    grid-template-columns: minmax(0, 440px);
  }

  .card {
    padding: 3.4rem 3rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-bottom: clamp(7rem, 16vh, 11rem);
  }
}

/* ======================= MOVIMIENTO REDUCIDO ======================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero__inner > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }

  .sparkles,
  .chispas-marco {
    display: none;
  }

  .padres.is-visible .padres__letra,
  .recepcion .card.is-visible .card__letra,
  .recepcion .card.is-visible .card__title {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .gold-text {
    animation: none;
    background-position: 50% 50%;
  }

  .intro__video {
    display: none;
  }
}

/* ============================== SIN JS ============================== */

.no-js .intro {
  display: none;
}

.no-js body,
.no-js .is-locked {
  height: auto;
  overflow: auto;
}
