/* ============================================================
   DIGITALIZANDO MX
   Aplicaciones empresariales
   Sección: CTA
============================================================ */


/* ============================================================
   Sección principal
============================================================ */

.dmxCTA {
    position: relative;
    isolation: isolate;

    padding:
        clamp(90px, 10vw, 150px)
        0;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f4f8fc 100%
        );
}


.dmxCTA::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -2;

    opacity: 0.38;

    background-image:
        linear-gradient(
            rgba(8, 38, 77, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(8, 38, 77, 0.035) 1px,
            transparent 1px
        );

    background-size: 64px 64px;

    -webkit-mask-image:
        linear-gradient(
            180deg,
            transparent,
            #000 14%,
            #000 86%,
            transparent
        );

    mask-image:
        linear-gradient(
            180deg,
            transparent,
            #000 14%,
            #000 86%,
            transparent
        );

    pointer-events: none;
}


.dmxCTA::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -420px;
    z-index: -1;

    width: min(1000px, 100vw);
    height: min(1000px, 100vw);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(6, 103, 241, 0.09),
            rgba(0, 217, 220, 0.04) 38%,
            transparent 72%
        );

    filter: blur(28px);

    transform: translateX(-50%);

    pointer-events: none;
}


.dmxCTA > .container {
    position: relative;
    z-index: 2;
}


/* ============================================================
   Caja principal
============================================================ */

.dmxCTABox {
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(390px, 0.92fr);

    align-items: center;
    gap:
        clamp(50px, 7vw, 105px);

    min-height:
        clamp(620px, 65vw, 760px);

    padding:
        clamp(54px, 7vw, 94px);

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius:
        clamp(34px, 5vw, 56px);

    color: #ffffff;

    background:
        radial-gradient(
            circle at 9% 15%,
            rgba(6, 103, 241, 0.27),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 82%,
            rgba(0, 217, 220, 0.17),
            transparent 37%
        ),
        linear-gradient(
            135deg,
            #041222 0%,
            #061a33 46%,
            #08264d 100%
        );

    box-shadow:
        0 52px 130px rgba(8, 38, 77, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


.dmxCTABox::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -3;

    opacity: 0.34;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.045) 1px,
            transparent 1px
        );

    background-size: 48px 48px;

    -webkit-mask-image:
        radial-gradient(
            circle at 78% 50%,
            #000 0%,
            rgba(0, 0, 0, 0.85) 42%,
            transparent 78%
        );

    mask-image:
        radial-gradient(
            circle at 78% 50%,
            #000 0%,
            rgba(0, 0, 0, 0.85) 42%,
            transparent 78%
        );

    pointer-events: none;
}


.dmxCTABox::after {
    content: "";

    position: absolute;
    top: -150px;
    left: 44%;
    z-index: -2;

    width: 540px;
    height: 540px;

    border-radius: 50%;

    border:
        1px solid rgba(255, 255, 255, 0.045);

    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.018),
        0 0 0 140px rgba(255, 255, 255, 0.012);

    pointer-events: none;
}


/* ============================================================
   Contenido
============================================================ */

.dmxCTAContent {
    position: relative;
    z-index: 3;

    max-width: 720px;
}


.dmxCTAEyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}


.dmxCTAEyebrow > span {
    position: relative;

    width: 46px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--dmx-cyan)
        );
}


.dmxCTAEyebrow > span::after {
    content: "";

    position: absolute;
    top: 50%;
    right: 0;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--dmx-cyan);

    box-shadow:
        0 0 16px rgba(0, 217, 220, 0.7);

    transform: translateY(-50%);
}


.dmxCTAEyebrow small {
    color: var(--dmx-cyan);

    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}


.dmxCTAContent h2 {
    max-width: 780px;

    margin: 29px 0 0;

    color: #ffffff;

    font-size:
        clamp(50px, 5.6vw, 82px);

    line-height: 0.97;
    letter-spacing: -0.067em;
}


