/* ==========================================================
   Diseño "Corazones" · Boda · llena la pantalla de amor
   Paleta: rosa suave, frambuesa, blanco, oro y tinta
   ========================================================== */

:root {
  --rosa: #f7d6dc;
  --rosa-2: #f2b8c6;
  --frambuesa: #e2557a;
  --frambuesa-2: #c63f65;
  --blanco: #fffafb;
  --oro: #d4ad6a;
  --oro-2: #a9833f;
  --tinta: #4a3a3f;
  --suave: #876f76;
  --guion: "Great Vibes", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --rebote: cubic-bezier(.2, 1.5, .4, 1);
  --suave-curva: cubic-bezier(.22, .7, .18, 1);

  --s-fondo: var(--blanco);
  --s-tinta: var(--tinta);
  --s-suave: var(--suave);
  --s-acento: var(--frambuesa);
  --s-acento-tinta: #fff;
  --s-tarjeta: rgba(255, 255, 255, .9);
  --s-borde: rgba(226, 85, 122, .16);
  --s-radio: 22px;
  --s-sombra: 0 20px 38px -28px rgba(198, 63, 101, .5);
  --s-fuente: var(--serif);
  --s-titulo: var(--guion);
  --s-titulo-tam: clamp(2.8rem, 12vw, 3.5rem);
  --s-titulo-color: var(--frambuesa-2);
  --s-etiqueta: var(--sans);
  --s-num: var(--serif);
  --s-num-color: var(--frambuesa);
  --s-btn-linea-color: var(--tinta);
}

body {
  background: #f6e7ea;
  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); }

/* ================= INTRO ================= */
.amor {
  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 15% 10%, rgba(247, 214, 220, .85), transparent 70%),
    radial-gradient(60% 40% at 95% 85%, rgba(247, 214, 220, .7), transparent 70%),
    radial-gradient(50% 30% at 85% 20%, rgba(212, 173, 106, .12), transparent 70%),
    var(--blanco);
  box-shadow: 0 0 60px -30px rgba(74, 58, 63, .35);
}
.amor::before {                             /* textura de papel */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grano);
  opacity: .55;
  pointer-events: none;
}
.amor__lienzo { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.amor__destello {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(circle at 50% 46%, #fff 0, rgba(255, 250, 251, .96) 28%, rgba(247, 214, 220, .7) 58%, rgba(247, 214, 220, 0) 82%);
  opacity: 0;
  pointer-events: none;
}
.amor.boom .amor__destello { animation: destello 1s ease-out both; }
@keyframes destello { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.amor.boom { animation: sacudir .5s ease-out; }
@keyframes sacudir {
  0%, 100% { transform: none; }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(4px, -3px); }
  60% { transform: translate(-3px, -2px); }
  80% { transform: translate(2px, 2px); }
}

/* Encabezado */
.amor__cab {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 34px);
  left: 22px;
  right: 22px;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  transition: opacity .6s ease, transform .6s ease;
}
.amor__eyebrow { margin: 0; font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--frambuesa); }
.amor__eyebrow .amp { font-size: 1.1em; padding: 0 .2em; }
.amor__titulo {
  margin: 12px auto 0;
  max-width: 14em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 8.4vw, 2.35rem);
  line-height: 1.15;
  color: var(--tinta);
  animation: aparecer 1.2s .2s var(--suave-curva) both;
}
@keyframes aparecer { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Medidor con forma de corazón */
.medidor {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 3;
  width: min(46vw, 200px);
  aspect-ratio: 108 / 98;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity .35s ease, transform .5s var(--rebote), filter .5s;
}
.medidor__svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 22px rgba(226, 85, 122, .28)); animation: respirar 2.6s ease-in-out infinite; }
@keyframes respirar { 50% { transform: scale(1.04); } }
.medidor__svg { transform-origin: 50% 50%; }
.medidor__nivel { transform: translateY(94px); transition: transform .7s var(--rebote); }
.medidor__ola { animation: ola 2.4s linear infinite; }
.medidor__ola--atras { animation-duration: 3.6s; animation-direction: reverse; opacity: .9; }
@keyframes ola { to { transform: translateX(-50px); } }
.medidor__brillo { opacity: .75; }
.medidor::after {                            /* onda que invita a tocar */
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 1.5px solid rgba(226, 85, 122, .45);
  animation: invitar 2.2s ease-out infinite;
}
@keyframes invitar { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.amor.jugando .medidor::after { animation: none; opacity: 0; }
.amor.jugando .medidor__svg { animation: none; }
.medidor.late .medidor__svg { animation: latido .46s ease-out; }
@keyframes latido { 0% { transform: scale(1); } 25% { transform: scale(1.12); } 45% { transform: scale(.98); } 65% { transform: scale(1.07); } 100% { transform: scale(1); } }

.medidor__txt {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(52% + min(23vw, 100px) + 18px);
  z-index: 3;
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--frambuesa-2);
  pointer-events: none;
  transition: opacity .4s;
}

