:root{
    --error-blanco: var(--blanco, #ffffff);
    --error-gris: rgba(255,255,255,0.72);
    --error-gris-soft: rgba(255,255,255,0.52);
    --error-verde-claro: var(--verdeClaro, #61CE70);
    --error-verde-oscuro: var(--verdeOscuro, #06752e);
    --error-verde-muy-oscuro: var(--verdeMuyOscuro, #14261C);
    --error-verde-profundo: #031107;
    --error-negro: rgba(0,0,0,0.58);
}

/* =========================================
   BASE
========================================= */

.pagina404{
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--error-verde-profundo);
}

.error404Hero{
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;

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

    padding: 130px 24px 80px;

    background-image:
        linear-gradient(90deg, rgba(0, 10, 4, 0.95) 0%, rgba(4, 25, 11, 0.87) 42%, rgba(6, 117, 46, 0.62) 100%),
        radial-gradient(circle at 20% 78%, rgba(97, 206, 112, 0.18), transparent 34%),
        radial-gradient(circle at 78% 22%, rgba(54, 255, 125, 0.10), transparent 28%),
        url('../img/fondo_inicio.jpeg');

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/* =========================================
   CAPAS VISUALES
========================================= */

.error404Overlay{
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.12));
}

.error404Grid{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    background:
        linear-gradient(rgba(255,255,255,0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px);

    background-size: 54px 54px;
    opacity: 0.28;

    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent 92%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent 92%);
}

.error404Glow{
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.5;
    pointer-events: none;
}

.error404GlowUno{
    width: 320px;
    height: 320px;
    left: -100px;
    bottom: 60px;
    background: rgba(97, 206, 112, 0.20);
}

.error404GlowDos{
    width: 280px;
    height: 280px;
    right: 8%;
    top: 14%;
    background: rgba(6, 117, 46, 0.30);
}

/* =========================================
   CONTENEDOR
========================================= */

.error404Wrap{
    position: relative;
    z-index: 5;
    width: min(1180px, 100%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.error404Contenido{
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

/* =========================================
   CARD PRINCIPAL
========================================= */

.error404Card{
    position: relative;
    width: min(680px, 100%);
    padding: 46px 44px 42px;

    border-radius: 28px;

    color: var(--error-blanco);

    background: linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.14);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.42),
        inset 0 1px 0 rgba(255,255,255,0.15);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    animation: errorFadeUp 800ms ease forwards;
}

.error404Card::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;

    background: linear-gradient(
        135deg,
        rgba(97, 206, 112, 0.78),
        transparent 36%,
        rgba(255,255,255,0.16)
    );

    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;

    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
}

.error404Linea{
    display: block;
    width: 78px;
    height: 3px;
    margin-bottom: 22px;

    border-radius: 999px;
    background: linear-gradient(90deg, var(--error-verde-claro), rgba(255,255,255,0.10));
    box-shadow: 0 0 22px rgba(97, 206, 112, 0.70);
}

.error404Eyebrow{
    margin: 0 0 18px;
    color: rgba(255,255,255,0.84);
    letter-spacing: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.error404Numero{
    margin: 0;
    font-size: clamp(88px, 14vw, 150px);
    line-height: 0.9;
    font-weight: 700;
    letter-spacing: -4px;
    color: rgba(255,255,255,0.08);
    text-shadow: 0 0 28px rgba(97, 206, 112, 0.06);
}

.error404Card h1{
    margin: 6px 0 0;
    max-width: 520px;
    font-size: clamp(40px, 5vw, 70px);
    line-height: 0.98;
    letter-spacing: -1.4px;
    font-weight: 400;
}

.error404Card h1 span{
    display: block;
    color: var(--error-blanco);
    text-shadow: 0 0 25px rgba(97, 206, 112, 0.16);
}

.error404Descripcion{
    margin: 24px 0 0;
    max-width: 520px;
    color: var(--error-gris);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.3px;
}

/* =========================================
   TAGS
========================================= */

.error404Tags{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    margin-bottom: 30px;
}

.error404Tags span{
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);

    color: rgba(255,255,255,0.80);
    font-size: 13px;
    letter-spacing: 0.3px;
}

.error404Tags span::before{
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--error-verde-claro);
    box-shadow: 0 0 14px var(--error-verde-claro);
}

/* =========================================
   BOTONES
========================================= */

.error404Acciones{
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.error404Boton{
    position: relative;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 14px 24px;

    border-radius: 11px;
    text-decoration: none;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.6px;

    transition:
        transform 350ms ease,
        box-shadow 350ms ease,
        border-color 350ms ease,
        background 350ms ease,
        color 350ms ease;
}

.error404Boton::before{
    content: "";
    position: absolute;
    top: 0;
    left: -90%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-22deg);
    transition: left 650ms ease;
}

.error404Boton:hover::before{
    left: 130%;
}

.error404BotonPrincipal{
    color: var(--error-blanco);
    background: linear-gradient(135deg, #0fa84f, var(--error-verde-oscuro));
    border: 1px solid rgba(97, 206, 112, 0.50);

    box-shadow:
        0 12px 34px rgba(6, 117, 46, 0.48),
        0 0 26px rgba(97, 206, 112, 0.20);
}

.error404BotonPrincipal:hover{
    transform: translateY(-3px);
    color: var(--error-blanco);
    box-shadow:
        0 18px 42px rgba(6, 117, 46, 0.60),
        0 0 36px rgba(97, 206, 112, 0.30);
}

.error404BotonSecundario{
    color: var(--error-blanco);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 10px 28px rgba(0,0,0,0.20);
}

.error404BotonSecundario:hover{
    transform: translateY(-3px);
    color: var(--error-blanco);
    background: rgba(255,255,255,0.12);
    border-color: rgba(97, 206, 112, 0.30);
}

/* =========================================
   ANIMACIÓN
========================================= */

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

/* =========================================
   TABLET
========================================= */

@media screen and (max-width: 1000px){

    .error404Hero{
        min-height: auto;
        padding: 125px 28px 70px;
        background-attachment: scroll;
    }

    .error404Wrap,
    .error404Contenido{
        justify-content: center;
    }

    .error404Card{
        width: min(720px, 100%);
        padding: 38px 30px 34px;
        text-align: center;
    }

    .error404Linea{
        margin-left: auto;
        margin-right: auto;
    }

    .error404Descripcion{
        margin-left: auto;
        margin-right: auto;
    }

    .error404Tags{
        justify-content: center;
    }

    .error404Acciones{
        justify-content: center;
    }
}

/* =========================================
   MOBILE
========================================= */

@media screen and (max-width: 480px){

    .error404Hero{
        min-height: 100svh;
        padding: 110px 18px 48px;

        background-image:
            linear-gradient(180deg, rgba(0, 12, 5, 0.94) 0%, rgba(4, 25, 11, 0.84) 48%, rgba(0, 10, 4, 0.94) 100%),
            radial-gradient(circle at 50% 22%, rgba(97, 206, 112, 0.18), transparent 38%),
            url('../img/fondo_inicio_mobile.png');

        background-position: center;
        background-size: cover;
        background-attachment: scroll;
    }

    .error404Card{
        width: 100%;
        padding: 30px 20px 28px;
        border-radius: 22px;
    }

    .error404Eyebrow{
        font-size: 10px;
        letter-spacing: 2.4px;
        line-height: 1.6;
    }

    .error404Numero{
        font-size: 74px;
        letter-spacing: -2px;
    }

    .error404Card h1{
        font-size: 38px;
        line-height: 1.04;
        letter-spacing: -0.6px;
    }

    .error404Descripcion{
        font-size: 15px;
        line-height: 1.65;
    }

    .error404Tags{
        gap: 8px;
    }

    .error404Tags span{
        font-size: 12px;
        padding: 7px 10px;
    }

    .error404Acciones{
        width: 100%;
        flex-direction: column;
    }

    .error404Boton{
        width: 100%;
        min-height: 50px;
        font-size: 15px;
    }

    .error404GlowUno{
        width: 240px;
        height: 240px;
        left: -130px;
        bottom: 120px;
    }

    .error404GlowDos{
        width: 200px;
        height: 200px;
        right: -90px;
        top: 120px;
    }
}

/* =========================================
   REDUCIR MOVIMIENTO
========================================= */

@media (prefers-reduced-motion: reduce){
    .error404Card,
    .error404Boton,
    .error404Boton::before{
        animation: none;
        transition: none;
    }
}