@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

/* =========================================================
   INVITACIÓN — José & Yacqueline
   Paleta: crema y dorado
   ========================================================= */

:root {
    --sello: 110px;
    --crema: #F8F1E4;
    --marfil: #FFFCF6;
    --oliva-oscuro: #D9BD7C;
    --oliva: #D9BD7C;
    --oliva-claro: #D9BD7C;
    --dorado: #B8954A;
    --dorado-claro: #D9BD7C;
    --carbon: #3A3528;

    --sombra-suave: 0 10px 40px rgba(156, 122, 11, 0.308);
    --radio-tarjeta: 4px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    height: 100%;
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--crema);
    color: var(--carbon);
    font-family: 'Lora', serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    color: var(--dorado);
    margin: 0;
    letter-spacing: 0.02em;
}

p { line-height: 1.75; color: var(--carbon); }

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------
   ELEMENTOS COMPARTIDOS
   --------------------------------------------------------- */

.eyebrow {
    font-family: 'Lora', serif;
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--dorado);
    margin: 0 0 0.6rem;
}

.eyebrow-claro { color: var(--dorado); }

.nombres-script {
    font-family: 'Bodoni Moda', 'Playfair Display', serif;
    font-style: normal;
    font-size: 3.6rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--dorado);
}

.separador {
    position: relative;
    height: 1px;
    width: 120px;
    margin: 0 auto 1.4rem;
    background: rgba(255, 252, 246, 0.6);
}

.separador::before {
    content: "✦";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--crema);
    color: var(--dorado);
    font-size: 0.8rem;
    padding: 0 10px;
}

.separador-claro::before {
    background: var(--dorado-claro);
    color: var(--marfil);
}

/* ---------------------------------------------------------
   PANTALLA DE BIENVENIDA — SOBRE
   --------------------------------------------------------- */

.bienvenida {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--crema);
    transition: opacity 1.3s ease;
}

.bienvenida.saliendo { opacity: 0; }

/* El sobre se acerca mientras se desvanece */
.bienvenida.saliendo .sobre { transform: scale(1.2); }

.sobre {
    --sello: 78px;
    position: relative;
    width: min(90vw, 460px);
    aspect-ratio: 3 / 2;
    perspective: 1000px;
    background: #E8DAC0;
    border: 1px solid rgba(184, 149, 74, 0.5);
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(120, 90, 20, 0.28);
    transition: transform 1.3s ease;
}

/* Bolsillo del sobre: tres triángulos que se juntan al centro */
.pliegue,
.sobre-solapa {
    position: absolute;
    inset: 0;
}