/* Tensión, explosión y revelado */
.amor.tension .medidor { transform: translate(-50%, -50%) scale(1.22); filter: drop-shadow(0 0 26px rgba(226, 85, 122, .55)); }
.amor.tension .medidor__svg { animation: temblor .09s linear infinite; }
@keyframes temblor { 0% { transform: translate(0, 0); } 25% { transform: translate(1px, -1px); } 50% { transform: translate(-1px, 1px); } 75% { transform: translate(1px, 1px); } }
.amor.tension .amor__cab, .amor.tension .amor__pie, .amor.tension .medidor__txt { opacity: 0; }
.amor.boom .medidor { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
.amor.boom .amor__cab, .amor.boom .amor__pie, .amor.boom .medidor__txt, .amor.boom .amor__sonido { opacity: 0; pointer-events: none; }
.amor.boom .amor__pie .btn-amor { pointer-events: none; }

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

/* Pie: botón "Llenar de amor" */
.amor__pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity .5s ease;
}
.btn-amor {
  all: unset;
  box-sizing: border-box;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec7092, var(--frambuesa) 55%, var(--frambuesa-2));
  color: #fff;
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 26px -14px rgba(198, 63, 101, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .2s ease, opacity .3s;
}
.btn-amor svg { animation: latidoIcono 1.4s ease-in-out infinite; }
@keyframes latidoIcono { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
.btn-amor:active { transform: scale(.95); }
.btn-amor:focus-visible { outline: 2px solid var(--frambuesa-2); outline-offset: 3px; }
.btn-amor:disabled { opacity: .6; cursor: default; }
.amor__tip { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--suave); }

/* Botón de sonido */
.amor__sonido {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: calc(env(safe-area-inset-top) + 8px);
  right: 8px;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--frambuesa-2);
  cursor: pointer;
  transition: opacity .4s, background-color .3s;
}
.amor__sonido:hover { background: rgba(247, 214, 220, .6); }
.amor__sonido:focus-visible { outline: 2px solid var(--frambuesa); outline-offset: 2px; }
.son-x { display: none; }
.amor__sonido[aria-pressed="true"] .son-x { display: inline; }
.amor__sonido[aria-pressed="true"] .son-onda { display: none; }

