:root {
    --color-accent: #9623FF;
    --color-accent-pressed: #500098;
    --color-accent-hover: #7912D6;

    --color-card-border: #2D2835;
    --color-card-bg: #18141C;

    --color-card-bg-hover: #211C26;
    --color-card-shadow-hover: #9623FF;

    --header-top: 31px;
    --header-hidden-top: -75px;
    --header-show-top: 35px;

    --border-radius-size: 16px;
}

html, body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    margin: 0;
    padding: 0;
    letter-spacing: 0.02em;
    scrollbar-gutter: stable;
}

a {
    text-decoration: none;
}

.container {
    margin: 0 auto;
    max-width: 1230px;
}


@keyframes hide {
    from {
        top: var(--header-top);
    }

    to {
        top: var(--header-hidden-top);
    }
}

@keyframes show {
    from {
        top: var(--header-hidden-top);
    }

    60% {
        top: var(--header-show-top);
    }

    to {
        top: var(--header-top);
    }
}

.header {
    top: 31px;
    position: fixed;
    width: 100%;
    z-index: 2;


    &.hidden {
        animation-duration: 0.1s;
        animation-name: hide;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
        top: var(--header-hidden-top);
    }

    &.visible {
        animation-duration: 0.4s;
        animation-name: show;
        animation-iteration-count: 1;
        animation-timing-function: ease-in-out;
        top: var(--header-top);
    }
}

.header-nav__logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-left: 100px;
}

.header-nav {
    height: 70px;
    display: flex;
    border: 2px solid #4C4854;
    border-radius: var(--border-radius-size);
    justify-content: space-between;
    align-items: center;
    background-color: rgba(24, 20, 28, 0.7);
    backdrop-filter: blur(10px);
}

.header-nav__menu {
    margin-right: 100px;
}

.header-nav__menu-item {
    color: #ffffff;
    font-size: 16px;
    margin: 0 23px;
}

.start-page {
    background: #09070B;
    background-size: cover;
    overflow: hidden;
    position: relative;


    .start-page-gradient {
        position: absolute;
        width: 838px;
        height: 838px;
        z-index: 0;
        overflow: hidden;
        background: #9623FF;
        filter: blur(150px);
        transform: translate(-50%, -50%);
        opacity: 0.2;
    }

    .start-page-right-gradient {

        top: 1290px;
        right: -585px;


    }


    .start-page-left-gradient {
        top: 2059px;
        left: 100px;
    }


    .hero {
        z-index: 1;
        position: relative;

        .hero-content {
            padding: 66px 72px 55px 72px;
            background: url('/assets/hero.png') no-repeat -104px -140px;
        }

        .hero-content-bg {
            background: url('/assets/hero-bg.png') no-repeat 0 0;
        }

        padding-top: 86px;

    }

    .hero-title {
        margin-bottom: 30px;
        color: #fff;
        font-size: 56px;
        line-height: 68px;
        letter-spacing: 0.03em;


        .hero-title__accent {
            color: var(--color-accent);
        }
    }

    .hero-description {
        color: #fff;
        font-size: 20px;
        line-height: 29px;
    }

    .hero-buttons {
        margin-top: 106px;
        display: flex;
        gap: 15px;
        padding-bottom: 75px;
    }
}


/* components */
.ghost {
    color: #fff;
    font-size: 16px;
    transition: color ease-in-out 0.3s;

    &:hover {
        color: var(--color-accent);
    }

    &:active {
        color: var(--color-accent-pressed);
    }
}

/*reset button styles*/
button {
    border: none;
}

