body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: black;
    margin: 0;
    gap: 30px;
}

/* Texto por encima de todo */
h1 {
    color: white;
    text-align: center;
    font-size: 2rem;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 2.5s ease;
}

/* Clase que se activa desde JS */
h1.mostrar-titulo {
    opacity: 1;
}

.contenedor-imagen {
    position: relative;
    width: 200px;
    overflow: hidden;
}

.imagen-principal {
    display: block;
    width: 100%;
    height: auto;
}

.capa-animacion {
    position: absolute;
    inset: 0;
    background-color: black;
    z-index: 20;
    animation: revelarImagen 5s ease-in-out forwards;
}

/* La capa sube y deja ver la imagen */
@keyframes revelarImagen {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

/* Responsive */
@media (min-width: 1024px) {
    .contenedor-imagen {
        width: 600px;
    }

    h1 {
        font-size: 3rem;
    }
}