@font-face {
    font-family: Chivo;
    src: url("/fonts/Chivo/Chivo-VariableFont_wght.ttf");
}

:root {
    --nebula-red: #5F2C34;
    --nebula-black: #0C1714;
    --achernar-white: #D9EBFC;
    --twilight-blue: #2C345F;
    --twilight-green: #2C4E5F;
    --dawn-blue: #6973A8;
}

* {
    margin: 0;
    padding: 0;
}

html, body {
    font-family: Chivo, sans-serif;
    background: var(--achernar-white);
    color: var(--nebula-black);
    font-size: 18px;
    transition: color 500ms, background 500ms;
}

.document {
    width: 75%;
    margin: 0 auto;
}

.center {
    text-align: center;
}

h2 {
    margin: 25px;
    font-size: 2.5em;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

h3 {
    font-size: 2em;
    margin: 20px 0;
}

h4 {
    font-size: 1.5em;
    margin: 15px 0;
}

h5 {
    font-size: 1.3em;
    margin: 15px 0;
}

p {
    line-height: 3ex;
}

a {
    color: var(--twilight-blue);
    text-decoration: underline;

    &:visited {
        color: var(--twilight-green);
    }

    &.email {
        color: var(--nebula-black);
        font-size: 1.5em;
        text-decoration: none;
    }
}

.marquee {
    position: relative;
    width: 100%;
    height: 170px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;

    &.autoscroll {
        overflow-x: hidden;
        > .content {
            position: absolute;
            left: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: max-content;
            animation: autoscroll 5s ease-in-out infinite alternate;
        }

        &:hover {
            > .content {
                animation-play-state: paused;
            }
        }
    }

    > .content {
        list-style: none;
        margin: 0;

        > * {
            display: inline-block;

            img {
                display: inline-block;
                width: 128px;

                &.logo {
                    filter: saturate(0);
                    margin: 0 20px;
                    transition: 500ms filter;

                    &:hover {
                        filter: saturate(0.8)
                    }

                    &.python {
                        width: auto;
                        height: 100px;
                        margin-right: -5px;
                    }

                    &.flask {
                        width: auto;
                        height: 100px;
                    }

                    &.fastapi {
                        width: auto;
                        height: 50px;
                    }

                    &.javascript {
                        width: auto;
                        height: 100px;
                    }

                    &.vuejs {
                        width: auto;
                        height: 70px;
                    }
                }
            }
        }
    }

}

header {
    background: var(--nebula-red);
    color: var(--achernar-white);
    text-align: center;

    > h1 {
        font-size: 1.5em;
        font-weight: normal;

        img {
            max-width: 128px;
            margin: 20px;
        }

        > strong {
            padding: 100px;
            display: block;
            font-weight: normal;
            font-size: 1.5em;
        }
    }

    &.hero {
        padding: 70px 50px;

        > h1 {
            img {
                max-width: 600px;
            }
        }
    }
}

section {
    padding: 50px;

    > h2 {
        > strong {
            font-weight: bolder;
            color: var(--twilight-blue);
        }

        > i {
            font-style: normal;
        }
    }

    &#a-propos {
        container-name: a-propos;
    }

    &#customers {
        > h2 {
            margin-bottom: 75px;
        }

        > .marquee > .content .logo {
            width: auto;
            height: 64px;
            margin: 0 40px;

            &.decathlon {
                height: 70px;
            }

            &.izi {
                height: 80px;
            }
        }
    }

    > p {
        margin: 100px;
        text-align: center;
        font-size: 1.3em;

        > em {
            font-style: normal;
            font-weight: bold;
        }

        &.small {
            font-size: 0.95em;
        }
    }

    > small {
        display: block;
        text-align: right;
    }
}

footer {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
    background: var(--twilight-blue);
    color: var(--achernar-white);

    a {
        color: var(--achernar-white);

        &:visited {
            color: inherit;
        }
    }
}

form {
    text-align: center;

    > button {
        background: var(--twilight-green);
        border: none;
        border-radius: 5px;
        color: var(--achernar-white);
        font-size: 1em;
        padding: 10px 20px;
        margin: 15px;
        cursor: pointer;
        transition: 500ms background;

        &:hover {
            background: var(--twilight-blue);
        }
    }
}

ul {
    margin: 15px 30px;
}

@keyframes autoscroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(calc(100vw - 100px) - 100%));
    }
}

@media(prefers-color-scheme: dark) {
    html, body {
        background: var(--nebula-black);
        color: var(--achernar-white);
        font-size: 18px;
    }

    section > h2 > strong {
        color: var(--dawn-blue);
    }
}

@media(max-width: 1000px) {
    .marquee.autoscroll > .content {
        animation-duration: 15s;
    }
}

@media(max-width: 730px) {
    html, body {
        font-size: 15px;
    }

    header.hero {
        padding: inherit;
        > h1 img {
            max-width: 128px;
            margin: 20px;
        }
    }

    h2 {
        margin: 25px 0;
    }

    section {
        padding: 5px 20px;

        > p {
            margin: 100px 0;
        }
    }

    .marquee > .content > * img {
        width: 96px;
    }
}

@media(min-width: 1790px) {
    #a-propos > .marquee.autoscroll > .content {
        animation: none;
        width: 100%;
    }
}

@media(min-width: 1400px) {
    #customers > .marquee.autoscroll > .content {
        animation: none;
        width: 100%;
    }
}

@media(prefers-reduced-motion: reduce) {
    .marquee {
        position: initial;
        white-space: initial;
        height: auto;
        text-align: center;

        &.autoscroll > .content {
            position: initial;
            animation: none;
            width: 100%;
            display: block;
            line-height: 10ex;
            > li {
                vertical-align: middle;
            }
        }
    }
}
