/*
 * Homepage Hero (acf/remote-team-block → template_parts/blocks/homepage/remote_team/remote_team_block.php).
 * Plain, hand-written CSS: the homepage is not built through Vite/Tailwind
 * (see should_use_vite_assets() in inc/styles_scripts.php), so this file is
 * enqueued directly, next to the legacy app.css/style.css bundle.
 * Geometry follows Figma nodes 1610:3502 (desktop, 1440) and 1137:1660 (mobile, 390).
 */

.home-hero {
    background-color: #19252a;
    /* Bottom edge is a "V": sides end 95px above the bottom, the tip sits at 29% of the width. */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 95px), 29% 100%, 0 calc(100% - 95px));
    overflow: hidden;
    padding-bottom: 169px;
    position: relative;
}

.home-hero__image {
    filter: blur(0.75px);
    height: calc(100% - 78px);
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 78px;
    width: 100%;
    z-index: 0;
}

.home-hero__overlay {
    background:
        linear-gradient(114.87deg, rgba(0, 0, 0, 0.42) 36.6%, rgba(0, 0, 0, 0.28) 54.26%, rgba(0, 0, 0, 0) 68.5%) -6px 80px / 1011px 775px no-repeat,
        linear-gradient(27.91deg, #000 24.23%, rgba(0, 0, 0, 0.178) 43.6%, rgba(0, 0, 0, 0) 62.99%) -6px 80px / 1011px 775px no-repeat,
        linear-gradient(265.4deg, rgba(0, 0, 0, 0.37) 24.77%, rgba(0, 0, 0, 0.066) 59.96%, rgba(0, 0, 0, 0) 70.01%) right 0 top 81px / 330px 708px no-repeat,
        rgba(25, 37, 42, 0.28);
    inset: 0;
    position: absolute;
    z-index: 1;
}

.home-hero__container {
    position: relative;
    z-index: 2;
}

.home-hero__content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 614px;
    padding: 179px 0 98px;
}

.home-hero__title {
    color: #fff;
    font-family: AvenirNext-Bold, sans-serif;
    font-size: 52px;
    letter-spacing: -1.325px;
    line-height: 1.15;
    margin: 0;
    padding-top: 8px;
    text-wrap: balance;
}

.home-hero__text {
    color: rgba(255, 255, 255, 0.78);
    font-family: Inter, sans-serif;
    font-size: 15.8px;
    line-height: 23.76px;
    margin: 0;
    max-width: 524px;
}

.home-hero__actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0 10px;
}

.home-hero__btn {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 500;
    gap: 5px;
    line-height: 19px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.home-hero__btn--primary {
    background-color: #e84f1c;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 15px 20px;
}

.home-hero__btn--primary:hover {
    background-color: #d6420f;
}

.home-hero__btn-icon {
    height: 13px;
    width: 13px;
}

.home-hero__btn--outline {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 14px 20px;
}

.home-hero__btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.home-hero__stats {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 22px;
    padding-top: 21px;
}

.home-hero__stat {
    flex: 1 0 0;
}

.home-hero__stat-value {
    color: #fff;
    font-family: AvenirNext-Bold, sans-serif;
    font-size: 30px;
    letter-spacing: -0.35px;
    line-height: 34.56px;
    margin: 0 0 10px;
}

.home-hero__stat-unit {
    color: #e84f1c;
    font-size: 16px;
    /* Keeps the inline unit from growing the 34.56px line box. */
    line-height: 1;
}

.home-hero__stat-label {
    color: rgba(255, 255, 255, 0.55);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.54px;
    line-height: 15px;
    margin: 0;
    text-transform: uppercase;
}

.home-hero__logos {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.home-hero__logos-track {
    animation: home-hero-marquee 32s linear infinite;
    display: flex;
    gap: 64px;
    padding: 0 32px;
    width: max-content;
}

.home-hero__logo {
    color: rgba(255, 255, 255, 0.72);
    font-family: AvenirNext-Bold, sans-serif;
    font-size: 26px;
    letter-spacing: -0.26px;
    line-height: 32px;
    white-space: nowrap;
}

@keyframes home-hero-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__logos-track {
        animation: none;
    }
}

/*
 * The "Our clients" title right after the hero sits in the white space to the right of
 * the hero's V edge. Over the right half of the page that edge rises only ~20px above
 * the hero bottom, so the title can start right at the hero bottom without touching the photo.
 */
@media screen and (min-width: 1024px) {
    .home-hero + .our-clients {
        padding-top: 0;
    }

    .home-hero + .our-clients .our-clients__title {
        margin-left: auto;
    }
}

@media screen and (max-width: 1023px) {
    .home-hero {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 29% 100%, 0 calc(100% - 64px));
        padding-bottom: 120px;
    }

    .home-hero__content {
        padding: 140px 0 72px;
    }

    .home-hero__title {
        font-size: 40px;
    }
}

