:root {
    --color-primary: #E0F7FA;
    --color-secondary: #90A4AE;
    --color-third: #37474F;
    --color-four: #1DE9B6;
    --color-text-dark: #333;
    --color-text-header: #263238;
    --color-background: #fff;
    --space-primary: 30px;
    --space-minimal: 14px;
    --radius-primary: 16px;
    font-size: 16px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;;
    font-optical-sizing: auto;
    line-height: 1.618;
    font-style: normal;
}

.d-none {
    display: none;
}

.container {
    width: auto;
    padding-left: var(--space-minimal);
    padding-right: var(--space-minimal);
    margin-left: auto;
    margin-right: auto;
}

.header__background {
    background-color: var(--color-secondary);
}

.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .logo-container {
        line-height: 0;
    }

    .logo {
        max-height: 70px;
    }

    .navigation {
        flex-basis: 100%;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: var(--space-minimal);
        overflow: hidden;
        height: 0;
        transition: 0.5s;

        .link {
            color: var(--color-text-header);
        }
    }

    .navigation.show {
        height: 120px;
        padding-top: var(--space-minimal);
    }

    .menu-button {
        color: var(--color-text-header);
        font-size: 40px;
        line-height: 80px;
        cursor: pointer;
    }

    #navigation {
        display: none;
    }
}

.content {
    padding-top: 150px;
}

.title--container {
    display: flex;
    justify-content: center;

    .title-main {
        padding: 120px 0;
    }

    .title-main h2 {
        position: absolute;
        font-size: 60px;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }

    .title-main h2:nth-child(1) {
        color: var(--color-secondary);
        z-index: 1;
    }

    .title-main h2:nth-child(2) {
        color: var(--color-third);
        z-index: 4;
        animation: animate 4s ease-in-out infinite;
    }
}

.footer-break {
    background-color: var(--color-third);
    animation: animate 4s ease-in-out infinite;
    width: 100%;
    height: 100px;
}

.footer__background {
    background-color: var(--color-third);

    .footer {
        padding-top: var(--space-primary);
        padding-bottom: var(--space-primary);
        display: grid;
        gap: var(--space-minimal);
        grid-template-columns: 1fr 1fr;

        .list {
            list-style: none;
            font-size: 18px;
            color: #cfd8dc;

            li {
                margin-bottom: 8px;
            }

            a {
                color: #cfd8dc;
                text-decoration: none;
            }
        }

        .title--footer {
            color: #cfd8dc;
        }
    }
}

.copy__background {
    background-color: var(--color-third);

    .copy {
        padding-top: var(--space-primary);
        padding-bottom: var(--space-primary);
        color: #cfd8dc;
        text-align: center;
    }
}

.home {
    display: grid;
    gap: var(--space-primary);
    grid-template-columns: 1fr;

    .col {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
    }

    h2 {
        font-size: 36px;
        margin-bottom: var(--space-primary);
        color: #70848b;
    }

    img {
        max-width: 500px;
        border-radius: var(--radius-primary);
    }
}

.about {
    margin-bottom: 45px;
}

.services {
    padding-bottom: 80px;

    .services__list {
        display: grid;
        gap: var(--space-primary);
        grid-template-columns: 1fr;

        .card {
            position: relative;
            min-height: 500px;
            border-radius: var(--radius-primary);
            overflow: hidden;
        }

        .card__content {
            position: absolute;
            border-radius: var(--radius-primary);
            inset: 4px;
            z-index: 2;
            padding: 20px;
            background-color: white;
            text-align: center;

            h3 {
                width: 100%;
            }

            div {
                width: 100%;
            }

            .img-container {
                height: 230px;
                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
                margin-bottom: var(--space-minimal);
            }

            img {
                max-height: 230px;
                max-width: 100%;
                height: auto;
                display: block;
                object-fit: contain;
            }
        }

        .card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: var(--color-secondary);
            z-index: 1;
            transform-origin: bottom right;
            animation: spinner-border 6s linear infinite;
        }

        .card:nth-child(1)::before {
            background: #a173e5;
        }

        .card:nth-child(2)::before {
            animation-delay: -1.5s;
        }

        .card:nth-child(3)::before {
            animation-delay: -3s;
            background: var(--color-four);
        }

        .card:nth-child(4)::before {
            background-color: #0023c4;
            animation-delay: -4.5s;
        }
    }
}

