/* ==========================================================
   Diseño "Brindis" · Boda · servir champaña y juntar las copas
   Paleta: champaña, oro, marfil, rubor y tinta cálida
   ========================================================== */

@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 {
  --champana: #e9d8b4;
  --oro: #c9a45c;
  --oro-2: #9c7a3a;          /* oro oscuro para texto legible */
  --marfil: #fbf7ef;
  --rubor: #f1d5cf;
  --rubor-2: #e4b5ab;
  --tinta: #4a4036;
  --suave: #7b6f62;
  --guion: "Pinyon Script", "Great Vibes", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --cinzel: "Cinzel", "Cormorant Garamond", serif;
  --sans: "DM Sans", system-ui, sans-serif;

  --s-fondo: var(--marfil);
  --s-tinta: var(--tinta);
  --s-suave: var(--suave);
  --s-acento: var(--oro);
  --s-acento-tinta: #3d342b;
  --s-tarjeta: rgba(255, 255, 255, .8);
  --s-borde: rgba(201, 164, 92, .32);
  --s-radio: 20px;
  --s-sombra: 0 22px 38px -28px rgba(110, 84, 40, .55);
  --s-fuente: var(--serif);
  --s-titulo: var(--guion);
  --s-titulo-tam: clamp(2.7rem, 12vw, 3.4rem);
  --s-titulo-color: var(--tinta);
  --s-etiqueta: var(--cinzel);
  --s-num: var(--cinzel);
  --s-num-color: var(--oro-2);
  --s-btn-linea-color: var(--tinta);
}

body {
  background: #f1eadc;
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.amp { font-family: var(--serif); font-style: italic; color: var(--oro-2); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ================= INTRO ================= */
.brindis {
  position: relative;
  width: min(100%, 520px);
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(70% 45% at 50% 62%, rgba(255, 246, 222, .95), transparent 72%),
    radial-gradient(55% 35% at 8% 12%, rgba(241, 213, 207, .55), transparent 70%),
    radial-gradient(50% 30% at 96% 30%, rgba(233, 216, 180, .55), transparent 70%),
    linear-gradient(180deg, #fdfaf4, var(--marfil) 55%, #f4ead6);
  box-shadow: 0 0 60px -30px rgba(74, 64, 54, .35);
}
.brindis__fondo { position: absolute; inset: 0; pointer-events: none; background-image: var(--grano); opacity: .9; }

/* Destellos de luz desenfocada (bokeh dorado) */
.bokeh {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 205, 140, .55), rgba(233, 205, 140, 0) 68%);
  animation: bokeh 9s ease-in-out infinite alternate;
}
.bokeh:nth-child(1) { left: 6%; top: 18%; }
.bokeh:nth-child(2) { left: 78%; top: 12%; width: 110px; height: 110px; animation-duration: 12s; animation-delay: -3s; }
.bokeh:nth-child(3) { left: 62%; top: 46%; width: 46px; height: 46px; animation-duration: 8s; animation-delay: -5s; }
.bokeh:nth-child(4) { left: 14%; top: 58%; width: 90px; height: 90px; animation-duration: 11s; animation-delay: -1s; }
.bokeh:nth-child(5) { left: 40%; top: 8%; width: 38px; height: 38px; animation-duration: 7s; animation-delay: -2s; }
.bokeh:nth-child(6) { left: 86%; top: 66%; width: 60px; height: 60px; animation-duration: 10s; animation-delay: -6s; }
.bokeh:nth-child(7) { left: 28%; top: 36%; width: 28px; height: 28px; animation-duration: 6s; animation-delay: -4s; }
.bokeh:nth-child(8) { left: 52%; top: 80%; width: 120px; height: 120px; animation-duration: 13s; animation-delay: -7s;
  background: radial-gradient(circle, rgba(241, 213, 207, .6), rgba(241, 213, 207, 0) 68%); }
@keyframes bokeh {
  0% { transform: translate(0, 0) scale(1); opacity: .5; }
  50% { opacity: 1; }
  100% { transform: translate(14px, -22px) scale(1.15); opacity: .65; }
}

/* Encabezado */
.brindis__cab {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 26px);
  left: 16px;
  right: 16px;
  z-index: 4;
  text-align: center;
  pointer-events: none;
  transition: opacity .8s ease, transform .8s ease;
}
.brindis__eyebrow { margin: 0; font-family: var(--cinzel); font-size: .68rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--oro-2); }
.brindis__titulo { margin: 2px 0 0; font-family: var(--guion); font-size: clamp(2.8rem, 13vw, 3.6rem); line-height: 1.08; color: var(--tinta); }
.brindis__guia { margin: 4px 0 0; font-size: 1.2rem; font-style: italic; font-weight: 600; color: var(--tinta); transition: opacity .4s; }
.brindis__sub { margin: 2px 0 0; font-size: .98rem; font-style: italic; color: var(--suave); transition: opacity .4s; }
.cambiando .brindis__guia, .cambiando .brindis__sub { opacity: 0; }
.brindado .brindis__cab { opacity: 0; transform: translateY(-16px); }

