body {
    overflow-x: hidden;
    -webkit-transition: all 300ms linear;
    transition: all 300ms linear;
}

/* PREVENT BACKGROUND SCROLLING WHEN MENU IS ACTIVE */
body.nav-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* #Navigation
================================================== */

.cd-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
}

.header-wrapper {
    position: relative;
    width: calc(100% - 100px);
    margin-left: 50px;
}

.logo-wrap {
    position: absolute;
    display: block;
    left: 0;
    top: 40px;
    cursor: pointer;
}

.logo-wrap a {
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease-out;
}

.logo-wrap a span {
    color: #8167a9;
}

.logo-wrap a:hover {
    opacity: 0.9;
}

.nav-but-wrap {
    position: relative;
    display: none;
    float: right;
    z-index: 12;
    padding-left: 15px;
    transition: all 0.3s ease-out;
}

.menu-icon {
    height: 30px;
    width: 30px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    display: block;
}

.menu-icon__line {
    height: 2px;
    width: 30px;
    display: block;
    background-color: #fff;
    margin-bottom: 7px;
    cursor: pointer;
    -webkit-transition: background-color .5s ease, -webkit-transform .2s ease;
    transition: background-color .5s ease, -webkit-transform .2s ease;
    transition: transform .2s ease, background-color .5s ease;
    transition: transform .2s ease, background-color .5s ease, -webkit-transform .2s ease;
}

.menu-icon__line-left {
    width: 16.5px;
    -webkit-transition: all 200ms linear;
    transition: all 200ms linear;
}

.menu-icon__line-right {
    width: 16.5px;
    float: right;
    -webkit-transition: all 200ms linear;
    -moz-transition: all 200ms linear;
    -o-transition: all 200ms linear;
    -ms-transition: all 200ms linear;
    transition: all 200ms linear;
}

.menu-icon:hover .menu-icon__line-left,
.menu-icon:hover .menu-icon__line-right {
    width: 30px;
}

body.nav-active .nav__content {
    visibility: visible;
}

body.nav-active .nav__content .nav__list {
    display: block;
}

body.nav-active .nav__content .nav__list .nav__list-item {
    margin: 30px 0;
}

body.nav-active .menu-icon__line {
    background-color: #fff;
    -webkit-transform: translate(0px, 0px) rotate(-45deg);
    transform: translate(0px, 0px) rotate(-45deg);
}

body.nav-active .menu-icon__line-left {
    width: 15px;
    -webkit-transform: translate(2px, 4px) rotate(45deg);
    transform: translate(2px, 4px) rotate(45deg);
}

body.nav-active .menu-icon__line-right {
    width: 15px;
    float: right;
    -webkit-transform: translate(-3px, -3.5px) rotate(45deg);
    transform: translate(-3px, -3.5px) rotate(45deg);
}

body.nav-active .menu-icon:hover .menu-icon__line-left,
body.nav-active .menu-icon:hover .menu-icon__line-right {
    width: 15px;
}

body.nav-active .nav {
    visibility: visible;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
}

body.nav-active .nav:before,
body.nav-active .nav:after {
    -webkit-transform: translateX(0%) translateY(0%);
    transform: translateX(0%) translateY(0%);
    border-radius: 0;
}

body.nav-active .nav:after {
    -webkit-transition-delay: .1s;
    transition-delay: .1s;
}

body.nav-active .nav:before {
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
}

body.nav-active .nav__list-item {
    opacity: 1;
    -webkit-transform: translateX(0%);
    transform: translateX(0%);
    -webkit-transition: opacity .3s ease, color .3s ease, -webkit-transform .3s ease;
    transition: opacity .3s ease, color .3s ease, -webkit-transform .3s ease;
    transition: opacity .3s ease, transform .3s ease, color .3s ease;
    transition: opacity .3s ease, transform .3s ease, color .3s ease, -webkit-transform .3s ease;
}

body.nav-active .nav__list-item:nth-child(0) {
    -webkit-transition-delay: 0.7s;
    transition-delay: 0.7s;
}

