@import url("./variables.css");

@font-face {
    font-family: "Montserrat";
    src: url("../assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900; /* Диапазон весов */
}

h1 {
    font-size: 64px;
    font-weight: 400;
    margin: 0;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    font-family: "Montserrat";
    font-size: 16px;
    color: var(--wh-transperent-60);
    margin: 0;
    padding: 0 60px;
    position: relative;
    background-image: url("../assets/images/hero-bg.svg");
    background-position: left 0;
    background-repeat: no-repeat;
}

body.noscroll {
    overflow: hidden;
}

a {
    text-decoration: none;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    position: relative;
}

.menu-toggle {
    display: none;
}

.mobile-menu {
    display: none;
    position: absolute;
}

.navigation {
    display: flex;
    flex-direction: row;
    gap: 80px;
}

.nagivation-item {
    cursor: pointer;
    color: inherit;
    transition: var(--transition-short);
}

.nagivation-item:hover {
    color: var(--wh-transperent-40);
}

.hero h1 {
    font-size: 64px;
    line-height: 100%;
    color: var(--wh-transperent-93);
}

.subtitle {
    display: flex;
    flex-direction: row;
}

.subtitle .content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.subtitle .info {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.subtitle::before {
    content: "";
    flex: 1 1 auto;
}

.hero .description {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 650px;
    width: 100%;
}

button {
    font-family: inherit;
    transition: var(--transition-short);
}

button.primary {
    border: none;
    outline: none;
    background: none;
    color: var(--blue);
    width: fit-content;
    font-weight: 500;
    font-size: 18px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

button.primary::after {
    display: block;
    content: "";
    width: 20px;
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
}

button.primary[isLoading="false"]::after {
    background-image: url("../assets/images/arrow-up-right.svg");
}

button.primary[disabled] {
    opacity: 0.8;
    cursor: default;
}

button.primary[isLoading="true"]::after {
    background-image: url("../assets/images/spinner.svg");
    animation: spin 1s linear infinite;
}

button.primary:not([isLoading="true"]):hover {
    opacity: 0.8;
    cursor: pointer;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hero {
    display: flex;
    flex-direction: column;
    padding: 100px 0 0px;
}

.gradient {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.section h2 {
    color: var(--wh-transperent-40);
}

.section + .section {
    padding-top: 120px;
}

.about {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    & .content {
        display: flex;
        flex-direction: column;
        gap: 36px;
    }

    & .headline {
        text-indent: 30%;
        font-size: 24px;
        font-weight: 500;
        color: var(--wh-transperent-93);
        max-width: 990px;
        width: 100%;
    }

    & .description {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;

        & .row {
            display: flex;
            flex-direction: column;
            gap: 40px;
        }
    }

    & .description::after {
        content: "";
        width: 155px;
    }

    & .quote {
        position: relative;
    }

    & .quote::before {
        content: "";
        background-image: url("../assets/images/quote.svg");
        position: absolute;
        width: 23px;
        height: 25px;
        left: -43px;
        top: 19px;
    }

    & .images {
        display: flex;

        & div {
            border: var(--border-base);
            padding: 10px;
            box-sizing: border-box;
        }

        & :first-child {
            width: 305px;
            height: 305px;
        }

        & :last-child {
            width: 200px;
            height: 200px;
            border-left: none;
        }
    }
}

.services {
    display: flex;
    flex-direction: column;
    gap: 40px;

    & .content {
        display: grid;
        grid-template-columns: 1fr 1fr;

        & .list {
            display: flex;
            flex-direction: column;
            border: var(--border-base);
            border-left: none;

            & .item {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                padding: 20px 20px 20px 8px;
                transition: var(--transition-short);

                & .text {
                    display: none;
                }

                & + .item {
                    border-top: var(--border-base);
                }

                & svg path {
                    transition: var(--transition-short);
                }

                &:hover {
                    cursor: pointer;
                    color: var(--wh-transperent-93);
                    & svg path {
                        fill: var(--blue);
                        fill-opacity: 1;
                    }
                }

                &.active {
                    color: var(--wh-transperent-93);

                    & svg path {
                        fill: var(--blue);
                        fill-opacity: 1;
                    }
                }
            }
        }

        & .description {
            border-top: var(--border-base);
            border-bottom: var(--border-base);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 20px 20px 20px 16px;

            & .text {
                max-width: 520px;
                width: 100%;
            }
        }
    }
}

.faq {
    display: grid;
    grid-template-columns: 1fr 1fr;

    & .content {
        border: var(--border-base);
        border-right: none;

        & .item {
            display: flex;
            flex-direction: column;
            padding: 22px 8px 0px 20px;
            margin-bottom: 22px;

            & .question {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                color: var(--wh-transperent-60);
                transition: var(--transition-short);
            }

            & + .item {
                border-top: var(--border-base);
            }

            & svg {
                transition: var(--transition-short);
            }

            &.active {
                & .question {
                    color: var(--wh-transperent-93);

                    & svg {
                        transform: rotate(45deg);

                        & path {
                            fill: var(--wh-transperent-60);
                            fill-opacity: 1;
                        }
                    }
                }

                & .answer {
                    max-height: 200px;
                }
            }

            &:hover {
                & .question {
                    color: var(--wh-transperent-93);
                    cursor: pointer;

                    & svg {
                        & path {
                            fill: var(--wh-transperent-60);
                            fill-opacity: 1;
                        }
                    }
                }
            }

            & .answer {
                overflow: hidden;
                max-height: 0px;
                transition: max-height 0.4s ease;
            }
        }
    }
}

.contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;

    & .info {
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        & .list {
            display: flex;
            flex-direction: column;
            gap: 12px;

            & a {
                color: var(--wh-transperent-60);
                transition: var(--transition-short);

                & svg path {
                    transition: var(--transition-short);
                }

                &:hover {
                    color: var(--blue);
                    & svg path {
                        fill: var(--blue);
                        fill-opacity: 1;
                    }
                }
            }

            & .item {
                font-size: 18px;
                font-weight: 500;
                display: flex;
                flex-direction: row;
                gap: 8px;
                align-items: center;
                width: fit-content;
            }
        }
    }
}

.request-form {
    position: relative;

    & .title {
        font-size: 24px;
        font-weight: 500;
        line-height: 120%;
        color: var(--wh-transperent-93);
        margin-bottom: 40px;
    }

    & form {
        & input, textarea {
            border-radius: 0px !important;
        }
        & input:not([type="checkbox"]),
        & textarea {
            border: var(--border-base);
            border-top: none;
            background: none;
            padding: 12px;
            width: 100%;
            outline: none;
            font-size: 16px;
            color: var(--wh-transperent-93);
            font-weight: 400;
            font-family: "Montserrat";
            transition: var(--transition-short);

            &::placeholder {
                color: var(--wh-transperent-40);
            }

            &[success] {
                background-image: url("../assets/images/check-ok.svg");
                background-position: right 12px center;
                background-repeat: no-repeat;
            }

            & + .error-label {
                opacity: 0;
                transition: 0.4s ease all;
                position: absolute;
                top: calc(100% + 4px);
                left: 4px;
                font-weight: 400;
                font-size: 14px;
                color: var(--error);
            }

            &[error] + .error-label {
                opacity: 1;
            }

            &:focus {
                &::placeholder {
                    opacity: 0;
                }

                border-color: var(--blue);
            }

            &:hover:not(:focus) {
                border-color: var(--wh-transperent-40);
            }
        }

        & .inputs {
            display: flex;
            flex-direction: row;
            gap: 16px;

            & .item {
                display: flex;
                flex: 1 1 auto;
                position: relative;
            }
        }

        & .textarea {
            display: flex;
            margin-top: 24px;

            & textarea {
                height: 140px;
                resize: none;
            }
        }

        & .policy-confirm {
            margin: 20px 0;
            display: flex;
            flex-direction: row;
            align-items: start;
            gap: 12px;
            font-size: 14px;
            font-weight: 400;

            & a {
                color: var(--wh-transperent-93);
            }

            & .custom-checkbox {
                & input {
                    width: 20px;
                    height: 20px;
                    position: absolute;
                    cursor: pointer;
                    opacity: 0;
                }

                & .checkmark {
                    width: 20px;
                    height: 20px;
                    display: block;
                    border: var(--border-base);

                    &.hint {
                        background-color: var(--wh-transperent-20);
                    }
                }

                & input:checked + .checkmark::before {
                    content: "";
                    display: block;
                    background-image: url("../assets/images/check.svg");
                    width: 100%;
                    height: 100%;
                    background-position: center;
                    background-repeat: no-repeat;
                }
            }
        }
    }

    & .result {
        font-size: 16px;
        font-weight: 500;
        line-height: 130%;
        display: none;

        &[result="success"] {
            color: var(--success);
            position: absolute;
            top: 100px;
        }

        &[result="error"] {
            margin-top: 40px;
            color: var(--error);
        }
    }

    &[loading] {
        & form {
            opacity: 0.5;
            pointer-events: none;
        }
    }

    &[success] {
        & form {
            opacity: 0;
        }

        & [result="success"] {
            display: block;
        }
    }

    &[error] {
        & [result="error"] {
            display: block;
        }
    }
}

.footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 40px 0px;

    & .copyright {
        font-size: 18px;
        font-weight: 500;
        color: var(--wh-transperent-60);
        display: flex;
        align-items: center;
    }

    & .label {
        font-size: 14px;
        font-weight: 400;
        color: var(--wh-transperent-40);
        display: flex;
        align-items: center;
    }
}

.footer-divider {
    position: absolute;
    bottom: 102px;
    height: 1px;
    background-color: var(--wh-transperent-10);
    left: 0;
    right: 0;
}

.footer-bg {
    position: absolute;
    bottom: 120px;
    right: 0px;
    z-index: -1;
}

.hero-bg {
    position: absolute;
    top: 225px;
    left: 306px;
    z-index: -1;
}

.overlay {
    z-index: -1;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: var(--overlay);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: 0.4s ease all;
}

.overlay.active {
    opacity: 1;
    z-index: 10;
}

.modal {
    z-index: 100;
    position: fixed;
    top: 20px;
    right: -720px;
    bottom: 20px;
    width: 700px;
    background: linear-gradient(270deg, rgba(17, 29, 44, 0.48) 21.47%, rgba(31, 47, 67, 0.48) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: calc(100vh - 38px);
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition-short);

    &.active {
        right: 20px;
    }

    & .modal-title {
        margin-bottom: 40px;
        font-size: 18px;
        font-weight: 500;
        color: var(--wh-transperent-40);
    }

    & .close {
        position: absolute;
        top: 40px;
        right: 40px;

        & svg path {
            transition: var(--transition-short);
        }

        &:hover {
            cursor: pointer;
            & svg path {
                fill-opacity: 0.6;
            }
        }
    }
}

.desktop-hidden {
    display: none !important;
}

.hero + .section {
    padding-top: 125px;
}

#service-description {
    line-height: 130%;
}
