/* ========= RESET ========= */
*{ margin:0; padding:0; box-sizing:border-box; }

html{
    display:flex;
    justify-content:center;
    scroll-behavior:smooth;
    background:#0a0a19;
}

body{
    width:100%;
    max-width:430px;          /* invitación pensada solo para celular */
    margin:0 auto;
    overflow-x:hidden;
    font-family:'Cormorant Garamond', serif;
    color:#f5e9d4;
    min-height:100vh;
    box-shadow:0 0 60px rgba(0,0,0,.6);
    background:
        radial-gradient(circle at top, rgba(120,120,180,.25), transparent 60%),
        linear-gradient(rgba(10,10,25,.96), rgba(20,15,40,.98));
}

img{ max-width:100%; display:block; }

:focus-visible{ outline:2px solid #ffe7b0; outline-offset:3px; }

/* ========= PORTADA ========= */
.container{
    min-height:100vh;
    position:relative;
    padding:60px 35px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    overflow:hidden;
    background:
        linear-gradient(rgba(10,10,25,.18), rgba(20,15,40,.38)),
        url("../imagenes/imagenfondo4.png") center/cover no-repeat;
}

/* halo detrás del contenido: mantiene legible el texto
   sin tener que oscurecer toda la imagen de fondo */
.container::before{
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(ellipse at center,
        rgba(10,10,25,.55) 0%,
        rgba(10,10,25,.35) 45%,
        transparent 78%);
    z-index:0;
}

.container::after{           /* luna de la portada */
    content:"";
    position:absolute;
    top:-40px; left:-40px;
    width:140px; height:140px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,245,200,.7), rgba(255,245,200,.1));
    filter:blur(4px);
    opacity:.5;
    z-index:0;
}
.container > *{ position:relative; z-index:1; }

.tungtung{
    display:flex;
    justify-content:center;
    margin-bottom:25px;
    animation:flotar 4s ease-in-out infinite;
}
.tungtung img{
    width:300px;
    max-width:88%;
    aspect-ratio:3/4;
    object-fit:cover;
    border-radius:50% / 38%;
    border:3px solid rgba(255,231,176,.65);
    box-shadow:
        0 0 0 10px rgba(255,231,176,.07),
        0 0 45px rgba(255,221,150,.35),
        0 14px 26px rgba(0,0,0,.45);
}
@keyframes flotar{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-8px); }
}

.ornament{
    width:60px; height:60px;
    border:1px solid rgba(255,231,176,.35);
    border-radius:50%;
    position:relative;
    margin-bottom:20px;
}
.ornament::before{
    content:"✦";
    position:absolute;
    top:50%; left:50%;
    transform:translate(-50%,-50%);
    color:#ffe7b0;
    font-size:18px;
}
.ornament.bottom{ margin:20px 0 0; }

.small{
    letter-spacing:4px;
    color:rgba(245,233,212,.75);
    font-size:15px;
    margin-bottom:6px;
}

h1{
    font-family:'Great Vibes', cursive;
    font-weight:400;
    font-size:66px;
    line-height:1.1;
    color:#ffe7b0;
    text-shadow:0 0 18px rgba(255,221,150,.35);
}

.divider{
    width:150px; height:1px;
    background:rgba(255,231,176,.5);
    margin:30px 0;
}

.date{
    font-size:24px;
    color:rgba(245,233,212,.85);
    margin-bottom:45px;
}

/* ========= BOTONES ========= */
.boton{
    display:inline-block;
    border:none;
    text-decoration:none;
    background:linear-gradient(135deg,#5a4a8a,#3a2f63);
    color:#ffe7b0;
    padding:15px 42px;
    border-radius:50px;
    font-size:18px;
    font-family:'Cormorant Garamond', serif;
    letter-spacing:1px;
    cursor:pointer;
    position:relative;
    overflow:hidden;
    box-shadow:0 0 20px rgba(255,221,150,.15);
    transition:transform .3s ease, box-shadow .3s ease;
}
.boton:hover,
.boton:active{
    transform:translateY(-3px);
    box-shadow:0 10px 25px rgba(0,0,0,.25), 0 0 25px rgba(255,221,150,.25);
}

.volver{
    position:fixed;
    top:14px; left:14px;
    z-index:10;
    width:42px; height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    text-decoration:none;
    font-size:20px;
    color:#ffe7b0;
    background:rgba(20,15,40,.65);
    border:1px solid rgba(255,231,176,.3);
    backdrop-filter:blur(8px);
}

/* ========= BOTÓN DE MÚSICA ========= */
.musica-toggle{
    position:fixed;
    top:14px; right:14px;
    z-index:10;
    width:42px; height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    border:1px solid rgba(255,231,176,.3);
    background:rgba(20,15,40,.65);
    color:#ffe7b0;
    font-size:16px;
    line-height:1;
    cursor:pointer;
    backdrop-filter:blur(8px);
    transition:box-shadow .3s ease, border-color .3s ease;
}
.musica-toggle.sonando{
    border-color:rgba(255,231,176,.7);
    box-shadow:0 0 16px rgba(255,221,150,.35);
    animation:pulso-musica 1.6s ease-in-out infinite;
}
@keyframes pulso-musica{
    0%,100%{ box-shadow:0 0 10px rgba(255,221,150,.25); }
    50%{ box-shadow:0 0 20px rgba(255,221,150,.5); }
}

/* ========= SECCIÓN INVITACIÓN ========= */
#invitacion{
    padding:80px 20px 60px;
    text-align:center;
    position:relative;
    overflow-x:hidden;
}

