/* =========================================================
   VARIABLES GENERALES
========================================================= */

:root {
    color-scheme: dark;

    --fondo-principal: #06152b;
    --fondo-secundario: #0a1d38;

    --tarjeta: rgba(15, 38, 72, 0.72);
    --tarjeta-hover: rgba(18, 47, 88, 0.88);

    --borde: rgba(148, 189, 238, 0.22);
    --borde-hover: rgba(96, 165, 250, 0.52);

    --texto-principal: #f8fafc;
    --texto-secundario: #a9bdd8;
    --texto-suave: #748aa8;

    --azul: #3b82f6;
    --azul-claro: #60a5fa;
    --azul-profundo: #0f4cc9;

    --sombra:
        0 28px 70px rgba(0, 0, 0, 0.30);

    --radio-tarjeta: 22px;
}


/* =========================================================
   REINICIO
========================================================= */

* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    min-height: 100vh;

    margin: 0;

    overflow-x: hidden;

    color: var(--texto-principal);

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(66, 112, 179, 0.26),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            var(--fondo-principal),
            #071a34 50%,
            #051226
        );

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


a {
    color: inherit;

    text-decoration: none;
}


/* =========================================================
   FONDO DECORATIVO
========================================================= */

.portal-fondo {
    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(125, 172, 232, 0.035),
            transparent
        );

    opacity: 0.65;
}


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

.portal {
    position: relative;
    z-index: 1;

    width: min(1240px, calc(100% - 40px));

    margin: 0 auto;

    padding:
        clamp(54px, 8vh, 94px)
        0
        46px;
}


/* =========================================================
   ENCABEZADO
========================================================= */

.portal-encabezado {
    max-width: 780px;

    margin: 0 auto 54px;

    text-align: center;
}


.portal-etiqueta {
    margin:
        0
        0
        12px;

    color: var(--azul-claro);

    font-size: 12px;
    font-weight: 750;

    letter-spacing: 0.18em;
    text-transform: uppercase;
}


.portal-encabezado h1 {
    margin: 0;

    font-size: clamp(38px, 5vw, 58px);
    font-weight: 500;

    letter-spacing: 0.13em;
    line-height: 1.1;

    text-transform: uppercase;

    text-shadow:
        0 0 28px rgba(96, 165, 250, 0.24);
}


.portal-descripcion {
    margin:
        20px
        0
        0;

    color: var(--texto-secundario);

    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.55;
}


/* =========================================================
   CUADRÍCULA DE APLICACIONES
========================================================= */

.aplicaciones-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   TARJETAS
========================================================= */

.aplicacion-tarjeta {
    position: relative;

    min-width: 0;
    min-height: 570px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    padding:
        30px
        28px
        28px;

    overflow: hidden;

    border: 1px solid var(--borde);
    border-radius: var(--radio-tarjeta);

    background:
        linear-gradient(
            155deg,
            rgba(27, 64, 112, 0.46),
            rgba(8, 29, 58, 0.74)
        );

    box-shadow: var(--sombra);

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


.aplicacion-tarjeta::before {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    top: 80px;
    left: 50%;

    border-radius: 50%;

    background:
        rgba(37, 99, 235, 0.14);

    filter: blur(58px);

    transform: translateX(-50%);

    pointer-events: none;
}


.aplicacion-activa:hover {
    transform: translateY(-5px);

    border-color: var(--borde-hover);

    background:
        linear-gradient(
            155deg,
            rgba(30, 75, 131, 0.58),
            rgba(9, 33, 65, 0.84)
        );

    box-shadow:
        0 34px 80px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(96, 165, 250, 0.08);
}


.aplicacion-tarjeta h2 {
    position: relative;
    z-index: 2;

    margin:
        0
        0
        16px;

    font-size: 20px;
    font-weight: 500;

    letter-spacing: 0.12em;
    line-height: 1.25;

    text-align: center;
    text-transform: uppercase;
}


/* =========================================================
   ILUSTRACIONES
========================================================= */

.aplicacion-ilustracion {
    position: relative;
    z-index: 1;

    height: 300px;

    display: grid;
    place-items: center;

    margin:
        0
        -12px;
}


.aplicacion-ilustracion img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    filter:
        drop-shadow(0 24px 24px rgba(0, 0, 0, 0.28));

    -webkit-mask-image:
        radial-gradient(
            ellipse 80% 76% at 50% 50%,
            #000 64%,
            transparent 100%
        );

    mask-image:
        radial-gradient(
            ellipse 80% 76% at 50% 50%,
            #000 64%,
            transparent 100%
        );
}


