/* ==========================================================================
   Vitrina de clientes (/clientes) — "la red de negocios"
   Fondo espacial con constelación en canvas, tarjetas de vidrio con brillo
   que sigue al cursor y estado vacío con radar. Todo respeta reduce-motion.
   ========================================================================== */
:root {
    --cx-bg: #04060d;
    --cx-ink: #f2f6ff;
    --cx-mute: rgba(226, 236, 255, .62);
    --cx-faint: rgba(226, 236, 255, .38);
    --cx-line: rgba(255, 255, 255, .08);
    --cx-cyan: #00d4ff;
    --cx-violet: #7c5cff;
    --cx-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---- Cabecera ---- */
.cx-hero {
    position: relative;
    overflow: hidden;
    padding: 110px 0 90px;
    background:
        radial-gradient(55% 60% at 50% 0%, rgba(0, 212, 255, .14), transparent 70%),
        radial-gradient(40% 50% at 100% 100%, rgba(124, 92, 255, .16), transparent 70%),
        radial-gradient(40% 50% at 0% 100%, rgba(0, 102, 255, .14), transparent 70%),
        var(--cx-bg);
    isolation: isolate;
}
.cx-net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.cx-aurora {
    position: absolute;
    left: 50%;
    top: -30%;
    width: 900px;
    height: 600px;
    max-width: 140vw;
    transform: translateX(-50%);
    background: conic-gradient(from 180deg, transparent, rgba(0, 212, 255, .22), rgba(124, 92, 255, .2), transparent 60%);
    filter: blur(90px);
    opacity: .7;
    z-index: -1;
    pointer-events: none;
    animation: cx-aurora 18s linear infinite;
}
@keyframes cx-aurora { to { transform: translateX(-50%) rotate(360deg); } }
/* fundido hacia la zona de la cartera */
.cx-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 140px;
    background: linear-gradient(transparent, var(--cx-bg));
    z-index: -1;
    pointer-events: none;
}

.cx-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    margin-bottom: 26px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--cx-ink);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(0, 212, 255, .28);
    box-shadow: 0 0 24px rgba(0, 212, 255, .12), inset 0 0 12px rgba(0, 212, 255, .06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.cx-live {
    position: relative;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22e39a;
    box-shadow: 0 0 10px #22e39a;
}
.cx-live::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid #22e39a;
    animation: cx-ping 1.8s var(--cx-ease) infinite;
}
@keyframes cx-ping {
    from { transform: scale(.6); opacity: 1; }
    to { transform: scale(2.2); opacity: 0; }
}

.cx-title {
    color: var(--cx-ink);
    font-weight: 700;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -2px;
    margin: 0 auto 22px;
    max-width: 900px;
    text-wrap: balance;
}
.cx-grad {
    background: linear-gradient(100deg, #00d4ff 0%, #7c5cff 45%, #ff5ccd 75%, #00d4ff 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: cx-shine 8s linear infinite;
}
@keyframes cx-shine { to { background-position: -220% 0; } }
.cx-lead {
    color: var(--cx-mute);
    font-size: 18px;
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto 18px;
    text-wrap: pretty;
}
.cx-hero .breadcrumb-style-01 ul li,
.cx-hero .breadcrumb-style-01 ul li a { color: var(--cx-faint); }
.cx-hero .breadcrumb-style-01 ul li a:hover { color: var(--cx-cyan); }

/* entrada escalonada de la cabecera */
.cx-rise { animation: cx-rise .9s var(--cx-ease) both; }
.cx-rise:nth-child(2) { animation-delay: .08s; }
.cx-rise:nth-child(3) { animation-delay: .16s; }
.cx-rise:nth-child(4) { animation-delay: .24s; }
.cx-stats.cx-rise { animation-delay: .32s; }
@keyframes cx-rise {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}

/* contadores */
.cx-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 44px;
}
.cx-stat {
    min-width: 180px;
    padding: 22px 28px;
    text-align: center;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
    border: 1px solid var(--cx-line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}
.cx-stat::before {
    content: '';
    position: absolute;
    left: 20%; right: 20%; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cx-cyan), transparent);
}
.cx-stat-num {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--cx-ink);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(0, 212, 255, .45);
}
.cx-stat-lbl {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cx-faint);
}