/* =========================
   FONDO ANIMADO (GIF)
   Cambiá el archivo en la línea "background-image".
   opacity  -> cuánto se ve el gif (0 a 1)
   ::after  -> velo oscuro que mantiene legible el texto
========================= */
.pagina-invitacion::before{
    content:"";
    position:fixed;
    inset:0;
    width:100%;
    max-width:430px;
    margin:0 auto;

    background-image:url("../imagenes/trallalerofondo.gif");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;

    opacity:.85;
    z-index:0;
    pointer-events:none;
}

.pagina-invitacion::after{
    content:"";
    position:fixed;
    inset:0;
    width:100%;
    max-width:430px;
    margin:0 auto;
    background:linear-gradient(rgba(10,10,25,.45), rgba(20,15,40,.6));
    z-index:1;
    pointer-events:none;
}

.contenido-nocturno{
    position:relative;
    z-index:2;
}

.moon{
    position:absolute;
    top:-20px; right:-70px;
    width:200px; height:200px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,245,200,.85), rgba(255,245,200,.15));
    filter:blur(4px);
    opacity:.55;
    z-index:-1;
    pointer-events:none;
}

.descripcion{
    font-size:19px;
    line-height:1.6;
    color:rgba(245,233,212,.9);
    margin-bottom:45px;
    padding:0 6px;
}

.firma{
    font-family:'Great Vibes', cursive;
    font-size:34px;
    color:#ffe7b0;
    margin:25px 0 10px;
}

/* ========= CUENTA REGRESIVA ========= */
.countdown-label{
    font-size:13px;
    letter-spacing:4px;
    color:rgba(255,231,176,.8);
    margin-bottom:16px;
}

#countdown{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:20px;
}

.box{
    flex:1 1 0;
    min-width:0;
    padding:14px 6px;
    border-radius:22px;
    position:relative;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.18);
    backdrop-filter:blur(12px);
    box-shadow:0 0 20px rgba(255,220,150,.08), inset 0 0 12px rgba(255,255,255,.05);
    overflow:hidden;
}
.box span{
    font-size:26px;
    font-weight:600;
    color:#ffe7b0;
    display:block;
    margin-bottom:4px;
    font-variant-numeric:tabular-nums;
    text-shadow:0 0 10px rgba(255,215,120,.35);
}
.box p{
    font-size:11px;
    letter-spacing:1px;
    color:rgba(255,255,255,.75);
}

/* ========= TARJETAS ========= */
.formulario{
    margin:40px auto;
    padding:26px 22px;
    border-radius:25px;
    text-align:center;
    background:rgba(255,255,255,.08);
    backdrop-filter:blur(10px);
    border:1px solid rgba(255,255,255,.15);
}

.formulario h3{
    font-size:24px;
    font-weight:400;
    color:#ffe7b0;
    margin-bottom:8px;
}

.formulario h4{
    font-size:20px;
    font-weight:400;
    color:#ffe7b0;
    margin-bottom:6px;
}

/* ========= CAMPOS DEL FORMULARIO ========= */
.campo{
    display:block;
    text-align:left;
    margin-top:22px;
    border:none;
}
.campo > span,
.campo legend{
    display:block;
    font-size:15px;
    letter-spacing:1px;
    color:rgba(245,233,212,.8);
    margin-bottom:8px;
}
.campo.oculto{ display:none; }

input[type="text"],
input[type="number"],
textarea{
    width:100%;
    padding:14px 16px;
    border:1px solid rgba(255,255,255,.15);
    border-radius:16px;
    outline:none;
    background:rgba(255,255,255,.08);
    color:#f5e9d4;
    font-family:'Cormorant Garamond', serif;
    font-size:17px;
}
textarea{ min-height:90px; resize:none; }
::placeholder{ color:rgba(245,233,212,.45); }
input:focus, textarea:focus{
    border-color:rgba(255,231,176,.6);
    box-shadow:0 0 0 2px rgba(255,231,176,.25);
}

