:root {
    --hero-page-width: 1440px;
    --hero-page-padding: 16px;

    --hero-radius: 24px;
}

.hero__container {
    width: min(
        calc(100% - var(--hero-page-padding) * 2),
        calc(var(--hero-page-width) - var(--hero-page-padding) * 2)
    );

    margin-inline: auto;
}

.hero {
    padding-bottom: 24px;
}

.hero__layout {
    display: grid;
    grid-template-columns:
        minmax(0, 931fr)
        minmax(380px, 461fr);

    gap: 16px;
}

.hero__content,
.hero__visual {
    position: relative;

    height: 692px;
    overflow: hidden;

    border-radius: var(--hero-radius);
}


/* ========== HERO LEFT SIDE ========== */
.hero__content {
    color: var( --BG-White);
    background-image: url('assets/hero-left-bg.webp');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: cover;
}

.hero__content-inner {
    padding: 102px 80px 80px 80px;

    display: flex;
    flex-direction: column;
}

.hero__title {
    margin-bottom: 16px;
}

.hero__description {
    max-width: 562px;
    margin: 0 0 32px;

    color: var(--color-bg-white-90);

    font-size: 24px;
    font-weight: 500;
    line-height: 1.5;
}

.hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 16px;
    margin-bottom: 48px;
}

.hero__button {
    min-height: 62px;
    max-height: none;
    padding: 18px 28px;
    border-radius: 12px;
}

.hero__button--primary {
    width: 242px;
}

.hero__button:focus-visible {
    outline: 3px solid rgba(105, 132, 255, 0.75);
    outline-offset: 3px;
}

.button__icon {
    flex: 0 0 auto;
}

/* ========== HERO RIGHT SIDE ========== */

.hero__visual {
    isolation: isolate;
    background: linear-gradient(125deg, var(--color-primary) 19.74%, #09166F 93.76%);
    padding-top: 65px;
    padding-left: 43px;
}

.hero__visual::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 2px);

    background-size: 116px 116px;

    opacity: 0.7;
    pointer-events: none;
}

.hero__live-truck {
    display: flex;
    width: 597px;
    padding: 24px 25px 23px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 13px;
    border-radius: 26px;
    border: 1px solid rgba(229, 231, 235, 0.50);
    background: var(--BG-White-10);
}

.hero__live-truck-title {
    color: var(--BG-White);
}

.hero__live-truck-img {
    width: 100%;
    aspect-ratio: 1279 / 657;
    background-image: url('assets/live-truck-bg.webp');
    background-size: contain;
    background-repeat: no-repeat;
}

.hero__live-status {
    display: flex;
    align-items: center;
    color: var(--BG-White);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 19px;
}

.hero__live-status:before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: var(--chart-green);
    border-radius: 50%;
    margin-right: 7px;
}

.hero__truck-info-img {
    width: 355px;
    height: 294px;
    margin-left: auto;
    transform: translate(21px, 11px);
    opacity: 0.9;

    background-image: url('assets/truck-info.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

@media (max-width: 900px) {
    :root {
        --hero-page-padding: 8px;
    }

    .hero {
        padding-bottom: 8px;
    }

    .hero__layout {
        grid-template-columns: 1fr;
    }

    .hero__content,
    .hero__content-inner {
        min-height: auto;
    }

    .hero__content-inner {
        padding: 139px 60px 60px;
    }

    .hero__title {
        font-size: 56px;
        font-style: normal;
        font-weight: 700;
        line-height: 114%;
        letter-spacing: -0.56px;
    }

    .hero__description {
        max-width: 448px;

        font-size: 20px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%;
    }

    .hero__visual {
        height: 373px;
        padding: 26px 39px 60px 39px;
    }

    .hero__live-truck {
        width: 100%;
        max-width: 465px;
        padding: 19px;
        border-radius: 20px;
    }

    .hero__live-truck-title {
        font-size: 13px;
        font-style: normal;
        font-weight: 500;
        line-height: 19px;
    }

    .hero__truck-info-img {
        position: absolute;
        bottom: 0;
        right: -4px;
        width: 280px;
        height: 232px;
        transform: none;
    }
}

@media (max-width: 640px) {
    :root {
        --hero-radius: 14px;
    }

    .hero {
        padding-bottom: 8px;
    }

    .hero__layout {
        gap: 8px;
    }

    .hero__content {
        height: auto;
        min-height: 376px;
    }

    .hero__content-inner {
        padding: 32px 30px;
        align-items: center;
        text-align: center;
    }

    .hero__title {
        margin-bottom: 12px;

        font-size: 36px;
        line-height: 114%;
        letter-spacing: -0.36px;
    }

    .hero__description {
        max-width: 318px;
        margin-bottom: 32px;

        font-size: 14px;
    }

    .hero__actions {
        width: 100%;
        margin-bottom: 32px;
    }

    .hero__button--primary {
        width: 100%;
        min-height: 52px;
        padding: 12px 32px;
        font-size: 14px;
        font-style: normal;
        font-weight: 700;
        line-height: 140%;
        border-radius: 8px;
    }

    .hero .rating {
        align-items: center;
        flex-direction: row;

        width: 100%;
        min-height: 60px;
        gap: 8px;
        padding: 12px;
        border-radius: 8px;
    }

    .hero .rating__customers {
        align-items: center;
        gap: 8px;
    }

    .hero .rating__avatars {
        width: 51px;
        height: 19px;
    }

    .hero .rating__text {
        font-size: 12px;
        line-height: 150%;
        text-align: left;
    }

    .hero .rating__score {
        font-size: 12px;
    }

    .hero__visual {
        --hero-live-truck-w: 282px;

        height: 216px;
        padding: 10px 0 0;
    }

    .hero__live-truck {
        width: var(--hero-live-truck-w);
        max-width: none;
        margin-left: auto;

        padding: 11px;
        gap: 7px;
        border-radius: 12px;
    }

    .hero__live-truck-title,
    .hero__live-status {
        font-size: 8px;
        line-height: 12px;
    }

    .hero__live-status:before {
        width: 3px;
        height: 3px;
        margin-right: 4px;
    }

    .hero__truck-info-img {
        position: absolute;
        inset: auto;
        transform: none;
        z-index: 1;
        width: 171px;
        height: auto;
        aspect-ratio: 358 / 176;
        background-image: url('assets/truck-info-mobile.webp');

        right: calc(var(--hero-live-truck-w) - 12px - 78.3px);
        bottom: 0;
    }
}
