/*
    Dimension by HTML5 UP
    html5up.net | @ajlkn
    Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

body {
    background-color: #1b1f22;
}

#bg {
    -moz-transition: opacity 1s ease;
    -webkit-transition: opacity 1s ease;
    -ms-transition: opacity 1s ease;
    transition: opacity 1s ease;
    height: 100%;
    left: 0;
    opacity: 1; /* Changed from 0 to 1 to make it visible immediately */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: -1; /* Changed z-index to be behind other content */
}

#bg:before, #bg:after {
    content: '';
    display: block;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

#bg:before {
    -moz-transition: opacity 1.25s ease-in-out;
    -webkit-transition: opacity 1.25s ease-in-out;
    -ms-transition: opacity 1.25s ease-in-out;
    transition: opacity 1.25s ease-in-out;
    -moz-transition-delay: 0.25s;
    -webkit-transition-delay: 0.25s;
    -ms-transition-delay: 0.25s;
    transition-delay: 0.25s;
    background-image: linear-gradient(to top, rgba(19, 21, 25, 0.5), rgba(19, 21, 25, 0.5)), url(../../images/overlay.png);
    background-size: auto, 256px 256px;
    background-repeat: repeat, repeat;
    z-index: 2;
    opacity: 1; /* Changed from 0 to 1 */
}

#bg:after {
    -moz-transform: scale(1.125);
    -webkit-transform: scale(1.125);
    -ms-transform: scale(1.125);
    transform: scale(1.125);
    -moz-transition: -moz-transform 10s ease, opacity 1s ease;
    -webkit-transition: -webkit-transform 10s ease, opacity 1s ease;
    -ms-transition: -ms-transform 10s ease, opacity 1s ease;
    transition: transform 10s ease, opacity 1s ease;
    background-image: url(../../images/bg.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

body.is-article-visible #bg:after {
    -moz-transform: scale(1.0825);
    -webkit-transform: scale(1.0825);
    -ms-transform: scale(1.0825);
    transform: scale(1.0825);
}

body.is-preload #bg:before {
    opacity: 0;
} 