.pliegue-izq { background: #EFE3CC; clip-path: polygon(0 0, 50% 55%, 0 100%);       z-index: 2; }
.pliegue-der { background: #EFE3CC; clip-path: polygon(100% 0, 50% 55%, 100% 100%); z-index: 2; }
.pliegue-inf { background: #E3D2B0; clip-path: polygon(0 100%, 50% 55%, 100% 100%); z-index: 2; }

/* Solapa superior: baja en punta hasta donde va el sello */
.sobre-solapa {
    bottom: 40%;
    background: linear-gradient(180deg, #FBF5E8, #EFE3CC);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transition: transform 0.9s ease;
    z-index: 3;
}

.sobre-lineas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    fill: none;
    stroke: #D9BD7C;
    stroke-width: 1.2;
}

.linea-sup { transition: opacity 0.4s; }

.flores {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.flor-img {
    position: absolute;
    height: auto;
    max-width: none;
}

.flor-inf-izq {
    left: -12%;
    bottom: -14%;
    width: 48%;
    transform: rotate(60deg);
}

.flor-sup-der {
    right: -5%;
    top: -10%;
    width: 38%;
    transform: scaleY(-1);
    transition: opacity 0.5s;
}

/* Sello de cera, en la punta de la solapa */
.sello {
    all: unset;
    position: absolute;
    top: 60%;
    left: 50%;
    width: var(--sello);
    height: var(--sello);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 7;
    filter: drop-shadow(0 5px 6px rgba(60, 40, 10, 0.4));
    transition: transform 0.4s ease, opacity 0.4s ease;
    animation: latido 2s ease-in-out infinite;
}

.sello svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sello:hover {
    background: none;
    border-color: transparent;
    box-shadow: none;
    transform: translate(-50%, -50%) scale(1.08);
}

@keyframes latido {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.07); }
}

/* Al abrir: la solapa se levanta */
.sobre.abierto .sobre-solapa {
    transform: rotateX(180deg);
    z-index: 0;
    transition: transform 0.9s ease, z-index 0s linear 0.45s;
}

.sobre.abierto .linea-sup { opacity: 0; }
.sobre.abierto .flor-sup-der { opacity: 0; }
.sobre.abierto .sello {
    animation: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

/* Texto fuera del sobre, sobre el fondo limpio */
.texto-musica {
    margin: 0;
    padding: 0 1rem;
    text-align: center;
    font-family: 'Lora', serif;
    font-size: 0.68rem;
    line-height: 1.6;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8F6E2E;
}

/* ---------------------------------------------------------
   INVITACIÓN — CONTENEDOR
   --------------------------------------------------------- */

#invitacion { display: none; }

/* Aparece suavemente, subiendo un poco, mientras se desvanece el sobre */
#invitacion.entrando {
    opacity: 0;
    transform: translateY(24px);
}

#invitacion.entrando.visible {
    opacity: 1;
    transform: none;
    transition: opacity 1.2s ease, transform 1.2s ease;
}

/* ---------------------------------------------------------
   PORTADA — foto arriba que se funde con el fondo crema
   --------------------------------------------------------- */

.portada {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    background: var(--crema);
}

.portada-foto {
    position: relative;
    height: 62vh;
    min-height: 340px;
    max-height: 560px;
    overflow: hidden;
}

.portada-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.portada-foto::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to bottom, rgba(248, 241, 228, 0), var(--crema));
}

.portada .overlay {
    position: relative;
    z-index: 1;
    margin-top: -2.5rem;
    padding: 0 1.6rem 2.6rem;
}

.portada-intro {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 auto 0.7rem;
    max-width: 320px;
    opacity: 0.85;
}

.nombres-portada {
    font-family: 'Bodoni Moda', 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 9vw, 2.6rem);
    line-height: 1.15;
    color: var(--carbon);
    margin: 0 0 0.7rem;
}

.fecha-portada {
    font-family: 'Bodoni Moda', 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    color: #8F6E2E;
    margin: 1.2rem 0 0;
}

.portada-mensaje {
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 320px;
}

/* ---------------------------------------------------------
   CONTADOR — estructura simple, fondo dorado
   --------------------------------------------------------- */

.contador-section {
    text-align: center;
    padding: 2.8rem 1rem 3rem;
    background: var(--oliva);
    color: var(--marfil);
}

.contador-titulo {
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--marfil);
    margin: 0 0 1.3rem;
}

.contador {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contador-bloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 0 0.25rem;
}

.contador-numero {
    font-family: 'Raleway', sans-serif;
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 500;
    color: var(--marfil);
}

.contador-label {
    margin-top: 0.45rem;
    font-family: 'Raleway', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 252, 246, 0.9);
}

.contador-sep {
    font-family: 'Raleway', sans-serif;
    font-size: 1.3rem;
    line-height: 1.9rem;
    color: var(--marfil);
    opacity: 0.7;
}

.contador-final {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--marfil);
}

/* ---------------------------------------------------------
   TARJETA BASE (la usan "familia" y la galería)
   --------------------------------------------------------- */

.card {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.card h2 {
    font-size: 2rem;
    margin-bottom: 1.1rem;
    font-family: 'Great Vibes', cursive;
}

.card p {
    font-size: 1.02rem;
    max-width: 480px;
    margin: 0 auto;
}

/* Mensaje a la familia: más compacto */
.card.card-familia {
    padding: 2.2rem 1.6rem 1.2rem;
}

.card.card-familia .icono-rama { margin-bottom: 0.2rem; }
.card.card-familia h2 { margin-bottom: 0.4rem; }

/* ---------------------------------------------------------
   BLOQUES UNIFICADOS (ceremonia, celebración, vestimenta,
   cupos, regalos y confirmación)
   --------------------------------------------------------- */

.bloque {
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem);
    max-width: 460px;
    margin: 1rem auto;
    padding: 1.8rem 1.6rem;
    text-align: center;
    background: #f7faf5;
    border: 1px solid var(--dorado);
    border-radius: var(--radio-tarjeta);
    box-shadow: var(--sombra-suave);
}

