/* ==========================================================
   Diseño "Linternas" · Boda · noche de linternas sobre el lago
   Paleta: azul noche, papel washi, ámbar y oro cálido
   ========================================================== */

@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pinyon-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pinyon-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --noche: #070b1f;
  --noche-2: #0b1438;
  --azul: #13204a;
  --papel: #f3e7d3;
  --suave: #b3bad3;
  --oro: #e9b96e;
  --oro-claro: #f8dfae;
  --oro-2: #c98a3c;
  --ambar: #f39a45;
  --guion: "Pinyon Script", "Great Vibes", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --caps: "Cinzel", Georgia, serif;
  --curva: cubic-bezier(.22, .7, .18, 1);
  --hz: 66%;                                 /* horizonte del lago (lo comparte el canvas) */

  --s-fondo: transparent;
  --s-tinta: var(--papel);
  --s-suave: var(--suave);
  --s-acento: var(--oro);
  --s-acento-tinta: #2a1a0c;
  --s-tarjeta: rgba(255, 255, 255, .05);
  --s-borde: rgba(233, 185, 110, .24);
  --s-radio: 22px;
  --s-sombra: 0 24px 40px -26px rgba(0, 0, 0, .9);
  --s-fuente: var(--serif);
  --s-titulo: var(--guion);
  --s-titulo-tam: clamp(2.6rem, 11.5vw, 3.3rem);
  --s-titulo-color: var(--oro-claro);
  --s-etiqueta: var(--caps);
  --s-num: var(--caps);
  --s-num-color: var(--oro);
  --s-btn-linea-color: var(--papel);
}

body {
  background: #04060f;
  color: var(--papel);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.amp { font-family: var(--serif); font-style: italic; color: var(--oro); }

/* ================= INTRO: EL LAGO ================= */
.lago {
  position: relative;
  width: min(100%, 520px);
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: linear-gradient(180deg, #1d2350 0%, #4a3a72 40%, #c8706a 62%, #13204a 66%, #070b1f 100%);
  color: var(--papel);
  box-shadow: 0 0 80px -30px rgba(0, 0, 0, .9);
}
.lago__lienzo { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.lago::after {                               /* viñeta cinematográfica */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(2, 4, 12, .55) 100%);
  pointer-events: none;
}

/* Idioma y sonido */
.lago .idiomas {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 10px;
  z-index: 6;
  font-family: var(--caps);
  font-size: .66rem;
  letter-spacing: .12em;
  color: var(--papel);
}
.lago .idiomas span { opacity: .5; }
.lago__sonido {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: 8px;
  z-index: 6;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--oro-claro);
  cursor: pointer;
  transition: background-color .3s, opacity .4s;
}
.lago__sonido:hover { background: rgba(255, 255, 255, .08); }
.lago__sonido:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.son-x { display: none; }
.lago__sonido[aria-pressed="true"] .son-x { display: inline; }
.lago__sonido[aria-pressed="true"] .son-onda { display: none; }

/* Encabezado */
.lago__cab {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  left: 22px;
  right: 22px;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  transition: opacity .9s ease, transform .9s var(--curva);
}
.lago__eyebrow {
  margin: 0;
  font-family: var(--caps);
  font-size: .66rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--oro);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
  animation: lin-aparecer 1.4s .2s var(--curva) both;
}
.lago__eyebrow .amp { font-size: 1.15em; padding: 0 .2em; }
.lago__titulo {
  margin: 12px auto 0;
  max-width: 12em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  line-height: 1.12;
  color: #fbf3e4;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  animation: lin-aparecer 1.6s .5s var(--curva) both;
}
.lago__hint {
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--suave);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
  animation: lin-aparecer 1.4s 1.2s var(--curva) both;
  transition: opacity .8s;
}
.lago__hint-ico { display: inline-flex; color: var(--oro); animation: lin-flotar 2.8s ease-in-out infinite; }
.lago.jugando .lago__hint { opacity: .6; }

