/* ─────────────────────────────────────────
   AI Managed Services Section
───────────────────────────────────────── */

.ai-services-section {
    background-color: var(--color-darkgrey);
    position: relative;
    overflow-x: clip;
    padding: max(60px, 5vw) 0;
}

/* ── Gradient Orbs ── */

.ai-orb {
    position: absolute;
    width: 80vw;
    pointer-events: none;
    z-index: 0;
}

.ai-orb img {
    width: 100%;
    height: auto;
    mix-blend-mode: screen;
    opacity: 0;
}

.ai-orb-left {
    left: -30vw;
    top: -15vw;
    animation: ais-orb-left 9s ease-in-out infinite alternate;
}

.ai-orb-right {
    right: -30vw;
    bottom: -15vw;
    animation: ais-orb-right 9s ease-in-out infinite alternate;
    animation-delay: -4.5s;
}

@keyframes ais-orb-left {
    0%   { transform: translate(0%, -15%); }
    40%  { transform: translate(14%, 30%); }
    100% { transform: translate(0%, 80%); }
}

@keyframes ais-orb-right {
    0%   { transform: translate(0%, 15%); }
    40%  { transform: translate(-14%, -30%); }
    100% { transform: translate(0%, -80%); }
}

/* ── Header ── */

.ai-services-header-wrap {
    position: relative;
    z-index: 1;
    margin-bottom: max(36px, 2.8vw);
}

.ai-services-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: max(10px, 0.7vw);
}

.ai-services-eyebrow {
    color: var(--overlay-text-color) !important;
    opacity: 1;
}

.ai-services-title {
    font-family: var(--font2);
    font-size: max(calc(38px * var(--heading-font-scale)), calc(2.7vw * var(--scale) * var(--heading-font-scale)));
    font-weight: 100;
    color: var(--overlay-text-color);
    line-height: 140%;
    text-transform: none;
    margin: 0;
}

.ai-services-sub {
    font-family: var(--font2);
    color: var(--overlay-text-color) !important;
    opacity: 0.55;
    text-transform: none !important;
    max-width: 80vw;
    text-align: center;
    margin: 0;
}

/* ── Feature Blocks ── */
/*
  Layout: section is 100vw (overflow:hidden clips lines at edges).
  Edge margin: 20vw from each side.
  Text width: ~22vw each.
  AI Implementation: text from 20vw→42vw; line from -3vw (off-screen)→42vw.
  DataOps:           text from 58vw→80vw; line from 58vw→103vw (off-screen).
*/

.ai-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: max(28px, 2.2vw);
    margin-bottom: max(36px, 2.8vw);
}

.ai-feature {
    display: flex;
    flex-direction: column;
    gap: max(8px, 0.55vw);
}

/* ── AI Implementation (left) ── */

.ai-feature-left .ai-feature-heading,
.ai-feature-left .ai-feature-desc {
    margin-left: 20vw;
    width: max(200px, 22vw);
}

/* Line: starts 3vw off-screen left, ends at right edge of text (20vw + 22vw = 42vw) */
.ai-feature-left .ai-feature-line {
    margin-left: -3vw;
    width: calc(23vw + max(200px, 22vw));
    transform-origin: left;
}

/* ── DataOps Management (right, mirrored) ── */

.ai-feature-right .ai-feature-heading,
.ai-feature-right .ai-feature-desc {
    margin-left: calc(100% - 20vw - max(200px, 22vw));
    width: max(200px, 22vw);
    text-align: right;
}

/* Line: starts at left edge of text (58vw), ends 3vw off-screen right */
.ai-feature-right .ai-feature-line {
    margin-left: calc(100% - 20vw - max(200px, 22vw));
    width: calc(23vw + max(200px, 22vw));
    transform-origin: right;
}

/* ── Shared line styles ── */