.dmxCTAContent h2 span {
    display: block;

    margin-top: 10px;

    color: transparent;

    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #bdefff 45%,
            var(--dmx-cyan) 100%
        );

    -webkit-background-clip: text;
    background-clip: text;
}


.dmxCTAContent > p {
    max-width: 650px;

    margin: 29px 0 0;

    color:
        rgba(231, 242, 252, 0.73);

    font-size:
        clamp(15px, 1.3vw, 18px);

    line-height: 1.82;
}


/* ============================================================
   Botones
============================================================ */

.dmxCTAButtons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;

    margin-top:
        clamp(34px, 5vw, 48px);
}


.dmxPrimaryButton,
.dmxSecondaryButton {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    min-height: 60px;

    padding:
        8px 10px 8px 26px;

    border-radius: 999px;

    text-decoration: none;

    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-transform: uppercase;

    transition:
        color 0.35s ease,
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}


.dmxPrimaryButton {
    color: var(--dmx-navy);

    background: var(--dmx-lime);

    box-shadow:
        0 18px 42px rgba(198, 255, 47, 0.17);
}


.dmxPrimaryButton::after {
    content: "↗";

    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    color: #ffffff;

    background: var(--dmx-navy);

    font-size: 15px;

    transition:
        transform 0.35s ease;
}


.dmxPrimaryButton:hover {
    box-shadow:
        0 26px 58px rgba(198, 255, 47, 0.25);

    transform:
        translateY(-4px);
}


.dmxPrimaryButton:hover::after {
    transform:
        rotate(45deg);
}


.dmxSecondaryButton {
    min-height: 60px;

    padding:
        8px 24px;

    border:
        1px solid rgba(255, 255, 255, 0.13);

    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.045);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


.dmxSecondaryButton::after {
    content: "→";

    font-size: 16px;

    transition:
        transform 0.35s ease;
}


.dmxSecondaryButton:hover {
    border-color:
        rgba(0, 217, 220, 0.3);

    background:
        rgba(0, 217, 220, 0.075);

    box-shadow:
        0 18px 42px rgba(0, 217, 220, 0.09);

    transform:
        translateY(-4px);
}


.dmxSecondaryButton:hover::after {
    transform:
        translateX(5px);
}


.dmxPrimaryButton:focus-visible,
.dmxSecondaryButton:focus-visible {
    outline:
        3px solid rgba(0, 217, 220, 0.42);

    outline-offset: 4px;
}
/* ============================================================
   Visual derecho
============================================================ */

.dmxCTAVisual {
    position: relative;
    z-index: 2;

    min-height:
        clamp(430px, 42vw, 560px);

    display: grid;
    place-items: center;

    perspective: 1200px;
}


/* ============================================================
   Orbe principal
============================================================ */

.dmxCTAOrb {
    position: absolute;
    top: 50%;
    left: 50%;

    width:
        clamp(300px, 31vw, 440px);

    aspect-ratio: 1;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255, 255, 255, 0.9),
            rgba(117, 232, 255, 0.55) 10%,
            rgba(0, 217, 220, 0.19) 29%,
            rgba(6, 103, 241, 0.19) 52%,
            rgba(8, 38, 77, 0.04) 70%,
            transparent 73%
        );

    filter:
        drop-shadow(
            0 0 70px rgba(0, 217, 220, 0.19)
        );

    transform:
        translate(-50%, -50%);

    animation:
        dmxCTAOrbFloat
        7s ease-in-out infinite;

    pointer-events: none;
}


.dmxCTAOrb::before {
    content: "";

    position: absolute;
    inset: 15%;

    border:
        1px solid rgba(255, 255, 255, 0.16);

    border-radius: inherit;

    box-shadow:
        inset 0 0 50px rgba(255, 255, 255, 0.06),
        0 0 50px rgba(0, 217, 220, 0.08);

    animation:
        dmxCTAOrbPulse
        4.8s ease-in-out infinite;
}


.dmxCTAOrb::after {
    content: "";

    position: absolute;
    inset: -16%;

    border:
        1px dashed rgba(0, 217, 220, 0.16);

    border-radius: inherit;

    animation:
        dmxCTAOrbRotate
        28s linear infinite;
}


