/* ==========================================================================
   Loading animation
   ========================================================================== */

#loadingScreen {
    position: fixed;
    top:      0;
    left:     0;
    width:    100%;
    height:   100%;
    z-index:  10;
    overflow: hidden;
}

.no-js #loadingScreen {
    display: none;
}

#loader {
    display:           block;
    position:          relative;
    left:              50%;
    top:               50%;
    width:             150px;
    height:            150px;
    margin:            -75px 0 0 -75px;
    border-radius:     50%;
    border:            2px solid transparent;
    border-top-color:  #D91522;
    -webkit-animation: spin 1.7s linear infinite;
    animation:         spin 1.7s linear infinite;
    z-index:           11;
}

#loader:before {
    content:           "";
    position:          absolute;
    top:               5px;
    left:              5px;
    right:             5px;
    bottom:            5px;
    border-radius:     50%;
    border:            2px solid transparent;
    border-top-color:  #E4CEB6;
    -webkit-animation: spin-reverse .6s linear infinite;
    animation:         spin-reverse .6s linear infinite;
}

#loader:after {
    content:           "";
    position:          absolute;
    top:               15px;
    left:              15px;
    right:             15px;
    bottom:            15px;
    border-radius:     50%;
    border:            2px solid transparent;
    border-top-color:  #755643;
    -webkit-animation: spin 1s linear infinite;
    animation:         spin 1s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform:     rotate(0deg);
        transform:         rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform:     rotate(360deg);
        transform:         rotate(360deg);
    }
}

@-webkit-keyframes spin-reverse {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(-360deg);
    }
}

@keyframes spin-reverse {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform:     rotate(0deg);
        transform:         rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(-360deg);
        -ms-transform:     rotate(-360deg);
        transform:         rotate(-360deg);
    }
}

#loadingScreen .screen {
    position:   fixed;
    top:        0;
    left:       0;
    width:      100%;
    height:     100%;
    background: #FFF;
    z-index:    10;
}

/* Loaded styles */
.loaded #loadingScreen .screen {
    -webkit-transition: all 0.5s .3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition:         all 0.5s .3s cubic-bezier(0.645, 0.045, 0.355, 1);
    opacity:            0;
}

.loaded #loader {
    opacity:            0;
    -webkit-transition: all 0.3s ease-out;
    transition:         all 0.3s ease-out;
}

.loaded #loadingScreen {
    visibility:         hidden;
    -webkit-transform:  translateY(-100%);
    -ms-transform:      translateY(-100%);
    transform:          translateY(-100%);
    -webkit-transition: all 0.3s 1s ease-out;
    transition:         all 0.3s 1s ease-out;
}

#unload {
    z-index:            -1;
    background:         #FFF;
    opacity:            0;
    position:           fixed;
    top:                0;
    left:               0;
    width:              100%;
    height:             100vh;
    -webkit-transition: opacity .3s;
    transition:         opacity .3s;
}

.unload #unload {
    opacity: 1;
    z-index: 9999;
}