.bloque::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(184, 149, 74, 0.55);
    border-radius: 2px;
    pointer-events: none;
}

.bloque h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    line-height: 1.1;
    margin: 0 0 0.5rem;
}

.bloque p {
    font-size: 0.98rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 380px;
}

.bloque .icono {
    display: flex;
    justify-content: center;
    margin-bottom: 0.4rem;
    color: var(--dorado);
}

.bloque .icono svg { width: 38px; height: 38px; }

/* Línea divisoria con adorno dentro de un mismo bloque */
.divisor {
    position: relative;
    height: 1px;
    width: 120px;
    margin: 1.3rem auto;
    background: rgba(184, 149, 74, 0.55);
}

.divisor::before {
    content: "✦";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #f7faf5;
    color: var(--dorado);
    font-size: 0.75rem;
    padding: 0 10px;
}

.detalle-evento {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.detalle-evento p {
    color: var(--dorado);
    letter-spacing: 0.02em;
}

.boton-mapa {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding: 0.55rem 1.3rem;
    border: 1px solid var(--dorado);
    border-radius: 999px;
    color: var(--dorado);
    font-family: 'Lora', serif;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.boton-mapa:hover { background: rgba(184, 149, 74, 0.1); }

/* ---------------------------------------------------------
   VESTIMENTA
   --------------------------------------------------------- */

.bloque-vestimenta {
    background: #f7faf5;
    max-width: 520px;
}

.vestimenta-intro {
    font-size: 0.92rem;
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 1rem;
}

.vestimenta-img-unica {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin: 0 auto 1.1rem;
}

.vestimenta-columnas {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-top: 1px solid rgba(184, 149, 74, 0.2);
    border-bottom: 1px solid rgba(184, 149, 74, 0.2);
    padding: 1.1rem 0;
}

.vestimenta-col {
    width: 50%;
    padding: 0 0.8rem;
}

.vestimenta-col:first-child { border-right: 1px solid rgba(184, 149, 74, 0.25); }

.vestimenta-col h3 {
    font-family: 'Lora', serif;
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--dorado);
    margin: 0 0 0.6rem;
    text-align: center;
    font-weight: 500;
}

.vestimenta-img {
    width: 100%;
    max-width: 130px;
    height: 170px;
    object-fit: cover;
    object-position: top;
    border-radius: 2px;
    margin: 0 auto 0.7rem;
    filter: grayscale(8%) sepia(5%);
}

.vestimenta-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vestimenta-col li {
    font-size: 0.84rem;
    color: var(--dorado);
    padding-left: 1.1rem;
    position: relative;
    text-align: left;
    line-height: 1.4;
}

.vestimenta-col li::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--dorado);
    font-size: 0.7rem;
    line-height: 1.6;
}

.bloque .vestimenta-evitar-titulo,
.vestimenta-evitar-titulo {
    font-size: 0.64rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--dorado);
    margin: 0 auto 0.6rem;
}

.chips-evitar {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.chip-evitar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--carbon);
    opacity: 0.75;
}

.chip-evitar .circulo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(58, 53, 40, 0.2);
    position: relative;
}

.chip-evitar .circulo::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent 44%, rgba(184,149,74,0.7) 44%, rgba(184,149,74,0.7) 56%, transparent 56%);
}