/* ============================================================
   Tarjetas flotantes
============================================================ */

.dmxCTACard {
    position: absolute;
    z-index: 4;

    min-width:
        clamp(190px, 17vw, 235px);

    padding:
        20px 22px;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.11);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.115),
            rgba(255, 255, 255, 0.035)
        );

    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.23),
        inset 0 1px 0 rgba(255, 255, 255, 0.11);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transform-style: preserve-3d;

    transition:
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}


.dmxCTACard::before {
    content: "";

    position: absolute;
    top: -80px;
    right: -80px;

    width: 170px;
    height: 170px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(0, 217, 220, 0.19),
            transparent 70%
        );

    pointer-events: none;
}


.dmxCTACard strong,
.dmxCTACard span {
    position: relative;
    z-index: 2;

    display: block;
}


.dmxCTACard strong {
    color: #ffffff;

    font-size:
        clamp(16px, 1.45vw, 20px);

    line-height: 1.2;
    letter-spacing: -0.03em;
}


.dmxCTACard span {
    margin-top: 7px;

    color:
        rgba(228, 240, 251, 0.62);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}


.dmxCTACard:hover {
    border-color:
        rgba(0, 217, 220, 0.25);

    background:
        linear-gradient(
            145deg,
            rgba(0, 217, 220, 0.13),
            rgba(255, 255, 255, 0.04)
        );

    box-shadow:
        0 34px 85px rgba(0, 0, 0, 0.28),
        0 0 44px rgba(0, 217, 220, 0.08);

    transform:
        translateY(-7px)
        scale(1.025);
}


.dmxCTACardTop {
    top: 7%;
    left: 0;

    transform:
        rotateY(7deg)
        rotateZ(-3deg);

    animation:
        dmxCTACardTopFloat
        6.5s ease-in-out infinite;
}


.dmxCTACardCenter {
    top: 42%;
    right: -2%;

    transform:
        rotateY(-8deg)
        rotateZ(2deg);

    animation:
        dmxCTACardCenterFloat
        7.2s ease-in-out infinite;
}


.dmxCTACardBottom {
    bottom: 6%;
    left: 11%;

    transform:
        rotateY(5deg)
        rotateZ(2deg);

    animation:
        dmxCTACardBottomFloat
        7.8s ease-in-out infinite;
}


/* ============================================================
   Líneas de conexión
============================================================ */

.dmxCTALines {
    position: absolute;
    inset: 10%;
    z-index: 1;

    border-radius: 50%;

    border:
        1px solid rgba(0, 217, 220, 0.08);

    pointer-events: none;
}


.dmxCTALines::before,
.dmxCTALines::after {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 118%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0, 217, 220, 0.2),
            transparent
        );

    transform-origin: center;
}


.dmxCTALines::before {
    transform:
        translate(-50%, -50%)
        rotate(31deg);
}


.dmxCTALines::after {
    transform:
        translate(-50%, -50%)
        rotate(-38deg);
}


/* ============================================================
   Reveal
============================================================ */

.dmxCTA .reveal {
    opacity: 0;

    transform:
        translateY(52px)
        scale(0.985);

    transition:
        opacity 0.9s ease,
        transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}


.dmxCTA .reveal.isVisible,
.dmxCTA .reveal.visible,
.dmxCTA .reveal.is-visible,
.dmxCTA .reveal.active {
    opacity: 1;

    transform: none;
}


/* ============================================================
   Animaciones
============================================================ */

@keyframes dmxCTAOrbFloat {

    0%,
    100% {
        transform:
            translate(-50%, -50%)
            translateY(0)
            scale(1);
    }

    50% {
        transform:
            translate(-50%, -50%)
            translateY(-15px)
            scale(1.035);
    }

}


@keyframes dmxCTAOrbPulse {

    0%,
    100% {
        opacity: 0.65;

        transform: scale(0.98);
    }

    50% {
        opacity: 1;

        transform: scale(1.05);
    }

}


