:root {
    --color-primary: #159929;
    --color-primary-hover: #0C8822;

    --color-red: #FE3824;

    --color-white: #FFFFFF;
    --color-white-gray: #F8F8F8;
    --color-light-gray: #F0F0F0;
    --color-border-gray: #D8D8D8;
    --color-gray: #5A5A5A;
    --color-dark-gray: #222222;

    --font-weight-bold: 600;

    --control-border-radius: 8px;

    --content-margin-x: 16px;
    --footer-padding-x: 24px;
    --footer-padding-y: 24px;

    @media (min-width: 375px) {
        --content-margin-x: 24px;
        --footer-padding-x: 32px;
    }

    @media (min-width: 744px) {
        --content-margin-x: 32px;
        --footer-padding-x: 40px;
        --footer-padding-y: 22px;
    }

    @media (min-width: 960px) {
        --content-margin-x: 40px;
        --footer-padding-x: 72px;
    }

    @media (min-width: 1128px) {
        --footer-padding-x: 88px;
    }

    @media (min-width: 1440px) {
        --content-margin-x: 56px;
        --footer-padding-x: 112px;
    }

    @media (min-width: 1728px) {
        --content-margin-x: 104px;
        --footer-padding-x: 168px;
    }

    @media (min-width: 1920px) {
        --footer-padding-x: 176px;
    }
}

@font-face {
    font-family: "Avenir";
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/hinted-avenir-roman.woff2?x13e8w") format("woff2"),
        url("/assets/fonts/hinted-avenir-roman.woff?x13e8w") format("woff");
}

@font-face {
    font-family: "Avenir";
    font-weight: normal;
    font-style: italic;
    font-display: swap;
    src: url("/assets/fonts/hinted-avenir-oblique.woff2?x13e8w") format("woff2"),
        url("/assets/fonts/hinted-avenir-oblique.woff?x13e8w") format("woff");
}

@font-face {
    font-family: "Avenir";
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/hinted-avenir-heavy.woff2?x13e8w") format("woff2"),
        url("/assets/fonts/hinted-avenir-heavy.woff?x13e8w") format("woff");
}

@font-face {
    font-family: "Avenir";
    font-weight: 600;
    font-style: italic;
    font-display: swap;
    src: url("/assets/fonts/hinted-avenir-heavy-oblique.woff2?x13e8w") format("woff2"),
        url("/assets/fonts/hinted-avenir-heavy-oblique.woff?x13e8w") format("woff");
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    word-break: break-word;
}

input, button, textarea, select {
    font: inherit;
}

html, body {
    min-height: 100%;
    font-family: Avenir, sans-serif;
    font-size: 16px;
    line-height: 1.35;
    color: var(--color-dark-gray);
}

body {
    position: absolute;
    width: 100%;
}

a {
    color: var(--color-primary);
    text-decoration: none;

    &:hover,
    &:focus {
        text-decoration: underline;
    }
}

.svg-icon {
    fill: currentColor;
    height: 1em;
    width: 1em;
}

.button {
    --button-background-color: transparent;
    --button-border-color: transparent;

    background-color: var(--button-background-color);
    border: 1px solid var(--button-border-color);
    border-radius: var(--control-border-radius);

    cursor: pointer;

    color: var(--color-dark-gray);
    font-weight: var(--font-weight-bold);
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 48px;
    padding: 0 32px;

    &.wide {
        width: 100%;
    }

    &.bigger {
        height: 56px;
    }

    &.primary {
        --button-background-color: var(--color-primary);
        --button-border-color: var(--color-primary);

        color: var(--color-white);

        &:hover,
        &:focus {
            background-color: var(--color-primary-hover);
            border-color: var(--color-primary-hover);
        }
    }
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;

    color: var(--color-dark-gray);
    font-size: 16px;

    background-color: var(--color-white);
    border: 1px solid var(--color-border-gray);
    border-radius: var(--control-border-radius);

    &:focus,
    &:focus-within {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: inset 0 0 0 1px var(--color-primary);
    }
}

