/* Styles */
/*============================================================================*/

html, body {
    height: 100%;
    margin: 0;
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* setup our defaults */
html {
    background-size: cover;
    background-color: #555;
    background-attachment: fixed;
    background-position: center center;
    background-image: url("images/mountain-bg.jpg");
}

body {
    color: #3b4351;
    font-size: .8rem;
    overflow-x: hidden;
    background: transparent;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-weight: 500;
  line-height: 1.2;
  margin: .5em 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.6rem;
}

h3, h4, h5, h6 {
    font-size: 1rem;
}

/*============================================================================*/

/* preload our images */
#slides-preload {
    width: 1px;
    height: 1px;
    top: -100%;
    left: -100%;
    position: absolute;
    animation-iteration-count: 1;
    animation: bg-slides 1s linear;
}

/* run slide show */
html {
    animation-delay: 4s; /* Delay to give time for images to downloads */
    animation: bg-slides 60s ease-in-out infinite;
}

/* Slide show of background images */
@keyframes bg-slides {
    from {
        background-image: url("images/mountain-bg.jpg");
    }
    7% {
        background-image: url("images/mountain-bg.jpg");
    }

    14% {
        background-image: url("images/canion-bg.jpg");
    }
    21% {
        background-image: url("images/canion-bg.jpg");
    }

    28% {
        background-image: url("images/forest-bg.jpg");
    }
    35% {
        background-image: url("images/forest-bg.jpg");
    }

    42% {
        background-image: url("images/cave-bg.jpg");
    }
    49% {
        background-image: url("images/cave-bg.jpg");
    }

    56% {
        background-image: url("images/ice-bg.jpg");
    }
    63% {
        background-image: url("images/ice-bg.jpg");
    }

    70% {
        background-image: url("images/river-bg.jpg");
    }
    77% {
        background-image: url("images/river-bg.jpg");
    }

    84% {
        background-image: url("images/alone-bg.jpg");
    }
    91% {
        background-image: url("images/alone-bg.jpg");
    }

    to {
        background-image: url("images/mountain-bg.jpg");
    }
}

/*============================================================================*/

/* Loading throbber */
#throbber-preload {
    position: absolute;
    opacity: 0;
    top: -100%;
    left: -100%;
    width: 0;
    height: 0;
    background: #555;
    animation-iteration-count: 1;
    animation: main-throbber 3s linear;
}

@keyframes main-throbber {
    0% {
        opacity: 1;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    30% {
        opacity: 1;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    99% {
        opacity: 0;
        top: 0;
        left: 0;
        z-index: 1;
        width: 100%;
        height: 100%;
    }
    100% {
        visibility: hidden;
        z-index: -10;
        top: -100%;
        left: -100%;
        width: 0;
        height: 0;
    }
}

/*============================================================================*/

.loading-ring {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.loading-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 51px;
    height: 51px;
    margin: 6px;
    border: 6px solid #fff;
    border-radius: 50%;
    animation: loading-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #fff transparent transparent transparent;
}

.loading-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.loading-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.loading-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

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

/*============================================================================*/

#grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    height: 100%;
    width: 100%;
    grid-gap: 1rem;
    align-items: center;
    grid-template-areas:
        "a b b b"
        "d c c e"
        "f f g g"
        "h h h h";
}

#throbber-preload {
    grid-area: a;
}

#content {
    margin: 1em
    padding: 3em;
    grid-area: c;
    opacity: 0.75;
    background: #FFF;
    text-align: center;
    border-radius: .5em;
}

/*============================================================================*/