/* =========================================================
   DESCRIPCIÓN
========================================================= */

.aplicacion-tarjeta > p {
    position: relative;
    z-index: 2;

    min-height: 58px;

    margin:
        6px
        0
        24px;

    color: var(--texto-secundario);

    font-size: 16px;
    line-height: 1.55;

    text-align: center;
}


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

.aplicacion-boton {
    position: relative;
    z-index: 2;

    min-height: 58px;

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

    gap: 9px;

    margin-top: auto;

    padding:
        14px
        18px;

    border: 1px solid rgba(96, 165, 250, 0.44);
    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            #0c48bf,
            #1557cf
        );

    color: #ffffff;

    font-size: 17px;
    font-weight: 600;

    box-shadow:
        0 14px 30px rgba(8, 55, 145, 0.27);

    transition:
        transform 160ms ease,
        filter 160ms ease,
        box-shadow 160ms ease;
}


a.aplicacion-boton:hover {
    transform: translateY(-2px);

    filter: brightness(1.10);

    box-shadow:
        0 18px 38px rgba(8, 55, 145, 0.40);
}


a.aplicacion-boton:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.82);
    outline-offset: 4px;
}


.aplicacion-boton-deshabilitado {
    cursor: not-allowed;

    border-color: rgba(148, 163, 184, 0.10);

    background:
        rgba(29, 53, 86, 0.60);

    color: var(--texto-suave);

    box-shadow: none;
}


.aplicacion-boton svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   PIE DE PÁGINA
========================================================= */

.portal-pie {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 58px;

    color: var(--texto-suave);

    font-size: 14px;
    line-height: 1.4;
}


.portal-pie svg {
    width: 20px;
    height: 20px;

    margin-right: 8px;

    fill: none;
    stroke: var(--azul-claro);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


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

@media (max-width: 980px) {

    .portal {
        width: min(860px, calc(100% - 32px));
    }


    .aplicaciones-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .aplicacion-proximamente {
        grid-column: 1 / -1;

        width: min(420px, 100%);

        justify-self: center;
    }

}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 650px) {

    .portal {
        width: min(100% - 24px, 460px);

        padding:
            34px
            0
            30px;
    }


    .portal-encabezado {
        margin-bottom: 32px;
    }


    .portal-etiqueta {
        font-size: 10px;
    }


    .portal-encabezado h1 {
        font-size: 34px;
        letter-spacing: 0.10em;
    }


    .portal-descripcion {
        margin-top: 14px;

        font-size: 15px;
    }


    .aplicaciones-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }


    .aplicacion-tarjeta,
    .aplicacion-proximamente {
        width: 100%;
        min-height: 500px;

        grid-column: auto;

        padding:
            24px
            20px
            20px;
    }


    .aplicacion-tarjeta h2 {
        font-size: 18px;
    }


    .aplicacion-ilustracion {
        height: 260px;
    }


    .aplicacion-tarjeta > p {
        min-height: auto;

        margin-bottom: 20px;

        font-size: 15px;
    }


    .aplicacion-boton {
        min-height: 54px;

        font-size: 16px;
    }


    .portal-pie {
        margin-top: 34px;

        gap: 7px;

        font-size: 12px;
    }

}


/* =========================================================
   PREFERENCIA DE MOVIMIENTO REDUCIDO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .aplicacion-tarjeta,
    .aplicacion-boton {
        transition: none;
    }

}