@keyframes dmxCTAOrbRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


@keyframes dmxCTACardTopFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotateY(7deg)
            rotateZ(-3deg);
    }

    50% {
        transform:
            translateY(-13px)
            rotateY(4deg)
            rotateZ(-1deg);
    }

}


@keyframes dmxCTACardCenterFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotateY(-8deg)
            rotateZ(2deg);
    }

    50% {
        transform:
            translateY(14px)
            rotateY(-4deg)
            rotateZ(0deg);
    }

}


@keyframes dmxCTACardBottomFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotateY(5deg)
            rotateZ(2deg);
    }

    50% {
        transform:
            translateY(-11px)
            rotateY(2deg)
            rotateZ(0deg);
    }

}


/* ============================================================
   Responsive
============================================================ */

@media (max-width: 1080px) {

    .dmxCTABox {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(330px, 0.8fr);

        gap: 45px;
    }


    .dmxCTACardTop {
        left: -5%;
    }


    .dmxCTACardCenter {
        right: -7%;
    }

}


@media (max-width: 900px) {

    .dmxCTABox {
        grid-template-columns: 1fr;

        min-height: 0;

        padding:
            64px 48px 44px;
    }


    .dmxCTAContent {
        max-width: 760px;
    }


    .dmxCTAVisual {
        min-height: 480px;

        margin-top: 14px;
    }


    .dmxCTAOrb {
        width:
            min(430px, 72vw);
    }


    .dmxCTACardTop {
        top: 9%;
        left: 8%;
    }


    .dmxCTACardCenter {
        top: 40%;
        right: 6%;
    }


    .dmxCTACardBottom {
        bottom: 5%;
        left: 17%;
    }

}


@media (max-width: 640px) {

    .dmxCTA {
        padding:
            90px 0;
    }


    .dmxCTABox {
        padding:
            52px 24px 32px;

        border-radius: 32px;
    }


    .dmxCTAContent h2 {
        font-size:
            clamp(42px, 12vw, 58px);
    }


    .dmxCTAContent > p {
        font-size: 14px;
    }


    .dmxCTAButtons {
        align-items: stretch;
        flex-direction: column;
    }


    .dmxPrimaryButton,
    .dmxSecondaryButton {
        width: 100%;

        justify-content: space-between;
    }


    .dmxCTAVisual {
        min-height: 430px;
    }


    .dmxCTAOrb {
        width:
            min(330px, 82vw);
    }


    .dmxCTACard {
        min-width: 172px;

        padding:
            17px 18px;
    }


    .dmxCTACardTop {
        top: 9%;
        left: 0;
    }


    .dmxCTACardCenter {
        top: 42%;
        right: 0;
    }


    .dmxCTACardBottom {
        bottom: 3%;
        left: 7%;
    }

}


@media (max-width: 430px) {

    .dmxCTABox {
        padding:
            46px 18px 25px;
    }


    .dmxCTAContent h2 {
        font-size: 39px;
    }


    .dmxCTAVisual {
        min-height: 395px;
    }


    .dmxCTACard {
        min-width: 154px;

        padding:
            15px 16px;

        border-radius: 17px;
    }


    .dmxCTACard strong {
        font-size: 15px;
    }


    .dmxCTACard span {
        font-size: 9px;
    }


    .dmxCTACardTop {
        left: -3%;
    }


    .dmxCTACardCenter {
        right: -3%;
    }


    .dmxCTACardBottom {
        left: 1%;
    }

}


/* ============================================================
   Reduced motion
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .dmxCTA .reveal {
        opacity: 1;

        transform: none;

        transition: none;
    }


    .dmxCTAOrb,
    .dmxCTAOrb::before,
    .dmxCTAOrb::after,
    .dmxCTACard {
        animation: none;
    }


    .dmxPrimaryButton,
    .dmxPrimaryButton::after,
    .dmxSecondaryButton,
    .dmxSecondaryButton::after,
    .dmxCTACard {
        transition: none;
    }

}