.ai-saas-services-page {
    position: relative;
    overflow-x: clip;
    isolation: isolate;
}

.ai-saas-services-page::before,
.ai-saas-services-page::after {
    position: fixed;
    z-index: 0;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    content: "";
    pointer-events: none;
    filter: blur(10px);
    opacity: 0.18;
    animation: ai-service-ambient 18s ease-in-out infinite alternate;
}

.ai-saas-services-page::before {
    top: 10rem;
    right: -15rem;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.44), transparent 68%);
}

.ai-saas-services-page::after {
    bottom: 12rem;
    left: -18rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);
    animation-delay: -8s;
}

.ai-saas-services-page > header {
    z-index: 50;
}

.ai-saas-services-page > main,
.ai-saas-services-page > footer {
    position: relative;
    z-index: 1;
}

.ai-service-header {
    animation: ai-service-header-in 0.7s ease-out both;
}

.ai-service-hero-copy > * {
    animation: ai-service-rise 0.72s cubic-bezier(0.2, 0.78, 0.25, 1) both;
}

.ai-service-hero-copy > :nth-child(1) { animation-delay: 0.08s; }
.ai-service-hero-copy > :nth-child(2) { animation-delay: 0.16s; }
.ai-service-hero-copy > :nth-child(3) { animation-delay: 0.24s; }
.ai-service-hero-copy > :nth-child(4) { animation-delay: 0.32s; }
.ai-service-hero-copy > :nth-child(5) { animation-delay: 0.4s; }

.ai-service-hero-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 26px 70px rgba(0, 8, 18, 0.3);
    animation: ai-service-card-in 0.82s 0.24s cubic-bezier(0.2, 0.78, 0.25, 1) both;
}

.ai-service-hero-card::before {
    position: absolute;
    inset: -45% 18% 38%;
    z-index: -1;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.17), transparent 67%);
    content: "";
    animation: ai-service-orbit 14s linear infinite;
}

.ai-service-hero-card::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.045) 48%, transparent 72%);
    content: "";
    transform: translateX(-120%);
    animation: ai-service-shimmer 7s 1.4s ease-in-out infinite;
}

.ai-service-portrait {
    width: 12.375rem;
    height: 15.46875rem;
    max-width: 72vw;
    border: 0;
    border-radius: 2.5rem;
    object-fit: cover;
    object-position: center 34%;
    opacity: 0.94;
    filter: saturate(0.86) contrast(0.96) brightness(0.94) drop-shadow(0 18px 28px rgba(0, 8, 18, 0.28));
    -webkit-mask-image: radial-gradient(ellipse 76% 82% at 50% 43%, #000 50%, rgba(0, 0, 0, 0.96) 64%, rgba(0, 0, 0, 0.5) 80%, transparent 100%);
    mask-image: radial-gradient(ellipse 76% 82% at 50% 43%, #000 50%, rgba(0, 0, 0, 0.96) 64%, rgba(0, 0, 0, 0.5) 80%, transparent 100%);
    transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
}

.ai-service-hero-card:hover .ai-service-portrait {
    transform: translateY(-2px) scale(1.015);
    opacity: 1;
    filter: saturate(0.92) contrast(0.98) brightness(0.98) drop-shadow(0 22px 34px rgba(0, 8, 18, 0.34));
}

.ai-service-section-nav {
    animation: ai-service-rise 0.7s 0.52s ease-out both;
}

.ai-service-section-nav a {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(8px);
}

.ai-service-section-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 193, 157, 0.1);
}

.ai-service-card,
.ai-service-project,
.ai-service-boundary,
.ai-service-step,
.ai-service-faq,
.ai-service-cta {
    transition: transform 0.32s ease, border-color 0.32s ease, background 0.32s ease, box-shadow 0.32s ease;
}

.ai-service-card {
    position: relative;
    overflow: hidden;
}

.ai-service-card::before {
    position: absolute;
    top: 0;
    left: 1.5rem;
    width: 3.5rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2dd4bf, rgba(45, 212, 191, 0));
    content: "";
    transition: width 0.32s ease;
}