.contact {
    position: relative;
    min-height: 300px;
    border-radius: var(--radius-primary);
    overflow: hidden;

    .contact__content {
        position: absolute;
        border-radius: var(--radius-primary);
        inset: 4px;
        z-index: 2;
        padding: 20px;
        background-color: white;
    }

    .list {
        list-style: none;
        font-size: 18px;
        color: var(--color-text-dark);

        li {
            margin-bottom: 8px;
        }
    }

    .title--contact {
        font-size: 22px;
        font-weight: 700;
        color: #009f7a;
    }
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-third);
    z-index: 1;
    transform-origin: bottom right;
    animation: spinner-border 5s linear infinite;
}

@media (min-width: 960px) {
    .header {
        .navigation {
            flex-basis: unset;
            display: flex;
            overflow: unset;
            height: unset;
            flex-direction: row;
            justify-content: end;
            align-items: center;
            gap: 20px;

            .link {
                padding: 12px 20px;
                font-weight: 400;
                text-decoration: none;
                transition: 0.5s;
            }

            .active {
                color: var(--color-text-dark);
                z-index: 5;
            }
        }

        .menu-button {
            display: none;
        }

        #navigation {
            display: block;
            position: absolute;
            background: var(--color-background);
            height: 50px;
            width: 50px;
            z-index: 1;
            top: 20px;
            border-top-left-radius: var(--space-minimal);
            border-top-right-radius: var(--space-minimal);
            transition: 0.5s;
        }

        #navigation::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: -30px;
            height: 30px;
            width: 30px;
            background: transparent;
            border-bottom-right-radius: 20px;
            box-shadow: 5px 5px 0 5px var(--color-background);
        }

        #navigation::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: -30px;
            height: 30px;
            width: 30px;
            background: transparent;
            border-bottom-left-radius: 20px;
            box-shadow: -5px 5px 0 5px var(--color-background);
        }
    }

    .services {
        .services__list {
            display: grid;
            gap: calc(var(--space-primary)*2);
            grid-template-columns: 1fr 1fr;
        }
    }

    .about {
        margin-bottom: 60px;
    }
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 1159px) {
    .order-2 {
        order: 2;
    }
}

@media (min-width: 1160px) {
    .container {
        max-width: 960px;
    }

    .home {
        display: grid;
        gap: 100px;
        grid-template-columns: 1fr 1fr;

        .col {
            display: block;
        }
    }

    .services {
        .services__list {
            gap: calc(var(--space-primary)*1);
            grid-template-columns: 1fr 1fr 1fr 1fr;

            .card {
                min-height: 700px;
            }
        }
    }
}

@media (min-width: 1300px) {
    .container {
        max-width: 1240px;
    }
}

@keyframes spinner-border {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate {
    0%, 100% {
        clip-path: polygon(0% 45%, 7% 42%, 13% 40%, 20% 41%, 26% 42%, 32% 46%, 37% 51%,
        44% 53%, 51% 55%, 55% 60%, 64% 60%, 71% 62%, 80% 62%, 84% 59%, 90% 57%, 94% 55%,
        98% 54%, 100% 51%, 100% 100%, 0% 100%);
    }
    50% {
        clip-path: polygon(0% 63%, 4% 61%, 9% 63%, 14% 66%, 20% 67%, 29% 67%, 36% 67%, 45% 64%, 52% 60%,
        60% 57%, 67% 54%, 74% 53%, 79% 49%, 85% 47%, 89% 47%, 94% 44%,
        96% 41%, 100% 37%, 100% 100%, 0% 100%);
    }
}