.credifas-hero {
    --credifas-hero-accent: #5c51d1;
    --credifas-hero-ink: #161d2a;
    position: relative;
    width: 100%;
    height: 870px;
    overflow: hidden;
    background:
        url("../images/hero/background.png")
        center top / cover
        no-repeat;
    font-family: "Open Sans", "Lato", sans-serif;
}

.credifas-hero__shade {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(242, 246, 252, 0) 47%,
        rgba(242, 246, 252, 0.18) 61%,
        rgba(242, 246, 252, 0.94) 89%,
        #f2f6fc 100%
    );
}

.credifas-hero__header,
.credifas-hero__content {
    position: absolute;
    z-index: 2;
    left: calc(50% + 10px);
    width: calc(100% - 40px);
    max-width: 1552px;
    transform: translateX(-50%);
}

.credifas-hero__header {
    top: 50px;
    height: 96px;
    padding: 0 29px 0 37px;
    border-radius: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.credifas-hero__logo {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
}

.credifas-hero__logo img {
    display: block;
    width: 162px;
    height: auto;
}

.credifas-hero__header-cta {
    min-width: 171px;
    min-height: 52px;
    padding: 0 25px;
    border-radius: 999px;
    background: var(--credifas-hero-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.credifas-hero__header-cta:hover,
.credifas-hero__header-cta:focus-visible {
    background: #4b41be;
    color: #fff;
    transform: translateY(-1px);
}

.credifas-hero__content {
    top: 204px;
    height: 446px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.credifas-hero__copy {
    padding-top: 59px;
    color: #fff;
}

.credifas-hero__title {
    width: 560px;
    margin: 0;
    font-size: 50px;
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -1.5px;
}

.credifas-hero__title span,
.credifas-hero__title strong {
    display: block;
}

.credifas-hero__title strong {
    color: var(--credifas-hero-accent);
    font-weight: 600;
}

.credifas-hero__benefits {
    margin: 28px 0 0 3px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.credifas-hero__benefits li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: -0.44px;
}

.credifas-hero__benefits img {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.credifas-hero-form {
    width: 494px;
    height: auto;
    min-height: 518px;
    padding: 32px;
    border-radius: 40px;
    background: #fff;
    color: var(--credifas-hero-ink);
    flex: 0 0 494px;
}

.credifas-hero-form__amount {
    display: grid;
    grid-template-columns: 202px 202px;
    grid-template-rows: 49px auto;
    column-gap: 18px;
    align-items: center;
}

.credifas-hero-form__amount > label,
.credifas-hero-form__field-label {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.credifas-hero-form__select {
    position: relative;
    width: 202px;
    height: 49px;
}

.credifas-hero-form__select::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 15px;
    width: 11px;
    height: 6px;
    background: url("../images/hero/select-arrow.svg") center / contain no-repeat;
    transform: translateY(-50%);
    pointer-events: none;
}

.credifas-hero-form__select select {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 42px 0 18px;
    border: 1.5px solid #dedfe2;
    border-radius: 9px;
    outline: none;
    appearance: none;
    background: #fff;
    color: #000;
    font: 600 24px/1 "Open Sans", "Lato", sans-serif;
    letter-spacing: -1.2px;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
}

.credifas-hero-form__select select:focus-visible,
.credifas-hero-form__field > input:focus-visible,
.credifas-hero-form__phone-control:focus-within {
    border-color: var(--credifas-hero-accent);
    box-shadow: 0 0 0 3px rgba(92, 81, 209, 0.14);
}

.credifas-hero-form__amount small {
    grid-column: 2;
    margin-top: 5px;
    color: #2c2c2c;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.credifas-hero-form__fields {
    margin-top: 29px;
    display: grid;
    grid-template-columns: repeat(2, 202px);
    gap: 18px;
}

.credifas-hero-form__field {
    position: relative;
    display: block;
}

.credifas-hero-form__field-label {
    display: block;
    margin-bottom: 11px;
}

.credifas-hero-form__fields input {
    width: 100%;
    height: 49px;
    padding: 0 12px;
    border: 1.5px solid #dedfe2;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--credifas-hero-ink);
    font: 400 14px/1.2 "Open Sans", "Lato", sans-serif;
    letter-spacing: -0.7px;
}

.credifas-hero-form__phone-control {
    width: 100%;
    height: 49px;
    overflow: hidden;
    border: 1.5px solid #dedfe2;
    border-radius: 9px;
    background: #fff;
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.credifas-hero-form__phone-prefix {
    height: 100%;
    padding-left: 12px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    color: var(--credifas-hero-accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.credifas-hero-form__phone-prefix::after {
    width: 1px;
    height: 26px;
    margin-left: 10px;
    background: #d9d9d9;
    content: "";
}

.credifas-hero-form__phone-control input {
    min-width: 0;
    height: 100%;
    padding: 0 10px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.credifas-hero-form__phone-control input:focus-visible {
    border: 0;
    box-shadow: none;
}

.credifas-hero-form__fields input::placeholder {
    color: #80848e;
    opacity: 1;
}

.credifas-hero-form__field .inline-field-error,
.credifas-hero-form__consent-field .inline-field-error {
    min-height: 30px;
    margin: 6px 0 0;
    color: #db2e42;
    font-size: 12px;
    font-weight: 600;
    line-height: 124.7%;
    visibility: hidden;
}

.credifas-hero-form__field.has-below-inline-error .inline-field-error,
.credifas-hero-form__consent-field.has-below-inline-error .inline-field-error {
    visibility: visible;
}

.credifas-hero-form__field.has-inline-error > input,
.credifas-hero-form__field.has-inline-error .credifas-hero-form__phone-control {
    border-color: #db2e42;
    background: rgba(219, 46, 66, 0.1);
    color: #db2e42;
}

.credifas-hero-form__field.has-inline-error input,
.credifas-hero-form__field.has-inline-error input::placeholder,
.credifas-hero-form__field.has-inline-error .credifas-hero-form__phone-prefix {
    color: #db2e42;
}

.credifas-hero-form__submit {
    width: 100%;
    height: 52px;
    margin-top: 32px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--credifas-hero-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 18px/15px "Open Sans", "Lato", sans-serif;
    letter-spacing: -0.4px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.credifas-hero-form__submit:hover,
.credifas-hero-form__submit:focus-visible {
    background: #4b41be;
    transform: translateY(-1px);
}

.credifas-hero-form__consent-field {
    margin: 14px 11px 0;
}

.credifas-hero-form__consent {
    margin: 0;
    display: grid;
    grid-template-columns: 13px 1fr;
    gap: 8px;
    align-items: start;
    color: #000;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.3px;
}

.credifas-hero-form__consent-field.has-inline-error .credifas-hero-form__consent input {
    outline: 1px solid #db2e42;
    outline-offset: 1px;
}

.credifas-hero-form__consent input {
    width: 13px;
    height: 13px;
    margin: 1px 0 0;
    accent-color: var(--credifas-hero-accent);
}

.credifas-hero-form__consent a {
    color: #0049ff;
    text-decoration: underline;
    text-underline-offset: 1px;
}

.credifas-hero-form .form__error {
    margin: 4px 11px 0;
    color: #db2e42;
    font-size: 12px;
    font-weight: 600;
    line-height: 124.7%;
    text-align: center;
}

.credifas-hero-form .form__error:empty {
    display: none;
}

.credifas-hero-form__legal {
    margin: 13px 11px 0;
    color: #000;
    font-size: 8px;
    font-weight: 400;
    line-height: 11px;
    letter-spacing: -0.38px;
    text-align: justify;
}

.credifas-hero__partners {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 29px;
    left: 0;
    height: 75px;
    overflow: hidden;
}

.credifas-hero__partners-track {
    width: max-content;
    height: 75px;
    display: flex;
    align-items: center;
    animation: credifas-partners-scroll 28s linear infinite;
    will-change: transform;
}

.credifas-hero__partners-group {
    height: 75px;
    padding-right: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.credifas-hero__partner-card {
    display: block;
    width: 181px;
    height: 75px;
    border-radius: 10px;
    flex: 0 0 181px;
    object-fit: cover;
}

@keyframes credifas-partners-scroll {
    from {
        transform: translateX(0);
    }

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

@media (max-width: 1200px) {
    .credifas-hero__header,
    .credifas-hero__content {
        width: calc(100% - 48px);
    }

    .credifas-hero__title {
        width: 490px;
        font-size: 44px;
    }

    .credifas-hero-form {
        width: 460px;
        padding-right: 24px;
        padding-left: 24px;
        flex-basis: 460px;
    }

    .credifas-hero-form__amount,
    .credifas-hero-form__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .credifas-hero-form__select {
        width: 100%;
    }
}

@media (max-width: 980px) {
    .credifas-hero {
        height: auto;
        min-height: 1210px;
        padding: 24px 24px 132px;
        background-position: 58% top;
    }

    .credifas-hero__shade {
        background: linear-gradient(
            180deg,
            rgba(22, 29, 42, 0.1) 0,
            rgba(242, 246, 252, 0.18) 30%,
            rgba(242, 246, 252, 0.92) 55%,
            #f2f6fc 88%
        );
    }

    .credifas-hero__header,
    .credifas-hero__content {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 720px;
        transform: none;
    }

    .credifas-hero__header {
        height: 80px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .credifas-hero__content {
        height: auto;
        margin: 70px auto 0;
        flex-direction: column;
        gap: 48px;
    }

    .credifas-hero__copy {
        padding-top: 0;
    }

    .credifas-hero__title {
        width: min(100%, 560px);
        color: #fff;
        font-size: 46px;
    }

    .credifas-hero__benefits {
        margin-top: 28px;
    }

    .credifas-hero-form {
        width: min(100%, 494px);
        margin-left: auto;
        height: auto;
        min-height: 518px;
        padding: 32px;
        flex-basis: auto;
    }
}

@media (max-width: 560px) {
    .credifas-hero {
        min-height: 0;
        padding: 16px 16px 118px;
        background-size: auto 650px;
        background-position: 55% top;
        background-color: #f2f6fc;
    }

    .credifas-hero__shade {
        background:
            radial-gradient(
                ellipse at 12% 23%,
                rgba(242, 246, 252, 0.68) 0%,
                rgba(242, 246, 252, 0.46) 38%,
                rgba(242, 246, 252, 0) 70%
            ),
            linear-gradient(
                180deg,
                rgba(242, 246, 252, 0.18) 0,
                rgba(242, 246, 252, 0.46) 34%,
                rgba(242, 246, 252, 0.94) 56%,
                #f2f6fc 88%
            );
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .credifas-hero__header {
        height: 68px;
        padding: 0 14px 0 18px;
        border-radius: 16px;
    }

    .credifas-hero__logo img {
        width: 126px;
    }

    .credifas-hero__header-cta {
        min-width: 132px;
        min-height: 44px;
        padding: 0 16px;
        font-size: 13px;
    }

    .credifas-hero__content {
        margin-top: 42px;
        gap: 40px;
    }

    .credifas-hero__title {
        font-size: clamp(28px, 8.6vw, 36px);
        line-height: 1.08;
        letter-spacing: -0.9px;
    }

    .credifas-hero__title span {
        text-shadow: 0 2px 12px rgba(22, 29, 42, 0.28);
    }

    .credifas-hero__benefits {
        margin-top: 20px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .credifas-hero__benefits li {
        flex: 0 1 auto;
        gap: 7px;
        font-size: 13px;
        line-height: 16px;
        white-space: nowrap;
    }

    .credifas-hero__benefits img {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .credifas-hero-form {
        min-height: 0;
        padding: 22px;
        border-radius: 28px;
    }

    .credifas-hero-form__amount {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 10px;
    }

    .credifas-hero-form__select {
        width: 100%;
    }

    .credifas-hero-form__amount small {
        grid-column: 1;
        margin-top: -3px;
        white-space: normal;
    }

    .credifas-hero-form__fields {
        margin-top: 18px;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .credifas-hero-form__field-label {
        margin-bottom: 5px;
    }

    .credifas-hero-form__field .inline-field-error,
    .credifas-hero-form__consent-field .inline-field-error {
        min-height: 17px;
        margin-top: 2px;
        font-size: 10px;
    }

    .credifas-hero-form__submit {
        margin-top: 16px;
    }

    .credifas-hero-form__consent-field {
        margin-top: 10px;
        margin-right: 0;
        margin-left: 0;
    }

    .credifas-hero-form__legal {
        margin-top: 9px;
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 390px) {
    .credifas-hero__header-cta {
        min-width: 118px;
        padding: 0 12px;
        font-size: 12px;
    }

    .credifas-hero__logo img {
        width: 116px;
    }
}

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