﻿/* Canvas de partículas */
canvas {
    position: fixed; /* Se mantiene fijo al hacer scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Por debajo de la imagen central y el menú */
}

/* Fondo animado detrás de las partículas */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: radial-gradient(circle at center, #001a33 0%, #000814 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    animation: shine 10s ease-in-out infinite alternate;
    scroll-behavior: smooth;
}

body {
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}


/* Animación del fondo que complementa las partículas */
@keyframes shine {
    0% {
        background-position: 0% 50%;
        background-color: #0a1f44;
    }

    50% {
        background-position: 100% 50%;
        background-color: #071737;
    }

    100% {
        background-position: 0% 50%;
        background-color: #0a1f44;
    }
}

/* Imagen central sobre las partículas (efecto “respiración”) */
.center-image {
    position: fixed; /* Fija sobre el canvas de partículas */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Encima del canvas */
    width: 350px;
    animation: breathe 5s ease-in-out infinite;
    pointer-events: none; /* No interfiere con el click del usuario */
}

@keyframes breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.6;
    }
}
