/* =========================================================
   DM STUDIO AI
   PUBLIC HOME - CREATIVE PATHWAYS SHOWCASE
========================================================= */

.dm-pathways-showcase {
    position: relative;
    width: min(90%, 1500px);
    margin: 72px auto;
    padding: clamp(34px, 5vw, 72px);
    overflow: hidden;
    border: 1px solid rgba(112, 109, 238, 0.14);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 15%, rgba(223, 220, 255, 0.78), transparent 34%),
        radial-gradient(circle at 86% 78%, rgba(197, 240, 255, 0.70), transparent 34%),
        linear-gradient(135deg, #f8f7ff 0%, #f5f8ff 50%, #f2fbff 100%);
    box-shadow: 0 26px 70px rgba(50, 56, 120, 0.10);
    isolation: isolate;
}

.dm-pathways-showcase-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
    gap: clamp(36px, 6vw, 90px);
    align-items: center;
}

.dm-pathways-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
    opacity: 0.65;
}

.dm-pathways-glow-one {
    width: 300px;
    height: 300px;
    top: -120px;
    left: -90px;
    background: rgba(149, 129, 255, 0.18);
}

.dm-pathways-glow-two {
    width: 340px;
    height: 340px;
    right: -120px;
    bottom: -160px;
    background: rgba(74, 199, 229, 0.16);
}

.dm-pathways-copy {
    text-align: left;
}

.dm-pathways-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    padding: 8px 13px;
    border: 1px solid rgba(109, 94, 238, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #6760df;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dm-pathways-kicker span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c68f4, #62a8ff);
    color: #ffffff;
    box-shadow: 0 5px 16px rgba(98, 92, 232, 0.22);
}

.dm-pathways-copy h2 {
    margin: 0;
    max-width: 680px;
    color: #11173f;
    font-size: clamp(2.3rem, 4.2vw, 4.3rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.dm-pathways-copy h2 span {
    display: block;
    margin-top: 8px;
    background: linear-gradient(90deg, #6c62f2 0%, #7074ff 48%, #55a4f3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dm-pathways-intro {
    max-width: 650px;
    margin: 24px 0 0;
    color: #5f6688;
    font-size: clamp(1rem, 1.45vw, 1.18rem);
    line-height: 1.75;
}

.dm-pathways-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.dm-pathways-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
    color: #5e6380;
    font-size: 0.85rem;
    line-height: 1.25;
}

.dm-pathways-benefit strong {
    display: block;
    color: #30365d;
    font-size: 0.88rem;
}

.dm-pathways-benefit-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(111, 101, 240, 0.10);
}

.dm-pathways-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.dm-pathways-primary-action,
.dm-pathways-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    transition:
        box-shadow 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.dm-pathways-primary-action {
    background: linear-gradient(135deg, #665ef0, #7b6ff4);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(94, 84, 224, 0.20);
}

.dm-pathways-secondary-action {
    border: 1px solid rgba(106, 100, 221, 0.18);
    background: rgba(255, 255, 255, 0.70);
    color: #4f56a6;
}

.dm-pathways-primary-action:hover,
.dm-pathways-primary-action:focus-visible {
    box-shadow:
        0 0 0 4px rgba(107, 99, 237, 0.10),
        0 14px 34px rgba(94, 84, 224, 0.26);
}

.dm-pathways-secondary-action:hover,
.dm-pathways-secondary-action:focus-visible {
    border-color: rgba(106, 100, 221, 0.34);
    background: #ffffff;
}

.dm-pathways-primary-action:focus-visible,
.dm-pathways-secondary-action:focus-visible {
    outline: 3px solid rgba(90, 116, 255, 0.22);
    outline-offset: 3px;
}

.dm-pathways-visual {
    position: relative;
    min-height: 600px;
    border-radius: 30px;
    isolation: isolate;
}


/* =========================================================
   CENTRAL PIXEL ARTWORK
========================================================= */

.dm-pathways-pixel {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;

    width: clamp(280px, 30vw, 390px);

    transform: translate(-50%, -50%);

    pointer-events: none;

    animation:
        dmPixelFloat 5s ease-in-out infinite;
}


.dm-pathways-pixel-glow {
    position: absolute;
    inset: 12%;

    z-index: -1;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(113, 101, 240, 0.28) 0%,
            rgba(75, 185, 246, 0.16) 44%,
            transparent 72%
        );

    filter: blur(28px);

    animation:
        dmPixelGlow 3.8s ease-in-out infinite;
}


.dm-pathways-pixel-image {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 24px 38px rgba(66, 67, 162, 0.18)
        );

    animation:
        dmPixelBreath 5.5s ease-in-out infinite;
}


/* =========================================================
   PATHWAY CARDS
========================================================= */

.dm-pathway-card {
    position: absolute;
    z-index: 4;

    width: min(245px, 38%);

    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 20px;

    border: 1px solid rgba(109, 104, 216, 0.10);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.92);

    box-shadow:
        0 18px 48px rgba(59, 63, 125, 0.12);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        box-shadow 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;

    animation:
        dmPathwayCardFloat 6s ease-in-out infinite;
}


.dm-pathway-card:hover,
.dm-pathway-card:focus-within {
    border-color: rgba(109, 104, 216, 0.20);

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 22px 54px rgba(59, 63, 125, 0.16);
}


.dm-pathway-card-icon {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 50px;
    height: 50px;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(115, 101, 241, 0.13),
            rgba(86, 170, 244, 0.12)
        );

    font-size: 1.65rem;
}


