/* DevArise home hero — full-bleed, softly blended background carousel. */
.cerebras-theme .hero.hero-with-carousel {
    --hero-ink: #17162f;
    --hero-accent: var(--brand-accent, #dd7646);
    --hero-accent-dark: var(--brand-accent-hover, #dd7646);
    --hero-green: #5fca86;
    position: relative !important;
    min-height: min(780px, calc(100dvh - 74px)) !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    text-align: left !important;
    isolation: isolate;
}

.cerebras-theme .hero.hero-with-carousel::before,
.cerebras-theme .hero.hero-with-carousel::after {
    display: none !important;
    content: none !important;
}

.cerebras-theme .hero .hero-layout {
    position: relative !important;
    z-index: 1 !important;
    width: min(calc(100% - 72px), 1280px) !important;
    max-width: 1280px !important;
    min-height: min(780px, calc(100dvh - 74px)) !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 auto !important;
    padding: clamp(64px, 7vw, 96px) 0 clamp(72px, 8vw, 104px) !important;
    box-sizing: border-box !important;
}

.hero-copy {
    position: relative;
    z-index: 3;
    width: min(50%, 610px);
    transform: translateY(-8px);
}

.cerebras-theme .hero .hero-copy .hero-badge-pill {
    margin: 0 0 22px !important;
    padding: 8px 14px !important;
    border: 1px solid rgba(29, 28, 57, 0.14) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    color: #525266 !important;
    box-shadow: 0 8px 30px rgba(29, 28, 57, 0.06) !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.hero-badge-spark {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--hero-green);
    box-shadow: 0 0 0 5px rgba(95, 202, 134, 0.14);
}

.cerebras-theme .hero .hero-copy h1 {
    max-width: 610px !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    color: var(--hero-ink) !important;
    font-size: clamp(3rem, 4.65vw, 4.55rem) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.05em !important;
    text-wrap: balance !important;
}

.hero-accent {
    display: inline;
    color: var(--hero-accent);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
}

.hero-title-line {
    display: block;
    width: max-content;
    max-width: 100%;
    padding-bottom: 0.06em;
}

.hero-title-line + .hero-title-line {
    margin-top: 0.055em;
}

.cerebras-theme .hero .hero-copy .hero-sub {
    max-width: 535px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #5c5b70 !important;
    font-size: clamp(1rem, 1.5vw, 1.14rem) !important;
    line-height: 1.68 !important;
    text-wrap: pretty !important;
}

.cerebras-theme .hero .hero-copy .hero-actions {
    justify-content: flex-start !important;
    margin: 28px 0 0 !important;
    gap: 12px !important;
}

.cerebras-theme .hero .hero-copy .hero-actions .btn {
    min-height: 50px !important;
    padding-inline: 22px !important;
}

.cerebras-theme .hero .hero-copy .hero-actions .btn-primary {
    border-color: var(--hero-ink) !important;
    background: var(--hero-ink) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(29, 28, 57, 0.16) !important;
}

.cerebras-theme .hero .hero-copy .hero-actions .btn-primary:hover {
    border-color: #2b2948 !important;
    background: #2b2948 !important;
    color: #ffffff !important;
}

.cerebras-theme .hero .hero-copy .hero-actions .btn-primary span {
    display: inline-block;
    margin-left: 7px;
    transition: transform 180ms ease;
}

.cerebras-theme .hero .hero-copy .hero-actions .btn-primary:hover span {
    transform: translateX(3px);
}

.cerebras-theme .hero .hero-copy .hero-footnote {
    display: flex !important;
    align-items: center;
    gap: 22px;
    margin: 20px 0 0 !important;
    padding: 0 !important;
    color: #6f6e7f !important;
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    letter-spacing: 0.05em !important;
}

.hero-footnote span {
    position: relative;
    padding-left: 15px;
}

.hero-footnote span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hero-green);
    transform: translateY(-50%);
}

/* The image begins behind the copy and extends to the viewport edge, like the reference. */
.hero-gallery-shell {
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 28%;
    right: calc((100vw - 100%) / -2);
    pointer-events: none;
}

.hero-carousel,
.hero-carousel-viewport {
    position: absolute;
    inset: 0;
}

.hero-carousel-viewport {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    transition:
        opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 3000ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 800ms;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0s;
}

.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.92;
    filter: saturate(0.88) contrast(0.96) brightness(1.03);
}