.button {
    --padding-y: 10px;
    --padding-x: 13px;
    --border-size: 2px;
    --padding-y-with-border: calc(var(--padding-y) - var(--border-size));
    --padding-x-with-border: calc(var(--padding-x) - var(--border-size));
    cursor: pointer;
    color: #fff;
    user-select: none;
    padding: var(--padding-y-with-border) var(--padding-x-with-border);
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;


    &.button {
        font-size: 16px;
        letter-spacing: 0.04em;
    }

    &.primary {
        background: var(--color-accent);
        display: inline-block;
        border: 2px solid var(--color-accent);

        &:hover {
            background: var(--color-accent-hover);
            transform: translateY(-6px);
        }

        &:active {
            background: var(--color-accent-pressed);
            transform: translateY(0);
        }
    }

    &.secondary {
        padding: var(--padding-y-with-border) var(--padding-x-with-border);

        &.large {
            padding: var(--padding-y-large-with-border) var(--padding-x-large-with-border);
        }

        border: var(--border-size) solid var(--color-accent);
        box-sizing: border-box;

        &:hover {
            border-color: var(--color-accent-hover);
            color: var(--color-accent-hover);
        }

        &:active {
            color: var(--color-accent-pressed);
            border-color: var(--color-accent-pressed);
            background: #000;
            transform: translateY(0);
        }
    }

}


.section-title {
    color: #fff;
    font-size: 48px;
    letter-spacing: 0.02em;
    margin: 38px 0;
}

.section {
    margin: 19px 0 74px 0;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--color-card-bg);
    border: 2px solid var(--color-card-border);

    min-height: 396px;
    border-radius: var(--border-radius-size);
    transition: all ease-in-out 0.3s;
    cursor: pointer;

    &:hover {
        border-color: var(--color-accent);
        transform: translateY(-5px);
        background: var(--color-card-bg-hover);
        box-shadow: 0 0 10px 1px var(--color-card-shadow-hover);
    }

    &:active {
        background: var(--color-card-bg);
        transform: translateY(0);
        border-color: var(--color-accent-pressed);
        box-shadow: none;
    }
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.card__content {
    padding: 0px 29px;
    max-width: 320px;
}

.card__title {
    color: #fff;
    margin: 29px 0 15px;
    font-size: 32px;
    line-height: 43px;
    letter-spacing: 0.02em;
}

.card__description {
    color: #fff;
    line-height: 24px;
    letter-spacing: 0.02em;
}


.spec {
    color: #fff;
    margin-top: -15px;

    .card {
        padding: 0 28px;
    }
}


.motivation {
    color: #fff;
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 56px;
}

.motivation__description {
    margin: -12px 0 0;
}

.motivation__description-text {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.005em;
}