/* ---- Cinta de nombres ---- */
.cx-ticker {
    position: relative;
    background: var(--cx-bg);
    border-top: 1px solid var(--cx-line);
    border-bottom: 1px solid var(--cx-line);
    overflow: hidden;
    padding: 16px 0;
}
/* bordes difuminados con el color del fondo (una máscara dejaba ver el blanco del body) */
.cx-ticker::before, .cx-ticker::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 14%;
    z-index: 1;
    pointer-events: none;
}
.cx-ticker::before { left: 0; background: linear-gradient(90deg, var(--cx-bg), transparent); }
.cx-ticker::after { right: 0; background: linear-gradient(-90deg, var(--cx-bg), transparent); }
.cx-ticker-track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content;
    animation: cx-ticker 40s linear infinite;
}
.cx-ticker:hover .cx-ticker-track { animation-play-state: paused; }
.cx-ticker span {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
    color: rgba(226, 236, 255, .55);
    white-space: nowrap;
}
.cx-ticker i { font-style: normal; color: var(--cx-cyan); opacity: .6; font-size: 12px; }
@keyframes cx-ticker { to { transform: translateX(-50%); } }

/* ---- Zona de la cartera ---- */
.cx-zone {
    position: relative;
    background: var(--cx-bg);
    padding: 70px 0 100px;
}
.cx-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 80%);
    mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 80%);
    pointer-events: none;
}
.cx-zone > .container { position: relative; }

/* filtros por sistema */
.cx-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 44px;
}
.cx-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-mute);
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--cx-line);
    transition: color .3s, border-color .3s, background .3s, box-shadow .3s;
}
.cx-filter b {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .07);
    color: var(--cx-ink);
}
.cx-filter:hover { color: var(--cx-ink); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.cx-filter.is-on {
    color: #fff;
    border-color: color-mix(in srgb, var(--c) 70%, transparent);
    background: color-mix(in srgb, var(--c) 16%, transparent);
    box-shadow: 0 0 22px color-mix(in srgb, var(--c) 30%, transparent);
}
.cx-filter.is-on b { background: color-mix(in srgb, var(--c) 45%, transparent); }

/* grilla */
.cx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 26px;
}

/* tarjeta: borde de gradiente + brillo que sigue al cursor (--mx/--my desde JS) */
.cx-card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    border-radius: 22px;
    padding: 1px;
    background:
        radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 80%, transparent), transparent 45%),
        linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .06));
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
    transition: transform .5s var(--cx-ease), box-shadow .5s var(--cx-ease);
    /* entrada con `translate` (no `transform`) para no pisar la inclinación */
    animation: cx-in .8s var(--cx-ease) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes cx-in {
    from { opacity: 0; translate: 0 24px; }
    to { opacity: 1; translate: none; }
}
.cx-card:hover {
    --ty: -6px;
    box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--c) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent);
}
.cx-card.is-tilting { transition: box-shadow .5s var(--cx-ease); }
.cx-card-in {
    height: 100%;
    border-radius: 21px;
    overflow: hidden;
    background:
        radial-gradient(300px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 10%, transparent), transparent 60%),
        linear-gradient(170deg, #0f1424, #090c17);
    display: flex;
    flex-direction: column;
}

/* portada: foto real o generada */
.cx-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.cx-cover img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--cx-ease);
}
.cx-card:hover .cx-cover img { transform: scale(1.06); }
.cx-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(9, 12, 23, .85));
    pointer-events: none;
}
a.cx-cover { cursor: zoom-in; }
.cx-zoom {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 2;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    background: rgba(5, 8, 16, .5);
    border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(.8);
    transition: opacity .3s, transform .4s var(--cx-ease);
}
.cx-card:hover .cx-zoom, .cx-cover:focus-visible .cx-zoom { opacity: 1; transform: none; }
@media (hover: none) { .cx-zoom { opacity: 1; transform: none; } }

