@font-face {
    font-family: 'Jost';
    src: url('../fonts/Jost-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('../fonts/Jost-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('../fonts/Jost-SemiBoldItalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

:root {
    --background: oklch(0.2681 0.0173 244.91);
    --background-second: oklch(0.3928 0.0173 244.91);
    --accent-color: oklch(0.6869 0.1839 44.34);
    --accent-dull: oklch(0.98 0 0);
    --accent-dull-transparent: oklch(0.98 0 0 / 50%);
    --text: oklch(0.98 0 0);
    --width-main: 1280px;
    --carousel-overlay: linear-gradient(to bottom, oklch(0 0 0 / 80%) 0%, oklch(0 0 0 / 0%) 50%);
}

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'Jost', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    background-color: var(--background);
    color: var(--text);
}

h1,
h2,
strong {
    font-weight: 600;
}

h2 {
    font-size: clamp(2rem, 4vw, 6rem);
    background-color: var(--accent-color);
    border-radius: 1.25rem;
    padding: 3rem 2rem 1rem;
    margin-bottom: 1rem;
    line-height: clamp(1.7rem, 4vw, 6rem);
}

.narrow {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.wide {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

section {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding-top: 2rem;
}



.lighter {
    background-color: var(--background-second);
}

.bottom-margin {
    margin-bottom: 2rem;
}

/* Header styles starts */

header {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

/* Navigation starts */
nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: clamp(2rem, 4vw, 3rem) 0;

    a.logo-pe111 {
        display: block;
        max-width: 65%;
    }

    a {
        text-decoration: none;
        color: var(--text);
        transition: color 0.3s ease;
        font-weight: 600;
        font-style: normal;
    }

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

    img.logo-pe111 {
        display: block;
        max-width: 100%;
        padding-left: 1rem;
    }

    button {
        background: none;
        display: block;
        border-style: none;
        padding: 0;
        width: 2rem;
        height: 2rem;
        background-image: url("../svg/icons/burger.svg");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        cursor: pointer;
    }

    button.active {
        background-image: url("../svg/icons/cross.svg");
    }

    ul {
        list-style-type: none;
    }

    ul.menu {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-around;
        gap: clamp(1rem, 4vw, 2rem);
        width: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.2s ease-out;

        .menu_item a {
            padding: 1rem 0;
            border-bottom: solid 0.35rem var(--background);
        }
    }

    ul.menu.active {
        padding: 3rem 0;
        max-height: 25rem;
    }

    ul.menu .contacts {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: space-evenly;
        align-items: center;

        .contact_link {
            display: inline-flex;
            align-items: center;
            gap: .7rem;
            padding: .3rem 0;

            .contact_icon {
                width: 1.5rem;
                display: flex;
            }
        }
    }
}

/* Navigation ends */

/* Carousel styles starts*/

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: clamp(1.25rem, 0.89rem + 1.79vw, 2rem);
    aspect-ratio: 3 / 4;

    img {
        position: absolute;
        width: 100%;
        opacity: 0;
        transition: all 0.5s ease-in-out;
    }

    img.active {
        opacity: 1;
    }

    .slide {
        height: 100%;
    }

    h1 {
        color: var(--text);
        position: absolute;
        top: clamp(3rem, 5vh, 6rem);
        right: 1.5rem;
        left: 1.5rem;
        z-index: 10;
        text-align: right;
        line-height: clamp(1.6rem, 0.727rem + 4.364vw, 4rem);
        font-size: clamp(1.6rem, 0.727rem + 4.364vw, 4rem);
        font-style: italic;

        width: auto;
    }

    .dots {
        z-index: 10;
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
    }

    .dot {
        cursor: pointer;
        list-style: none;
        width: 3rem;
        height: 0.4rem;
        margin: 1rem 0.1rem;
        background-color: var(--accent-dull-transparent);
        transition: background-color 0.6s ease;
    }

    .dot.active {
        background-color: var(--accent-dull);
    }

    .dot:hover,
    .dot:focus-visible {
        background-color: var(--accent-color);
    }

    button {
        display: none;
    }
}

.carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--carousel-overlay);
    z-index: 1;
}

/* Carousel styles ends*/

/* Header styles ends */

/* Logos section starts */
.marquee-gallery {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 4rem;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    cursor: grab;
    width: 100%;
    padding: 2rem 0;
}

.marquee-gallery:active {
    cursor: grabbing;
}

.marquee-gallery .logos {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-around;
    gap: 4rem;
    list-style: none;
    min-width: 100%;
    pointer-events: none;
    will-change: transform;

    .logo {
        width: 100%;
        max-width: 16rem;
        height: 10rem;
    }
}

/* Logos section ends */

/* Portfolio section starts */

#portfolio {
    padding-bottom: 2rem;

    .portfolio-btn {
        display: block;
        margin: 2rem auto 0;
        padding: 0.8rem 2rem;
        font-family: 'Jost', sans-serif;
        font-size: clamp(1.1rem, 0.96rem + 0.6vw, 1.4rem);
        font-weight: 600;
        background-color: var(--background);
        color: var(--accent-color);
        border: solid .2rem var(--accent-dull);
        border-radius: 2rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .portfolio-btn:hover {
        color: var(--text);
        background-color: var(--accent-color);
    }
}

.portfolio {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    grid-template-rows: repeat(auto-fill, minmax(0, max-content));

    .portfolio-card.is-hidden {
        opacity: 0;
        visibility: hidden;
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
        border: none;
    }

    .portfolio-card {
        border: solid .2rem var(--accent-dull);
        border-radius: clamp(1.25rem, 0.89rem + 1.79vw, 2rem);
        overflow: hidden;
        position: relative;
        background-color: var(--background);
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease, visibility 0.3s ease;

        img {
            width: 100%;
            height: auto;
            display: block;
        }

        .icon {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 1rem;
            border-radius: 50%;
            border: solid .1rem var(--accent-color);
            background-color: var(--accent-dull);
            box-sizing: content-box;
            padding: .75rem;
            color: var(--accent-color);
            transition: all 0.3s ease-in-out;
        }

        .icon:hover,
        .icon:focus-visible {
            background-color: var(--accent-color);
            color: var(--accent-dull);
        }

        .portfolio-card-text {
            display: flex;
            flex-direction: column;
            flex-wrap: nowrap;
            justify-content: flex-end;
            border-left: solid 2rem var(--accent-color);
            padding: 1rem 2rem;
            height: 10rem;
            font-size: clamp(1.15rem, 0.9rem + 0.83vw, 1.5rem);
            line-height: clamp(1.17rem, 1rem + 0.83vw, 1.5rem);

            box-sizing: content-box;

            .name {
                font-weight: 600;
                font-size: clamp(1.2rem, 1.12rem + 0.4vw, 1.6rem);
            }

            p {
                margin-top: 1rem;
            }
        }
    }
}

/* Portfolio section ends */

/* Services section starts */

.services {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;

    .service-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-wrap: nowrap;
        border-radius: clamp(1.25rem, 0.89rem + 1.79vw, 2rem);
        border: solid 0.2rem var(--accent-dull);
        padding: 3rem 4rem;

        img {
            width: 8rem;
            height: 8rem;
            aspect-ratio: 1/1;
            padding: 0 0 2rem;
        }

        .service-text {
            border-top: solid 0.2rem var(--accent-color);
            padding: 2rem 0 0;
            text-align: center;

            h3 {
                font-size: clamp(1.25rem, 0.89rem + 1.79vw, 2rem);
                line-height: clamp(1.25rem, 0.89rem + 1.79vw, 2rem);
                padding-bottom: clamp(.5rem, 1.79vw, .85rem);
            }

            p {
                font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            }
        }

    }
}

