* {
    --main-background-color: #DBDACD;
    --main-text-color: #212121;
    --main-font: 'Kavivanar', sans-serif;

    --nav-selected-background-color: #314650;
    --nav-selected-text-color: #F6FEFF;

    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: -1;
    background-attachment: initial;
    pointer-events: none;

    background: var(--background-color);
    background: url('background.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

#document {
    width: 60%;
    margin: 2rem auto 5rem auto;

    background: var(--main-background-color);
    color: var(--main-text-color);
    font-family: var(--main-font);
}

@media (max-width: 1200px) {
    #document {
        width: 90%;
    }
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    padding: 1em;

    position: sticky;
    top: 0;
    background: var(--main-background-color);

    div {
        display: inline-block;
        padding: 0.8em;
        margin-left: 0.3em;
        margin-right: 0.3em;
        text-align: center;

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

        &.active, &:hover, &:hover a {
            background-color: var(--nav-selected-background-color);
            color: var(--nav-selected-text-color);
        }
    }
}

@media (max-width: 900px) {
    nav div {
        padding: 0.5em;
        margin-left: 0.2em;
        margin-right: 0.2em;
        font-size: 10pt;
    }
}

@media (max-width: 450px) {
    nav div {
        font-size: 8pt;
    }
}

#keyvisual {
    overflow: hidden;
    width: 100%;
    height: 340px;

    background-image: url('keyvisual.jpg');
    background-position: 50% 50%;
    background-size: 100% auto;
    background-repeat: no-repeat;
}

@media (max-width: 800px) {
    #keyvisual {
        height: 210px;
    }
}

@media (max-width: 500px) {
    #keyvisual {
        height: 170px;
    }
}

#description {
    padding: 1.5rem;

    & > :first-child {
        margin-top: 0;
    }

    & > :last-child {
        margin-bottom: 0;
    }

    ul {
        padding-left: 2em;

        & > li {
            margin-top: 0.8em;
            margin-bottom: 0.8em;
        }
    }

    p {
        font-family: 'Liberation Sans', 'Arial', sans-serif;
    }

    a {
        color: var(--main-text-color);
        text-decoration: underline;
    }

    h1 {
        font-size: 1.7em;
    }

    h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 1200px) {
    #description p {
        text-align: justify;
        hyphens: auto;
    }
}

@media (max-width: 800px) {
    #description {
        padding: 0.8em;
    }
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;

    & > div {
        display: flex;
        justify-content: center;
        flex-direction: column;

        img {
            width: 100%;
            max-height: 20rem;
            object-fit: cover;
        }
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }
}

:is(p, ul) + .gallery {
    margin-top: 2em;
}

#description .center {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    text-align: center;
}

img.one {
    width: 50%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    img.one {
        width: 100%;
    }
}

iframe {
    border: none;
}

#logo-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 5rem;

    img {
        margin: 0 auto;
        width: 20rem;
    }
}

@media (max-width: 22rem) {
    #logo-wrapper img {
        width: 15rem;
    }
}