/* Superficie táctil: botón accesible del tamaño de la escena */
.lago__zona {
  all: unset;
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.lago__zona:focus-visible { outline: 2px dashed var(--oro); outline-offset: -12px; border-radius: 26px; }
.lago__zona:disabled { cursor: default; }

/* Aviso breve (linterna especial / seguir soltando) */
.lago__aviso {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 150px);
  z-index: 5;
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--oro-claro);
  text-shadow: 0 0 14px rgba(255, 190, 110, .55), 0 1px 8px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .9s ease, transform .9s var(--curva);
  pointer-events: none;
}
.lago__aviso.ver { opacity: 1; transform: none; }
.lago.revelado .lago__aviso { top: calc(env(safe-area-inset-top, 0px) + 54px); bottom: auto; font-size: 1.02rem; }

/* Pie: contador con lunita y botón */
.lago__pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  transition: opacity .8s ease, transform .8s var(--curva);
  animation: lin-aparecer 1.4s 1.6s var(--curva) both;
}
.luna {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: rgba(7, 11, 31, .5);
  border: 1px solid rgba(233, 185, 110, .22);
  font-family: var(--caps);
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--papel);
}
.luna__svg { display: block; width: 24px; height: 24px; filter: drop-shadow(0 0 6px rgba(246, 226, 180, .45)); }
.luna.late .luna__svg { animation: lin-pulso .7s ease-out; }
.luna__n { font-variant-numeric: tabular-nums lining-nums; }
.luna__de { opacity: .55; }
.luna__lbl { font-family: var(--serif); font-style: italic; font-size: .98rem; letter-spacing: 0; color: var(--suave); }

.btn-linterna {
  all: unset;
  box-sizing: border-box;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f8dca4, var(--oro) 50%, var(--oro-2));
  color: #2a1a0c;
  font-family: var(--caps);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(233, 185, 110, .75), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .2s ease, opacity .3s;
}
.btn-linterna:active { transform: scale(.95); }
.btn-linterna:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 3px; }
.btn-linterna:disabled { opacity: .55; cursor: default; }

/* Las linternas se reúnen: la interfaz se retira */
.lago.reuniendo .lago__cab { opacity: 0; transform: translateY(-14px); }
.lago.reuniendo .lago__pie { opacity: 0; transform: translateY(14px); pointer-events: none; }
.lago.reuniendo .btn-linterna { pointer-events: none; }

/* ================= REVELADO: CORAZÓN DE LUZ ================= */
.revela { position: absolute; inset: 0; z-index: 2; pointer-events: none; visibility: hidden; }
.lago.revelado .revela { visibility: visible; }

/* La foto: el JS la centra en el corazón (left/top/width) */
.revela__foto {
  position: absolute;
  left: 50%;
  top: 33%;
  width: 120px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.revela__foto::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 150, .5), rgba(255, 170, 90, .2) 48%, rgba(255, 170, 90, 0));
}
.revela__foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(248, 223, 174, .95), 0 0 0 6px rgba(233, 185, 110, .16), 0 0 46px 10px rgba(255, 186, 104, .42);
}
.lago.revelado .revela__foto { animation: lin-foto 1.8s .1s var(--curva) both; }
.lago.revelado .revela__foto::before { animation: lin-halo 4.2s 1.9s ease-in-out infinite; }

/* Nombres dorados justo sobre el agua */
.revela__nombres,
.revela__reflejo {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
  font-family: var(--guion);
  font-weight: 400;
  font-size: clamp(2.2rem, 10.5vw, 3.4rem);
  line-height: 1.25;
}
.revela__nombres { bottom: calc(100% - var(--hz) + 2px); }
.revela__nombres .revela__n,
.revela__nombres .amp {
  display: inline-block;
  padding: 0 .16em .08em;
  background: linear-gradient(100deg, var(--oro-2) 0%, var(--oro-claro) 32%, #fff7df 44%, var(--oro) 58%, var(--oro-2) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 190, 110, .45));
  opacity: 0;
}
.revela__nombres .amp { margin: 0 -.05em; font-size: .55em; padding: 0 .12em; }
.lago.revelado .revela__nombres .revela__n:first-child { animation: lin-aparecer 1.3s 1.1s var(--curva) both, lin-brillo 7s 2.6s linear infinite; }
.lago.revelado .revela__nombres .amp { animation: lin-aparecer 1.2s 1.45s var(--curva) both, lin-brillo 7s 2.6s linear infinite; }
.lago.revelado .revela__nombres .revela__n:last-child { animation: lin-aparecer 1.3s 1.7s var(--curva) both, lin-brillo 7s 2.6s linear infinite; }

/* Su reflejo en el lago (ondula) */
.revela__reflejo {
  top: calc(var(--hz) + 1px);
  color: var(--oro);
  opacity: 0;
  transform: scaleY(-1);
  filter: blur(1.1px);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 3px, rgba(0, 0, 0, .35) 3px 5px), linear-gradient(to top, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image: repeating-linear-gradient(to bottom, #000 0 3px, rgba(0, 0, 0, .35) 3px 5px), linear-gradient(to top, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 92%);
  mask-composite: intersect;
}
.revela__reflejo .amp { font-size: .55em; color: var(--oro); }
.lago.revelado .revela__reflejo { animation: lin-reflejo 1.8s 1.9s ease both, lin-ondular 3.6s 1.9s ease-in-out infinite; }

/* Fecha bajo el reflejo */
.revela__pie {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--hz) + clamp(52px, 11vh, 84px));
  text-align: center;
  opacity: 0;
}
.lago.revelado .revela__pie { animation: lin-aparecer 1.4s 2.3s var(--curva) both; }
.revela__eyebrow { margin: 0; font-family: var(--caps); font-size: .64rem; letter-spacing: .36em; text-transform: uppercase; color: var(--oro); }
.revela__fecha {
  margin: 8px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--caps);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--papel);
}
.revela__fecha i { width: 4px; height: 4px; border-radius: 50%; background: var(--oro); box-shadow: 0 0 8px rgba(255, 190, 110, .8); }

