
:root {
    --crema: #f7eee5;
    --papel: #fffaf3;
    --rosa: #e7b6bd;
    --rosa-oscuro: #c78291;
    --cafe: #704f4b;
    --salvia: #a5b5a0;
    --kraft: #cfad88;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--cafe);
    background: var(--crema);
}

button {
    font: inherit;
}

[hidden] {
    display: none !important;
}

/* PORTADA */

.portada {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: 45px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 20% 15%,
            #ffffff,
            transparent 50%
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 4px,
            #704f4b06 5px
        ),
        var(--crema);
}

.contenido-portada {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 750px;
    text-align: center;
    animation: aparecer 0.8s ease both;
}

.etiqueta {
    display: inline-block;
    padding: 9px 18px;
    border: 1px dashed var(--kraft);
    background: #fffaf0;
    border-radius: 30px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.15;
    margin-bottom: 15px;
}

h1 em {
    display: block;
    font-weight: normal;
    color: var(--rosa-oscuro);
}

.introduccion {
    max-width: 460px;
    margin: 0 auto 15px;
    font-size: 16px;
    line-height: 1.6;
}

.composicion-fotos {
    position: relative;
    width: min(100%, 420px);
    height: 345px;
    margin: 10px auto 15px;
}

.polaroid {
    background: #fffdf8;
    padding: 11px 11px 22px;
    box-shadow: 0 12px 28px #704f4b35;
}

.portada-foto-uno {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 255px;
    transform: translateX(-50%) rotate(-7deg);
}

.polaroid img {
    display: block;
    width: 100%;
    height: 225px;
    object-fit: cover;
}

.polaroid figcaption {
    margin-top: 13px;
    font-size: 15px;
    font-style: italic;
    text-align: center;
}

.cinta {
    position: absolute;
    top: -13px;
    left: 50%;
    width: 95px;
    height: 28px;
    transform: translateX(-50%) rotate(-4deg);
    opacity: 0.85;
    background: repeating-linear-gradient(
        45deg,
        #e9b8be 0 10px,
        #f4cdd2 10px 20px
    );
    z-index: 3;
}

.nota-portada {
    position: absolute;
    bottom: 0;
    right: 5px;
    width: 190px;
    padding: 16px;
    transform: rotate(5deg);
    background: #fff0bc;
    box-shadow: 0 6px 15px #704f4b25;
    font-size: 16px;
    font-style: italic;
}

.pequeno-titulo {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 11px;
    margin-bottom: 8px;
}

#nombresPortada {
    font-size: clamp(29px, 4vw, 40px);
    margin-bottom: 8px;
}

.fecha-portada {
    font-size: 14px;
    margin-bottom: 25px;
}

.boton-principal {
    background: var(--cafe);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 35px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.boton-principal:hover {
    background: #a56b70;
    transform: translateY(-3px);
}

.pie-portada {
    font-size: 13px;
    font-style: italic;
    margin-top: 25px;
}

.decoracion {
    position: absolute;
    pointer-events: none;
    opacity: 0.55;
}

.flor-uno {
    top: 12%;
    left: 8%;
    font-size: 75px;
    color: var(--rosa-oscuro);
}

.flor-dos {
    bottom: 13%;
    right: 9%;
    font-size: 75px;
    color: var(--salvia);
}

.corazon-uno {
    top: 26%;
    right: 12%;
    font-size: 40px;
    color: var(--rosa-oscuro);
}

/* ALBUM */

.album-recuerdos {
    min-height: 100vh;
    padding: 55px 18px 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 5px,
            #704f4b05 6px
        ),
        #f5e9dc;
}

.encabezado-album {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.encabezado-album h2 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 17px;
}

.encabezado-album > p:last-child {
    font-size: 16px;
    line-height: 1.8;
}

.separador {
    text-align: center;
    margin: 30px 0 20px;
    color: var(--rosa-oscuro);
    font-size: 25px;
    letter-spacing: 15px;
}

/* CONTADOR */

.contador-amor {
    max-width: 540px;
    margin: 35px auto 55px;
    padding: 35px 25px;
    text-align: center;
    background: #fff6df;
    border: 2px dashed var(--kraft);
    border-radius: 12px;
    box-shadow: 0 10px 25px #704f4b18;
    transform: rotate(-1deg);
}

.contador-corazon {
    display: block;
    font-size: 42px;
    color: var(--rosa-oscuro);
    margin-bottom: 12px;
}

.contador-amor p {
    font-size: 16px;
    line-height: 1.7;
}

.contador-amor strong {
    display: block;
    font-size: clamp(35px, 7vw, 58px);
    margin: 15px 0;
}

/* GALERIA SCRAPBOOK */