body.nav-active .nav__list-item:nth-child(1) {
    -webkit-transition-delay: 0.8s;
    transition-delay: 0.8s;
}

body.nav-active .nav__list-item:nth-child(2) {
    -webkit-transition-delay: 0.9s;
    transition-delay: 0.9s;
}

body.nav-active .nav__list-item:nth-child(3) {
    -webkit-transition-delay: 1s;
    transition-delay: 1s;
}

body.nav-active .nav__list-item:nth-child(4) {
    -webkit-transition-delay: 1.1s;
    transition-delay: 1.1s;
}

body.nav-active .nav__list-item:nth-child(5) {
    -webkit-transition-delay: 1.2s;
    transition-delay: 1.2s;
}

body.nav-active .nav__list-item:nth-child(6) {
    -webkit-transition-delay: 1.3s;
    transition-delay: 1.3s;
}

body.nav-active .nav__list-item:nth-child(7) {
    -webkit-transition-delay: 1.4s;
    transition-delay: 1.4s;
}

body.nav-active .nav__list-item:nth-child(8) {
    -webkit-transition-delay: 1.5s;
    transition-delay: 1.5s;
}

body.nav-active .nav__list-item:nth-child(9) {
    -webkit-transition-delay: 1.6s;
    transition-delay: 1.6s;
}

body.nav-active .nav__list-item:nth-child(10) {
    -webkit-transition-delay: 1.7s;
    transition-delay: 1.7s;
}

.switch-wrap {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 10;
    transform: translateY(-50%);
    width: 100%;
    -webkit-transition: all 500ms linear;
    transition: all 500ms linear;
    margin: 0 auto;
    text-align: center;
}

.switch-wrap h1 {
    font-weight: 900;
    font-size: 46px;
    line-height: 1;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 40px;
    -webkit-transition: all 300ms linear;
    transition: all 300ms linear;
}

@media screen and (max-width: 580px) {
    .switch-wrap h1 {
        font-size: 32px;
    }
}

.switch-wrap p {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 1;
    color: #8167a9;
    text-align: center;
    margin-top: 15px;
}

.switch-wrap p span {
    position: relative;
}

.switch-wrap p span:before {
    position: absolute;
    content: '';
    width: 100%;
    height: 2px;
    background-color: #fff;
    left: 0;
    bottom: -4px;
    -webkit-transition: all 300ms linear;
    transition: all 300ms linear;
}

.switch-wrap p span:nth-child(2):before {
    opacity: 0;
}

#switch,
#circle {
    cursor: pointer;
    -webkit-transition: all 300ms linear;
    transition: all 300ms linear;
}

#switch {
    width: 60px;
    height: 8px;
    margin: 0 auto;
    text-align: center;
    border: 2px solid #000;
    border-radius: 27px;
    background: #8167a9;
    position: relative;
    display: inline-block;
}

#circle {
    position: absolute;
    top: -11px;
    left: -13px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    box-shadow: 0 4px 4px rgba(26, 53, 71, 0.25), 0 0 0 1px rgba(26, 53, 71, 0.07);
    background: #fff;
}

.switched {
    border-color: #8167a9 !important;
    background: #000 !important;
}

.switched #circle {
    left: 43px;
    background: #000;
}

/* #Light
================================================== */

body.light {
    background-color: #fff;
}

body.light .cursor,
body.light .cursor2,
body.light .cursor3 {
    mix-blend-mode: normal;
}

