* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 100%;
    font: inherit;
}

html {
    /* font-size: 20px; */
    font-size: 18px;
}

@font-face {
    font-family: 'Graphik';
    src: url(Graphik-Regular-Web.woff);
    font-weight: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url(Graphik-Super-Web.woff);
    font-weight: bold;
}

body {
    background: #ff0022;
    line-height: 1.1;
    font-family: 'Graphik';
    color: #fff;
    text-transform: lowercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding: 1rem 2rem;
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
}

.blacktext {
    color: #000;
}

strong {
    font-weight: bold;
}

button {
    all: unset;
    appearance: none;
    cursor: pointer;
}




/* links */

a {
    color: inherit;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

a.external {
    padding-right: .8em;
    background-image: url(../images/external.svg);
    background-repeat: no-repeat;
    background-position: right 65%;
    background-size: .6em;
}

body:not(.blacktext) a.external {
    background-image: url(../images/external-white.svg);
}

::selection {
    background: #fff;
    color: #000;
}




/* header */
.header {
    display: flex;

    position: sticky;
    top: 1rem;
}

.header:after {
    content: '';
    background: linear-gradient(to bottom, var(--bgcolor) 50%, transparent 100%);
    display: block;
    width: 100%;
    position: absolute;
    top: -1rem;
    height: 5rem;
    z-index: -1;
}

.header-mobile {
    display: none;
}

.header-pages {
}

.header-pages br {
    display: none;
}

.header-languages {
    margin-left: auto;
}

a.active {
    font-weight: bold;
    text-decoration: none;
}

body.mobilemenu {
    overflow: hidden;
}

body.mobilemenu .header {
    position: fixed;
    inset: 0;
    background: var(--bgcolor);
    display: block;

    padding: inherit;
}




/* main */
.main {
    font-size: 2rem;
    margin-top: 5.5rem;
    max-width: 45ch;
}

p+p {
    margin-top: 1.1em;
}






/* overlay */

body.overlaid {
    overflow: hidden;
}

.overlay {
    position: fixed;
    inset: 0;
    height: auto;
    padding: 1rem 2rem;
    overflow: auto;

    opacity: 0;
    z-index: -1;

    transition: all .3s cubic-bezier(0.33, 1, 0.68, 1);
}

.overlay--open {
    opacity: 1;
    z-index: 400;
    transform: translateY(0%);
}

.overlay-content {
    transform: translateY(100vh);
    transition: all .3s cubic-bezier(0.33, 1, 0.68, 1);
    padding-top: 1.1em;
}

.overlay--open .overlay-content {
    transform: translateY(0%);
}

.overlaybg {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--bgcolor);
    opacity: 0;
    z-index: -1;
    transition: all .3s cubic-bezier(0.33, 1, 0.68, 1);
}

body.overlaid .overlaybg {
    opacity: .8;
    z-index: 1;
}

.close {
    position: fixed;
    right: .75rem;
    top: .55em;

    top: 0;
    right: 0;

    z-index: -1;
    opacity: 0;
    font-size: 2em;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.5em;
    text-align: center;

    transition: all .3s cubic-bezier(0.33, 1, 0.68, 1);
}

body.overlaid .close {
    opacity: 1;
    z-index: 500;
}


/* subpage */

h2 {
    margin-bottom: .55em;
    font-weight: bold;
}

.overlay-content {

    padding-bottom: 4.4rem;

    .block-group {
        background-image: linear-gradient(to bottom, transparent 0%, var(--bgcolor) 2.2rem, var(--bgcolor) calc(100% - 2.2rem), transparent 100%);
    }

    .block {
        padding-bottom: .55em;
        padding-top: .55em;
    }

    .block:not(.block-image) {
    }

    .block img {
        background: rgba(255,255,255,.2);
    }

    .blacktext .block img {
        background: rgba(0,0,0,.2);
    }

    p, ul, ol, figcaption {
        font-size: 1.5rem;
        max-width: 45ch;
    }

    ul, ol {
        padding-left: 1em;
    }

    figure {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 100%;
        width: auto;
    }

    img {
        max-width: 100%;
        width: auto;
        height: auto;
        max-height: 95dvh;
    }

    figcaption {
        margin-top: .65em;
    }
}




/* footer */
.footer {
    padding-top: 2.2em;
    margin-top: auto;
}



@media (max-width: 1000px) {
    html {
        font-size: 12px;
    }

    body, .overlay {
        padding: 1rem 10px;
    }

    .close {
        right: 0;
        top: 0;
        font-size: 2em;
        width: 1.5em;
        height: 1.5em;
        line-height: 1.5em;
    }

    body:not(.mobilemenu) .header-pages, body:not(.mobilemenu) .header-languages {
        display: none;
    }

    body.mobilemenu .header {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .header:after {
        height: 6rem;
    }

    body.mobilemenu .header:after {
        display: none;
    }

    body.mobilemenu .header-mobile-title {
        visibility: hidden;
    }

    body:not(.mobilemenu) .header-mobile-btn span+span {
        display: none;
    }

    body.mobilemenu span:first-of-type {
        display: none;
    }

    .header-mobile {
        display: flex;
        width: 100%;
    }

    .header-mobile-title {
        margin-right: auto;
        text-decoration: none;
    }

    .header, .footer {
        font-size: 2rem;
    }

    .header-pages, .header-languages {
        margin-top: 2.2em;
        font-size: 3.5rem;
        margin-left: 0;
    }

    .header-pages br {
        display: block;
    }
}