/* Copas (el JS fija tamaño y posición base; el arrastre usa transform) */
.copa {
  all: unset;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 80px;
  height: 256px;
  transform-origin: 50% 100%;
  cursor: default;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.copa__svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(120, 95, 50, .14)); }
.copa__sombra {
  position: absolute;
  left: 50%;
  bottom: calc(5.5% - 8px);
  width: 92%;
  height: 16px;
  margin-left: -46%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 95, 50, .28), rgba(120, 95, 50, 0));
  z-index: -1;
}
.copa__inicial { font-family: var(--cinzel); font-size: 15px; font-weight: 600; fill: #c9a45c; opacity: .42; letter-spacing: .05em; }
.paso2 .copa { cursor: grab; }
.paso2 .copa:active { cursor: grabbing; }
.copa:focus-visible { outline: 2px dashed var(--oro-2); outline-offset: 6px; border-radius: 30px; }
.paso2 .copa:not(:disabled) .copa__svg { animation: invitar 1.6s ease-in-out infinite; }
#copaB .copa__svg { animation-delay: -.8s; }
.chocando .copa .copa__svg, .brindado .copa .copa__svg { animation: none; }
@keyframes invitar { 50% { filter: drop-shadow(0 6px 10px rgba(120, 95, 50, .14)) drop-shadow(0 0 10px rgba(233, 205, 140, .85)); } }

/* Botella */
.botella {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 46px;
  height: 160px;
  transform-origin: 50% 1.5%;
  transition: transform .55s cubic-bezier(.45, .05, .25, 1), opacity .5s ease;
  pointer-events: none;
  opacity: 0;
}
.botella.visible { opacity: 1; }
.botella__svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 12px rgba(70, 80, 60, .2)); }
.botella__mono { font-family: var(--cinzel); font-size: 11px; font-weight: 600; fill: var(--oro-2); letter-spacing: .02em; }
.botella__amp { font-family: var(--serif); font-style: italic; font-size: 10px; }

.brindis__lienzo { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }

