/* Every story shares one direction: copy on the left, image on the right. */
body.page-home .editorial-hero--home[data-home-hero] {
    --home-hero-surface: #f8f9fb;
    --home-hero-copy-duration: 150ms;
    --home-hero-media-duration: 280ms;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(640px, 76vh, 790px);
    padding-block: clamp(8rem, 12vh, 9.5rem) 3rem;
    background: var(--home-hero-surface);
    border-bottom: 0;
}

body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__layout {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    flex: 1;
}

body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__copy {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    max-width: 43rem;
    min-width: 0;
}

body.page-home .editorial-hero--home[data-home-hero] .page-hero__eyebrow {
    margin-bottom: 1rem;
}

body.page-home #main-content h1.page-hero__title[data-hero-title] {
    max-width: 22ch;
    min-height: 0;
    font-size: clamp(2.55rem, 3.9vw, 4.05rem);
    letter-spacing: -0.048em;
    line-height: 1.01;
}

body.page-home .editorial-hero--home[data-home-hero] .page-hero__copy {
    max-width: 35rem;
    margin-top: 1.25rem;
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.62;
}

body.page-home .editorial-hero--home[data-home-hero] .page-hero__actions {
    margin-top: 1.65rem;
}

body.page-home .home-hero-media[data-home-hero-media] {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

body.page-home .home-hero-media--editorial .home-hero-media__image {
    position: absolute;
    inset: 0 0 0 auto;
    width: 54%;
    height: auto;
    overflow: hidden;
    border-radius: 0;
    background: #e8edf1;
    isolation: isolate;
}

body.page-home .home-hero-media--editorial .home-hero-media__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% center;
    filter: saturate(0.9) contrast(1.02) brightness(0.99);
}

body.page-home .home-hero-media--editorial .home-hero-media__image::before,
body.page-home .home-hero-media--editorial .home-hero-media__image::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
}

body.page-home .home-hero-media--editorial .home-hero-media__image::before {
    z-index: 1;
    background:
        linear-gradient(90deg, var(--home-hero-surface) 0%, color-mix(in srgb, var(--home-hero-surface) 78%, transparent) 11%, color-mix(in srgb, var(--home-hero-surface) 24%, transparent) 32%, transparent 58%),
        linear-gradient(0deg, color-mix(in srgb, var(--home-hero-surface) 82%, transparent) 0%, color-mix(in srgb, var(--home-hero-surface) 54%, transparent) 22%, color-mix(in srgb, var(--home-hero-surface) 18%, transparent) 46%, transparent 66%);
}

/* Keep each crop with its own image. The shared frame never moves between slides. */
body.page-home .home-hero-media__slide[data-home-hero-treatment="infrastructure"] img {
    object-position: 70% center;
}

body.page-home .home-hero-media__slide[data-home-hero-treatment="home"] img {
    object-position: 58% center;
    filter: saturate(0.88) contrast(1.02) brightness(1.02);
}

body.page-home .home-hero-media__slide[data-home-hero-treatment="business"] img {
    object-position: 54% center;
    filter: saturate(0.84) contrast(1.02) brightness(0.98);
}

/* The photos already carry the story. Decorative network lines obscured the subjects. */
body.page-home .home-hero-media--editorial .home-hero-media__image::after {
    z-index: 2;
    background: none;
    opacity: 0;
}

body.page-home .home-hero-media__slide {
    z-index: 0;
    visibility: hidden;
    opacity: 0;
    transition-property: opacity, visibility;
    transition-duration: var(--home-hero-media-duration), 0s;
    transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1), linear;
    transition-delay: 0s, var(--home-hero-media-duration);
}

body.page-home .home-hero-media__slide.is-active {
    z-index: 1;
    visibility: visible;
    opacity: 1;
    transition-delay: 0s, 0s;
}