/* Mobile layout: title → text → stats → buttons, per the 390px mockup. */
@media screen and (max-width: 767px) {
    .home-hero {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 23px), 35% 100%, 0 calc(100% - 31px));
        padding-bottom: 47px;
    }

    .home-hero__image {
        filter: none;
        height: 100%;
        object-position: 28% center;
        top: 0;
    }

    .home-hero__overlay {
        background:
            linear-gradient(112.14deg, rgba(0, 0, 0, 0.42) 36.86%, rgba(0, 0, 0, 0.28) 53.28%, rgba(0, 0, 0, 0) 66.53%),
            linear-gradient(40.05deg, #000 22.54%, rgba(0, 0, 0, 0.178) 63.2%, rgba(0, 0, 0, 0) 87.69%),
            rgba(0, 0, 0, 0.28);
    }

    /* The 390px column (343px of text) is kept on wider phones, so buttons stay centred under it. */
    .home-hero__content {
        gap: 0;
        max-width: 370px;
        padding: 110px 8px 93px 19px;
    }

    .home-hero__title {
        /* 45px at 390px; shrinks on narrower phones to keep the mockup's 3 lines. */
        font-size: clamp(34px, 11.5vw, 45px);
        letter-spacing: 0;
        line-height: 1.2;
        padding-top: 0;
        text-shadow: 0 4px 16.8px rgba(0, 0, 0, 0.25);
        text-wrap: wrap;
    }

    .home-hero__text {
        color: #fff;
        font-family: AvenirNext, sans-serif;
        font-size: 18px;
        line-height: 1.5;
        margin-top: 20px;
        max-width: 100%;
    }

    .home-hero__stats {
        border-top: 0;
        gap: 24px;
        margin-top: 46px;
        order: 3;
        padding-top: 0;
    }

    .home-hero__stat {
        flex: 0 0 auto;
        max-width: 100px;
    }

    .home-hero__stat-label {
        max-width: 92px;
    }

    .home-hero__stat-value {
        font-size: 18px;
        white-space: nowrap;
        letter-spacing: -0.85px;
        line-height: 1.1;
        margin-bottom: 6px;
    }

    .home-hero__stat-unit {
        color: #d73d04;
    }

    .home-hero__actions {
        align-items: center;
        flex-direction: column;
        gap: 13px;
        margin-top: 59px;
        order: 4;
        padding: 0;
    }

    .home-hero__btn {
        justify-content: center;
        width: 271px;
    }

    .home-hero__btn--primary {
        box-shadow: 6px 8px 40px 1px rgba(25, 37, 42, 0.15);
        font-size: 14px;
        line-height: 17px;
    }

    .home-hero__logo {
        font-size: 22px;
    }
}

/* Narrow phones (iPhone SE 1st gen, small Androids): give the three stats room. */
@media screen and (max-width: 374px) {
    .home-hero__content {
        padding-left: 0;
        padding-right: 0;
    }

    .home-hero__stats {
        gap: 10px;
    }
}