.lago .desliza-c { z-index: 5; color: var(--oro-claro); font-family: var(--caps); }

/* ================= INVITACIÓN ================= */
.contenido {
  position: relative;
  background: linear-gradient(180deg, var(--noche) 0%, var(--noche-2) 28%, #0e1a45 60%, var(--noche) 100%);
  box-shadow: 0 0 80px -30px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.contenido::before {                         /* cielo estrellado muy sutil */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 24px 38px, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(1px 1px at 132px 92px, rgba(255, 236, 200, .45), transparent 70%),
    radial-gradient(1.4px 1.4px at 190px 210px, rgba(255, 255, 255, .4), transparent 70%),
    radial-gradient(1px 1px at 70px 170px, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(1px 1px at 230px 40px, rgba(255, 236, 200, .4), transparent 70%);
  background-size: 260px 260px;
  opacity: .6;
  pointer-events: none;
}
.contenido::after {                          /* resplandor cálido en lo alto */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 420px;
  background: radial-gradient(60% 70% at 50% 0%, rgba(243, 154, 69, .14), transparent 75%);
  pointer-events: none;
}
.contenido > * { position: relative; z-index: 1; }

.separador { display: flex; align-items: center; gap: 12px; width: min(230px, 70%); margin: 0 auto; }
.separador i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 185, 110, .65)); }
.separador i:last-child { background: linear-gradient(90deg, rgba(233, 185, 110, .65), transparent); }
.separador .lin { display: block; width: 26px; height: auto; overflow: visible; filter: drop-shadow(0 0 10px rgba(255, 186, 104, .8)); animation: lin-flotar 4.2s ease-in-out infinite; }
.separador--medio { margin: -14px auto; }

.carta { padding-top: 70px; }
.carta__eyebrow { margin: 18px 0 0; max-width: 22em; font-family: var(--caps); font-size: .64rem; letter-spacing: .3em; line-height: 1.8; text-transform: uppercase; color: var(--oro); }
.carta__nombres { margin: 12px 0 0; font-family: var(--guion); font-weight: 400; font-size: clamp(2.9rem, 13vw, 3.9rem); line-height: 1.15; color: var(--oro-claro); text-shadow: 0 0 24px rgba(255, 186, 104, .35); }
.carta__nombres .amp { font-size: .5em; }
.carta__fecha { margin: 8px 0 0; font-family: var(--caps); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--suave); }
.carta__texto { margin: 22px 0 0; max-width: 21em; font-size: 1.22rem; line-height: 1.6; font-style: italic; color: var(--papel); }

.s-cuenta__caja { border-radius: 20px 20px 28px 28px; background: linear-gradient(180deg, rgba(243, 154, 69, .1), rgba(255, 255, 255, .03)); }
.s-cuenta__num { text-shadow: 0 0 14px rgba(255, 186, 104, .45); }
.s-cuenta__fecha { color: var(--suave); }

