/* ======================================
   CONFIGURACION GENERAL
====================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rosa: #f08bb5;
    --rosa-claro: #ffd5e5;
    --violeta: #a78bfa;
    --fondo: #100d19;
    --blanco: #fff5fa;
    --texto: #d8cbd8;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--fondo);
    color: var(--blanco);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

.fondo-animado {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 15% 20%, #713b6950, transparent 40%),
        radial-gradient(ellipse at 85% 75%, #493b8050, transparent 40%),
        linear-gradient(135deg, #100d19, #1b1226, #100d19);
}

#corazones {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.corazon-flotante {
    position: absolute;
    bottom: -40px;
    color: #f08bb5;
    opacity: .35;
    animation: flotar 10s linear forwards;
}

@keyframes flotar {
    to {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

.oculto {
    display: none !important;
}

/* ======================================
   BLOQUEO CON CONTRASEÑA
====================================== */

#bloqueo {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background:
        radial-gradient(circle at 20% 20%, #713b6950, transparent 40%),
        radial-gradient(circle at 80% 80%, #493b8050, transparent 40%),
        linear-gradient(135deg, #100d19, #1b1226, #100d19);
}

.caja-bloqueo {
    width: 100%;
    max-width: 460px;
    padding: 45px 35px;
    text-align: center;
    background: #ffffff0b;
    border: 1px solid #f08bb555;
    border-radius: 25px;
    box-shadow: 0 20px 70px #00000055;
    backdrop-filter: blur(15px);
    animation: aparecer 1s ease;
}

.corazon-bloqueo {
    color: var(--rosa);
    font-size: 55px;
    margin-bottom: 15px;
    animation: latido 1.5s infinite;
}

.caja-bloqueo h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 7vw, 43px);
    margin: 18px 0;
    color: var(--rosa-claro);
}

.caja-bloqueo p:not(.subtitulo):not(#error-clave) {
    color: var(--texto);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 25px;
}

#clave {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 15px;
    border: 1px solid #f08bb566;
    border-radius: 30px;
    outline: none;
    background: #ffffff10;
    color: white;
    font-family: inherit;
    font-size: 15px;
    text-align: center;
    transition: .3s;
}

#clave::placeholder {
    color: #d8cbd899;
}

#clave:focus {
    border-color: var(--rosa);
    box-shadow: 0 0 15px #f08bb533;
}

#ingresar-clave {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(100deg, #ffd0e3, #ed8eb9);
    color: #251321;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 8px 30px #e879a544;
}

#ingresar-clave:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px #e879a577;
}

#error-clave {
    min-height: 22px;
    margin-top: 15px;
    color: #ff9fbd;
    font-size: 13px;
}

.detalle-bloqueo {
    display: block;
    margin-top: 20px;
    color: #d8cbd899;
    font-size: 11px;
    letter-spacing: 2px;
}

/* ======================================
   ANIMACIONES
====================================== */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes latido {
    50% {
        transform: scale(1.2);
    }
}

/* ======================================
   PORTADA
====================================== */

