@font-face {
    font-family: 'ABC Areal';
    src: url(../../fonts/areal/ABCArealVariable.ttf) format('truetype');
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Areal Mono';
    src: url(../../fonts/areal/ABCArealMonoVariable.ttf) format('truetype');
    font-weight: 400 700;
    font-display: swap;
}

.container {
    display: flex;
    height: 100vh;
    position: relative;

    --star-shape: polygon(
        50% 0%, 53.8% 40.8%, 85.4% 14.6%, 59.2% 46.2%,
        100% 50%, 59.2% 53.8%, 85.4% 85.4%, 53.8% 59.2%,
        50% 100%, 46.2% 59.2%, 14.6% 85.4%, 40.8% 53.8%,
        0% 50%, 40.8% 46.2%, 14.6% 14.6%, 46.2% 40.8%
    );

    .site-title {
        position: absolute;
        top: 3px;
        left: 50%;
        pointer-events: none;

        font-family: 'ABC Areal', Helvetica, Arial, sans-serif;
        font-size: 1.1vw;
        line-height: 1.1;
        white-space: nowrap;
        color: transparent;

        &::before,
        &::after {
            content: attr(data-title);
            content: attr(data-title) / "";
            position: absolute;
            top: 0;
            left: 0;
            translate: calc(-50% - 1.1em) 0;
            z-index: 10;
        }

        &::before {
            color: #fff;
        }

        &::after {
            display: none;
        }

        @media (orientation: landscape) {
            &::before {
                mix-blend-mode: difference;
            }

            &::after {
                display: block;
                color: #808080;
                mix-blend-mode: saturation;
            }
        }
    }

    .meta-nav {
        flex: 0 0 50%;
        position: relative;
        display: flex;
    }

    .meta-pages {
        flex: 1 1 100%;
        position: relative;
        overflow: hidden;

        border-left: 0.5vw solid transparent;
        background:
            linear-gradient(to right, red, transparent) border-box left / 1.5vw 100% no-repeat,
            #000;

        --planet-size: 44vmin;
    }

    .is-positioned .satellite {
        visibility: visible;
    }

    .planet {
        position: absolute;
        top: 50%;
        left: 50%;
        width: var(--planet-size);
        height: var(--planet-size);
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: radial-gradient(#2d2d2d, #212121 66%, transparent 100%);
        z-index: 2;
        box-shadow: 0 0 calc(0.1 * var(--planet-size)) rgba(0, 0, 0, 0.618);
    }

    .satellite {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 3;

        will-change: transform, opacity, filter;

        visibility: hidden;

        --satellite-font-size: 1vw;

        font-family: 'ABC Areal', Helvetica, Arial, sans-serif;
        font-size: var(--satellite-font-size);
        line-height: 1;
        color: #777;

        &.besonders {
            font-family: 'ABC Areal Mono', monospace;
            font-size: calc(var(--satellite-font-size) * 0.9);

            &:hover {
                color: lime;
            }
        }

        width: max-content;
        max-width: 20%;
        text-align: center;
        text-decoration: none;

        &.is-current {
            color: red;
        }

        &:hover {
            color: red;
            text-decoration: underline;
            opacity: 1 !important;
        }

        &::before {
            content: "";
            position: absolute;
            bottom: calc(100% + 0.4em);
            left: 50%;
            translate: -50% 0;
            width: calc(var(--planet-size) * 0.035);
            aspect-ratio: 1;
            border-radius: 50%;
            background: currentColor;
        }

        &.besonders::before {
            width: calc(var(--planet-size) * 0.035 * 1.3 * 1.3);
            rotate: 22.5deg;
            border-radius: 0;
            clip-path: var(--star-shape);
        }
    }

    .meta-nav.is-list .meta-pages > * {
        visibility: hidden;
    }

    .meta-menu {
        position: absolute;
        inset: 0;
        z-index: 5;
        overflow-y: auto;
        pointer-events: none;

        display: flex;
        flex-direction: column;
        padding-top: 3px;

        font-family: 'ABC Areal', Helvetica, Arial, sans-serif;
        font-size: 1.1vw;
        line-height: 1.1;
    }

    .meta-nav.is-list .meta-menu {
        pointer-events: auto;
    }

    .meta-menu-toggle {
        --icon-height: 0.72em;
        --icon-line: 1px;

        flex: 0 0 auto;
        align-self: flex-start;
        margin-left: 4px;
        height: 1.1em;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
        pointer-events: auto;

        display: flex;
        align-items: center;

        color: #e7e7e7;
        font: inherit;

        &:hover {
            color: red;
        }
    }

    .meta-menu-icon {
        display: block;
        position: relative;
        width: 1em;
        height: var(--icon-height);
        background:
            linear-gradient(currentColor 0 0) top    / 100% var(--icon-line) no-repeat,
            linear-gradient(currentColor 0 0) center / 100% var(--icon-line) no-repeat,
            linear-gradient(currentColor 0 0) bottom / 100% var(--icon-line) no-repeat;
    }

    .meta-nav.is-list .meta-menu-icon {
        background: none;

        &::before,
        &::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: calc(var(--icon-height) * 1.4142);
            height: var(--icon-line);
            background: currentColor;
            translate: -50% -50%;
            rotate: 45deg;
        }

        &::after {
            rotate: -45deg;
        }
    }

    .meta-list {
        margin-top: 0.5em;
        display: flex;
        flex-direction: column;

        font-size: 1.6vw;
        color: #777;
    }

    .meta-list-item {
        padding: 2px 4px 2px calc(1.5vw + 4px);
        color: inherit;
        text-decoration: none;

        & + & {
            border-top: 1px solid #555;
        }

        &.is-current {
            color: red;
        }

        &:hover {
            background: #555;
            color: #000;
        }
    }
}