.chip-blanco .circulo    { background: #FFFFFF; }
.chip-champagne .circulo { background: #E9D9B8; }
.chip-beige .circulo     { background: #DCC9A6; }
.chip-rojo .circulo      { background: #c42121; }

/* ---------------------------------------------------------
   CUPOS + REGALOS (dos columnas) Y CONFIRMAR
   --------------------------------------------------------- */

.duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.duo-item h2 { font-size: 1.7rem; }

.duo-item p {
    font-size: 0.9rem;
    color: var(--dorado);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.boton-confirmar {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    border: 1px solid var(--dorado);
    background: var(--dorado);
    color: var(--marfil);
    font-family: 'Lora', serif;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(120, 90, 20, 0.2);
}

.boton-confirmar:hover {
    background: var(--oliva);
    border-color: var(--oliva);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(120, 90, 20, 0.25);
}

/* ---------------------------------------------------------
   GALERÍA / RECUERDOS (sin cambios)
   --------------------------------------------------------- */

.galeria {
    text-align: center;
    padding: 4.5rem 1.5rem 5rem;
}

.galeria h2 {
    font-size: 3rem;
    margin-bottom: 2.5rem;
    font-family: 'Great Vibes', cursive;
}

/* Carrusel de fotos */

.carrusel {
    max-width: 420px;
    margin: 0 auto;
}

.carrusel-marco {
    position: relative;
    border: 1px solid var(--dorado);
    border-radius: var(--radio-tarjeta);
    box-shadow: var(--sombra-suave);
    overflow: hidden;
}

/* Línea fina interior sobre la foto */
.carrusel-marco::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(255, 252, 246, 0.75);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
}

.carrusel-pista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carrusel-pista::-webkit-scrollbar { display: none; }

.carrusel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.carrusel-slide img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 30%;
}

.carrusel-flecha {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    padding: 0 0 3px;
    border: 1px solid var(--dorado);
    border-radius: 50%;
    background: rgba(255, 252, 246, 0.85);
    color: var(--dorado);
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.carrusel-prev { left: 12px; }
.carrusel-next { right: 12px; }

.carrusel-puntos {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carrusel-punto {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--dorado);
    opacity: 0.35;
    cursor: pointer;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.carrusel-punto.activo {
    opacity: 1;
    width: 20px;
    border-radius: 4px;
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

footer {
    text-align: center;
    background: var(--oliva-oscuro);
    color: var(--marfil);
    padding: 3.5rem 1.5rem 3rem;
}

.footer-firma,
footer .nombres-script {
    font-size: 2.2rem;
    color: var(--marfil);
    margin: 0;
}

.footer-texto {
    color: var(--marfil);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
}

/* ---------------------------------------------------------
   ANIMACIONES
   --------------------------------------------------------- */

@keyframes aparecer {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card, .bloque, .galeria { animation: aparecer 0.9s ease both; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 640px) {
    .card h2 { font-size: 2.4rem; }
    .nombres-script { font-size: 2.7rem; }
    .nombre-individual { font-size: 2.3rem; }

    .circulo-ampersand { width: 46px; height: 46px; font-size: 1.3rem; }


    .card { padding: 3rem 1.4rem; }
    .card.card-familia { padding: 2rem 1.4rem 1rem; }
    .card.card-familia h2 { font-size: 2.2rem; }

    .bloque { padding: 1.6rem 1.2rem; }
    .bloque h2 { font-size: 1.9rem; }
    .duo { gap: 0.6rem; }
    .duo-item h2 { font-size: 1.6rem; }
    .vestimenta-col { padding: 0 0.6rem; }

    .footer-firma,
    footer .nombres-script { font-size: 1.6rem; }
}

/* ---------------------------------------------------------
   ACCESIBILIDAD
   --------------------------------------------------------- */

button:focus-visible {
    outline: 2px solid var(--dorado);
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   TEXTOS NORMALES UNIFICADOS (misma letra, tamaño y color)
   --------------------------------------------------------- */

.portada-intro,
.portada-mensaje,
#mensaje-familia,
.detalle-evento p,
.vestimenta-intro,
#cupos,
#cupos ~ p,
#Regalos {
    font-family: 'Lora', serif;
    font-size: 0.98rem;
    line-height: 1.6;
    font-style: normal;
    font-weight: 400;
    color: #8F6E2E;
    opacity: 1;
}

/* Mantener siempre el modo claro */
:root { color-scheme: light only; }

html, body {
    background-color: #F8F1E4;
    color: #3A3528;
}

@media (prefers-color-scheme: dark) {
    :root { color-scheme: light only; }
    html, body {
        background-color: #F8F1E4 !important;
        color: #3A3528 !important;
    }
}