/* Invitaciones digitales de ejemplo — EMP Solutions Tech. Cada ejemplo tiene su propio tema (clase en <body>). */
@font-face { font-family: 'Manrope'; src: url('/fuente/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/fuente/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fuente/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: 'Manrope', system-ui, sans-serif; line-height: 1.6; font-size: 1.05rem; -webkit-font-smoothing: antialiased; background: var(--fondo); color: var(--tinta); }
img, svg { display: block; }
a { color: var(--acento); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.inv { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; overflow: hidden; }
.aviso-ej { margin: 0; padding: 8px 14px; font-size: .8rem; font-weight: 700; text-align: center; background: var(--aviso-fondo, #fde7b0); color: #2a2118; }
.aviso-ej a { color: inherit; }
.boton-i { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; background: var(--acento); color: var(--sobre-acento); transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.boton-i:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px var(--acento); }
.boton-i:active { transform: scale(.97); }
.boton-i.sec { background: transparent; color: var(--tinta); border-color: currentColor; }
.sonido-i { position: fixed; top: 44px; right: max(12px, calc(50% - 268px)); z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; border: 1.5px solid var(--linea); background: var(--fondo); color: var(--tinta); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.sonido-i[aria-pressed='true'] { background: var(--acento); color: var(--sobre-acento); border-color: var(--acento); }
.sonido-i svg { width: 16px; height: 16px; }

/* Sobre: se ve solo con JavaScript; sin JS la invitación aparece abierta */
.sobre { display: none; }
.js .sobre { display: grid; position: fixed; inset: 0; z-index: 40; place-items: center; background: var(--sobre-fondo); transition: opacity .6s ease .5s, visibility 0s linear 1.1s; }
.js .sobre.abierto { opacity: 0; visibility: hidden; }
.sobre-caja { position: relative; width: min(340px, 84vw); aspect-ratio: 4 / 3; perspective: 900px; }
.sobre-cuerpo { position: absolute; inset: 0; background: var(--sobre-papel); border-radius: 10px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.45); }
.sobre-solapa { position: absolute; left: 0; right: 0; top: 0; height: 60%; background: var(--sobre-solapa); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .7s cubic-bezier(.4,0,.2,1); border-radius: 10px 10px 0 0; z-index: 2; }
.sobre.abierto .sobre-solapa { transform: rotateX(180deg); z-index: 0; }
.sello { position: absolute; left: 50%; top: 52%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: var(--acento); color: var(--sobre-acento); font-family: var(--letra-titulo); font-size: 1.3rem; font-weight: 700; box-shadow: 0 6px 14px -4px rgba(0,0,0,.4); transition: transform .4s, opacity .3s; }
.sobre.abierto .sello { transform: scale(.4); opacity: 0; }
.sobre-texto { position: absolute; left: 0; right: 0; bottom: -86px; text-align: center; color: var(--sobre-tinta); }
.sobre-texto p { margin: 0 0 10px; font-weight: 700; }

/* Contenido */
.portada-i { text-align: center; padding: 72px 24px 48px; position: relative; }
.pre { margin: 0 0 8px; letter-spacing: .02em; color: var(--suave); font-weight: 600; }
.titulo-i { font-family: var(--letra-titulo); font-weight: var(--peso-titulo, 700); font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1; margin: 0 0 16px; letter-spacing: -0.02em; }
.fecha-i { font-size: 1.15rem; font-weight: 700; margin: 0; }
.lugar-i { margin: 4px 0 0; color: var(--suave); }
.cuenta { display: flex; justify-content: center; gap: 10px; margin: 28px 0 0; }
.cuenta div { min-width: 70px; padding: 12px 6px; border-radius: 16px; background: var(--tarjeta); border: 1px solid var(--linea); }
.cuenta b { display: block; font-family: var(--letra-titulo); font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cuenta span { font-size: .78rem; color: var(--suave); }
.bloque-i { padding: 36px 24px; text-align: center; }
.bloque-i h2 { font-family: var(--letra-titulo); font-weight: var(--peso-titulo, 700); font-size: 1.9rem; margin: 0 0 12px; line-height: 1.1; }
.bloque-i p { margin: 0 auto 10px; max-width: 42ch; color: var(--suave); }
.detalle { display: grid; gap: 12px; text-align: left; margin-top: 16px; }
.detalle div { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 18px; padding: 16px 18px; }
.detalle h3 { margin: 0 0 4px; font-size: 1.05rem; }
.detalle p { margin: 0; text-align: left; max-width: none; }
.acciones-i { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.rsvp { display: grid; gap: 10px; text-align: left; max-width: 380px; margin: 16px auto 0; }
.rsvp label { font-weight: 700; display: grid; gap: 6px; }
.rsvp input, .rsvp select { font: inherit; min-height: 50px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--linea); background: var(--tarjeta); color: var(--tinta); }
.rsvp input:focus, .rsvp select:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 30%, transparent); }
.nota-i { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fde7b0; color: #2a2118; font-size: .92rem; text-align: left; }
.pie-i { text-align: center; padding: 36px 24px 48px; font-size: .9rem; color: var(--suave); }
.pie-i a { font-weight: 700; }

/* Aparición suave */
.js .aparece { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.js .aparece.visible { opacity: 1; transform: none; }

/* Confeti (cumpleaños) */
.confeti { position: fixed; top: -12px; z-index: 35; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: cae linear forwards; }
@keyframes cae { to { transform: translate(var(--dx), 110vh) rotate(var(--giro)); } }

/* ---------- Tema: matrimonio ---------- */
.t-boda { --fondo: #f7f3ea; --tinta: #2f3b2e; --suave: #5e6e5a; --acento: #8a6a2f; --sobre-acento: #fff; --tarjeta: #fffdf8; --linea: #e3dccb; --letra-titulo: 'Fraunces', Georgia, serif; --peso-titulo: 500;
  --sobre-fondo: #e9e2d2; --sobre-papel: #fbf8f1; --sobre-solapa: #efe7d6; --sobre-tinta: #2f3b2e; }
.t-boda .titulo-i { font-style: italic; }

/* ---------- Tema: cumpleaños ---------- */
.t-cumple { --fondo: #fff7fb; --tinta: #2a1b3d; --suave: #5b4a6e; --acento: #d6246e; --sobre-acento: #fff; --tarjeta: #ffffff; --linea: #f3d3e3; --letra-titulo: 'Bricolage', 'Manrope', sans-serif; --peso-titulo: 800;
  --sobre-fondo: #2a1b3d; --sobre-papel: #ffd23f; --sobre-solapa: #ff9f1c; --sobre-tinta: #fff; }
.t-cumple .titulo-i { font-size: clamp(3rem, 14vw, 5rem); }
.t-cumple .titulo-i span { color: var(--acento); display: block; }
.t-cumple .globos { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.js .t-cumple .globos svg { animation: flota 3.5s ease-in-out infinite alternate; }
.t-cumple .globos svg:nth-child(2) { animation-delay: .6s; } .t-cumple .globos svg:nth-child(3) { animation-delay: 1.1s; }
@keyframes flota { to { transform: translateY(-10px) rotate(3deg); } }

/* ---------- Tema: baby shower ---------- */
.t-baby { --fondo: #f6fbfa; --tinta: #2e4057; --suave: #5b6b7a; --acento: #3e7c74; --sobre-acento: #fff; --tarjeta: #ffffff; --linea: #d8ece8; --letra-titulo: 'Fraunces', Georgia, serif; --peso-titulo: 600;
  --sobre-fondo: #dff1ee; --sobre-papel: #ffffff; --sobre-solapa: #fde2d3; --sobre-tinta: #2e4057; }
.t-baby .nubes { color: #cfe7e2; width: 220px; margin: 0 auto 6px; }
.js .t-baby .nubes { animation: nube 6s ease-in-out infinite alternate; }
@keyframes nube { to { transform: translateX(10px); } }
.t-baby .regalos { list-style: none; padding: 0; margin: 14px auto 0; max-width: 380px; display: grid; gap: 8px; text-align: left; }
.t-baby .regalos li { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 14px; padding: 10px 14px; }

/* ---------- Tema: evento / publicidad ---------- */
.t-evento { --fondo: #0d0f12; --tinta: #f2f4f7; --suave: #a3aab5; --acento: #c6f432; --sobre-acento: #0d0f12; --tarjeta: #161a20; --linea: #262c35; --letra-titulo: 'Bricolage', 'Manrope', sans-serif; --peso-titulo: 800; --aviso-fondo: #c6f432;
  --sobre-fondo: #0d0f12; --sobre-papel: #161a20; --sobre-solapa: #1f252d; --sobre-tinta: #f2f4f7; }
.t-evento .titulo-i { font-size: clamp(2.8rem, 12vw, 4.6rem); text-transform: none; }
.t-evento .titulo-i span { color: var(--acento); }
.t-evento .rayo { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 300px at 50% -10%, rgba(198,244,50,.18), transparent 70%); }
.t-evento .producto { width: 200px; margin: 0 auto 18px; }
.js .t-evento .producto { animation: gira 8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.t-evento .boton-i.sec { color: var(--tinta); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .aparece { opacity: 1; transform: none; }
}
.titulo-i:focus { outline: none; }

/* Fotos recortadas y fotos de cada invitación */
.recorte-i { display: block; height: auto; margin: 0 auto 14px; filter: drop-shadow(0 16px 22px rgba(0,0,0,.16)); }
.t-boda .recorte-i { width: 150px; }
.t-cumple .recorte-i { width: 92px; }
.t-baby .recorte-i { width: 190px; }
.t-evento .recorte-i { width: 240px; filter: drop-shadow(0 20px 36px rgba(198,244,50,.18)); }
.js .t-cumple .recorte-i { animation: flota 3.5s ease-in-out infinite alternate; }
.js .t-baby .recorte-i, .js .t-boda .recorte-i { animation: flota 5s ease-in-out infinite alternate; }
.foto-i { margin: 0 auto 26px; max-width: 360px; border-radius: 24px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.14); border: 6px solid var(--tarjeta); }
.foto-i img { display: block; width: 100%; height: auto; }
.t-evento .foto-i { border-color: #1b2028; }
@media (prefers-reduced-motion: reduce) { .recorte-i { animation: none !important; } }