.galeria {
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px 60px;
    padding: 45px 35px 110px;
    align-items: center;
}

.recuerdo {
    position: relative;
    min-width: 0;
    padding: 15px 15px 25px;
    background: #fffdf8;
    box-shadow: 0 12px 28px #704f4b30;
    cursor: pointer;
    border: none;
    color: inherit;
    text-align: left;
    transition: transform 0.35s, box-shadow 0.35s;
}

.recuerdo:nth-child(4n + 1) {
    transform: rotate(-5deg);
}

.recuerdo:nth-child(4n + 3) {
    transform: rotate(4deg);
}

.recuerdo:hover,
.recuerdo:focus-visible {
    transform: rotate(0deg) translateY(-8px);
    box-shadow: 0 18px 35px #704f4b45;
    z-index: 5;
}

.recuerdo img {
    display: block;
    width: 100%;
    height: clamp(180px, 25vw, 340px);
    object-fit: cover;
    background: #e5d4c5;
}

.recuerdo h3 {
    margin: 20px 0 8px;
    font-size: clamp(18px, 2vw, 24px);
    text-align: center;
}

.recuerdo p {
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
    text-align: center;
}

.recuerdo::before {
    content: "";
    position: absolute;
    width: 105px;
    height: 29px;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    background: repeating-linear-gradient(
        45deg,
        #e7b6bdc9 0 10px,
        #f7d5d9c9 10px 20px
    );
    z-index: 2;
}

.recuerdo::after {
    content: "♡";
    position: absolute;
    right: -15px;
    bottom: -22px;
    color: var(--rosa-oscuro);
    font-size: 55px;
    transform: rotate(15deg);
}

/* NOTAS ROMANTICAS */

.nota-romantica {
    position: relative;
    width: min(100%, 370px);
    min-height: 230px;
    margin: 0 auto;
    padding: 42px 30px 35px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #fff0bc;
    box-shadow: 5px 12px 25px #704f4b25;
    text-align: center;
    transform: rotate(3deg);
}

.nota-romantica:nth-child(4n) {
    transform: rotate(-4deg);
}

.nota-romantica::before {
    content: "";
    position: absolute;
    top: -13px;
    left: 50%;
    width: 90px;
    height: 27px;
    transform: translateX(-50%) rotate(-5deg);
    background: #e7b6bdd9;
}

.nota-romantica .simbolo-nota {
    font-size: 35px;
    margin-bottom: 14px;
    color: var(--rosa-oscuro);
}

.nota-romantica p {
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.6;
    font-style: italic;
}

.nota-romantica.color-rosa {
    background: #f5dce0;
}

.nota-romantica.color-verde {
    background: #e0e9d9;
}

.nota-romantica.color-crema {
    background: #fff4dc;
}

.nota-romantica.color-amarillo {
    background: #fff0bc;
}

/* FINAL */

.final-album {
    padding: 45px 15px 90px;
    text-align: center;
}

.nota-final {
    max-width: 630px;
    margin: auto;
    padding: 45px 30px;
    background: #fff6df;
    box-shadow: 0 10px 30px #704f4b20;
    transform: rotate(-1deg);
}

.corazon-final {
    display: block;
    font-size: 55px;
    color: var(--rosa-oscuro);
    margin-bottom: 12px;
}

.nota-final h2 {
    font-size: clamp(27px, 4vw, 38px);
    margin-bottom: 18px;
}

.nota-final p {
    line-height: 1.8;
    margin-bottom: 28px;
}

/* VISOR */

.visor-fotos {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(92vw, 850px);
    max-height: 92vh;
    max-height: 92dvh;
    padding: 25px;
    border: none;
    border-radius: 12px;
    background: var(--papel);
    color: var(--cafe);
    text-align: center;
    overflow-y: auto;
    box-shadow: 0 20px 60px #0005;
}

.visor-fotos::backdrop {
    background: rgba(38, 25, 24, 0.82);
}

.visor-fotos img {
    display: block;
    max-width: 100%;
    max-height: 65vh;
    max-height: 65dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 15px auto;
    border-radius: 5px;
}

.visor-fotos h3 {
    font-size: 25px;
    margin-bottom: 10px;
}

.visor-fotos p {
    line-height: 1.6;
    font-style: italic;
}

.cerrar-visor {
    position: sticky;
    top: 0;
    display: block;
    margin-left: auto;
    background: var(--cafe);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 27px;
    cursor: pointer;
    z-index: 2;
}

/* ANIMACIONES */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CELULARES */