.form {
    .row {
        display: flex;
        gap: 16px;

        & + & {
            margin-top: 32px;
        }

        .col {
            flex-basis: 0;
            flex-grow: 1;
        }
    }

    .field {
        .label {
            display: block;

            font-size: 14px;
            font-weight: var(--font-weight-bold);
            line-height: 140%;

            margin-bottom: 4px;

            &.required:after {
                content: "*";
                color: var(--color-red);
                margin-left: 4px;
            }
        }
    }
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 96px;
}

.hero {
    margin-top: 64px;
    margin-bottom: 64px;
    padding: 0 var(--content-margin-x);

    @media (min-width: 375px) {
        margin-top: 72px;
        margin-bottom: 128px;
    }

    @media (min-width: 1128px) {
        display: flex;
        align-items: center;
        gap: 56px;
    }

    .details {
        --hero-details-padding-left: 0px;

        flex-grow: 1;
        text-align: center;

        padding-left: var(--hero-details-padding-left);

        @media (min-width: 1128px) {
            --hero-details-padding-left: 46px;

            text-align: left;
        }

        @media (min-width: 1440px) {
            --hero-details-padding-left: 56px;
        }

        .title {
            font-size: 48px;
            font-weight: var(--font-weight-bold);
            line-height: 114%;
            letter-spacing: -0.96px;

            margin-bottom: 8px;

            @media (min-width: 744px) {
                font-size: 64px;
                line-height: 106%;
                letter-spacing: -1.28px;
            }

            @media (min-width: 1920px) {
                font-size: 96px;
                letter-spacing: -1.92px;
            }
        }

        .description {
            font-size: 18px;
            line-height: 135%; /* 24.3px */
            letter-spacing: -0.18px;

            margin-bottom: 32px;

            @media (min-width: 744px) {
                font-size: 20px;
                letter-spacing: -0.2px;
            }
        }

        .apply-button {
            width: 208px;
        }
    }

    .media {
        --media-primary-width: 223px;
        --media-primary-height: 300px;
        --media-secondary-width: 141px;
        --media-secondary-height: 197px;

        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        gap: 32px;

        margin-top: 88px;

        @media (min-width: 744px) {
            --media-primary-width: 257px;
            --media-primary-height: 346px;
            --media-secondary-width: 163px;
            --media-secondary-height: 228px;
        }

        @media (min-width: 1440px) {
            --media-primary-width: 309px;
            --media-primary-height: 385px;
            --media-secondary-width: 197px;
            --media-secondary-height: 274px;
        }

        @media (min-width: 1728px) {
            --media-primary-width: 368px;
            --media-primary-height: 495px;
            --media-secondary-width: 234px;
            --media-secondary-height: 326px;
        }

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

            .photo {
                background-color: var(--color-white-gray);
                overflow: hidden;

                position: relative;

                img,
                video {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }

                video {
                    cursor: pointer;
                }

                .control {
                    background-color: transparent;
                    border: none;
                    cursor: pointer;

                    color: var(--color-white);
                    font-size: 16px;

                    display: flex;
                    align-items: center;
                    justify-content: center;

                    position: absolute;

                    padding: 0;

                    &.off {
                        .icon.on {
                            display: none;
                        }
                    }

                    &:not(.off) {
                        .icon.off {
                            display: none;
                        }
                    }
                }

                .play-toggle {
                    pointer-events: none;

                    background-color: rgba(0, 0, 0, .5);
                    border-radius: 50%;
                    box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.25);

                    font-size: 24px;

                    width: 48px;
                    height: 48px;

                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);

                    opacity: 0;
                    visibility: hidden;
                    transition: visibility .3s, opacity .3s, box-shadow .3s;

                    &.off {
                        opacity: 1;
                        visibility: visible;
                    }
                }

                .sound-toggle {
                    bottom: 16px;
                    right: 16px;

                    width: 16px;
                    height: 16px;
                }
            }

            .label {
                color: var(--color-dark-gray);
                font-size: 14px;
                line-height: 135%;
                letter-spacing: -0.14px;
                text-decoration: none;
            }

            &:nth-child(1),
            &:nth-child(3) {
                .photo {
                    border-radius: 8px;

                    width: var(--media-secondary-width);
                    height: var(--media-secondary-height);
                }
            }


            &:nth-child(1) {
                transform: rotate(-3.554deg);
            }

            &:nth-child(3) {
                transform: rotate(5.509deg);
            }

            &:nth-child(2) {
                transform: rotate(2.373deg);

                .photo {
                    border-radius: 16px;

                    width: var(--media-primary-width);
                    height: var(--media-primary-height);
                }
            }
        }
    }
}

