.closing {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: clamp(230px, 23vw, 290px) clamp(24px, 5vw, 72px) 0;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(180deg, #dceaf5 0%, #a9c4d9 7%, #4d7094 17%, #20385d 31%, #101c38 62%, #0b1730 100%);
}
.closing-haze {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 42% 35% at 50% 52%, rgba(132, 174, 211, .2), transparent 86%),
    radial-gradient(ellipse 24% 17% at 14% 37%, rgba(176, 209, 235, .08), transparent),
    radial-gradient(ellipse 24% 17% at 87% 29%, rgba(176, 209, 235, .08), transparent);
}
.closing-garland {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(116px, 15vw, 185px);
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(250, 252, 255, .48));
}
.closing-bulbs circle { filter: drop-shadow(0 0 4px #fafcff); }
.closing-bulbs circle:nth-child(4n) { animation: closing-light 7s ease-in-out infinite; }
.closing-bulbs circle:nth-child(4n + 2) { animation: closing-light 8s ease-in-out -3s infinite; }
@keyframes closing-light { 50% { opacity: .6; } }

.closing-ornaments { position: absolute; inset: 0 0 auto; height: 360px; pointer-events: none; }
.closing-hang { position: absolute; top: 0; width: var(--size); height: calc(var(--drop) + var(--size)); transform-origin: top center; animation: closing-sway 9s ease-in-out infinite alternate; }
@keyframes closing-sway { from { rotate: -.8deg; } to { rotate: .8deg; } }
.closing-ribbon { position: absolute; top: 0; left: 50%; width: 2px; height: var(--drop); transform: translateX(-50%); background: linear-gradient(90deg, #7088a2, #fafcff 50%, #7892aa); box-shadow: 1px 0 3px rgba(250, 252, 255, .3); }
.closing-metal-star { position: absolute; top: var(--drop); left: 0; width: 100%; color: #dceaf5; font: 400 var(--size)/1 var(--serif); text-align: center; text-shadow: 0 1px 0 #fff, 0 4px 8px rgba(4, 18, 43, .55), 0 0 16px rgba(220, 234, 245, .54); filter: drop-shadow(1px 2px 1px #6c87a0); }
.closing-cap { position: absolute; z-index: 2; top: calc(var(--drop) - 6px); left: 50%; width: 29%; height: 10px; transform: translateX(-50%); border: 1px solid #edf5fb; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #748ca5, #fafcff 49%, #849bb0); box-shadow: 0 2px 5px rgba(2, 10, 25, .45); }
.closing-glass {
  position: absolute;
  top: var(--drop);
  left: 0;
  width: var(--size);
  aspect-ratio: 1;
  border: 1.5px solid rgba(241, 248, 253, .85);
  border-radius: 50%;
  background: radial-gradient(circle at 24% 19%, rgba(255, 255, 255, .68), transparent 13%),
    radial-gradient(circle at 74% 79%, rgba(215, 235, 250, .44), transparent 36%),
    radial-gradient(circle at 46% 42%, rgba(206, 229, 247, .08) 31%, rgba(221, 239, 250, .28) 78%, rgba(249, 252, 255, .64) 100%);
  box-shadow: inset 7px 8px 13px rgba(255, 255, 255, .18), inset -8px -10px 15px rgba(190, 215, 236, .32), 0 14px 24px rgba(1, 9, 27, .3);
}
.closing-glass::before { content: ""; position: absolute; top: 11%; left: 17%; width: 35%; height: 25%; border-top: 2px solid rgba(255, 255, 255, .85); border-left: 2px solid rgba(255, 255, 255, .61); border-radius: 50%; transform: rotate(-28deg); }
.closing-glass::after { content: ""; position: absolute; right: 10%; bottom: 13%; width: 14%; height: 8%; border-radius: 50%; background: rgba(255, 255, 255, .7); filter: blur(3px); }
.closing-hang--left-star { --drop: 105px; --size: 35px; left: 9%; animation-delay: -2s; }
.closing-hang--left-glass { --drop: 194px; --size: 76px; left: 3%; animation-delay: -5s; }
.closing-hang--right-star { --drop: 119px; --size: 45px; right: 12%; animation-delay: -3s; }
.closing-hang--right-glass { --drop: 219px; --size: 88px; right: 2%; animation-delay: -1s; }
.closing-hang--small { --drop: 70px; --size: 29px; right: 29%; animation-delay: -4s; }

.closing-content { position: relative; z-index: 1; width: min(100%, 850px); margin: 0 auto clamp(105px, 13vw, 170px); text-align: center; text-shadow: 0 3px 25px rgba(3, 12, 31, .53); }
.closing-hero-star { display: block; width: clamp(66px, 7vw, 90px); height: auto; margin: 0 auto 33px; filter: drop-shadow(0 0 14px rgba(235, 246, 255, .65)) drop-shadow(0 0 38px rgba(178, 211, 238, .35)); }
.closing-eyebrow { margin: 0 0 26px; color: var(--ice); font-size: .73rem; font-weight: 600; letter-spacing: .27em; line-height: 1.5; text-transform: uppercase; }
.closing h2 { max-width: 830px; margin: 0 auto; color: var(--white); font: 400 clamp(3.5rem, 7vw, 7rem)/1.03 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.closing-message { max-width: 575px; margin: 30px auto 0; color: var(--ice); font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.8; text-wrap: pretty; }
.closing h2, .closing-message, .closing-signature, .closing-footer p { overflow-wrap: anywhere; }
.closing-signature { display: flex; flex-direction: column; gap: 7px; margin: 41px auto 0; color: var(--ice); font-size: .91rem; letter-spacing: .08em; line-height: 1.4; }
.closing-signature strong { color: var(--white); font: 400 clamp(1.8rem, 2.8vw, 2.4rem)/1.2 var(--serif); letter-spacing: 0; }
.back-to-top { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 48px; margin-top: 46px; padding: 12px 22px; border: 1px solid var(--silver); border-radius: 999px; color: var(--white); font-size: .79rem; font-weight: 600; letter-spacing: .11em; text-decoration: none; transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.back-to-top span { color: var(--ice); font-size: 1.05rem; line-height: 1; }
.back-to-top:hover { border-color: var(--white); background: rgba(220, 234, 245, .13); transform: translateY(-2px); }
.back-to-top:focus-visible, .closing-footer a:focus-visible { outline: 3px solid var(--white); outline-offset: 5px; }

.closing-footer { position: relative; z-index: 1; width: min(100%, 1040px); margin: auto auto 0; padding: 0 0 36px; text-align: center; }
.closing-footer-rule { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; color: var(--silver); }
.closing-footer-rule span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(188, 200, 214, .68)); }
.closing-footer-rule span:last-child { transform: rotate(180deg); }
.closing-footer-rule b { font-size: .88rem; font-weight: 400; }
.closing-footer p { margin: 24px 0 0; color: var(--silver); font-size: .77rem; line-height: 1.5; letter-spacing: .07em; }
.closing-footer a { color: var(--white); text-decoration-color: var(--silver); text-underline-offset: 3px; }
.closing-footer a:hover { color: var(--ice); }

.closing.is-enhanced .closing-hero-star { opacity: 0; transform: translateY(18px) scale(.8); transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.closing.is-enhanced.is-in-view .closing-hero-star { opacity: 1; transform: none; }
.closing.is-enhanced .closing-copy > * { opacity: 0; transform: translateY(17px); transition: opacity .95s ease, transform 1.05s cubic-bezier(.2, .7, .2, 1); }
.closing.is-enhanced.is-in-view .closing-copy > * { opacity: 1; transform: none; }
.closing.is-enhanced .closing-eyebrow { transition-delay: .43s; }
.closing.is-enhanced h2 { transition-delay: .57s; }
.closing.is-enhanced .closing-message { transition-delay: .72s; }
.closing.is-enhanced .closing-signature { transition-delay: .87s; }
.closing.is-enhanced .back-to-top { transition-delay: 1s; }

@media (max-width: 700px) {
  .closing { padding: 222px 25px 0; background: linear-gradient(180deg, #dceaf5 0%, #a9c4d9 6%, #4d7094 15%, #20385d 27%, #101c38 55%, #0b1730 100%); }
  .closing-garland { height: 125px; }
  .closing-hang--left-star { --drop: 75px; --size: 28px; left: 8%; }
  .closing-hang--left-glass { --drop: 148px; --size: 51px; left: -18px; }
  .closing-hang--right-star { --drop: 74px; --size: 29px; right: 7%; }
  .closing-hang--right-glass { --drop: 161px; --size: 55px; right: -20px; }
  .closing-hang--small { --drop: 45px; --size: 22px; right: 27%; }
  .closing-content { margin-bottom: 105px; }
  .closing-hero-star { width: 72px; margin-bottom: 27px; }
  .closing-eyebrow { font-size: .64rem; letter-spacing: .19em; margin-bottom: 22px; }
  .closing h2 { font-size: clamp(3rem, 11.5vw, 5rem); }
  .closing-message { max-width: 460px; font-size: .97rem; margin-top: 24px; }
  .closing-signature { margin-top: 35px; }
  .back-to-top { margin-top: 39px; }
}
@media (max-width: 360px) {
  .closing { padding-left: 20px; padding-right: 20px; }
  .closing h2 { font-size: 2.85rem; }
  .closing-hang--small { right: 33%; }
}
/* ---- Pulido visual: del hielo a la noche entre neblina, cielo de acuarela y cierre ---- */
.closing {
  padding-top: clamp(430px, 38vw, 520px);
  background:
    linear-gradient(180deg, #dceaf5 0, #dceaf5 70px, rgba(220, 234, 245, .9) 140px, rgba(206, 223, 238, .7) 210px, rgba(170, 196, 220, .45) 290px, rgba(110, 145, 182, .2) 380px, rgba(60, 95, 140, 0) 470px),
    radial-gradient(ellipse 110% 520px at 50% -120px, rgba(220, 234, 245, .9) 0 40%, rgba(220, 234, 245, .45) 62%, rgba(220, 234, 245, 0) 100%),
    linear-gradient(0deg, #0b1730 0, rgba(11, 23, 48, .75) 18%, rgba(11, 23, 48, 0) 45%),
    #0b1a36 url("assets/images/cielo-acuarela.jpg") 70% 40% / 150% auto no-repeat;
}
.closing-haze {
  background:
    radial-gradient(ellipse 40% 26% at 50% 58%, rgba(132, 174, 211, .2), transparent 86%),
    radial-gradient(ellipse 24% 17% at 14% 45%, rgba(176, 209, 235, .08), transparent),
    radial-gradient(ellipse 24% 17% at 87% 38%, rgba(176, 209, 235, .08), transparent);
}
/* Estrellas que aparecen al caer la noche */
.closing-haze::before {
  content: "";
  position: absolute;
  inset: 300px 0 0;
  background:
    radial-gradient(2.1px 2.1px at 7% 12%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 16% 34%, #dceaf5 50%, transparent 51%),
    radial-gradient(2.3px 2.3px at 24% 8%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 33% 52%, #bcc8d6 50%, transparent 51%),
    radial-gradient(1.9px 1.9px at 41% 21%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 52% 6%, #dceaf5 50%, transparent 51%),
    radial-gradient(2.1px 2.1px at 63% 29%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 71% 11%, #bcc8d6 50%, transparent 51%),
    radial-gradient(2.3px 2.3px at 82% 24%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 90% 47%, #dceaf5 50%, transparent 51%),
    radial-gradient(1.9px 1.9px at 96% 15%, #fafcff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 11% 66%, #dceaf5 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 88% 70%, #fafcff 50%, transparent 51%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent);
  animation: closing-stars 5s ease-in-out infinite alternate;
}
@keyframes closing-stars { from { opacity: .5; } to { opacity: 1; } }
/* Bancos de neblina que bajan del hielo y se disuelven en la noche */
.closing-haze::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  top: 70px;
  height: 380px;
  background:
    radial-gradient(circle 130px at 4% 34%, rgba(226, 238, 248, .42), transparent 100%),
    radial-gradient(circle 160px at 18% 46%, rgba(226, 238, 248, .36), transparent 100%),
    radial-gradient(circle 110px at 31% 28%, rgba(226, 238, 248, .4), transparent 100%),
    radial-gradient(circle 170px at 45% 50%, rgba(226, 238, 248, .3), transparent 100%),
    radial-gradient(circle 120px at 58% 30%, rgba(226, 238, 248, .4), transparent 100%),
    radial-gradient(circle 160px at 73% 48%, rgba(226, 238, 248, .34), transparent 100%),
    radial-gradient(circle 110px at 87% 30%, rgba(226, 238, 248, .4), transparent 100%),
    radial-gradient(circle 150px at 100% 44%, rgba(226, 238, 248, .36), transparent 100%);
  filter: blur(30px);
  animation: closing-mist 34s ease-in-out infinite alternate;
}
@keyframes closing-mist { from { translate: -3% 0; } to { translate: 3% 0; } }
/* Colinas nevadas al pie de la invitación */
.closing::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 260px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 175px at 22% 100%, #0e2140 0 70%, rgba(14, 33, 64, 0) 72%),
    radial-gradient(ellipse 58% 150px at 82% 100%, #0d1f3c 0 70%, rgba(13, 31, 60, 0) 72%),
    radial-gradient(ellipse 62% 179px at 22% 100%, rgba(188, 200, 214, .2) 0 70%, rgba(188, 200, 214, 0) 72%),
    radial-gradient(ellipse 58% 154px at 82% 100%, rgba(188, 200, 214, .16) 0 70%, rgba(188, 200, 214, 0) 72%);
}

/* La guirnalda y los adornos cuelgan desde la neblina, no desde el borde */
.closing-garland { top: clamp(190px, 18vw, 240px); }
.closing-ornaments { top: clamp(150px, 14vw, 190px); height: 420px; }
.closing-ribbon {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 70px);
  mask-image: linear-gradient(180deg, transparent 0, #000 70px);
}
.closing-garland path { stroke-opacity: .85; }
.closing-hang--left-glass, .closing-hang--right-glass { --drop: 250px; }
.closing-hang--right-glass { --drop: 276px; }

/* Estrella principal con halo y destello */
.closing-hero-star { overflow: visible; }
.closing.is-in-view .closing-hero-star, .closing:not(.is-enhanced) .closing-hero-star { animation: closing-star-glow 4.5s ease-in-out 1.4s infinite; }
@keyframes closing-star-glow {
  50% { filter: drop-shadow(0 0 20px rgba(245, 250, 255, .9)) drop-shadow(0 0 54px rgba(178, 211, 238, .5)); scale: 1.04; }
}
.closing-content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -160px;
  z-index: -1;
  width: min(130vw, 1000px);
  aspect-ratio: 1.6;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(150, 188, 222, .2), rgba(150, 188, 222, .08) 55%, transparent);
  pointer-events: none;
}

/* Título plateado con brillo que recorre las letras */
.closing h2 {
  background: linear-gradient(100deg, var(--ice) 0%, #fafcff 30%, var(--ice) 40%, #fff 48%, #f4f9ff 52%, var(--ice) 60%, #fafcff 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 22px rgba(3, 12, 31, .55));
}
.closing.is-in-view h2, .closing:not(.is-enhanced) h2 { animation: closing-title-shine 7s ease-in-out 2s infinite; }
@keyframes closing-title-shine { 0% { background-position: 100% 0; } 35%, 100% { background-position: 0 0; } }

/* Revelado escalonado con desenfoque, como en las demás secciones */
.closing.is-enhanced .closing-copy > * { filter: blur(6px); transition: opacity .95s ease, transform 1.05s cubic-bezier(.2, .7, .2, 1), filter .95s ease; }
.closing.is-enhanced .closing-copy > h2 { filter: blur(6px) drop-shadow(0 3px 22px rgba(3, 12, 31, .55)); }
.closing.is-enhanced.is-in-view .closing-copy > * { filter: none; }
.closing.is-enhanced.is-in-view .closing-copy > h2 { filter: drop-shadow(0 3px 22px rgba(3, 12, 31, .55)); }

/* Firma con líneas finas */
.closing-signature > span { display: inline-flex; align-items: center; justify-content: center; gap: 14px; }
.closing-signature > span::before, .closing-signature > span::after { content: ""; width: 42px; height: 1px; background: linear-gradient(90deg, transparent, rgba(188, 200, 214, .8)); }
.closing-signature > span::after { transform: scaleX(-1); }

/* Botón de cristal escarchado */
.back-to-top {
  position: relative;
  overflow: hidden;
  border-color: rgba(220, 234, 245, .45);
  background: linear-gradient(135deg, rgba(220, 234, 245, .16), rgba(220, 234, 245, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 28px rgba(3, 12, 31, .3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.back-to-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%) no-repeat; background-size: 250% 100%; background-position: 140% 0; animation: glass-sweep 7s ease-in-out 3s infinite; pointer-events: none; }
.back-to-top span { transition: translate .25s ease; }
.back-to-top:hover span { translate: 0 -3px; }

.closing-footer-rule b { animation: closing-stars 3.5s ease-in-out infinite alternate; }

@media (max-width: 700px) {
  .closing {
    padding-top: 380px;
    background:
      linear-gradient(180deg, #dceaf5 0, #dceaf5 50px, rgba(220, 234, 245, .88) 110px, rgba(206, 223, 238, .66) 170px, rgba(170, 196, 220, .42) 235px, rgba(110, 145, 182, .18) 305px, rgba(60, 95, 140, 0) 380px),
      radial-gradient(ellipse 140% 400px at 50% -100px, rgba(220, 234, 245, .9) 0 40%, rgba(220, 234, 245, .45) 62%, rgba(220, 234, 245, 0) 100%),
      linear-gradient(0deg, #0b1730 0, rgba(11, 23, 48, .75) 18%, rgba(11, 23, 48, 0) 45%),
      #0b1a36 url("assets/images/cielo-acuarela.jpg") 70% 40% / auto 140% no-repeat;
  }
  .closing-haze::before { inset: 240px 0 0; }
  .closing-haze::after { top: 40px; height: 300px; left: -40%; right: -40%; }
  .closing-garland { top: 150px; height: 110px; }
  .closing-ornaments { top: 120px; }
  .closing-hang--left-glass { --drop: 190px; }
  .closing-hang--right-glass { --drop: 205px; }
  .closing::after { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .closing-hang, .closing-bulbs circle { animation: none !important; }
  .closing.is-enhanced .closing-hero-star, .closing.is-enhanced .closing-copy > * { opacity: 1; transform: none; transition: none; }
  .back-to-top { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .closing-haze::before, .closing-haze::after, .closing h2, .closing-hero-star, .back-to-top::after, .closing-footer-rule b { animation: none !important; }
  .closing.is-enhanced .closing-copy > * { filter: none; }
  .closing.is-enhanced .closing-copy > h2 { filter: drop-shadow(0 3px 22px rgba(3, 12, 31, .55)); }
}
