/* Estilos del sitio. Se sirve directo desde public/ y se enlaza con pra::asset(),
   que le añade ?v=<fecha> para que el navegador no sirva una copia vieja. */

/* --- Fuente de la marca (Quantico, servida desde la propia web) ---------- */

@font-face {
    font-family: "Quantico";
    src: url("../fonts/quantico-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Quantico";
    src: url("../fonts/quantico-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Paleta: fondo oscuro, tinta clara y un acento cian-violeta ---------- */

:root {
    --fondo: #06080c;
    --tinta: #e7ebf0;
    --tenue: #5b6676;
    --cian: #22d3ee;
    --violeta: #a78bfa;
    color-scheme: dark;
}

/* --- Base ----------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    font-family: "Quantico", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--tinta);
    background: var(--fondo);
    overflow-x: hidden;
}

a {
    color: var(--cian);
}

main {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

/* --- Fondo: red de nodos (canvas, ver js/red.js) y aura de luz ------------ */

#red {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.aura {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    /* viñeta: oscurece los bordes para llevar la vista al centro */
    background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.7) 100%);
}

.aura::before,
.aura::after {
    content: "";
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(60px);
    animation: deriva 38s ease-in-out infinite alternate;
}

.aura::before {
    top: -20vmax;
    left: -15vmax;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.10), transparent 65%);
}

.aura::after {
    right: -20vmax;
    bottom: -25vmax;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.09), transparent 65%);
    animation-duration: 46s;
    animation-direction: alternate-reverse;
}

@keyframes deriva {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(12vmax, 8vmax) scale(1.15);
    }
}

/* --- Portada: el logo y su entrada --------------------------------------- */

.portada {
    margin: 0;
    line-height: 0;
}

.logo {
    display: block;
    width: min(46rem, 82vw);
    height: auto;
    overflow: visible;
    color: var(--tinta);
}

.logo path {
    transform-box: fill-box;
    transform-origin: center;
}

/* 1. La A se alza desde abajo. */
.logo .brazos {
    animation: alza 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}

/* 2. RED y LAN salen de detrás de la A, cada una hacia su lado. */
.logo .red {
    animation: desde-derecha 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s both;
}

.logo .lan {
    animation: desde-izquierda 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s both;
}

/* 3. El travesaño se enciende el último, y su halo respira despacio. */
.logo .travesano {
    animation: abre 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.7s both;
}

.logo .halo {
    opacity: 0.35;
    animation:
        aparece 1.2s ease-out 2s both,
        respira 5s ease-in-out 3.2s infinite alternate;
}

@keyframes alza {
    from {
        opacity: 0;
        transform: translateY(14%);
    }
}

@keyframes desde-derecha {
    from {
        opacity: 0;
        transform: translateX(18%);
        filter: blur(6px);
    }
}

@keyframes desde-izquierda {
    from {
        opacity: 0;
        transform: translateX(-18%);
        filter: blur(6px);
    }
}

@keyframes abre {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
}

@keyframes aparece {
    from {
        opacity: 0;
    }
}

@keyframes respira {
    from {
        opacity: 0.35;
    }
    to {
        opacity: 0.9;
    }
}

/* --- Pie ------------------------------------------------------------------ */

.pie {
    position: relative;
    z-index: 2;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--tenue);
    animation: aparece 1.5s ease-out 2.6s both;
}

.pie-a {
    height: 0.95em;
    width: auto;
    /* el letter-spacing ya separa la D; el margen derecho iguala el otro lado */
    margin: 0 0.3em 0 0;
    vertical-align: -0.05em;
    fill: currentColor;
}

/* --- Quien pide menos movimiento, lo ve todo quieto ---------------------- */

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