/* Toonz AI Ecosystem Section - Cinematic Layout */

.toonz-ai-ecosystem-wrapper {
    position: relative;
    width: 100%;
    padding: 100px 0 150px;
    background-color: #000;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

.aie-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: bgGlowPulse 10s infinite ease-in-out;
    z-index: 1;
}

@keyframes bgGlowPulse {

    0%,
    100% {
        filter: brightness(0.7) contrast(1);
    }

    50% {
        filter: brightness(1.8) contrast(1.1);
    }
}

.aie-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

.aie-container {
    margin: 0 auto;
    padding: 0 3%;
    position: relative;
    z-index: 5;
}

/* --- Header --- */
.aie-header {
    text-align: center;
    margin-bottom: 80px;
}

.aie-tagline {
    font-size: 28px;
    letter-spacing: 4px;
    font-weight: 300;
    margin-bottom: 10px;
}

.aie-title {
    font-size: 90px;
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.aie-title .accent {
    color: #F87510;
}

/* --- Visual Structure --- */
.aie-visual-structure {
    position: relative;
    padding-top: 50px;
}

/* Grid */
.aie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 140px;
}

.aie-item-col {
    position: relative;
    height: 480px;
    transition: all 0.5s ease;
    animation: floatingItem 6s infinite ease-in-out;
}

/* Staggered Floating */
.aie-item-col.item-1 {
    animation-delay: 0s;
}

.aie-item-col.item-2 {
    animation-delay: 1s;
    animation-duration: 8s;
}

.aie-item-col.item-3 {
    animation-delay: 0.5s;
    animation-duration: 7s;
}

.aie-item-col.item-4 {
    animation-delay: 1.5s;
    animation-duration: 9s;
}

@keyframes floatingItem {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.aie-image-wrap {
    position: absolute;
    inset: 0 10px;
    overflow: hidden;
    transform: skewX(-8deg);
    /* The slanted look */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #111;
}

.aie-image-inner {
    position: absolute;
    inset: 0;
    transform: skewX(8deg) scale(1.1);
    /* Counter skew for image */
    transition: transform 0.8s ease;
}

.aie-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.aie-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
}

.aie-content {
    position: absolute;
    bottom: 0;
    left: -29px;
    width: 100%;
    padding: 50px;
    text-align: center;
    z-index: 10;
}

.aie-icon-box {
    width: 60px;
    height: 60px;
    border: 1.5px solid #F87510;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #F87510;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 20px rgba(248, 117, 16, 0.2);
}

.aie-icon-box svg,
.aie-custom-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.aie-item-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #fff;
}

.aie-item-desc {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    max-width: 250px;
    margin: 0 auto;
}

/* Hover Effects */
.aie-item-col:hover .aie-image-inner {
    transform: skewX(8deg) scale(1.2);
}

.aie-item-col:hover .aie-image-wrap {
    filter: brightness(1.2);
    border-color: rgba(248, 117, 16, 0.4);
}

/* --- Responsiveness --- */
@media (max-width: 1400px) {
    .aie-title {
        font-size: 70px;
    }

    .aie-branches {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .aie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .aie-image-wrap {
        transform: none;
    }

    .aie-image-inner {
        transform: scale(1.1);
    }

    .aie-item-col:hover .aie-image-inner {
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .aie-title {
        font-size: 42px;
    }

    .aie-grid {
        grid-template-columns: 1fr;
    }

    .aie-tagline {
        font-size: 18px;
    }
}