@import url("https://fonts.googleapis.com/css?family=Dancing+Script");

/**
 * Page Loader - Animated Bus Scene
 */

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #fff7b0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.credit-section {
    position: absolute;
    text-align: left;
    left: 15px;
    bottom: 20px;
    color: #fff;
    font-size: 16px;
}

.credit-section a {
    color: #faee5a;
    cursor: pointer;
}

.heading {
    top: 80px !important;
    left: 0 !important;
    width: 100%;
    text-align: center;
    font-family: "Dancing Script", cursive;
}

.heading h1 {
    font-size: 70px;
    color: #68b69f;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.main-section {
    height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
    background: #68cdaf;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
}

#scene {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.cloud_3 {
    top: 20px !important;
    left: -150px !important;
    width: 400px;
    animation: animateCloud3 15s linear infinite alternate both;
}

.cloud_3 img {
    width: 100%;
}

.cloud_1 {
    top: 200px !important;
    left: -150px !important;
}

.cloud_2 {
    left: auto !important;
    top: -50px !important;
    right: -50px !important;
    width: 300px;
    animation: animateCloud4 15s linear infinite alternate both;
}

.rope-line {
    top: auto !important;
    bottom: 140px;
    height: 85px;
    left: -50px !important;
    right: -50px;
    z-index: 2;
}

.rope-line>.inner {
    background: url("https://res.cloudinary.com/dyquku6bs/image/upload/v1537333317/rope-line_zd9qwz.png");
    background-size: 1500px;
    background-repeat: repeat-x;
    height: 100%;
}

.hills-background-wrap {
    top: auto !important;
    bottom: 145px;
    z-index: -1;
    height: 230px;
    left: -50px !important;
    right: -50px;
}

.hills-background-wrap>.inner {
    background: url("https://res.cloudinary.com/dyquku6bs/image/upload/v1537333316/hill-bg_rzukmt.png");
    background-size: 3000px;
    background-repeat: repeat-x;
    height: 100%;
}

.buildings-bg {
    top: auto !important;
    bottom: 145px;
    z-index: 1;
    height: 255px;
    left: -50px !important;
    right: -50px;
}

.buildings-bg>.inner {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    background: url("https://res.cloudinary.com/dyquku6bs/image/upload/v1537333316/buildings-background_rxiq0u.png") 0% 0% repeat-x;
    animation: move-bg 1000s linear reverse;
    background-size: 3000px;
}

.bus-wrap {
    position: absolute;
    bottom: 53px;
    /* Moved up to sit better on the road surface */
    top: auto !important;
    z-index: 999;
    left: auto !important;
    right: 80px;
    width: 400px;
    height: 117px;
    /* Based on aspect ratio 182/621 * 400 */
}

.bus-wrap>.inner {
    position: relative;
    animation: bus-bounce 0.75s linear infinite;
}

.bus-wrap svg {
    width: 100%;
    display: block;
}

.bus-wrap .tyres-wrapper {
    display: none;
    /* Removed the 2 wheel cap objects as requested */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.bus-wrap .tyres-wrapper .tyres-content:nth-child(1) {
    position: absolute;
    top: 78.8%;
    /* Calculated from SVG: 143.5 / 182 */
    left: 25.7%;
    /* Calculated from SVG: 160 / 621 */
    transform: translate(-50%, -50%);
}

.bus-wrap .tyres-wrapper .tyres-content:nth-child(2) {
    position: absolute;
    top: 78.8%;
    left: 74.0%;
    /* Calculated from SVG: 460 / 621 */
    transform: translate(-50%, -50%);
}

.bus-wrap .tyres {
    position: relative;
    z-index: 10;
    width: 12px;
    height: 12px;
    background: #f4f4f4;
    border-radius: 50%;
    border: 4px solid #333;
}

.bus-wrap .rim-section {
    position: relative;
    width: 12px;
    height: 12px;
    background: #f3f3f3;
    border-radius: 50%;
}

.bus-wrap .rim-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border: 2px dashed #4e5066;
    border-radius: 50%;
    animation: rim-dot 2s linear infinite;
}

