/**
 * Общий marketing-hero.
 * BEM: hero, hero--devices | hero--photo, hero--{page}.
 * Page-специфика медиа — в {page}.css.
 * Только var(--site-*), rem.
 */

.hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 81.25rem;
    margin: 6.25rem auto 0; /* 100px от меню */
    padding: 0 0 var(--site-section-gap);
    background-color: var(--site-surface);
}

.hero__media {
    order: -1;
    width: 100%;
}

.hero--devices .hero__media {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 14rem;
}

.hero__device {
    display: block;
    height: auto;
}

.hero__device--primary {
    width: 88%;
    max-width: 28rem;
}

.hero__device--secondary {
    position: absolute;
    right: 2%;
    bottom: 0;
    z-index: 1;
    width: 30%;
    max-width: 8.5rem;
    filter: drop-shadow(0 0.75rem 1.5rem rgba(45, 45, 45, 0.18));
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    box-sizing: border-box;
    margin: 0;
    min-height: 3.0625rem;
    padding: 0.625rem 1.25rem;
    border: 0;
    border-radius: 3.125rem;
    background-color: var(--site-badge-bg);
}

.hero__badge-icon {
    display: block;
    width: 1rem;
    height: 1.1875rem;
    flex-shrink: 0;
}

.hero--drivers .hero__badge-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.hero__badge-text {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--site-accent);
}

.hero__title {
    margin: 0;
    max-width: 28rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 2.125rem;
    color: var(--site-text-primary);
}

.hero__text {
    margin: 0;
    max-width: 36rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5rem;
    color: var(--site-text-primary);
}

.hero__em {
    font-weight: 700;
    color: var(--site-text-primary);
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.25rem;
}

.hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    border: 0.125rem solid transparent;
    appearance: none;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero__btn-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.hero__btn--primary {
    background-color: var(--site-accent);
    border-color: var(--site-accent-border);
    color: var(--site-on-accent);
}

.hero__btn--primary:hover,
.hero__btn--primary:focus-visible {
    background-color: var(--site-accent-hover);
    border-color: var(--site-accent-border);
    color: var(--site-on-accent);
}

.hero__btn--ghost {
    background-color: var(--site-surface);
    border-color: var(--site-accent);
    color: var(--site-accent);
}

.hero__btn--ghost:hover,
.hero__btn--ghost:focus-visible {
    background-color: var(--site-accent-soft);
    color: var(--site-accent);
}

.hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.hero__feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    background-color: var(--site-chip-bg);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: var(--site-chip-text);
}

@media (min-width: 48rem) {
    .hero {
        gap: 1.75rem;
        padding-block: 0 var(--site-section-gap);
    }

    .hero--devices .hero__media {
        min-height: 18rem;
    }

    .hero__device--primary {
        max-width: 34rem;
    }

    .hero__device--secondary {
        right: 4%;
        max-width: 10rem;
    }

    .hero__title {
        max-width: 34rem;
        font-size: 2.25rem;
        line-height: 2.75rem;
    }

    .hero__text {
        font-size: 1.125rem;
        line-height: 1.625rem;
    }

    .hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }

    .hero__btn {
        width: auto;
    }
}

@media (min-width: 64rem) {
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        align-items: start;
        gap: 2rem;
        height: 35.625rem; /* 570px — высота фрейма макета */
        min-height: 35.625rem;
        margin-bottom: var(--site-section-gap);
        padding-block: 0;
        overflow: hidden;
    }

    .hero__media {
        order: 0;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .hero--devices .hero__media {
        width: 100%;
        min-height: 28rem;
        max-width: 40rem;
    }

    .hero__device--primary {
        width: 92%;
        max-width: none;
    }

    .hero__device--secondary {
        right: 0;
        bottom: 0.25rem;
        width: 34%;
        max-width: 12rem;
    }

    .hero__content {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        gap: 1.125rem;
        max-width: 34rem;
    }

    .hero__title {
        max-width: 34rem;
        font-size: 2.5rem;
        line-height: 3rem;
    }

    .hero__text {
        max-width: 32rem;
    }

    .hero__actions {
        margin-top: 0.5rem;
    }

    .hero__features {
        margin-top: 0.75rem;
    }
}

@media (max-width: 47.9375rem) {
    .hero {
        margin-top: 3.125rem; /* 50px от меню */
    }

    .hero__title {
        font-size: 1.625rem;
        line-height: 2rem;
    }
}
