/*
|--------------------------------------------------------------------------
| Zentraler Seitenhintergrund
|--------------------------------------------------------------------------
|
| Diese Datei steuert den gemeinsamen Hintergrund des gesamten Frontends.
|
| Die eigentlichen Farbwerte werden zentral in variables.css gepflegt.
|
*/

html {
    min-height: 100%;
    background: var(--background-page-start);
}

body {
    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            var(--background-page-start) 0%,
            var(--background-page-middle) 42%,
            var(--background-page-end) 100%
        );

    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;

    color: var(--text-primary);
}


/*
|--------------------------------------------------------------------------
| Dezente Lichtakzente
|--------------------------------------------------------------------------
|
| Diese Ebenen erzeugen etwas Tiefe, ohne den eigentlichen Inhalt oder
| vorhandene Seitenhintergründe zu überlagern.
|
*/

body::before,
body::after {
    position: fixed;
    z-index: -1;

    width: 420px;
    height: 420px;

    content: "";

    pointer-events: none;

    border-radius: 50%;

    filter: blur(100px);
    opacity: 0.12;
}

body::before {
    top: -160px;
    left: -160px;

    background: var(--theme-current);
}

body::after {
    right: -180px;
    bottom: -180px;

    background: var(--color-primary-500);
}


/*
|--------------------------------------------------------------------------
| Auswahlmarkierung
|--------------------------------------------------------------------------
*/

::selection {
    color: var(--text-dark);
    background: var(--theme-current);
}


/*
|--------------------------------------------------------------------------
| Scrollbar
|--------------------------------------------------------------------------
*/

* {
    scrollbar-width: thin;
    scrollbar-color:
        var(--color-slate-600)
        var(--background-surface-solid);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--background-surface-solid);
}

*::-webkit-scrollbar-thumb {
    background: var(--color-slate-600);
    border:
        2px
        solid
        var(--background-surface-solid);
    border-radius: var(--radius-round);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-slate-500);
}


/*
|--------------------------------------------------------------------------
| Reduzierte Bewegung
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body {
        background-attachment: scroll;
    }
}


/*
|--------------------------------------------------------------------------
| Mobile Geräte
|--------------------------------------------------------------------------
|
| Fixed Backgrounds können auf mobilen Browsern zu Darstellungsproblemen
| und unnötigem Ressourcenverbrauch führen.
|
*/

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    body::before,
    body::after {
        width: 300px;
        height: 300px;

        filter: blur(80px);
        opacity: 0.09;
    }
}