/* Superficie táctil del paso 1 */
.brindis__mesa {
  all: unset;
  position: absolute;
  inset: 0;
  z-index: 6;
  cursor: pointer;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.brindis__mesa:focus-visible { outline: 2px dashed var(--oro-2); outline-offset: -14px; border-radius: 26px; }

/* Indicador "mantén presionado" sobre la copa */
.brindis__pulso {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  border-radius: 50%;
  border: 1.5px solid var(--oro);
  pointer-events: none;
  animation: pulso 2s ease-out infinite;
  transition: opacity .4s;
}
.brindis__pulso::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--oro); opacity: .5; }
@keyframes pulso { 0% { transform: scale(.55); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
.sirviendo .brindis__pulso, .paso2 .brindis__pulso, .brindado .brindis__pulso { opacity: 0; animation: none; }

/* Flechas que invitan a juntar las copas */
.brindis__flechas {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 18px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.brindis__flechas i { width: 12px; height: 12px; border-top: 1.5px solid var(--oro-2); border-right: 1.5px solid var(--oro-2); }
.brindis__flechas i:first-child { transform: rotate(45deg); animation: flechaD 1.3s ease-in-out infinite; }
.brindis__flechas i:last-child { transform: rotate(-135deg); animation: flechaI 1.3s ease-in-out infinite; }
@keyframes flechaD { 50% { transform: translateX(5px) rotate(45deg); } }
@keyframes flechaI { 50% { transform: translateX(-5px) rotate(-135deg); } }
.paso2 .brindis__flechas { opacity: .9; }
.chocando .brindis__flechas, .brindado .brindis__flechas { opacity: 0; }

/* Pie: nivel + botones */
.brindis__pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity .7s ease, transform .7s ease;
}
.nivel { width: 132px; height: 4px; border-radius: 4px; background: rgba(201, 164, 92, .22); overflow: hidden; transition: opacity .4s; }
.nivel i { display: block; width: 100%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e9d8b4, var(--oro)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.paso2 .nivel { opacity: 0; }
.btn-brindis {
  all: unset;
  box-sizing: border-box;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 92, .6);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--cinzel);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tinta);
  cursor: pointer;
  transition: transform .2s ease, background-color .3s, opacity .3s;
}
.btn-brindis svg { color: var(--oro-2); }
.btn-brindis--lleno { background: linear-gradient(135deg, #f0dfb6, var(--oro)); border-color: transparent; color: #3d342b; box-shadow: 0 12px 24px -14px rgba(120, 90, 40, .7); }
.btn-brindis--lleno svg { color: #3d342b; }
.btn-brindis:active { transform: scale(.96); }
.btn-brindis:focus-visible { outline: 2px solid var(--oro-2); outline-offset: 3px; }
.btn-brindis:disabled { opacity: .5; cursor: default; }
.brindado .brindis__pie { opacity: 0; transform: translateY(12px); }
.brindado .brindis__pie .btn-brindis { pointer-events: none; }

/* Nombres (las burbujas los escriben; luego aparece el texto real) */
.brindis__final {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  top: calc(env(safe-area-inset-top) + 7%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
.final__eyebrow { margin: 0 0 4px; font-family: var(--cinzel); font-size: .7rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--oro-2); opacity: 0; }
.final__nombres { margin: 0; font-family: var(--guion); font-weight: 400; font-size: clamp(3rem, 14.5vw, 4rem); line-height: 1; color: var(--tinta); }
.final__n, .final__nombres .amp { display: block; opacity: 0; }
.final__nombres .amp { margin: 2px 0; font-size: .5em; line-height: 1; }
.final__fecha { margin: 14px 0 0; font-family: var(--cinzel); font-size: .92rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--oro-2); opacity: 0; }
.revelado .final__eyebrow { animation: revelar 1s .1s ease both; }
.revelado .final__n:first-child { animation: revelar 1.2s .2s ease both; }
.revelado .final__nombres .amp { animation: revelar 1.2s .35s ease both; }
.revelado .final__n:last-child { animation: revelar 1.2s .5s ease both; }
.revelado .final__fecha { animation: revelar 1.2s .7s ease both; }
@keyframes revelar { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: none; } }

.brindis .desliza-c { z-index: 8; color: var(--oro-2); font-family: var(--cinzel); }

/* ================= INVITACIÓN ================= */
.contenido {
  position: relative;
  background: var(--marfil);
  background-image: var(--grano);
  box-shadow: 0 0 60px -30px rgba(74, 64, 54, .35);
}
.s-titulo { margin-bottom: 22px; }

.sep { display: block; width: 170px; height: 42px; margin: 0 auto; }
.sep.separador { margin: -14px auto; }

.carta { padding-top: 60px; }
.carta__eyebrow { margin: 12px 0 24px; max-width: 22em; font-family: var(--cinzel); font-size: .7rem; font-weight: 600; line-height: 1.8; letter-spacing: .24em; text-transform: uppercase; color: var(--oro-2); }
/* Marco con forma de copa flauta: arco alto y base angosta */
.carta__foto {
  position: relative;
  width: min(72%, 280px);
  margin: 0;
  padding: 8px;
  border-radius: 999px 999px 140px 140px / 999px 999px 160px 160px;
  background: linear-gradient(160deg, #fffaf0, #f3e6c9);
  box-shadow: var(--s-sombra), 0 0 0 1px rgba(201, 164, 92, .55);
}
.carta__foto::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  border: 1px solid rgba(201, 164, 92, .4);
  pointer-events: none;
}
.carta__foto img { display: block; width: 100%; aspect-ratio: 3 / 4.3; object-fit: cover; border-radius: 999px 999px 132px 132px / 999px 999px 152px 152px; }
.carta__nombres { margin: 30px 0 0; font-family: var(--guion); font-weight: 400; font-size: clamp(3rem, 14vw, 3.8rem); line-height: 1.05; }
.carta__nombres .amp { font-size: .5em; }
.carta__fecha { margin: 8px 0 0; font-family: var(--cinzel); font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--oro-2); }
.carta__texto { margin: 20px 0 0; max-width: 21em; font-size: 1.18rem; line-height: 1.6; font-style: italic; }

.s-cuenta { background: linear-gradient(180deg, var(--marfil), rgba(233, 216, 180, .45) 55%, var(--marfil)); }
.s-cuenta__caja { position: relative; background: rgba(255, 255, 255, .88); border-radius: 14px 14px 40px 40px; }
.s-cuenta__caja::before { content: ""; position: absolute; top: 6px; left: 50%; width: 18px; height: 1px; margin-left: -9px; background: var(--oro); }

.s-evento { position: relative; overflow: hidden; }
.s-evento::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 15px;
  border: 1px solid rgba(201, 164, 92, .28);
  pointer-events: none;
}
.s-evento__icono { background: radial-gradient(circle at 35% 30%, #fffaf0, #f3e6c9); border-color: var(--oro); color: var(--oro-2); }
.s-evento__titulo { color: var(--oro-2); }
.s-evento__hora { color: var(--tinta); }
.s-evento__lugar { font-size: 1.2rem; }
.s-evento__dir { font-size: 1.02rem; }

.s-foto { border: 6px solid #fff; }
.s-galeria__rejilla--3 .s-foto:first-child { border-radius: 999px 999px var(--s-radio) var(--s-radio); }
.s-galeria__rejilla--3 .s-foto:first-child img { aspect-ratio: 4 / 3; }

.frase { background: radial-gradient(80% 50% at 50% 55%, rgba(241, 213, 207, .45), transparent 75%); }
.frase__foto {
  margin: 0;
  width: min(80%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid #fff;
  box-shadow: var(--s-sombra), 0 0 0 1px rgba(201, 164, 92, .55), 0 0 0 14px rgba(233, 216, 180, .45);
}
.frase__foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frase__txt { margin: 30px 0 0; max-width: 18em; font-size: 1.35rem; line-height: 1.5; font-style: italic; color: var(--tinta); }

.s-vestimenta { background: linear-gradient(180deg, var(--marfil), rgba(241, 213, 207, .35) 55%, var(--marfil)); }
.s-vestimenta__tipo { font-family: var(--serif); font-style: italic; font-size: 1.85rem; color: var(--oro-2); }
.s-paleta li { background: #fff; }

.s-rsvp { background: radial-gradient(80% 60% at 50% 40%, rgba(233, 216, 180, .55), transparent 75%); }
.s-rsvp__saludo { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--oro-2); }
.s-rsvp__texto { font-size: 1.15rem; }
.s-btn--lleno { background: linear-gradient(135deg, #f0dfb6, var(--oro)); }

.s-pie__n { font-family: var(--guion); font-size: 2.8rem; }
.btn-musica { background: var(--marfil); color: var(--oro-2); box-shadow: 0 6px 18px rgba(74, 64, 54, .2); }

@media (min-width: 521px) {
  .brindis__titulo { font-size: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bokeh, .brindis__pulso, .brindis__flechas i, .paso2 .copa:not(:disabled) .copa__svg { animation: none !important; }
  .botella { transition-duration: .2s; }
  .revelado .final__eyebrow, .revelado .final__n, .revelado .final__nombres .amp, .revelado .final__fecha { animation: none; opacity: 1; }
}