.ai-service-card:hover,
.ai-service-boundary:hover,
.ai-service-step:hover,
.ai-service-faq:hover {
    transform: translateY(-6px);
    border-color: rgba(45, 212, 191, 0.48);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 20px 44px rgba(0, 8, 18, 0.22);
}

.ai-service-card:hover::before {
    width: calc(100% - 3rem);
}

.ai-service-project {
    position: relative;
    box-shadow: 0 18px 45px rgba(0, 8, 18, 0.18);
}

.ai-service-project img {
    transition: transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1), filter 0.4s ease;
}

.ai-service-project:hover {
    transform: translateY(-8px);
    border-color: rgba(45, 212, 191, 0.48);
    box-shadow: 0 28px 58px rgba(0, 8, 18, 0.3);
}

.ai-service-project:hover img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.02);
}

.ai-service-boundary:hover h3 {
    transform: translateX(4px);
}

.ai-service-boundary h3 {
    transition: color 0.24s ease, transform 0.24s ease;
}

.ai-service-step {
    position: relative;
    overflow: hidden;
}

.ai-service-step::after {
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 7rem;
    height: 7rem;
    border: 1px solid rgba(45, 212, 191, 0.12);
    border-radius: 50%;
    content: "";
    transition: transform 0.42s ease, border-color 0.42s ease;
}

.ai-service-step:hover::after {
    transform: scale(1.2);
    border-color: rgba(45, 212, 191, 0.3);
}

.ai-service-cta {
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 8, 18, 0.25);
}

.ai-service-cta::before {
    position: absolute;
    inset: -80% -20%;
    background: conic-gradient(from 180deg, transparent, rgba(45, 212, 191, 0.12), transparent 35%);
    content: "";
    animation: ai-service-orbit 16s linear infinite;
    pointer-events: none;
}

.ai-service-cta > * {
    position: relative;
}

@supports (animation-timeline: view()) {
    .ai-service-reveal > div {
        animation: ai-service-scroll-reveal linear both;
        animation-timeline: view();
        animation-range: entry 4% cover 28%;
    }
}

@keyframes ai-service-header-in {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-service-rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-service-card-in {
    from { opacity: 0; transform: translateY(22px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ai-service-scroll-reveal {
    from { opacity: 0.2; transform: translateY(34px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-service-ambient {
    from { transform: translate3d(-2%, -3%, 0) scale(0.92); }
    to { transform: translate3d(5%, 4%, 0) scale(1.08); }
}

@keyframes ai-service-orbit {
    to { transform: rotate(360deg); }
}

@keyframes ai-service-shimmer {
    0%, 72%, 100% { transform: translateX(-120%); }
    88% { transform: translateX(120%); }
}

@media (max-width: 767px) {
    .ai-saas-services-page::before,
    .ai-saas-services-page::after {
        width: 22rem;
        height: 22rem;
        opacity: 0.14;
    }

    .ai-service-card:hover,
    .ai-service-project:hover,
    .ai-service-boundary:hover,
    .ai-service-step:hover,
    .ai-service-faq:hover {
        transform: translateY(-3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-saas-services-page::before,
    .ai-saas-services-page::after,
    .ai-service-header,
    .ai-service-hero-copy > *,
    .ai-service-hero-card,
    .ai-service-hero-card::before,
    .ai-service-hero-card::after,
    .ai-service-section-nav,
    .ai-service-reveal > div,
    .ai-service-cta::before,
    .ai-saas-services-page .animate-talk {
        animation: none !important;
    }

    .ai-service-card,
    .ai-service-project,
    .ai-service-project img,
    .ai-service-boundary,
    .ai-service-boundary h3,
    .ai-service-step,
    .ai-service-faq,
    .ai-service-section-nav a {
        transition: none !important;
    }

    .ai-service-card:hover,
    .ai-service-project:hover,
    .ai-service-boundary:hover,
    .ai-service-step:hover,
    .ai-service-faq:hover,
    .ai-service-project:hover img,
    .ai-service-boundary:hover h3,
    .ai-service-section-nav a:hover {
        transform: none !important;
    }
}