.cx-cover-gen {
    background:
        radial-gradient(80% 90% at 85% 10%, color-mix(in srgb, var(--c) 55%, transparent), transparent 60%),
        radial-gradient(70% 80% at 0% 100%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%),
        #0b1020;
}
.cx-cover-gen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(90% 90% at 80% 20%, #000, transparent 75%);
    mask-image: radial-gradient(90% 90% at 80% 20%, #000, transparent 75%);
}
.cx-mono {
    position: absolute;
    left: 22px; bottom: 6px;
    z-index: 1;
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c) 70%, #fff);
    opacity: .85;
    transition: transform .8s var(--cx-ease);
}
.cx-card:hover .cx-mono { transform: translateX(6px); }
.cx-cover-ico {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 1;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: cx-float 5s ease-in-out infinite;
}
@keyframes cx-float { 50% { transform: translateY(-5px); } }

.cx-body {
    padding: 4px 24px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cx-name {
    color: var(--cx-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.3px;
    margin: 14px 0 6px;
}
.cx-city {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cx-mute);
    font-size: 14px;
}
.cx-city i { color: var(--c); font-size: 13px; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.cx-chips span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 5px 11px;
    border-radius: 100px;
    color: color-mix(in srgb, var(--c) 70%, #fff);
    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
    background: color-mix(in srgb, var(--c) 12%, transparent);
}
.cx-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
    font-size: 12px;
    color: var(--cx-faint);
}
.cx-chips + .cx-foot, .cx-city + .cx-foot { margin-top: 18px; border-top: 1px solid var(--cx-line); }
.cx-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 10.5px;
    color: #22e39a;
}
.cx-status i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22e39a;
    box-shadow: 0 0 10px #22e39a;
    animation: cx-blink 2.4s ease-in-out infinite;
}
@keyframes cx-blink { 50% { opacity: .35; } }