/* Foto revelada en el marco de corazón */
.revela {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 70px);
  text-align: center;
  pointer-events: none;
  visibility: hidden;
}
.amor.revelado .revela { visibility: visible; }
.revela__marco { position: relative; width: min(76vw, 340px, 44svh); opacity: 0; }
.revela__marco::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(247, 214, 220, .7) 55%, rgba(247, 214, 220, 0));
}
.revela__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 22px 30px rgba(198, 63, 101, .35)); }
.marco__punteado { animation: girarPunteado 30s linear infinite; transform-box: fill-box; }
.revela__eyebrow { margin: 14px 0 0; font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--frambuesa); opacity: 0; }
.revela__nombres { margin: 2px 0 0; font-family: var(--guion); font-weight: 400; font-size: clamp(3rem, 14vw, 4rem); line-height: 1.05; color: var(--tinta); }
.revela__n { display: inline-block; opacity: 0; }
.revela__nombres .amp { display: inline-block; margin: 0 .18em; font-size: .55em; opacity: 0; }
.revela__fecha {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--suave);
  opacity: 0;
}
.revela__dia {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--oro);
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0;
  color: var(--frambuesa-2);
  box-shadow: 0 8px 16px -10px rgba(198, 63, 101, .5);
}
.amor.revelado .revela__marco { animation: brotarCorazon 1.35s var(--suave-curva) both, pulsoSuave 2.8s 1.6s ease-in-out infinite; }
.amor.revelado .revela__eyebrow { animation: aparecer 1s .75s var(--suave-curva) both; }
.amor.revelado .revela__n:first-of-type { animation: aparecer 1.1s .95s var(--suave-curva) both; }
.amor.revelado .revela__nombres .amp { animation: aparecer 1s 1.2s var(--suave-curva) both; }
.amor.revelado .revela__n:last-of-type { animation: aparecer 1.1s 1.4s var(--suave-curva) both; }
.amor.revelado .revela__fecha { animation: aparecer 1s 1.8s var(--suave-curva) both; }
@keyframes brotarCorazon {
  0% { opacity: 0; transform: scale(0) rotate(-14deg); }
  45% { opacity: 1; transform: scale(1.14) rotate(4deg); }
  65% { transform: scale(.94) rotate(-2deg); }
  82% { transform: scale(1.04) rotate(.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes pulsoSuave { 0%, 100% { opacity: 1; transform: scale(1); } 12% { opacity: 1; transform: scale(1.035); } 24% { opacity: 1; transform: scale(1); } 36% { opacity: 1; transform: scale(1.02); } }
@keyframes girarPunteado { to { stroke-dashoffset: -60; } }

.amor .desliza-c { z-index: 5; color: var(--frambuesa-2); font-family: var(--sans); }

/* ================= INVITACIÓN ================= */
.contenido { position: relative; background: var(--blanco); box-shadow: 0 0 60px -30px rgba(74, 58, 63, .35); }
.contenido::before { content: ""; position: absolute; inset: 0; background-image: var(--grano); opacity: .4; pointer-events: none; }

.separador { display: block; width: 160px; height: 24px; margin: 0 auto; }
.separador--medio { margin: -18px auto; }

.carta { padding-top: 64px; }
.carta__eyebrow { margin: 16px 0 0; max-width: 22em; font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .28em; line-height: 1.7; text-transform: uppercase; color: var(--frambuesa); }
.carta__nombres { margin: 14px 0 0; font-family: var(--guion); font-weight: 400; font-size: clamp(3.2rem, 15vw, 4.1rem); line-height: 1.05; color: var(--tinta); }
.carta__nombres .amp { font-size: .5em; }
.carta__fecha { margin: 8px 0 0; font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--suave); }
.carta__texto { margin: 22px 0 0; max-width: 21em; font-size: 1.2rem; line-height: 1.6; font-style: italic; }

.s-cuenta { background: linear-gradient(180deg, var(--blanco), rgba(247, 214, 220, .55) 55%, var(--blanco)); }
.s-cuenta__caja { border-radius: 50% 50% 18px 18px / 40% 40% 18px 18px; }
.s-cuenta__lbl { color: var(--suave); }

.s-evento { position: relative; overflow: hidden; }
.s-evento::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  width: 22px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath d='M50 86C18 64 2 44 2 26 2 12 13 2 27 2c11 0 19 7 23 16 4-9 12-16 23-16 14 0 25 10 25 24 0 18-16 38-48 60z' fill='%23f7d6dc'/%3E%3C/svg%3E") no-repeat center / contain;
}
.s-evento__icono { background: rgba(247, 214, 220, .5); border-color: var(--rosa-2); color: var(--frambuesa-2); }
.s-evento__titulo { color: var(--frambuesa-2); }
.s-evento__hora { color: var(--oro-2); }
.s-evento__lugar { font-size: 1.2rem; }
.s-evento__dir { font-size: 1.02rem; }

.s-foto { border: 5px solid #fff; }
.s-galeria__rejilla--3 .s-foto:first-child { border-radius: 999px 999px var(--s-radio) var(--s-radio); }

.frase { padding-top: 36px; }
.frase__marco { width: min(80%, 320px); }
.frase__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 26px rgba(198, 63, 101, .28)); }
.frase__txt { margin: 22px 0 0; max-width: 15em; font-family: var(--guion); font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.2; color: var(--frambuesa-2); }

.s-vestimenta { background: linear-gradient(180deg, var(--blanco), rgba(247, 214, 220, .4) 55%, var(--blanco)); }
.s-vestimenta__tipo { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--frambuesa-2); }
.s-paleta li { background: #fff; }

.s-rsvp { background: radial-gradient(80% 60% at 50% 40%, rgba(247, 214, 220, .6), transparent 75%); }
.s-rsvp__saludo { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--oro-2); }
.s-btn--lleno { background: linear-gradient(135deg, #ec7092, var(--frambuesa) 55%, var(--frambuesa-2)); }
.s-pie__n { font-family: var(--guion); font-size: 2.8rem; color: var(--frambuesa-2); }

/* ================= MOVIMIENTO REDUCIDO ================= */
@media (prefers-reduced-motion: reduce) {
  .medidor__svg, .medidor::after, .medidor__ola, .btn-amor svg, .marco__punteado, .amor__titulo { animation: none !important; }
  .amor.boom, .amor.tension .medidor__svg { animation: none; }
  .amor.tension .medidor, .amor.boom .medidor { transform: translate(-50%, -50%); }
  .amor.boom .amor__destello { animation: none; }
  .amor.revelado .revela__marco, .amor.revelado .revela__eyebrow, .amor.revelado .revela__n,
  .amor.revelado .revela__nombres .amp, .amor.revelado .revela__fecha { animation: aparecerQuieto .8s ease both; }
  @keyframes aparecerQuieto { from { opacity: 0; } to { opacity: 1; } }
}