.dm-pathway-card h3 {
    margin: 4px 0 8px;

    color: #1b2149;

    font-size: 1rem;
    line-height: 1.25;
}


.dm-pathway-card p {
    margin: 0;

    color: #747b98;

    font-size: 0.86rem;
    line-height: 1.55;
}


/* =========================================================
   CARD POSITIONS
   Keep a clean empty zone around Pixel.
========================================================= */

.dm-pathway-card-video {
    left: 0;
    top: 5%;
}


.dm-pathway-card-design {
    right: 0;
    top: 5%;

    animation-delay: 0.5s;
}


.dm-pathway-card-animation {
    left: 0;
    bottom: 5%;

    animation-delay: 0.9s;
}


.dm-pathway-card-story {
    right: 0;
    bottom: 5%;

    animation-delay: 1.3s;
}


/* =========================================================
   REVEAL / PROGRESSIVE ENHANCEMENT
========================================================= */

.js .dm-pathways-reveal {
    opacity: 0;
    transform: translateY(18px);

    transition:
        opacity 650ms ease,
        transform 650ms ease;
}


.js .dm-pathways-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.js .dm-pathway-card {
    transition:
        opacity 520ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}


.js .dm-pathways-visual:not(.is-visible) .dm-pathway-card {
    opacity: 0;
}


.js .dm-pathways-visual.is-visible .dm-pathway-card {
    opacity: 1;
}


.js .dm-pathways-visual.is-visible .dm-pathway-card-design {
    transition-delay: 80ms;
}


.js .dm-pathways-visual.is-visible .dm-pathway-card-animation {
    transition-delay: 160ms;
}


.js .dm-pathways-visual.is-visible .dm-pathway-card-story {
    transition-delay: 240ms;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes dmPixelFloat {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            translateY(0);
    }

    50% {
        transform:
            translate(-50%, -50%)
            translateY(-10px);
    }
}


@keyframes dmPixelGlow {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}


@keyframes dmPixelBreath {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}


@keyframes dmPathwayCardFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* =========================================================
   LARGE TABLET / SMALL LAPTOP
========================================================= */

@media (max-width: 1180px) {

    .dm-pathways-showcase-inner {
        grid-template-columns: 1fr;
    }

    .dm-pathways-copy {
        max-width: 820px;
    }

    .dm-pathways-visual {
        min-height: 620px;
        margin-top: 16px;
    }

    .dm-pathways-pixel {
        width: clamp(300px, 42vw, 390px);
    }

    .dm-pathway-card {
        width: min(255px, 34%);
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .dm-pathways-visual {
        min-height: 660px;
    }

    .dm-pathways-pixel {
        width: min(46vw, 340px);
    }

    .dm-pathway-card {
        width: 230px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {

    .dm-pathways-showcase {
        width: calc(100% - 28px);
        margin: 44px auto;
        padding: 30px 20px;

        border-radius: 26px;
    }

    .dm-pathways-copy h2 {
        font-size: clamp(2.05rem, 12vw, 3.25rem);
    }

    .dm-pathways-benefits {
        grid-template-columns: 1fr;
    }

    .dm-pathways-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dm-pathways-primary-action,
    .dm-pathways-secondary-action {
        width: 100%;
    }


    /*
     * Mobile uses normal document flow rather than absolute positioning.
     * This guarantees that no card can cover Pixel.
     */
    .dm-pathways-visual {
        min-height: 0;
        margin-top: 28px;

        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;

        align-items: stretch;
    }


    .dm-pathways-pixel {
        position: relative;

        left: auto;
        top: auto;

        grid-column: 1 / -1;

        width: min(82vw, 320px);

        margin: 4px auto 14px;

        transform: none;

        justify-self: center;

        animation:
            dmPixelFloatMobile 5s ease-in-out infinite;
    }


    .dm-pathway-card {
        position: relative;

        left: auto;
        right: auto;
        top: auto;
        bottom: auto;

        width: 100%;
        min-height: 160px;

        padding: 16px;

        flex-direction: column;

        animation: none;
    }


    .dm-pathway-card-video,
    .dm-pathway-card-design,
    .dm-pathway-card-animation,
    .dm-pathway-card-story {
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 500px) {

    .dm-pathways-visual {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    .dm-pathways-pixel {
        width: min(88vw, 300px);
    }


    .dm-pathway-card {
        min-height: 0;

        display: grid;
        grid-template-columns: auto 1fr;

        align-items: center;
        gap: 12px;

        padding: 15px 16px;
    }


    .dm-pathway-card-icon {
        width: 44px;
        height: 44px;

        font-size: 1.35rem;
    }


    .dm-pathway-card h3 {
        margin: 0 0 4px;

        font-size: 0.96rem;
    }


    .dm-pathway-card p {
        font-size: 0.8rem;
        line-height: 1.45;
    }

}


/* =========================================================
   MOBILE PIXEL FLOAT
========================================================= */

@keyframes dmPixelFloatMobile {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .dm-pathways-showcase *,
    .dm-pathways-showcase *::before,
    .dm-pathways-showcase *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }


    .js .dm-pathways-reveal,
    .js .dm-pathways-reveal.is-visible,
    .js .dm-pathways-visual:not(.is-visible) .dm-pathway-card,
    .js .dm-pathways-visual.is-visible .dm-pathway-card {
        opacity: 1 !important;
        transform: none !important;
    }

}