/* Wide left dissolve, shorter bottom dissolve, and nearly untouched right edge. */
.hero-carousel-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg,
            #fff 0%,
            rgba(255, 255, 255, 0.99) 13%,
            rgba(255, 255, 255, 0.90) 25%,
            rgba(255, 255, 255, 0.66) 37%,
            rgba(255, 255, 255, 0.30) 49%,
            rgba(255, 255, 255, 0.08) 59%,
            transparent 68%),
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.12) 0%,
            transparent 18%,
            transparent 66%,
            rgba(255, 255, 255, 0.30) 78%,
            rgba(255, 255, 255, 0.78) 91%,
            #fff 100%);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .cerebras-theme .hero .hero-copy h1 {
        font-size: clamp(2.7rem, 5.5vw, 3.8rem) !important;
    }

    .hero-gallery-shell {
        left: 24%;
    }
}

@media (max-width: 820px) {
    .cerebras-theme .hero.hero-with-carousel {
        min-height: auto !important;
    }

    .cerebras-theme .hero .hero-layout {
        width: min(calc(100% - 36px), 680px) !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        padding: clamp(36px, 6vw, 52px) 0 48px !important;
    }

    .hero-copy {
        order: 1;
        width: 100%;
        max-width: 620px;
        margin-inline: auto;
        transform: none;
        text-align: center;
    }

    .cerebras-theme .hero .hero-copy .hero-badge-pill {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .cerebras-theme .hero .hero-copy h1 {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .hero-title-line {
        margin-right: auto;
        margin-left: auto;
    }

    .cerebras-theme .hero .hero-copy .hero-sub {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .cerebras-theme .hero .hero-copy .hero-actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
    }

    .cerebras-theme .hero .hero-copy .hero-actions .btn {
        width: auto !important;
        max-width: none !important;
    }

    .hero-gallery-shell {
        position: relative;
        order: 2;
        align-self: center;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100vw;
        height: clamp(230px, 50vw, 360px);
        margin: clamp(24px, 5vw, 36px) 0 0;
        transform: none;
    }

    .cerebras-theme .hero .hero-copy .hero-footnote {
        justify-content: center;
    }

    .hero-carousel-viewport::after {
        background:
            linear-gradient(90deg,
                #fff 0%,
                rgba(255, 255, 255, 0.35) 7%,
                transparent 17%,
                transparent 86%,
                rgba(255, 255, 255, 0.25) 95%,
                #fff 100%),
            linear-gradient(180deg,
                #fff 0%,
                rgba(255, 255, 255, 0.70) 11%,
                transparent 28%,
                transparent 65%,
                rgba(255, 255, 255, 0.42) 78%,
                rgba(255, 255, 255, 0.84) 91%,
                #fff 100%);
    }
}

@media (max-width: 520px) {
    .cerebras-theme .hero .hero-layout {
        width: calc(100% - 28px) !important;
        padding: 22px 0 34px !important;
    }

    .cerebras-theme .hero .hero-copy .hero-badge-pill {
        max-width: 100% !important;
        margin-bottom: 14px !important;
        padding: 7px 12px !important;
        border-radius: 999px !important;
        font-size: 0.64rem !important;
    }

    .cerebras-theme .hero .hero-copy h1 {
        margin-bottom: 16px !important;
        font-size: clamp(2.1rem, 10.7vw, 2.65rem) !important;
        line-height: 1.06 !important;
    }

    .hero-title-line {
        width: auto;
    }

    .hero-title-line + .hero-title-line {
        margin-top: 0.025em;
    }

    .cerebras-theme .hero .hero-copy .hero-sub {
        max-width: 35ch !important;
        font-size: 0.92rem !important;
        line-height: 1.5 !important;
    }

    .cerebras-theme .hero .hero-copy .hero-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        margin-top: 22px !important;
        gap: 10px !important;
    }

    .cerebras-theme .hero .hero-copy .hero-actions .btn {
        width: 100% !important;
        max-width: none !important;
        min-height: 48px !important;
    }

    .cerebras-theme .hero .hero-copy .hero-footnote {
        flex-wrap: wrap;
        gap: 8px 16px;
        margin-top: 16px !important;
        font-size: 0.68rem !important;
    }

    .hero-gallery-shell {
        height: clamp(230px, 62vw, 290px);
        min-height: 230px;
        margin-top: 16px;
        margin-bottom: 0;
    }

    .hero-carousel-viewport::after {
        background:
            linear-gradient(90deg,
                #fff 0%,
                rgba(255, 255, 255, 0.28) 6%,
                transparent 14%,
                transparent 88%,
                rgba(255, 255, 255, 0.22) 96%,
                #fff 100%),
            linear-gradient(180deg,
                #fff 0%,
                rgba(255, 255, 255, 0.42) 6%,
                transparent 18%,
                transparent 72%,
                rgba(255, 255, 255, 0.38) 82%,
                rgba(255, 255, 255, 0.82) 93%,
                #fff 100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .cerebras-theme .hero .hero-copy .hero-actions .btn-primary span {
        transition-duration: 0.01ms !important;
    }
}