/* Services section ends */

/* Team section starts */

.team {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;

    .team-card {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        padding: 2rem 0 0;

        img {
            border-radius: 50%;
            aspect-ratio: 1/1;
            border: solid .2rem var(--accent-color);
        }

        .team-card-text {
            display: flex;
            flex-direction: column;
            flex-wrap: nowrap;
            align-items: center;
            padding: 1rem 0 0;

            .name {
                font-size: clamp(1.3rem, 1.045rem + 1.273vw, 2rem);
                font-weight: 600;
                padding-bottom: 0.5rem;
            }

            p {
                font-size: clamp(1.2rem, 1.091rem + 0.545vw, 1.5rem);
            }
        }
    }
}

/* Team section ends */

/* Contacts section starts */

#contacts {
    .big-color {
        font-size: clamp(1.3rem, 1.045rem + 1.273vw, 2rem);
        font-weight: 600;
        padding: 0 2rem;
        color: var(--accent-color);
    }

    p {
        font-size: clamp(1.2rem, 1.091rem + 0.545vw, 1.5rem);
        padding: 0 2rem;
        color: var(--text);


    }

    p.margin-top-1 {
        margin-top: 1rem;
    }

    a {
        color: var(--text);
    }

    a:hover,
    a:focus-visible {
        text-decoration: underline solid var(--accent-color);
    }

    .iframe-container {
        width: 100%;
        max-width: 1280px;

        iframe {
            border-radius: 2rem;
            margin: 2rem 0;

            display: block;
            width: 100%;
            height: auto;
            aspect-ratio: 3 / 4;
            border: 0;
        }
    }
}

