﻿:root {
    --portal-bg: #020914;
    --portal-text: #f8fafc;
    --portal-muted: #a8b4c8;
    --portal-blue: #2589ff;
    --portal-cyan: #0dd8e8;
    --portal-purple: #a54cff;
    --portal-green: #58d953;
    --portal-yellow: #ffb822;
    --portal-border: rgba(102, 151, 211, .24);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: var(--portal-bg);
    color: var(--portal-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
    overflow-x: hidden;
}

.portal-page {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 24%, rgba(0, 91, 194, .18), transparent 34%),
        radial-gradient(circle at 100% 42%, rgba(0, 207, 221, .16), transparent 29%),
        radial-gradient(circle at 0% 18%, rgba(15, 79, 177, .15), transparent 30%),
        linear-gradient(180deg, #020812 0%, #03101d 62%, #020914 100%);
}

.portal-atmosphere {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.portal-grid {
    position: absolute;
    inset: 0;
    opacity: .12;
    background-image:
        linear-gradient(rgba(44, 116, 199, .34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 116, 199, .34) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

.portal-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .22;
}

.portal-glow-left {
    width: 430px;
    height: 430px;
    top: 3%;
    left: -230px;
    background: #1259d4;
}

.portal-glow-right {
    width: 460px;
    height: 460px;
    top: 23%;
    right: -240px;
    background: #04b7ca;
}

.portal-stars {
    position: absolute;
    inset: 16% 7% 25%;
    opacity: .65;
    background-image:
        radial-gradient(circle, #158aff 0 1px, transparent 1.7px),
        radial-gradient(circle, #0ddff5 0 1px, transparent 1.6px);
    background-position: 20px 30px, 130px 90px;
    background-size: 150px 115px, 210px 155px;
}

.portal-floor {
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: -15%;
    height: 39%;
    opacity: .28;
    transform: perspective(520px) rotateX(61deg);
    transform-origin: bottom;
    background-image:
        linear-gradient(rgba(15, 112, 223, .48) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 112, 223, .48) 1px, transparent 1px);
    background-size: 80px 54px;
    mask-image: linear-gradient(to top, black, transparent 92%);
}

.portal-shell {
    position: relative;
    z-index: 2;
    width: min(1460px, calc(100% - 64px));
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px 0 20px;
    display: grid;
    grid-template-rows: auto auto minmax(350px, 1fr) auto;
    gap: 18px;
}

/* Header */

.portal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #278cff;
    border-radius: 18px;
    color: #d8f4ff;
    background:
        linear-gradient(145deg, rgba(14, 63, 121, .5), rgba(4, 19, 39, .72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 18px 40px rgba(0, 64, 154, .2);
}

.brand-logo span {
    font-family: Consolas, monospace;
    font-size: 16px;
    font-weight: 850;
}

.brand-name {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -1px;
}

.brand-name span {
    color: #3a95ff;
}

.brand-subtitle {
    margin-top: 5px;
    color: #d4d9e2;
    font-size: 15px;
}

.portal-summary {
    min-width: 395px;
    height: 86px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(5, 17, 33, .72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        0 18px 50px rgba(0, 0, 0, .16);
    backdrop-filter: blur(16px);
}

.summary-icon {
    color: var(--portal-blue);
    font-size: 25px;
}

.summary-item {
    min-width: 72px;
    text-align: center;
}

.summary-item strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 24px;
    line-height: 1;
}

.summary-item > span {
    display: block;
    margin-top: 8px;
    color: #e2e8f0;
    font-size: 12px;
    white-space: nowrap;
}

.summary-divider,
.footer-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(131, 161, 199, .22);
}

.summary-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.summary-dot.beta {
    background: var(--portal-green);
}

.summary-dot.development {
    background: var(--portal-yellow);
}

/* Hero */

.portal-hero {
    align-self: center;
    text-align: center;
    padding-top: 4px;
}

.hero-badge {
    width: fit-content;
    margin: 0 auto 12px;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #1486e8;
    border-radius: 999px;
    background: rgba(0, 82, 156, .2);
    color: #a9dcff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.hero-badge span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #20d4ff;
    box-shadow: 0 0 14px #20d4ff;
}

.portal-hero h1 {
    margin: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: none;
    font-size: clamp(38px, 3.1vw, 50px);
    line-height: 1.08;
    letter-spacing: -2px;
    font-weight: 900;
}

.portal-hero h1::before,
.portal-hero h1::after {
    display: none;
    content: none;
}

.portal-hero h1 span {
    color: transparent;
    background: linear-gradient(90deg, #4b9fff, #1dc8f3);
    background-clip: text;
    -webkit-background-clip: text;
}

.portal-hero p {
    margin: 10px auto 0;
    color: #c0cad9;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.5;
}

/* ==========================================================
   CARDS
========================================================== */

.apps-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 20px;
}

/* ---------- Responsive ---------- */

@media (max-width:1700px) {

    .apps-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }
}

@media (max-width:1400px) {

    .apps-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width:992px) {

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width:768px) {

    .apps-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Card ---------- */

.app-card {
    --accent: var(--portal-blue);
    position: relative;
    min-width: 0;
    height: 100%;
    padding: 20px;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    overflow: hidden;
    border: 1px solid var(--accent);
    border-radius: 21px;
    color: #fff;
    text-decoration: none;
    background: radial-gradient(circle at 50% 0%, rgba(24,81,142,.18), transparent 46%), linear-gradient(155deg, rgba(8,28,52,.93), rgba(3,14,29,.95));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 20px 60px rgba(0,0,0,.21);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .app-card::after {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        top: -110px;
        right: -90px;
        border-radius: 50%;
        background: var(--accent);
        filter: blur(65px);
        opacity: .12;
    }

    .app-card:hover,
    .app-card:focus-visible {
        color: #fff;
        transform: translateY(-4px);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 26px 70px rgba(0,0,0,.33), 0 0 34px color-mix(in srgb, var(--accent) 18%, transparent);
    }

    .app-card:focus-visible {
        outline: 3px solid rgba(255,255,255,.75);
        outline-offset: 4px;
    }

    /* ---------- Colores ---------- */

    .app-card.regcit {
        --accent: var(--portal-yellow);
    }

    .app-card.overtimex {
        --accent: var(--portal-cyan);
    }

    .app-card.explanner {
        --accent: #7c3aed;
    }

    .app-card.vectix {
        --accent: var(--portal-green);
    }

    .app-card.aria {
        --accent: var(--portal-purple);
    }

/* ---------- Encabezado ---------- */

.card-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.app-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb,var(--accent) 48%,transparent);
    background: color-mix(in srgb,var(--accent) 15%,transparent);
    box-shadow: inset 0 0 24px color-mix(in srgb,var(--accent) 10%,transparent);
    color: var(--accent);
    font-size: 28px;
}

/* ---------- Estado ---------- */

.status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
}

    .status span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }

    .status.beta {
        color: #73f17a;
        border: 1px solid rgba(65,216,91,.3);
        background: rgba(27,102,52,.2);
    }

        .status.beta span {
            background: #64ed72;
            box-shadow: 0 0 9px #64ed72;
        }

    .status.development {
        color: #ffd044;
        border: 1px solid rgba(233,176,37,.25);
        background: rgba(95,71,12,.2);
    }

        .status.development span {
            background: var(--portal-yellow);
            box-shadow: 0 0 9px var(--portal-yellow);
        }

/* ---------- Contenido ---------- */

.card-body {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
}

.category {
    min-height: 18px;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.app-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.6px;
    line-height: 1.15;
}

.app-card p {
    flex: 1;
    margin: 0;
    color: #d0d6df;
    font-size: 13px;
    line-height: 1.45;
}

/* ---------- Botón ---------- */

.open-button {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 18px;
    padding: 0 18px;
    min-height: 46px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    border: 1px solid var(--accent);
    background: linear-gradient( 90deg, color-mix(in srgb,var(--accent) 28%,transparent), color-mix(in srgb,var(--accent) 14%,transparent) );
    font-size: 14px;
    font-weight: 800;
}

    .open-button i {
        font-size: 20px;
    }
/* Footer */

.portal-footer {
    min-height: 74px;
    padding: 10px 24px;
    display: grid;
    grid-template-columns:
        minmax(190px, 1.35fr) 1px
        minmax(135px, .9fr) 1px
        minmax(145px, .9fr) 1px
        minmax(135px, .9fr) 1px
        minmax(110px, .75fr) 1px
        minmax(205px, 1.25fr);
    align-items: center;
    gap: 18px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(3, 16, 31, .78);
    backdrop-filter: blur(16px);
}

.footer-intro,
.technology,
.footer-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-intro strong,
.technology strong,
.footer-copy strong {
    font-size: 13px;
}

.footer-intro span,
.technology span,
.footer-copy span {
    color: #d2d7df;
    font-size: 11px;
}

.technology {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.technology img {
    width: 39px;
    height: 39px;
    padding: 6px;
    object-fit: contain;
    flex: 0 0 auto;
    border: 1px solid rgba(94, 137, 188, .25);
    border-radius: 12px;
    background: rgba(14, 38, 67, .6);
}

.footer-copy {
    justify-self: end;
}

.cr-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cr-location img,
.cr-flag {
    width: 28px;
    height: 17px;
    padding: 0;
    object-fit: cover;
    object-position: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 2px;
    background: transparent;
}

/* Responsive */

@media (max-width: 1250px) {
    .portal-page {
        overflow: visible;
    }

    .portal-shell {
        width: min(1460px, calc(100% - 40px));
        min-height: 100svh;
        padding: 22px 0;
        grid-template-rows: auto auto auto auto;
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .app-card {
        min-height: 350px;
    }

    .portal-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-footer .footer-divider {
        display: none;
    }

    .footer-copy {
        justify-self: start;
    }
}

@media (max-width: 800px) {
    .portal-shell {
        width: min(100% - 28px, 1460px);
    }

    .portal-topbar {
        flex-direction: column;
        gap: 20px;
    }

    .portal-summary {
        width: 100%;
        min-width: 0;
    }

    .portal-brand {
        gap: 13px;
    }

    .brand-logo {
        width: 58px;
        height: 58px;
    }

    .brand-name {
        font-size: 24px;
    }

    .portal-hero h1 br,
    .portal-hero p br {
        display: none;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .app-card {
        min-height: 345px;
    }

    .portal-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .portal-summary {
        padding: 12px;
        gap: 8px;
    }

    .summary-icon,
    .summary-divider {
        display: none;
    }

    .summary-item {
        min-width: 0;
        flex: 1;
    }

    .portal-hero h1 {
        font-size: 34px;
        letter-spacing: -1.3px;
    }

    .app-card {
        padding: 20px;
    }

    .status {
        padding: 6px 9px;
        font-size: 9px;
    }
}

@media (max-height: 850px) and (min-width: 1251px) {
    .portal-shell {
        padding-top: 16px;
        padding-bottom: 14px;
        gap: 12px;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
    }

    .portal-summary {
        height: 78px;
    }

    .portal-hero h1 {
        font-size: 40px;
    }

    .portal-hero p {
        margin-top: 8px;
    }

    .app-card {
        padding: 20px;
    }

    .app-icon {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }

    .card-body {
        padding-top: 15px;
    }

    .app-card h2 {
        font-size: 25px;
    }

    .app-card p {
        font-size: 13px;
    }

    .open-button {
        min-height: 42px;
        margin-top: 14px;
    }

    .portal-footer {
        min-height: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card {
        transition: none;
    }

    .app-card:hover,
    .app-card:focus-visible {
        transform: none;
    }
}