.section-title {
    font-size: 34px;
    font-weight: var(--font-weight-bold);
    line-height: 114%; /* 38.76px */
    letter-spacing: -0.68px;

    @media (min-width: 744px) {
        font-size: 48px;
        letter-spacing: -0.96px;
    }
}

.steps {
    --steps-padding-x: 24px;
    --steps-padding-y: 64px;

    @media (min-width: 744px) {
        --steps-padding-x: 40px;
    }

    @media (min-width: 1128px) {
        --steps-padding-y: 128px;
    }

    @media (min-width: 1440px) {
        --steps-padding-x: 56px;
    }

    background-color: var(--color-light-gray);
    border-radius: 24px;

    margin: 0 var(--content-margin-x);
    padding: var(--steps-padding-y) var(--steps-padding-x);

    text-align: center;

    .title {
        margin-bottom: 72px;
    }

    .items {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 48px;

        list-style: none;
        margin: 0 auto;
        padding: 0;

        max-width: 400px;

        @media (min-width: 1128px) {
            flex-direction: row;
            align-items: flex-start;
            gap: 32px;

            max-width: 100%;
        }

        .item {
            margin: 0;
            padding: 0;

            min-width: 0;

            @media (min-width: 1128px) {
                flex-basis: 0;
                flex-grow: 1;
            }

            .icon-container {
                --icon-container-size: 96px;

                display: inline-flex;
                align-items: center;
                justify-content: center;

                background-color: var(--color-white);
                border-radius: 24px;

                height: var(--icon-container-size);
                width: var(--icon-container-size);

                margin-bottom: 32px;

                .icon {
                    color: var(--color-primary);
                    font-size: 32px;
                }
            }

            .name {
                font-size: 24px;
                font-weight: var(--font-weight-bold);
                line-height: 114%; /* 27.36px */
                letter-spacing: -0.24px;

                margin-bottom: 8px
            }

            .desctiption {
                color: var(--color-gray);
                line-height: 135%; /* 21.6px */
                letter-spacing: -0.16px;
            }
        }
    }
}

.apply {
    --apply-margin-y: 64px;

    @media (min-width: 744px) {
        --apply-margin-y: 96px;
    }

    @media (min-width: 1128px) {
        --apply-margin-y: 128px;
    }

    @media (min-width: 1728px) {
        --apply-margin-y: 180px;
    }

    display: flex;
    justify-content: center;
    margin: var(--apply-margin-y) var(--content-margin-x);

    .title {
        margin-bottom: 56px;
        text-align: center;
    }

    .form {
        max-width: 432px;
        width: 100%;
    }
}