.opciones{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.card-opcion{
    display:flex;
    align-items:center;
    gap:12px;
    padding:15px;
    border-radius:18px;
    cursor:pointer;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.2);
    color:rgba(245,233,212,.9);
    font-size:17px;
    transition:border-color .25s, background .25s;
}
.card-opcion input[type="radio"]{
    appearance:none;
    -webkit-appearance:none;
    width:20px; height:20px;
    border-radius:50%;
    border:2px solid rgba(255,231,176,.6);
    background:transparent;
    position:relative;
    flex-shrink:0;
    cursor:pointer;
}
.card-opcion input[type="radio"]::before{
    content:"";
    position:absolute;
    top:50%; left:50%;
    width:10px; height:10px;
    border-radius:50%;
    background:#ffe7b0;
    transform:translate(-50%,-50%) scale(0);
    transition:transform .2s;
}
.card-opcion input[type="radio"]:checked::before{
    transform:translate(-50%,-50%) scale(1);
}
.card-opcion:has(input:checked){
    background:rgba(255,231,176,.12);
    border-color:rgba(255,231,176,.7);
}

.aviso-fecha{
    display:inline-block;
    margin:14px 0 4px;
    padding:9px 16px;
    border-radius:50px;
    font-size:14px;
    letter-spacing:.5px;
    color:#ffe7b0;
    background:rgba(255,231,176,.1);
    border:1px solid rgba(255,231,176,.35);
}

.boton-enviar{
    width:100%;
    margin-top:26px;
}

.error{
    min-height:20px;
    margin-top:10px;
    font-size:15px;
    color:#ffb4a8;
}

/* ========= JUEGO ========= */
.juego{
    margin-top:30px;
    padding-top:24px;
    border-top:1px solid rgba(255,231,176,.2);
}

.colores{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    margin-top:16px;
}

.chip{
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 14px 9px 10px;
    border-radius:50px;
    cursor:pointer;
    font-size:15px;
    color:rgba(245,233,212,.9);
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.18);
    transition:border-color .25s, background .25s;
}
.chip input{
    appearance:none;
    -webkit-appearance:none;
    width:18px; height:18px;
    border-radius:50%;
    background:var(--c);
    border:1px solid rgba(255,255,255,.5);
    cursor:pointer;
}
.chip:has(input:checked){
    background:rgba(255,231,176,.14);
    border-color:rgba(255,231,176,.7);
}

.pista{
    min-height:22px;
    margin-top:14px;
    font-size:16px;
    color:rgba(245,233,212,.75);
}

/* ========= VESTIMENTA ========= */
.tarjeta-vestimenta{
    background:linear-gradient(rgba(255,231,176,.06), rgba(255,231,176,.02));
    border:1px solid rgba(255,231,176,.25);
}

.icono-vestimenta{
    display:block;
    font-size:32px;
    margin-bottom:10px;
}

.vestimenta-tipo{
    font-family:'Great Vibes', cursive;
    font-size:32px;
    color:#ffe7b0;
    text-shadow:0 0 14px rgba(255,221,150,.35);
    margin:4px 0 12px;
}

.vestimenta-detalle{
    font-size:16px;
    line-height:1.55;
    color:rgba(245,233,212,.8);
}

.prohibidos{
    margin-top:20px;
    padding-top:18px;
    border-top:1px solid rgba(255,231,176,.2);
}
.prohibidos-titulo{
    font-size:14px;
    letter-spacing:1px;
    color:rgba(245,233,212,.7);
    margin-bottom:12px;
}
.prohibidos ul{
    list-style:none;
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:14px 18px;
}
.prohibidos li{
    display:flex;
    align-items:center;
    gap:7px;
    font-size:16px;
    color:rgba(245,233,212,.9);
}
.prohibidos i{
    width:14px; height:14px;
    border-radius:50%;
    background:var(--c);
    border:1px solid rgba(255,255,255,.35);
}

/* ========= FOTOS ========= */
.foto{
    margin:40px auto;
    border-radius:25px;
    overflow:hidden;
    border:1px solid rgba(255,231,176,.3);
    box-shadow:0 12px 30px rgba(0,0,0,.45);
}
.foto img{
    width:100%;
    aspect-ratio:4/5;
    object-fit:cover;
}

/* ========= UBICACIÓN ========= */
.lugar-nombre{
    font-family:'Great Vibes', cursive;
    font-size:32px;
    color:#ffe7b0;
    margin-bottom:6px;
}
.lugar-direccion{
    font-size:16px;
    line-height:1.5;
    color:rgba(245,233,212,.8);
    margin-bottom:22px;
}

@media (prefers-reduced-motion: reduce){
    *:not(.reveal){ animation:none !important; transition:none !important; }
}

/* ========= APARICIÓN AL SCROLLEAR ========= */
.reveal{
    opacity:0;
    transform:translateY(40px);
    transition:opacity .8s ease, transform .8s ease;
}
.reveal.active{
    opacity:1;
    transform:translateY(0);
}
.reveal:nth-child(2){ transition-delay:.08s; }
.reveal:nth-child(3){ transition-delay:.16s; }