/* ---- Estado vacío: radar con los sistemas en órbita ---- */
.cx-empty { text-align: center; padding: 10px 0 20px; }
.cx-radar {
    --r: 150px;
    position: relative;
    width: calc(var(--r) * 2 + 60px);
    height: calc(var(--r) * 2 + 60px);
    margin: 0 auto 40px;
}
.cx-ring {
    position: absolute;
    left: 50%; top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, .16);
    transform: translate(-50%, -50%);
}
.cx-ring:nth-child(1) { width: calc(var(--r) * 2); height: calc(var(--r) * 2); }
.cx-ring:nth-child(2) { width: calc(var(--r) * 1.35); height: calc(var(--r) * 1.35); border-style: dashed; }
.cx-ring:nth-child(3) { width: calc(var(--r) * .7); height: calc(var(--r) * .7); }
.cx-sweep {
    position: absolute;
    left: 50%; top: 50%;
    width: calc(var(--r) * 2);
    height: calc(var(--r) * 2);
    margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(0, 212, 255, .35), rgba(0, 212, 255, 0) 70deg, transparent 360deg);
    -webkit-mask-image: radial-gradient(circle, #000 70%, transparent 71%);
    mask-image: radial-gradient(circle, #000 70%, transparent 71%);
    animation: cx-spin 4s linear infinite;
}
@keyframes cx-spin { to { transform: rotate(360deg); } }
.cx-core {
    position: absolute;
    left: 50%; top: 50%;
    width: 78px; height: 78px;
    margin: -39px 0 0 -39px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #121a30, #070b16);
    border: 1px solid rgba(0, 212, 255, .4);
    box-shadow: 0 0 40px rgba(0, 212, 255, .35), inset 0 0 20px rgba(0, 212, 255, .15);
}
.cx-core img { width: 44px; height: auto; }
.cx-orbit {
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}
.cx-orbit b {
    position: absolute;
    left: -22px; top: -22px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--c) 18%, #0b1020);
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--c) 40%, transparent);
    animation: cx-blip 4s var(--cx-ease) infinite;
    animation-delay: var(--d);
}
@keyframes cx-blip {
    0%, 100% { transform: scale(1); }
    8% { transform: scale(1.18); box-shadow: 0 0 34px color-mix(in srgb, var(--c) 80%, transparent); }
}
.cx-empty-title {
    color: var(--cx-ink);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.cx-empty-text {
    color: var(--cx-mute);
    font-size: 17px;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 30px;
}

/* ---- Botones propios ---- */
.cx-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    color: #04060d;
    background: linear-gradient(100deg, #00d4ff, #7cc4ff 50%, #b7a6ff);
    box-shadow: 0 10px 30px -8px rgba(0, 212, 255, .6);
    transition: transform .4s var(--cx-ease), box-shadow .4s var(--cx-ease);
}
.cx-btn:hover { color: #04060d; transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(0, 212, 255, .8); }
.cx-btn i { transition: transform .4s var(--cx-ease); }
.cx-btn:hover i { transform: translateX(4px); }
.cx-btn-ghost {
    color: var(--cx-ink);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: none;
}
.cx-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: none; }
.cx-btn:focus-visible, .cx-filter:focus-visible { outline: 2px solid var(--cx-cyan); outline-offset: 3px; }

/* ---- CTA final ---- */
.cx-zone-cta { padding-top: 0; }
.cx-cta {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding: 64px 40px;
    text-align: center;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(0, 212, 255, .16), transparent 70%),
        linear-gradient(170deg, #0f1528, #080b16);
    border: 1px solid rgba(0, 212, 255, .2);
    box-shadow: 0 40px 80px -30px rgba(0, 212, 255, .25);
}
.cx-cta::before {
    content: '';
    position: absolute;
    left: 15%; right: 15%; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cx-cyan), var(--cx-violet), transparent);
}
.cx-cta-title {
    color: var(--cx-ink);
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}
.cx-cta-text {
    color: var(--cx-mute);
    font-size: 17px;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 32px;
}
.cx-cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ---- Móvil ---- */
@media (max-width: 767px) {
    .cx-hero { padding: 70px 0 60px; }
    .cx-title { letter-spacing: -1px; }
    .cx-lead { font-size: 16px; }
    .cx-stats { gap: 10px; margin-top: 30px; }
    .cx-stat { min-width: 0; flex: 1 1 0; padding: 16px 8px; border-radius: 14px; }
    .cx-stat-num { font-size: 32px; }
    .cx-stat-lbl { font-size: 10.5px; letter-spacing: .8px; }
    .cx-zone { padding: 50px 0 70px; }
    .cx-zone-cta { padding-top: 0; }
    /* filtros en una sola fila deslizable, sin desbordar la página */
    .cx-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin: 0 -15px 30px;
        padding: 4px 15px;
        scrollbar-width: none;
    }
    .cx-filters::-webkit-scrollbar { display: none; }
    .cx-filter { flex: 0 0 auto; }
    .cx-grid { grid-template-columns: 1fr; gap: 18px; }
    .cx-radar { --r: 118px; }
    .cx-orbit b { width: 38px; height: 38px; left: -19px; top: -19px; font-size: 17px; border-radius: 12px; }
    .cx-cta { padding: 46px 22px; border-radius: 22px; }
    .cx-cta-actions .cx-btn { width: 100%; justify-content: center; }
}

/* ---- Sin animaciones si el usuario lo pide ---- */
@media (prefers-reduced-motion: reduce) {
    .cx-aurora, .cx-grad, .cx-live::after, .cx-ticker-track, .cx-sweep,
    .cx-orbit b, .cx-cover-ico, .cx-status i, .cx-rise, .cx-card { animation: none !important; }
    .cx-ticker { display: none; }
    .cx-card, .cx-cover img, .cx-mono { transition: none; }
}