.s-evento { position: relative; overflow: hidden; backdrop-filter: blur(2px); }
.s-evento::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -60px;
  width: 200px;
  height: 140px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(243, 154, 69, .16), transparent);
  pointer-events: none;
}
.s-evento__icono { color: var(--oro); border-color: rgba(233, 185, 110, .55); background: rgba(243, 154, 69, .08); box-shadow: 0 0 22px -4px rgba(255, 186, 104, .45); }
.s-evento__titulo { color: var(--oro-claro); }
.s-evento__lugar { font-size: 1.2rem; }
.s-evento__dir { font-size: 1.02rem; }

.s-foto { border: 1px solid rgba(233, 185, 110, .35); }
.s-galeria__rejilla--3 .s-foto:first-child { border-radius: 999px 999px var(--s-radio) var(--s-radio); }

.banda { position: relative; margin: 14px 24px 0; overflow: hidden; border-radius: 26px; border: 1px solid rgba(233, 185, 110, .4); box-shadow: var(--s-sombra); }
.banda img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; }
.banda figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 22px 22px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.45;
  color: #fff8ea;
  background: linear-gradient(180deg, transparent, rgba(7, 11, 31, .85) 70%);
}

.s-vestimenta__tipo { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--oro-claro); }
.s-paleta li { background: rgba(255, 255, 255, .06); }

.s-rsvp { background: radial-gradient(80% 60% at 50% 45%, rgba(243, 154, 69, .12), transparent 75%); }
.s-rsvp__saludo { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--oro-claro); }
.s-btn--lleno { background: linear-gradient(135deg, #f8dca4, var(--oro) 50%, var(--oro-2)); box-shadow: 0 14px 34px -14px rgba(233, 185, 110, .8); }
.s-btn--lleno svg { flex: none; }
.s-pie__n { font-family: var(--guion); font-size: 2.8rem; color: var(--oro-claro); }
.s-pie__marca { color: var(--papel); }

/* ================= KEYFRAMES ================= */
@keyframes lin-aparecer { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lin-flotar { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
@keyframes lin-pulso { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes lin-foto {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); filter: blur(10px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}
@keyframes lin-halo { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
@keyframes lin-brillo { from { background-position: 100% 0; } to { background-position: -160% 0; } }
@keyframes lin-reflejo { from { opacity: 0; } to { opacity: .4; } }
@keyframes lin-ondular {
  0%, 100% { transform: scaleY(-1) translateX(0) skewX(0deg); }
  33% { transform: scaleY(-1.05) translateX(1.5px) skewX(1.6deg); }
  66% { transform: scaleY(-.97) translateX(-1px) skewX(-1.1deg); }
}

/* ================= PANTALLAS BAJAS ================= */
@media (max-height: 680px) {
  .lago__cab { top: calc(env(safe-area-inset-top, 0px) + 44px); }
  .lago__titulo { margin-top: 8px; font-size: clamp(1.65rem, 7.6vw, 2.1rem); }
  .lago__hint { margin-top: 8px; font-size: 1rem; }
  .lago__pie { gap: 9px; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
  .lago__aviso { bottom: calc(env(safe-area-inset-bottom, 0px) + 122px); }
  .btn-linterna { min-height: 44px; }
}

/* ================= MOVIMIENTO REDUCIDO ================= */
@media (prefers-reduced-motion: reduce) {
  .lago__eyebrow, .lago__titulo, .lago__hint, .lago__pie, .lago__hint-ico, .separador .lin { animation: none !important; }
  .luna.late .luna__svg { animation: none; }
  .lago.revelado .revela__foto { animation: lin-quieto-foto .8s ease both; }
  .lago.revelado .revela__foto::before { animation: none; }
  .lago.revelado .revela__nombres .revela__n,
  .lago.revelado .revela__nombres .amp,
  .lago.revelado .revela__pie { animation: lin-quieto .8s ease both !important; }
  .lago.revelado .revela__reflejo { animation: lin-reflejo .8s ease both; }
  @keyframes lin-quieto { from { opacity: 0; } to { opacity: 1; } }
  @keyframes lin-quieto-foto { from { opacity: 0; transform: translate(-50%, -50%); } to { opacity: 1; transform: translate(-50%, -50%); } }
}

/* Tras el revelado ya no hacen falta el contador ni el botón automático */
#hero.listo #contador, #hero.listo #encender { opacity: 0; pointer-events: none; transition: opacity .8s ease; }