.portada {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: center;
    background: radial-gradient(circle at center, #633b6840, transparent 55%);
}

.portada-contenido {
    max-width: 650px;
    animation: aparecer 1.2s ease;
}

.corazon-portada {
    display: block;
    font-size: 65px;
    color: var(--rosa);
    animation: latido 1.5s infinite;
}

.subtitulo,
.etiqueta {
    color: var(--rosa-claro);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 12px;
}

.portada h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(65px, 12vw, 110px);
    margin: 15px 0;
    background: linear-gradient(90deg, #ffd5e5, #ef91ba, #c9a5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.frase-portada {
    color: var(--texto);
    margin-bottom: 35px;
    font-size: 17px;
}

/* ======================================
   BOTONES
====================================== */

button {
    font-family: inherit;
    cursor: pointer;
}

.boton-principal,
.boton-secundario {
    border: 0;
    border-radius: 40px;
    padding: 15px 28px;
    font-size: 14px;
    font-weight: 700;
    transition: .3s;
}

.boton-principal {
    color: #251321;
    background: linear-gradient(100deg, #ffd0e3, #ed8eb9);
    box-shadow: 0 8px 30px #e879a544;
}

.boton-principal:hover,
.boton-secundario:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px #e879a555;
}

.boton-secundario {
    color: var(--blanco);
    background: #ffffff12;
    border: 1px solid #ffffff30;
}

/* ======================================
   ENCABEZADO Y MENU
====================================== */

.encabezado {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 75px;
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #100d19ed;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #ffffff12;
}

.logo {
    color: var(--rosa-claro);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    white-space: nowrap;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

nav button {
    color: var(--texto);
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: .3s;
}

nav button:first-child {
    color: var(--rosa-claro);
}

nav button:hover,
nav button.seleccionado {
    color: var(--rosa-claro);
    background: #ffffff12;
}

/* ======================================
   PAGINA Y SECCIONES
====================================== */

.pagina {
    animation: aparecer 1s ease;
}

.seccion {
    display: none;
    min-height: 85vh;
    padding: 100px 8%;
    animation: aparecer .6s ease;
}

.seccion.activa {
    display: block;
}

#inicio {
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#inicio.activa {
    display: flex;
}

.inicio-contenido {
    max-width: 750px;
}

.inicio-contenido h2,
.titulo-seccion h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 65px);
    line-height: 1.2;
    margin: 20px 0;
}

.inicio-contenido p,
.titulo-seccion p {
    color: var(--texto);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ======================================
   CONTADOR
====================================== */

.contador {
    margin: 40px auto;
    padding: 25px;
    max-width: 370px;
    border: 1px solid #f08bb544;
    border-radius: 20px;
    background: #ffffff08;
}

.contador span {
    display: block;
    color: var(--texto);
    font-size: 13px;
}

.contador strong {
    display: block;
    color: var(--rosa-claro);
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-top: 10px;
}

/* ======================================
   TITULOS
====================================== */

.titulo-seccion {
    text-align: center;
    margin-bottom: 60px;
}

.titulo-seccion > span {
    color: var(--rosa);
    font-size: 11px;
    letter-spacing: 3px;
}

/* ======================================
   GALERIA
====================================== */

.galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1050px;
    margin: auto;
}

.foto-card {
    padding: 12px;
    background: #ffffff0d;
    border: 1px solid #ffffff18;
    border-radius: 18px;
    transition: .3s;
}

.foto-card:hover {
    transform: translateY(-8px);
    border-color: var(--rosa);
}

.foto-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.foto-card p {
    text-align: center;
    color: var(--rosa-claro);
    padding: 15px 5px 8px;
}

.foto-vacia {
    display: none;
    height: 300px;
    place-items: center;
    color: var(--rosa);
    font-size: 45px;
    background: #ffffff0b;
    border-radius: 12px;
}

/* ======================================
   CARTAS
====================================== */

.cartas-contenedor {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 35px;
    max-width: 1000px;
    margin: auto;
}

.sobre-card {
    text-align: center;
    padding: 30px 20px;
    background: #ffffff09;
    border: 1px solid #ffffff18;
    border-radius: 22px;
    transition: .4s;
}

.sobre-card:hover {
    transform: translateY(-10px);
    border-color: #f08bb577;
    box-shadow: 0 15px 40px #00000030;
}

.sobre {
    width: 170px;
    height: 115px;
    position: relative;
    margin: 15px auto 30px;
    filter: drop-shadow(0 10px 12px #00000040);
    transition: transform .4s;
}

.sobre-card:hover .sobre {
    transform: translateY(-5px) scale(1.06);
}

.sobre-cuerpo {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f6abc9, #c76d9e);
    border-radius: 5px 5px 10px 10px;
    z-index: 2;
}

.sobre-solapa {
    position: absolute;
    inset: 0;
    background: #ffcee1;
    clip-path: polygon(0 0, 100% 0, 50% 65%);
    z-index: 3;
    transform-origin: top;
    transition: transform .5s ease;
}

.sobre-corazon {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    color: #9e315f;
    font-size: 27px;
}

.sobre-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--rosa-claro);
    font-size: 21px;
    margin-bottom: 8px;
}