.road-wrap {
    height: 150px;
    background: #4a4953;
    position: absolute;
    top: auto !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    /* Behind the bus, but in front of background elements */
}

.road-wrap .bar {
    position: absolute;
    content: "";
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 39px 9px;
    background-repeat: repeat-x;
    height: 4px;
    left: 0;
    width: 100%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.road-wrap .bar:before {
    content: "";
    position: absolute;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0) 0%);
    background-size: 39px 9px;
    height: 4px;
    left: -101%;
    display: block;
    width: 100%;
}

.road-wrap:before {
    position: absolute;
    content: "";
    left: 0;
    right: 0;
    top: 10px;
    border-top: 5px solid #e6db69;
}

/* ANIMATIONS */

#background-wrap {
    opacity: 0.7;
}

.x1 {
    animation: animateCloud 100s linear infinite;
    transform: scale(0.2);
    position: absolute;
    top: 50px;
}

.x2 {
    animation: animateCloud1 200s linear infinite;
    transform: scale(0.3);
    position: absolute;
    top: 300px;
}

.x3 {
    animation: animateCloud2 150s linear infinite;
    transform: scale(0.4);
    position: absolute;
    top: 150px;
}

/* Clouds */

.cloud {
    background: #fff;
    background: linear-gradient(top, #fff 5%, #f1f1f1 100%);
    border-radius: 100px;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    height: 120px;
    position: relative;
    width: 350px;
}

.cloud:after,
.cloud:before {
    background: #fff;
    content: "";
    position: absolute;
    z-index: -1;
}

.cloud:after {
    border-radius: 100px;
    height: 100px;
    left: 50px;
    top: -50px;
    width: 100px;
}

.cloud:before {
    border-radius: 200px;
    width: 180px;
    height: 180px;
    right: 50px;
    top: -90px;
}

.slide-right {
    animation: slide-right 30s linear infinite both;
}

.slide-right-img {
    animation: slide-right-img 100s linear infinite;
}

.slide-right-buildings {
    animation: slide-right-buildings 115s linear infinite;
}

.slide-right-rope {
    animation: slide-right-rope 90s linear infinite;
}

/* KEYFRAMES */

@keyframes animateCloud {
    0% {
        left: -20%;
    }

    100% {
        left: 100%;
    }
}

@keyframes animateCloud1 {
    0% {
        left: -10%;
    }

    100% {
        left: 100%;
    }
}

@keyframes animateCloud2 {
    0% {
        left: -30%;
    }

    100% {
        left: 100%;
    }
}

@keyframes animateCloud3 {
    0% {
        margin-left: 0;
    }

    100% {
        margin-left: 100px;
    }
}

@keyframes animateCloud4 {
    0% {
        margin-right: 0;
    }

    100% {
        margin-right: 150px;
    }
}

@keyframes wire-move {
    0% {
        margin-bottom: 0;
    }

    100% {
        margin-bottom: -30px;
    }
}

@keyframes slide-right {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes slide-right-rope {
    100% {
        background-position: 5000px 0;
    }
}

@keyframes slide-right-buildings {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 5000px 0;
    }
}

@keyframes slide-right-img {
    100% {
        background-position: 3000px 0;
    }
}

@keyframes bus-bounce {
    0% {
        top: 1px;
    }

    20% {
        top: 0px;
    }

    40% {
        top: 1px;
    }

    75% {
        top: 0px;
    }

    100% {
        top: 0px;
    }
}

@keyframes rim-dot {
    0% {
        transform: rotateZ(0deg);
    }

    50% {
        transform: rotateZ(-180deg);
    }

    100% {
        transform: rotateZ(-360deg);
    }
}

@keyframes move-bg {
    to {
        background-position-x: 5000%;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-section {
        height: 100vh;
        width: 100%;
        max-width: 100%;
    }

    .heading h1 {
        font-size: 50px;
    }

    .bus-wrap {
        width: 350px;
        right: 60px;
    }

    .cloud_3 {
        width: 350px;
    }

    .cloud_2 {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .main-section {
        height: 100vh;
        width: 100%;
        max-width: 100%;
        border: none;
    }

    .heading {
        left: 25% !important;
        top: 30px !important;
    }

    .heading h1 {
        font-size: 40px;
    }

    .bus-wrap {
        width: 280px;
        right: 40px;
    }

    .bus-wrap .tyres-wrapper .tyres-content:nth-child(1) {
        bottom: 25px;
        left: 56px;
    }

    .bus-wrap .tyres-wrapper .tyres-content:nth-child(2) {
        bottom: 25px;
        right: 73px;
    }

    .bus-wrap .tyres {
        width: 14px;
        height: 14px;
        border: 6px solid #333;
    }

    .bus-wrap .rim-section {
        width: 10px;
        height: 10px;
    }

    .bus-wrap .rim-dot {
        width: 8px;
        height: 8px;
    }

    .cloud_3 {
        width: 300px;
    }

    .cloud_2 {
        width: 200px;
    }

    .rope-line {
        bottom: 115px;
        height: 70px;
    }

    .hills-background-wrap {
        bottom: 120px;
        height: 180px;
    }

    .buildings-bg {
        bottom: 120px;
        height: 200px;
    }

    .road-wrap {
        height: 120px;
    }
}

@media (max-width: 576px) {
    .main-section {
        height: 100vh;
        width: 100%;
        max-width: 100%;
        border: none;
    }

    .heading {
        left: 20% !important;
        top: 20px !important;
    }

    .heading h1 {
        font-size: 28px;
    }

    .bus-wrap {
        width: 200px;
        right: 20px;
        bottom: 10px;
    }

    .bus-wrap .tyres-wrapper .tyres-content:nth-child(1) {
        bottom: 18px;
        left: 40px;
    }

    .bus-wrap .tyres-wrapper .tyres-content:nth-child(2) {
        bottom: 18px;
        right: 52px;
    }

    .bus-wrap .tyres {
        width: 10px;
        height: 10px;
        border: 4px solid #333;
    }

    .bus-wrap .rim-section {
        width: 8px;
        height: 8px;
        border: 1px solid #f1f1f1;
    }

    .bus-wrap .rim-dot {
        width: 6px;
        height: 6px;
        border: 1px dashed #4e5066;
    }

    .cloud_3 {
        width: 200px;
        top: 10px !important;
        left: -100px !important;
    }

    .cloud_2 {
        width: 150px;
        top: -30px !important;
    }

    .cloud_1 {
        top: 150px !important;
    }

    .rope-line {
        bottom: 90px;
        height: 60px;
    }

    .rope-line>.inner {
        background-size: 1000px;
    }

    .hills-background-wrap {
        bottom: 95px;
        height: 140px;
    }

    .hills-background-wrap>.inner {
        background-size: 2000px;
    }

    .buildings-bg {
        bottom: 95px;
        height: 150px;
    }

    .buildings-bg>.inner {
        background-size: 2000px;
    }

    .road-wrap {
        height: 95px;
    }

    .x1 {
        transform: scale(0.15);
    }

    .x2 {
        transform: scale(0.2);
        top: 200px;
    }

    .x3 {
        transform: scale(0.25);
        top: 100px;
    }
}

@media (max-width: 400px) {
    .main-section {
        height: 100vh;
    }

    .heading h1 {
        font-size: 24px;
    }

    .bus-wrap {
        width: 160px;
    }

    .rope-line {
        bottom: 75px;
    }

    .hills-background-wrap {
        bottom: 80px;
        height: 120px;
    }

    .buildings-bg {
        bottom: 80px;
        height: 130px;
    }

    .road-wrap {
        height: 80px;
    }
}