.motivation__promo {
    border-radius: var(--border-radius-size);
    padding: 0px 43px 60px;
    background-image: linear-gradient(to right bottom, #18141c, #341f4f, #512686, #7229c1, #9724ff);
}

.motivation__promo-title {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.motivation__promo-text {
    max-width: 372px;
    line-height: 23px;
    letter-spacing: 0.008em;
}

.motivation-options {
    margin: 14px 0 0;
    color: #fff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.motivation-option {
    border-radius: var(--border-radius-size);
    padding: 35px 40px 60px;


    &:nth-child(1) {
        background: url('/assets/motivation-options/01.svg') no-repeat 0 0;
    }

    &:nth-child(2) {

        background: #9623FF
    }

    &:nth-child(3) {
        background: url('/assets/motivation-options/03.png') no-repeat 0 0;
    }

}

.motivation-option-title {
    font-size: 55px;
    margin: 0;
    letter-spacing: 0.03em;
    margin-left: 4px;
}

.motivation-option-text {
    margin: 10px 0;
    max-width: 220px;
    line-height: 22px;
}

/*work*/
.work {
    color: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;


    .work-item {
        padding: 5px 0px;


        .work-item-title__number {
            font-size: 56px;
            font-weight: bold;
            display: flex;
            align-items: center;

        }

        .work-item-title__number-value {
            margin-right: 27px;
        }

        .work-item-title__number-border {
            width: 100%;
            height: 1px;
            background: var(--color-accent);
            display: inline-block;
        }
    }

    .work-item-content {
        margin: 0 0 0 28px;


        .work-item-content-title {
            font-size: 24px;
            line-height: 36px;
            margin-bottom: -6px;
        }

        .work-item-content-description {
            line-height: 24px;
            width: 230px;

        }


        .work-item-content__title {
            font-size: 20px;
        }
    }


}

.calculate-form {
    &.section {
        margin-top: -15px;
    }

    .calculate-form__content {
        background: url('/assets/calculate-form-bg.png') no-repeat 0 0;
        padding: 5px 70px 0 625px;
        height: 400px;
    }

    .calculate-form-title {
        color: #fff;
        font-size: 50px;
        margin: 34px 0 24px;
        line-height: 56px;
        letter-spacing: 0.0015em;
    }

    .calculate-form-description {
        color: #fff;
        line-height: 24px;
        max-width: 510px;
        letter-spacing: 0.01em;
    }

    .calculate-form-buttons {
        margin-top: 41px;

        .button {
            padding: calc(var(--padding-y-with-border) + 1px) calc(var(--padding-x-with-border) + 3px);
        }
    }

}

footer {
    margin-top: 142px;
    color: #fff;
    background-image: radial-gradient(ellipse 40% 100% at center top, hsl(0deg 0% 35.3% / 26%) 0%, #09070B 70%);
    --color-footer-content: #7C7484;

    .footer-top {
        display: flex;
        padding: 43px 0 0 104px;
        justify-content: space-between;
    }

    .footer-top__logo {
        width: 670px;
    }

    .footer-top__logo-link {
        color: #fff;
        font-size: 23px;
        font-weight: bold;
        letter-spacing: 0.02em;
    }

    .footer-top__contacts {
        width: 510px;
    }

    .footer-top__contacts-title {
        font-size: 20px;
    }

    .footer-top__items {
        list-style: none;
        padding: 14px 0 0;
    }

    .footer-top__item {
        color: var(--color-footer-content);
        margin-bottom: 30px;
    }

    .footer-top__mailing {
        width: 650px;
    }

    .footer-top__mailing-title {
        font-size: 20px;
    }

    .footer-top__mailing-description {
        padding: 14px 0 0;
        color: var(--color-footer-content);
        line-height: 23px;
        width: 300px;
    }

    .footer-top__mailing-input-wrapper {
        margin-top: 25px;
        display: flex;
        align-items: center;
    }

    .footer-top__mailing-input-img {
        cursor: pointer;
        width: 24px;
        height: 24px;
        margin-left: -37px;
        z-index: 2;
        transition: all ease-in-out 0.2s;

        &:hover {
            opacity: 0.6;
        }
    }

    .footer-top__mailing-input {
        background-color: #18141C;
        border: 1px solid #2D2835;
        padding: 10px 16px;
        border-radius: 8px;
        position: relative;
        font-size: 16px;
        width: 260px;
        color: #fff;

        &:-webkit-autofill,
        &:-webkit-autofill:hover,
        &:-webkit-autofill:focus,
        &:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 30px #18141C inset !important;
            -webkit-text-fill-color: #ffffff;
        }

        &:active, &:focus-visible {
            outline: none;
            border-color: #7a7487;
            background-color: #18141C;
            color: #fff;
        }
    }

    .footer-bottom {
        letter-spacing: 0.005em;
        display: flex;
        justify-content: space-between;
        margin-top: 26px;
        border-top: 1px solid #7C7484;
        color: #fff;
        font-size: 12px;
        padding: 42px 0 82px 0;
    }

    .footer-bottom__link {
        color: #7C7484;
    }

    .footer-bottom__copyright {
        padding: 0;
        margin: 0;
        color: #7C7484;
    }
}

.cases-page {
    background: #09070B;

    .cases {
        padding-top: 86px;
        min-height: 600px;
    }

    .section-title {
        margin-top: 96px;
        margin-bottom: 26px;
    }

    .cases-description {
    margin-bottom: 58px;
    color: #fff;
    font-size: 20px;
    max-width: 445px;
    line-height: 30px;
    letter-spacing: 0.015em;
    }

    .cases-list {
    }

    .cases-list__filter {
        display: flex;
        gap: 19px;
        margin-bottom: 32px;
    }

    .cases-list__filter-item {
        &.button.primary {
            &:active, &:hover {
                transform: none;
            }
        }
    }

    .case__img {
    }

    .case__title {
        margin-top: 16px;
    }


    .case__description {
        max-width: 270px;
    }
}