body.light .cursor2 {
    border: 2px solid #1f2029;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

body.light .cursor2.hover {
    background: rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

body.light .logo-wrap a {
    color: #1f2029;
}

body.light .menu-icon__line {
    background-color: #1f2029;
}

body.light .nav:before {
    background: rgba(235, 235, 235, 0.6);
}

body.light .nav:after {
    background: rgba(250, 250, 250, 1);
}

body.light .nav__list-item a {
    color: rgba(0, 0, 0, 0.6);
}

body.light .nav__list-item a:hover {
    color: #1f2029;
}

body.light .nav__list-item.active-nav a {
    color: #1f2029;
}

body.light .switch-wrap h1 {
    color: #000;
}

body.light .switch-wrap p span:nth-child(2):before {
    opacity: 1;
    background-color: #000;
}

body.light .switch-wrap p span:nth-child(1):before {
    opacity: 0;
}

/* #Mobile Logo Fix
================================================== */

@media screen and (max-width: 768px) {
    .nav-but-wrap {
        display: block;
    }

    /* Logo positioning for mobile - fixed when menu active */
    body.nav-active .logo {
        position: fixed !important;
        top: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10000 !important;
    }

    .logo {
        display: block !important;
        justify-content: unset !important;
        align-items: unset !important;
        margin: unset !important;
        float: unset !important;
        left: unset !important;
        right: unset !important;
        position: unset !important;
    }

    .logo img {
        max-width: 120px;
        height: auto;
        width: 120px;
    }

    /* Clean navigation content positioning */
    body.nav-active .nav__content {
        padding-top: 15px;
        padding-bottom: 70px;
    }

    /* PREVENT CONTENT PEEK-THROUGH WHEN MENU IS ACTIVE */
    body.nav-active main,
    body.nav-active footer {
        display: none !important;
    }

    /* Flexbox Layout for Full Height Menu */
    body.nav-active .nav__content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: 100vh;
        min-height: 0;
        padding-top: 90px;
        padding-bottom: 70px;
        box-sizing: border-box;
    }

    /* Logo scaling with viewport height */
    body.nav-active .logo {
        position: static !important;
        margin-top: 3vh;
        margin-bottom: 2vh;
        z-index: 10000;
    }

    body.nav-active .logo img {
        max-height: 60px;
        height: 8vh;
        width: auto;
        min-height: 48px;
    }

    /* Menu list scaling */
    body.nav-active .nav__list {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.nav-active .nav__list .nav__list-item {
        margin: 0.8vh 0 !important;
    }

    /* Registrieren Button always at the bottom */
    body.nav-active .nav__list .Btn {
        margin-top: 1vh;
        margin-bottom: 40px;
        font-size: 1.8vh;
        padding: 1vh 2.5vh;
        min-width: 100px;
    }

    .logo-mobile {
        background: none !important;
        box-shadow: none !important;
        margin-bottom: 1vh;
        margin-top: 1.5vh;
        pointer-events: none;
    }

    .logo-mobile img {
        display: block;
        margin: 0 auto;
        max-height: 40px;
        height: 6vh;
        width: auto;
    }

    body.nav-active .logo,
    body.nav-active .logo-wrap {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    .logo-mobile {
        display: none !important;
    }
}

@media screen and (orientation: landscape) and (max-width: 1024px) {
    body.nav-active .nav__content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: 100vh;
        min-height: 0;
        padding-top: 90px;
        padding-bottom: 70px;
        box-sizing: border-box;
    }

    body.nav-active .nav__list {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.nav-active .nav__list .nav__list-item {
        margin: 0.8vh 0 !important;
    }

    body.nav-active .nav__list .Btn {
        margin-top: 1vh;
        margin-bottom: 40px;
        font-size: 1.8vh;
        padding: 1vh 2.5vh;
        min-width: 100px;
    }
}

/* #Link to page
================================================== */

.link-to-portfolio {
    position: fixed;
    bottom: 40px;
    right: 50px;
    z-index: 200;
    cursor: pointer;
    width: 50px;
    height: 50px;
    text-align: center;
    border-radius: 3px;
    background-position: center center;
    background-size: 65%;
    background-repeat: no-repeat;
    background-image: url('https://assets.codepen.io/1462889/fcy.png');
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .1);
    transition: opacity .2s, border-radius .2s, box-shadow .2s;
    transition-timing-function: ease-out;
}

.link-to-portfolio:hover {
    opacity: 0.8;
    border-radius: 50%;
    box-shadow: 0 0 0 20px rgba(255, 255, 255, .1);
}