.hero {
    width: auto;
}

.hero__title {
    font-family: var(--font-title);
    font-size: clamp(40px, 8vw, 84px);
    font-weight: 400;
    line-height: 1.05;
    color: var(--color-text);
    text-align: center;
    margin: clamp(40px, 8vw, 67px) auto clamp(50px, 10vw, 119px);
    padding: 0 clamp(16px, 4vw, 0px);
}

.hero__title-line {
    display: block;
    opacity: 0;
    transform: translateY(28px);
    animation: hero-title-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title-line--1 {
    animation-delay: 0.1s;
}

.hero__title-line--2 {
    background-image: var(--gradient-primary-light);
    background-size: 220% 100%;
    background-position: 0 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation:
        hero-title-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards,
        hero-title-glow 5s ease-in-out 1.3s infinite alternate;
}

@keyframes hero-title-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-title-glow {
    from { background-position: 0 50%; }
    to { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__title-line {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .hero__title-line--2 {
        background-position: 50% 50%;
    }

    .hero__card,
    .hero__picture {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.hero__card {
    position: relative;
    background-image: url("../../image/hero/hero-bc.svg");
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin: 0 var(--section-gutter) 27px;
    min-height: 281px;
    padding: clamp(28px, 4vw, 40px) clamp(28px, 6vw, 60px);
    opacity: 0;
    transform: translateY(36px);
    animation: hero-card-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

@keyframes hero-card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__card-image {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: -45px;
    height: clamp(260px, 34vw, 470px);
    left: 50%;
    transform: translateX(-50%);
}

.hero__picture {
    animation: hero-float 5s ease-in-out infinite;

    aspect-ratio: 1071 / 1341;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hero__card-text {
    width: 100%;
    max-width: min(320px, 62vw);
    font-family: var(--font-body);
    margin: clamp(40px, 6vw, 70px) 0 20px;
    font-size: clamp(16px, 1.4vw, 18px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.72px;
    color: var(--color-white);
}

.hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 50px;
    padding: 6px 6px 6px 32px;
    background-color: var(--color-white);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 500;
    color: var(--color-text);
    transition: background-color 0.2s ease;
}

.hero__btn:hover {
    background-color: #f0f0f0;
}

.hero__btn-text {
    line-height: 1;
}

.hero__btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: var(--color-accent);
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.hero__btn:hover .hero__btn-icon {
    transform: translateX(4px);
}

.hero__btn-icon img {
    width: 16px;
    height: 16px;
    transform: translateX(2px);
}

@media (max-width: 760px) {
    .hero__title {
        text-align: center;
    }

    .hero__card {
        display: flex;
        flex-direction: column;
        min-height: auto;

        padding: clamp(76px, 24vw, 120px) 24px 40px;
    }

    .hero__card-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero__card-text {
        max-width: 100%;
        margin: 8px 0 24px;
    }

    .hero__card-image {
        position: absolute;
        top: clamp(-90px, -26vw, -50px);
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        height: clamp(240px, 74vw, 400px);
    }
}

@media (max-width: 420px) {
    .hero__title {
        letter-spacing: -0.5px;
    }
}

/* Мобильная вёрстка по Figma-макету 402px (не переиспользует fluid-clamp
   десктопа — фиксированные значения из макета) */
@media (max-width: 480px) {
    .hero__title {
        font-size: 24px;
        line-height: 1.1;
        letter-spacing: normal;
        margin: 24px auto 40px;
        padding: 0 12px;
    }

    .hero__card {
        border-radius: 30px;
        padding: 225px 20px 32px;
    }

    .hero__card-text {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        line-height: 1.1;
        letter-spacing: -0.04em;
        margin: 12px 0 24px;
    }

    .hero__card-image {
        top: -35px;
        width: 200px;
        height: 250px;
    }

    .hero__btn {
        width: 100%;
        height: 44px;
        padding: 0 6px 0 20px;
    }

    .hero__btn-text {
        font-size: 16px;
    }

    .hero__btn-icon {
        width: 32px;
        height: 32px;
    }
}