.footer {
    background-color: var(--color-white-gray);
    padding: 48px var(--footer-padding-x) var(--footer-padding-y) var(--footer-padding-x);

    .link {
        color: var(--color-gray);
        font-size: 14px;
        line-height: 1.5;
        text-decoration: none;

        &:hover,
        &:focus {
            text-decoration: underline;
        }
    }

    .top {
        display: flex;
        align-items: center;
        justify-content: space-between;

        margin-bottom: 48px;

        .logo {
            &.mobile {
                @media (min-width: 744px) {
                    display: none;
                }
            }

            &.desktop {
                display: none;

                @media (min-width: 744px) {
                    display: block;
                }
            }
        }

        .socials {
            display: flex;
            align-items: center;
            gap: 16px;

            @media (min-width: 744px) {
                gap: 24px;
            }

            .social {
                color: var(--color-gray);
                font-size: 18px;

                &.facebook {
                    &:hover,
                    &:focus {
                        color: #1877F2;
                    }
                }

                &.instagram {
                    &:hover,
                    &:focus {
                        color: #E1306C;
                    }
                }

                &.tiktok {
                    &:hover,
                    &:focus {
                        color: #000000;
                    }
                }

                &.youtube {
                    &:hover,
                    &:focus {
                        color: #FF0000;
                    }
                }

                &.reviews {
                    &:hover,
                    &:focus {
                        color: #000000;
                    }
                }
            }
        }
    }

    .middle {
        --footer-middle-columns: 2;
        --footer-middle-gap: 16px;

        @media (min-width: 744px) {
            --footer-middle-columns: 3;
        }

        @media (min-width: 1128px) {
            --footer-middle-columns: 6;
        }

        display: flex;
        flex-wrap: wrap;

        margin: 0 calc(var(--footer-middle-gap) / -2);

        .group {
            margin-bottom: 32px;
            padding: 0 calc(var(--footer-middle-gap) / 2);

            width: calc(100% / var(--footer-middle-columns));

            @media (min-width: 1128px) {
                margin-bottom: 48px;
            }

            .name {
                font-size: 16px;
                font-weight: var(--font-weight-bold);
                line-height: 135%;

                margin-bottom: 4px;
            }

            .links {
                .link {
                    display: block;
                    margin: 10px 0;
                }
            }
        }
    }

    .bottom {
        border-top: 1px solid var(--color-border-gray);

        color: var(--color-gray);
        font-size: 14px;
        line-height: 1.5;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;

        padding-top: var(--footer-padding-y);

        @media (min-width: 744px) {
            flex-direction: row;
        }

        .col {
            flex-shrink: 0;

            &.banner {
                @media (min-width: 744px) {
                    flex-grow: 1;
                    text-align: right;
                }
            }
        }

        .links {
            display: flex;
            gap: 16px;
        }
    }
}

.modal {
    position: fixed;

    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;
    transition: visibility .3s, opacity .3s;

    &.open {
        visibility: visible;
        opacity: 1;
        z-index: 100;
    }

    .overlay {
        content: '';

        display: block;
        background-color: rgba(0, 0, 0, .5);

        position: absolute;
        z-index: 0;

        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .dialog {
        --dialog-margin-x: 16px;
        --dialog-margin-top: 40px;
        --dialog-margin-bottom: 80px;

        position: relative;
        z-index: 1;

        margin: var(--dialog-margin-top) var(--dialog-margin-x) var(--dialog-margin-bottom) var(--dialog-margin-x);
        width: calc(100% - var(--dialog-margin-x) * 2);
        max-height: calc(100% - var(--dialog-margin-top) - var(--dialog-margin-bottom));

        .close {
            --dislog-close-padding: 4px;

            background-color: transparent;
            border: none;
            cursor: pointer;

            color: var(--color-white);
            font-size: 16px;

            position: absolute;
            bottom: calc(100% + 16px);
            right: 0;

            padding: var(--dislog-close-padding);
            margin: calc(var(--dislog-close-padding) * -1);
        }

        .content {
            background-color: var(--color-white);
            border-radius: 12px;
            box-shadow: 0 32px 40px 0 rgba(0, 0, 0, 0.25);

            padding: 40px;
        }
    }
}

.alert-modal {
    .dialog {
        max-width: 380px;
    }

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

        .title {
            font-size: 24px;
            font-weight: var(--font-weight-bold);
            letter-spacing: -0.48px;

            margin: 0;
        }

        .message {
            color: var(--color-gray);

            margin: 0;
            margin-top: 8px;

            text-align: center;
        }

        .submit {
            margin-top: 32px;
        }
    }
}