body.page-home .home-hero-proof[data-home-hero-proof] {
    position: absolute;
    z-index: 4;
    isolation: isolate;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1rem, 2vw, 1.75rem);
    width: min(42rem, calc(57vw - 2rem));
    max-width: 45rem;
    margin: 0;
    padding: 1.15rem 1.35rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.page-home .home-hero-proof[data-home-hero-proof]::before {
    position: absolute;
    z-index: -1;
    inset: -3rem -5rem;
    background:
        linear-gradient(90deg, transparent 0%, rgba(248, 249, 251, 0.22) 18%, rgba(248, 249, 251, 0.48) 58%, rgba(248, 249, 251, 0.16) 86%, transparent 100%),
        linear-gradient(0deg, rgba(248, 249, 251, 0.72) 0%, rgba(248, 249, 251, 0.44) 48%, rgba(248, 249, 251, 0.1) 100%);
    filter: blur(24px);
    content: "";
    pointer-events: none;
}

body.page-home .home-hero-proof__item {
    min-width: 0;
}

body.page-home .home-hero-proof__item + .home-hero-proof__item {
    padding-left: clamp(0.9rem, 1.6vw, 1.35rem);
    border-left: 1px solid rgba(1, 0, 72, 0.14);
}

body.page-home .home-hero-proof__value,
body.page-home .home-hero-proof__clients .home-hero-proof__value,
body.page-home .home-hero-proof__service .home-hero-proof__value {
    margin: 0;
    color: var(--color-kamnet-blue-dark);
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.6vw, 1.55rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.12;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

body.page-home .home-hero-proof__caption,
body.page-home .home-hero-proof__service .home-hero-proof__caption {
    max-width: 19rem;
    margin: 0.3rem 0 0;
    color: #4e5668;
    font-size: clamp(0.82rem, 0.95vw, 0.93rem);
    line-height: 1.42;
    text-align: left;
}

body.page-home .editorial-hero__copy[data-home-hero-copy],
body.page-home .home-hero-proof[data-home-hero-proof] {
    transition:
        opacity var(--home-hero-copy-duration) cubic-bezier(0.23, 1, 0.32, 1),
        transform var(--home-hero-copy-duration) cubic-bezier(0.23, 1, 0.32, 1);
}

body.page-home .editorial-hero__copy[data-home-hero-copy].is-changing,
body.page-home .home-hero-proof[data-home-hero-proof].is-changing {
    opacity: 0;
    transform: translateY(0.25rem);
    pointer-events: none;
}

@media (max-width: 1023px) {
    body.page-home .editorial-hero--home[data-home-hero] {
        min-height: 0;
        padding-block: 9rem 2.75rem;
    }

    body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: start;
        align-items: start;
        gap: 2rem;
        padding-inline: clamp(1.5rem, 5vw, 3rem);
    }

    body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__copy {
        grid-column: 1;
        grid-row: 1;
        max-width: 45rem;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-proof[data-home-hero-proof] {
        position: relative;
        inset: auto;
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        justify-self: start;
        width: min(100%, 42rem);
        max-width: none;
        margin: 1.5rem 0 0;
        padding: 1rem 1.15rem;
    }

    body.page-home .home-hero-proof[data-home-hero-proof]::before {
        inset: -1.75rem -2rem;
        background:
            linear-gradient(90deg, transparent 0%, rgba(248, 249, 251, 0.3) 12%, rgba(248, 249, 251, 0.62) 52%, rgba(248, 249, 251, 0.2) 88%, transparent 100%),
            linear-gradient(0deg, rgba(248, 249, 251, 0.78) 0%, rgba(248, 249, 251, 0.48) 54%, rgba(248, 249, 251, 0.1) 100%);
        filter: blur(19px);
    }

    body.page-home #main-content h1.page-hero__title[data-hero-title] {
        max-width: 20ch;
        font-size: clamp(2.7rem, 6.2vw, 4rem);
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image {
        inset: 0;
        width: 100%;
        height: auto;
        border-radius: 0;
    }

    body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__copy {
        grid-column: 1;
        justify-self: start;
        text-align: left;
    }

    body.page-home .editorial-hero--home[data-home-hero] .page-hero__eyebrow {
        justify-content: flex-start;
        text-align: left;
    }

    body.page-home .editorial-hero--home[data-home-hero] .page-hero__actions {
        justify-content: flex-start;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-proof[data-home-hero-proof] {
        grid-column: 1;
        justify-self: start;
    }

    body.page-home .home-hero-media--editorial .home-hero-media__image img {
        opacity: 0.72;
        object-position: 64% center;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image::before {
        background:
            linear-gradient(90deg, var(--home-hero-surface) 0%, color-mix(in srgb, var(--home-hero-surface) 92%, transparent) 26%, color-mix(in srgb, var(--home-hero-surface) 58%, transparent) 58%, color-mix(in srgb, var(--home-hero-surface) 14%, transparent) 100%),
            linear-gradient(0deg, color-mix(in srgb, var(--home-hero-surface) 60%, transparent) 0%, color-mix(in srgb, var(--home-hero-surface) 24%, transparent) 30%, transparent 68%);
    }

}

@media (max-width: 767px) {
    body.page-home .editorial-hero--home[data-home-hero] {
        padding-block: 8.25rem 2rem;
    }

    body.page-home .editorial-hero--home[data-home-hero] .editorial-hero__layout {
        gap: 1.5rem;
        padding-inline: 1.25rem;
    }

    body.page-home .editorial-hero--home[data-home-hero] .page-hero__eyebrow {
        margin-bottom: 0.8rem;
    }

    body.page-home #main-content h1.page-hero__title[data-hero-title] {
        max-width: 12ch;
        font-size: clamp(2.35rem, 9vw, 3.25rem);
    }

    body.page-home .editorial-hero--home[data-home-hero] .page-hero__copy {
        margin-top: 1rem;
        font-size: 1rem;
    }

    body.page-home .editorial-hero--home[data-home-hero] .page-hero__actions {
        margin-top: 1.35rem;
    }

    body.page-home .home-hero-media--editorial .home-hero-media__image img {
        opacity: 0.78;
        object-position: 68% center;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image {
        inset: 12% 0 0;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image::before {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--home-hero-surface) 74%, transparent) 0%, color-mix(in srgb, var(--home-hero-surface) 38%, transparent) 35%, color-mix(in srgb, var(--home-hero-surface) 8%, transparent) 72%, transparent 100%),
            linear-gradient(90deg, color-mix(in srgb, var(--home-hero-surface) 74%, transparent) 0%, color-mix(in srgb, var(--home-hero-surface) 34%, transparent) 38%, transparent 76%);
    }

    body.page-home .home-hero-proof[data-home-hero-proof] {
        gap: 0.8rem;
        padding-top: 0.85rem;
    }

    body.page-home .home-hero-proof__item + .home-hero-proof__item {
        padding-left: 0.8rem;
    }

    body.page-home .home-hero-proof__value,
    body.page-home .home-hero-proof__clients .home-hero-proof__value,
    body.page-home .home-hero-proof__service .home-hero-proof__value {
        font-size: 1rem;
    }

    body.page-home .home-hero-proof__caption,
    body.page-home .home-hero-proof__service .home-hero-proof__caption {
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-transparency: reduce) {
    body.page-home .home-hero-proof[data-home-hero-proof]::before {
        background: #f8f9fb;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-home .home-hero-media__slide,
    body.page-home .editorial-hero__copy[data-home-hero-copy],
    body.page-home .home-hero-proof[data-home-hero-proof] {
        transition: none;
    }
}

/* Keep the mobile copy calm while letting the photography read clearly. */
@media (max-width: 767px) {
    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image {
        inset: 10% 0 0;
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image img {
        opacity: 0.78;
        filter: saturate(0.86) contrast(1) brightness(1.03);
    }

    body.page-home .editorial-hero--home[data-home-hero] .home-hero-media--editorial .home-hero-media__image::before {
        background:
            linear-gradient(180deg, rgba(248, 249, 251, 0.94) 0%, rgba(248, 249, 251, 0.82) 20%, rgba(248, 249, 251, 0.62) 43%, rgba(248, 249, 251, 0.4) 70%, rgba(248, 249, 251, 0.24) 100%),
            linear-gradient(90deg, rgba(248, 249, 251, 0.7) 0%, rgba(248, 249, 251, 0.56) 42%, rgba(248, 249, 251, 0.3) 72%, rgba(248, 249, 251, 0.14) 100%);
    }
}