/* Contacts section ends */

/* Footer starts */

footer {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    padding: 5rem 0;
    border-top: solid .75rem var(--accent-color);

    p {
        font-size: clamp(1.3rem, 1.045rem + 1.273vw, 2rem);
    }
}

/* Footer ends */

/* Smartphones */
@media (max-width: 425px) {
    section.wide .narrow {
        margin-left: 0;
        margin-right: 0;
    }

    section.narrow .narrow {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Tabtlets */
@media (min-width: 426px) {
    h2 {
        border-top: solid 2px var(--accent-color);
        margin: 4rem 0 1rem;
        padding: 1rem 2rem 1rem;
        background-color: unset;
        border-radius: unset;
    }

    .carousel {
        aspect-ratio: 10 / 6;
    }

    .portfolio {
        grid-template-columns: 1fr 1fr;
    }

    .services {
        .service-card {
            flex-direction: row;
            align-items: flex-end;

            img {
                border-right: solid 0.2rem var(--accent-color);
                border-bottom: unset;
                padding: 0 3rem 0 0;
            }

            .service-text {
                border-top: unset;
                padding: 0 3rem;
                text-align: left;
            }
        }
    }

    #contacts {
        .iframe-container {
            iframe {
                aspect-ratio: 2 / 1;
            }
        }
    }
}

/* Desktops/laptops */
@media (min-width: 769px) {
    .portfolio {
        grid-template-columns: 1fr 1fr 1fr;
    }

    #contacts {
        .iframe-container {
            iframe {
                aspect-ratio: 16 / 6;
            }
        }
    }
}

@media (min-width: 1025px) {
    .carousel {
        aspect-ratio: 16 / 6;
    }
}

@media (min-width: 1280px) {
    .services {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1290px) {
    .narrow {
        width: min(var(--width-main), 100%);
        margin-inline: auto;
        overflow: hidden;
    }

    nav {
        flex-wrap: nowrap;
        /* padding: 3rem 0; */

        img.logo-pe111 {
            padding: 0;
        }

        button {
            display: none;
        }

        ul.menu {
            flex-direction: row;
            justify-content: space-evenly;
            width: auto;
            padding: initial;
            max-height: fit-content;

            .menu_item a {
                border-bottom: solid 0.35rem var(--background);
            }

            .menu_item a:hover {
                border-bottom: solid 0.35rem var(--accent-color);
                transition: all 0.9s ease;
            }

            .contacts {
                align-items: flex-end;
            }
        }



    }

    .carousel {
        aspect-ratio: 16 / 6;

        button {
            display: block;
            cursor: pointer;
            background-color: transparent;
            color: var(--accent-dull);
            padding: 2rem;
            border-radius: 1.25rem;
            border: none;
            filter: brightness(.98);
            z-index: 10;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            transition: all 0.3s ease-in-out;
        }

        button:hover,
        button:focus-visible {
            color: var(--accent-color);
            background-color: var(--accent-dull-transparent);
        }

        button[data-carousel-button="prev"] {
            left: 4rem;
        }

        button[data-carousel-button="next"] {
            right: 4rem;
        }

        .slide {
            height: unset;
            width: 100%;
        }

        h1 {
            width: inherit;
        }
    }
}