@media (max-width: 600px) {
    .portada {
        padding: 35px 15px;
    }

    .introduccion {
        font-size: 14px;
    }

    .composicion-fotos {
        height: 320px;
    }

    .portada-foto-uno {
        width: 220px;
    }

    .portada-foto-uno img {
        height: 195px;
    }

    .nota-portada {
        width: 160px;
        right: 0;
        font-size: 13px;
    }

    .decoracion {
        font-size: 40px;
    }

    .galeria {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 35px 28px 80px;
    }

    .recuerdo {
        width: min(100%, 370px);
        margin: 0 auto;
    }

    .recuerdo img {
        height: clamp(210px, 65vw, 310px);
    }

    .recuerdo:nth-child(n) {
        transform: rotate(-2deg);
    }

    .recuerdo:nth-child(4n + 3) {
        transform: rotate(3deg);
    }

    .recuerdo:hover,
    .recuerdo:focus-visible {
        transform: rotate(0deg);
    }

    .nota-romantica {
        width: min(90%, 330px);
        min-height: 180px;
        padding: 30px 22px;
        margin: 5px auto 20px;
    }

    .nota-romantica p {
        font-size: 18px;
    }

    .encabezado-album > p:last-child {
        font-size: 14px;
    }

    .contador-amor {
        margin: 25px 12px 45px;
        padding: 28px 15px;
    }

    .nota-final {
        padding: 35px 20px;
    }

    .visor-fotos {
        padding: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* V1.4 - SOBRE Y CARTA ROMANTICA */
.seccion-carta {
    max-width: 850px;
    margin: 0 auto 60px;
    padding: 25px 18px 45px;
    text-align: center;
}
.seccion-carta > h2 {
    font-size: clamp(28px, 4.5vw, 42px);
    margin-bottom: 14px;
}
.instruccion-carta { line-height: 1.7; margin-bottom: 30px; }
.sobre-boton {
    display: block;
    width: min(100%, 340px);
    margin: 0 auto;
    padding: 22px 0 45px;
    border: 0;
    background: transparent;
    cursor: pointer;
    perspective: 900px;
}
.sobre-boton:focus-visible { outline: 3px solid var(--rosa-oscuro); outline-offset: 5px; border-radius: 10px; }
.sobre {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.65;
    filter: drop-shadow(0 14px 12px #704f4b35);
    transition: transform .35s ease;
}
.sobre-boton:hover .sobre { transform: translateY(-5px) rotate(-1deg); }
.sobre-interior { position: absolute; inset: 0; background: #d99c9f; border-radius: 8px; }
.sobre-papel {
    position: absolute;
    z-index: 1;
    left: 12%; right: 12%; top: 14%; height: 75%;
    display: grid; place-items: center;
    background: #fffaf3;
    color: var(--rosa-oscuro);
    font-size: 23px;
    font-style: italic;
    box-shadow: 0 3px 6px #704f4b20;
    transition: transform .65s ease .15s;
}
.sobre-frente {
    position: absolute;
    z-index: 3;
    inset: 0;
    background: #e9b9be;
    clip-path: polygon(0 15%, 50% 66%, 100% 15%, 100% 100%, 0 100%);
    border-radius: 0 0 8px 8px;
}
.sobre-solapa {
    position: absolute;
    z-index: 4;
    inset: 0;
    background: #f2ced1;
    clip-path: polygon(0 0, 100% 0, 50% 60%);
    transform-origin: 50% 0%;
    transition: transform .65s ease, z-index 0s linear .3s;
}
.sobre-sello {
    position: absolute;
    z-index: 5;
    left: 50%; top: 48%;
    width: 45px; height: 45px;
    display: grid; place-items: center;
    background: #bb6779;
    border: 3px solid #f8dfe2;
    border-radius: 50%;
    color: white;
    transform: translate(-50%, -50%);
    transition: opacity .25s;
}
.sobre-boton.abierto .sobre-solapa { transform: rotateX(180deg); z-index: 0; }
.sobre-boton.abierto .sobre-papel { transform: translateY(-38%); }
.sobre-boton.abierto .sobre-sello { opacity: 0; }
.carta-desplegada {
    max-width: 700px;
    margin: 12px auto 0;
    animation: aparecer .55s ease both;
}
.papel-carta {
    padding: clamp(28px, 6vw, 62px);
    text-align: left;
    background: repeating-linear-gradient(0deg, transparent 0 31px, #c7829114 32px), #fffaf3;
    border: 1px solid #e4d0ba;
    box-shadow: 0 15px 40px #704f4b29;
    border-radius: 6px;
    transform: rotate(-1deg);
}
.adorno-carta { display: block; text-align: center; letter-spacing: 14px; color: var(--rosa-oscuro); font-size: 22px; margin-bottom: 12px; }
.papel-carta h3 { font-size: clamp(26px, 4vw, 38px); text-align: center; margin-bottom: 30px; }
.saludo-carta { font-size: 21px; font-weight: bold; margin-bottom: 20px; }
.mensaje-carta p { font-size: 17px; line-height: 1.95; margin-bottom: 20px; }
.despedida-carta { margin-top: 32px; font-style: italic; }
.firma-carta { font-size: 23px; margin-top: 10px; margin-bottom: 35px; font-style: italic; color: var(--rosa-oscuro); }
.papel-carta .boton-principal { display: block; margin: 0 auto; }
@media (max-width: 600px) {
    .seccion-carta { padding: 10px 12px 35px; }
    .sobre-boton { width: min(100%, 280px); }
    .papel-carta { transform: none; }
    .mensaje-carta p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .sobre, .sobre-solapa, .sobre-papel, .sobre-sello { transition: none; }
}


/* V1.5.1 — FONDO ROMÁNTICO DINÁMICO REFORZADO
   Más visible que en V1.5, sin robar protagonismo al contenido. */
.album-recuerdos {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.album-recuerdos > :not(.fondo-romantico) {
    position: relative;
    z-index: 1;
}
.fondo-romantico {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    contain: paint;
}
.fondo-detalle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    opacity: 0;
    transform: translate3d(0, 16px, 0) rotate(var(--angulo)) scale(0.96);
    animation: detalle-flotar var(--duracion) ease-in-out var(--retraso) infinite;
    will-change: transform, opacity;
    text-shadow: 0 2px 8px rgba(112, 79, 75, 0.10);
    filter: saturate(1.05);
}
.fondo-detalle.corazon {
    color: rgba(216, 130, 145, 0.86);
    font-size: var(--tamano);
}
.fondo-detalle.flor {
    color: rgba(165, 181, 160, 0.88);
    font-size: var(--tamano);
    animation-name: detalle-brisa;
}
.fondo-detalle.destello {
    color: rgba(214, 170, 102, 0.86);
    font-size: var(--tamano);
    animation-name: detalle-brillo;
}
@keyframes detalle-flotar {
    0%, 100% {
        opacity: 0;
        transform: translate3d(0, 16px, 0) rotate(var(--angulo)) scale(0.96);
    }
    20%, 80% {
        opacity: .45;
    }
    50% {
        opacity: .72;
        transform: translate3d(10px, -28px, 0) rotate(calc(var(--angulo) + 14deg)) scale(1.08);
    }
}
@keyframes detalle-brisa {
    0%, 100% {
        opacity: .28;
        transform: translate3d(0, 0, 0) rotate(var(--angulo)) scale(0.97);
    }
    50% {
        opacity: .62;
        transform: translate3d(8px, -10px, 0) rotate(calc(var(--angulo) + 16deg)) scale(1.07);
    }
}
@keyframes detalle-brillo {
    0%, 100% {
        opacity: .14;
        transform: scale(.82) rotate(var(--angulo));
    }
    50% {
        opacity: .78;
        transform: scale(1.28) rotate(var(--angulo));
    }
}
@media (max-width: 600px) {
    .fondo-detalle:nth-child(3n) { display: none; }
    .fondo-detalle {
        animation-duration: 13.5s;
        opacity: .95;
    }
}
@media (prefers-reduced-motion: reduce) {
    .fondo-detalle {
        animation: none !important;
        opacity: .34;
        transform: none;
        will-change: auto;
    }
}

/* V1.6 — REPRODUCTOR MUSICAL FLOTANTE */
.reproductor-musica {
    position: fixed !important;
    z-index: 25 !important;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(95vw, 365px);
    padding: 11px 13px;
    border: 1px solid #d8a8ac;
    border-radius: 18px;
    background: rgba(255, 250, 243, .97);
    box-shadow: 0 7px 28px #704f4b35;
    color: var(--cafe);
    backdrop-filter: blur(7px);
}
.musica-icono { font-size: 27px; color: var(--rosa-oscuro); flex: 0 0 auto; }
.musica-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.musica-info strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.musica-info span { font-size: 11px; line-height: 1.25; }
.control-musica {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2d3d5;
    color: #704f4b;
    font: 700 17px Arial, sans-serif;
    cursor: pointer;
}
.control-musica:hover { background: #e7b6bd; }
.control-musica:focus-visible { outline: 3px solid #8c5260; outline-offset: 3px; }
@media (max-width: 600px) {
    .reproductor-musica { right: 9px; bottom: 9px; gap: 7px; padding: 8px 9px; max-width: calc(100vw - 18px); }
    .musica-icono { font-size: 22px; }
    .musica-info strong { font-size: 12px; }
    .musica-info span { font-size: 10px; }
    .control-musica { width: 32px; height: 32px; font-size: 15px; }
    .final-album { padding-bottom: 115px; }
}