.ai-feature-line {
    height: 1px;
    border: none;
    border-top: none;
    background-image: radial-gradient(circle, rgba(255, 248, 238, 0.35) 1px, transparent 1px);
    background-size: 10px 1px;
    background-repeat: repeat-x;
    background-position: 0 0;
    height: 1px;
    transform: scaleX(0);
    will-change: transform;
}

.ai-feature-heading {
    font-family: var(--font2);
    font-size: max(20px, calc(1.7vw * var(--scale)));
    font-weight: 400;
    font-style: normal;
    color: var(--cyan);
    text-transform: none;
    letter-spacing: normal;
    line-height: 120%;
    margin: 0;
}

.ai-feature-desc {
    font-family: var(--font2);
    font-size: max(13px, calc(0.9vw * var(--scale)));
    line-height: 165%;
    color: var(--overlay-text-color);
    opacity: 0.6;
    margin: 0;
}

/* ── Stats Row ── */

.ai-stats-wrap {
    position: relative;
    z-index: 1;
    width: 80vw;
    margin: 0 auto;
}

.ai-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: max(16px, 1.2vw);
}

.ai-stat {
    display: flex;
    flex-direction: column;
    gap: max(10px, 0.7vw);
}

.ai-stat-top {
    display: flex;
    align-items: center;
    gap: max(10px, 0.7vw);
}

.ai-stat-icon {
    flex-shrink: 0;
    width: max(34px, 2.4vw);
    height: max(34px, 2.4vw);
    border: 1px solid rgba(255, 248, 238, 0.3);
    border-radius: max(6px, 0.4vw);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--overlay-text-color);
}

.ai-stat-icon svg {
    width: max(13px, 0.9vw);
    height: max(13px, 0.9vw);
}

.ai-stat-value {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.ai-stat-number {
    font-family: var(--font2);
    font-size: max(44px, calc(3.5vw * var(--scale)));
    font-weight: 100;
    color: var(--overlay-text-color);
    line-height: 1;
}

.ai-stat-pct {
    font-family: var(--font2);
    font-size: max(44px, calc(3.5vw * var(--scale)));
    font-weight: 100;
    color: var(--overlay-text-color);
    line-height: 1;
}

.ai-stat-desc {
    font-family: var(--font2);
    font-size: max(12px, calc(0.82vw * var(--scale)));
    line-height: 160%;
    color: var(--overlay-text-color);
    opacity: 0.55;
    margin: 0;
}

/* ── Responsive ── */

@media screen and (max-width: 1080px) {
    .ai-stats-wrap {
        width: 90vw;
    }

    .ai-stats-row {
        gap: max(28px, 2.5vw) max(20px, 1.5vw);
    }

    .ai-orb {
        width: 100vw;
    }
}

@media screen and (max-width: 767px) {
    .ai-services-section {
        padding: max(48px, 4vw) 0;
    }

    .ai-services-title {
        font-size: 24px;
        line-height: 110%;
    }

    .ai-feature-left .ai-feature-heading,
    .ai-feature-left .ai-feature-desc {
        margin-left: max(26px, 1.8vw);
        width: calc(100% - max(52px, 3.6vw));
    }

    .ai-feature-left .ai-feature-line {
        margin-left: -3vw;
        width: calc(max(26px, 1.8vw) + 3vw + calc(100% - max(52px, 3.6vw)));
    }

    .ai-feature-right .ai-feature-heading,
    .ai-feature-right .ai-feature-desc {
        margin-left: max(26px, 1.8vw);
        width: calc(100% - max(52px, 3.6vw));
        text-align: left;
    }

    .ai-feature-right .ai-feature-line {
        margin-left: -3vw;
        width: 103vw;
        transform-origin: left;
    }

    .ai-stats-wrap {
        width: 100%;
        padding: 0 max(26px, 1.8vw);
        box-sizing: border-box;
    }

    .ai-stats-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ai-stat-number,
    .ai-stat-pct {
        font-size: 36px;
    }
}
