.home-ai-services {
    padding: 62px 0 48px;
    background: #f5f8ff;
}

.home-ai-services__content {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1200px;
    margin: 0 auto;
}

.home-ai-services__cover {
    display: block;
    width: 100%;
    height: auto;
}

.home-ai-services__scene {
    position: relative;
    isolation: isolate;
    container-type: inline-size;
}

.home-ai-services__cards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-ai-services__item {
    --ai-divider: #8294ff;
    min-width: 0;
}

.home-ai-services__item--platform { --ai-divider: #6374ff; }
.home-ai-services__item--factory { --ai-divider: #a1c5ff; }
.home-ai-services__item--fde { --ai-divider: #8ca3ff; }

.home-ai-services__card {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    display: flex;
    height: 100%;
    min-height: 196px;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px 22px;
    color: #091a45;
    text-align: center;
    text-decoration: none;
    outline-offset: 3px;
    filter: drop-shadow(0 5px 9px #a9c9ff65);
    transition: transform 240ms ease, filter 240ms ease;
}

.home-ai-services__card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 22px;
    background: radial-gradient(ellipse at 38% 62%, #ffffffad, transparent 76%), linear-gradient(#e3ecff, #fafcff);
    content: '';
}

.home-ai-services__card:focus-visible {
    outline: 2px solid #405be2;
    border-radius: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .home-ai-services__card:hover {
        transform: translateY(-6px);
        filter: drop-shadow(0 10px 13px #6e9aed77);
    }
}

.home-ai-services__card:is(a:hover, a:focus-visible) h4 { color: #294dc4; }

.home-ai-services__icon {
    display: block;
    width: 58px;
    height: 58px;
    margin-bottom: 5px;
    object-fit: contain;
}

.home-ai-services__card h4 {
    color: #091a45;
    font-size: clamp(15px, 2.45cqw, 21px);
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

.home-ai-services__card h4::after {
    content: '';
    display: block;
    width: 43px;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(90deg, #676dff, var(--ai-divider));
    margin: 10px auto 11px;
}

.home-ai-services__card p {
    margin: 0;
    color: #515e77;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.52;
}

.home-ai-services__line-break { display: none; }

.home-ai-services__stage {
    position: relative;
    z-index: 2;
    height: clamp(124px, 28cqw, 182px);
    margin-top: 8px;
    pointer-events: none;
}

.home-ai-services__stage::before,
.home-ai-services__stage::after,
.home-ai-services__glow {
    position: absolute;
    border-radius: 50%;
    content: '';
}

.home-ai-services__stage::before {
    inset: 37% 0 0;
    background: linear-gradient(#f1f6ff, #dae7ff);
}

.home-ai-services__stage::after {
    inset: 43% 6% 7%;
    background: linear-gradient(#f8fbff, #edf4ff);
}

.home-ai-services__glow {
    z-index: 1;
    inset: 49% 22% 13%;
    background: radial-gradient(ellipse at 50% 88%, #f4fbff, transparent 75%), linear-gradient(90deg, #bfd4ff, #edf7ff, #bfd4ff);
}

.home-ai-services__device {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    width: clamp(200px, 52%, 344px);
    height: auto;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .home-ai-services__scene { aspect-ratio: 1200 / 421; }

    .home-ai-services__cards {
        grid-template-columns: 260fr 260fr 257fr 257fr;
        align-items: start;
        gap: 1.6cqw;
        padding: 1.25cqw 4.58cqw 0;
    }

    .home-ai-services__card {
        height: 20cqw;
        min-height: 0;
        padding: 1.35cqw 1.2cqw 0;
    }

    .home-ai-services__card::before {
        border-radius: 0;
        clip-path: polygon(9.62% 6.25%, 32.74% 3.52%, 54.04% 1.56%, 73.51% 0.39%,
            91.15% 0%, 95.02% 0.68%, 97.79% 2.71%, 99.45% 6.09%, 100% 10.83%,
            100% 84.17%, 99.5% 87.5%, 97.98% 90%, 95.46% 91.67%, 91.92% 92.5%,
            9.62% 99.17%, 5.41% 99.09%, 2.4% 97.6%, 0.6% 94.71%, 0% 90.42%,
            0% 17.5%, 0.6% 13.2%, 2.4% 9.9%, 5.41% 7.58%);
    }

    .home-ai-services__item:nth-child(odd):not(:first-child) .home-ai-services__card::before,
    .home-ai-services__item:last-child .home-ai-services__card::before { transform: scaleX(-1); }

    .home-ai-services__item:is(:first-child, :last-child) { margin-top: 2.83cqw; }

    .home-ai-services__item:is(:first-child, :last-child) .home-ai-services__card {
        height: 22.08cqw;
        padding-top: 2cqw;
    }

    .home-ai-services__item:is(:first-child, :last-child) .home-ai-services__card::before {
        clip-path: polygon(10% 14.72%, 27.07% 10.85%, 45.96% 7.17%, 66.68% 3.68%,
            89.23% 0.38%, 93.77% 0.38%, 97.02% 1.89%, 98.97% 4.91%, 99.62% 9.43%,
            99.62% 77.74%, 99.09% 80.5%, 97.5% 82.74%, 94.86% 84.46%, 91.15% 85.66%,
            10% 99.62%, 5.63% 99.95%, 2.5% 98.68%, 0.63% 95.8%, 0% 91.32%,
            0% 26.42%, 0.63% 22.15%, 2.5% 18.77%, 5.63% 16.3%);
    }

    .home-ai-services__icon {
        width: 6.4cqw;
        height: 6.1cqw;
        margin-bottom: .45cqw;
    }

    .home-ai-services__item:is(:first-child, :last-child) .home-ai-services__icon { height: 6.35cqw; }
    .home-ai-services__card h4 { font-size: clamp(17px, 1.75cqw, 21px); }
    .home-ai-services__item:is(:first-child, :last-child) h4 { font-size: clamp(18px, 1.83cqw, 22px); }
    .home-ai-services__card h4::after { margin: .75cqw auto .9cqw; }
    .home-ai-services__card p { font-size: clamp(12px, 1.175cqw, 14.1px); }

    .home-ai-services__stage {
        position: absolute;
        inset: 50.8% 4.17% 4%;
        height: auto;
        margin: 0;
    }

    .home-ai-services__stage::before { inset: 29% 0 0; }
    .home-ai-services__stage::after { inset: 36% 5.9% 7%; }
    .home-ai-services__glow { inset: 42% 21.7% 14%; }
    .home-ai-services__device { width: 31.27%; }
}

@media (min-width: 1232px) {
    .home-ai-services__line-break { display: initial; }
}

@media (max-width: 767px) {
    .home-ai-services { padding: 20px 0 30px; }
    .home-ai-services .comm-v2-title { margin-bottom: 16px; }
}

@media (max-width: 360px) {
    .home-ai-services__cards { grid-template-columns: minmax(0, 1fr); }
    .home-ai-services__card { min-height: 0; }
}

@keyframes home-ai-services-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    .home-ai-services [data-ai-service-reveal].is-visible {
        animation: home-ai-services-enter 520ms cubic-bezier(.2, .7, .3, 1) var(--ai-delay, 0ms) backwards;
    }
    .home-ai-services [data-ai-service-reveal]:focus-within { animation: none; }
    .home-ai-services__item:nth-child(2) { --ai-delay: 75ms; }
    .home-ai-services__item:nth-child(3) { --ai-delay: 150ms; }
    .home-ai-services__item:nth-child(4) { --ai-delay: 225ms; }
    .home-ai-services__stage { --ai-delay: 180ms; }
}

@media (prefers-reduced-motion: reduce) {
    .home-ai-services__card { transition: none; }
    .home-ai-services__card:hover { transform: none; }
}