.sobre-card p {
    color: var(--texto);
    font-size: 13px;
    margin-bottom: 20px;
}

.boton-abrir {
    padding: 11px 20px;
    color: var(--rosa-claro);
    background: #f08bb51b;
    border: 1px solid #f08bb566;
    border-radius: 30px;
    transition: .3s;
}

.boton-abrir:hover {
    background: var(--rosa);
    color: #251321;
}

.sobre-card.abriendo .sobre-solapa {
    transform: rotateX(180deg);
}

/* ======================================
   MODAL DE CARTAS
====================================== */

.modal-carta {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 20px;
    background: #080610dd;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-carta.visible {
    display: flex;
    animation: aparecer .3s ease;
}

.modal-contenido {
    position: relative;
    width: min(100%, 600px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 50px 40px;
    text-align: center;
    color: #533b4b;
    background: linear-gradient(145deg, #fff5f8, #f9dce9);
    border-radius: 20px;
    box-shadow: 0 20px 80px #00000070;
    animation: cartaAparecer .6s ease;
}

@keyframes cartaAparecer {
    from {
        opacity: 0;
        transform: translateY(35px) scale(.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cerrar-modal {
    position: absolute;
    top: 12px;
    right: 20px;
    border: none;
    background: none;
    color: #89516c;
    font-size: 32px;
}

.modal-corazon {
    color: #d76d9c;
    font-size: 32px;
}

.modal-etiqueta {
    margin-top: 15px;
    font-size: 10px;
    letter-spacing: 3px;
    color: #b76d8c;
}

.modal-contenido h2 {
    margin: 15px 0 25px;
    font-family: 'Playfair Display', serif;
    font-size: 32px;
}

.texto-carta {
    text-align: left;
    white-space: pre-wrap;
    line-height: 1.9;
    color: #634b5a;
    font-size: 15px;
}

.firma-carta {
    margin-top: 35px;
    color: #bd638c;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
}

/* ======================================
   MENSAJES
====================================== */

.mensaje-central {
    max-width: 600px;
    margin: auto;
    padding: 50px 30px;
    text-align: center;
    background: #ffffff0a;
    border: 1px solid #f08bb544;
    border-radius: 25px;
}

.mensaje-central span {
    color: var(--rosa);
    font-size: 45px;
}

.mensaje-central p {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    margin: 25px 0;
    line-height: 1.5;
}

/* ======================================
   SORPRESAS
====================================== */

.sorpresa-card {
    max-width: 550px;
    margin: auto;
    text-align: center;
    padding: 45px 30px;
    background: #ffffff0a;
    border: 1px solid #f08bb544;
    border-radius: 25px;
}

.regalo {
    font-size: 70px;
    margin-bottom: 20px;
    animation: latido 2s infinite;
}

.sorpresa-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    margin-bottom: 15px;
}

.sorpresa-card p {
    color: var(--texto);
    line-height: 1.7;
    margin-bottom: 25px;
}

/* ======================================
   PIE DE PAGINA
====================================== */

footer {
    padding: 35px 15px;
    text-align: center;
    border-top: 1px solid #ffffff15;
    color: var(--rosa-claro);
}

footer span {
    display: block;
    color: var(--texto);
    margin-top: 8px;
    font-size: 12px;
}

/* ======================================
   CELULARES Y TABLETS
====================================== */

@media (max-width: 800px) {
    .encabezado {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    nav {
        justify-content: center;
    }

    nav button {
        padding: 8px;
        font-size: 12px;
    }

    .seccion {
        padding: 75px 6%;
    }

    .galeria,
    .cartas-contenedor {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .foto-card img {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .modal-contenido {
        padding: 45px 23px;
    }

    .modal-contenido h2 {
        font-size: 26px;
    }

    .logo {
        font-size: 19px;
    }

    .caja-bloqueo {
        padding: 35px 22px;
    }
}