html, body {
  padding: 0;
  margin: 0;
  height: 100%;
}
body {
  font-size: 16px;
  font-family:  sans-serif;
  background: #2b334a;
  box-sizing: border-box;
  text-align: center;
  font-weight: 300;
  display: flex;
  flex-flow: column nowrap;
  justify-content: space-between;  
}

a {
  color: #839adc;
  text-decoration: none;
}
a:hover {
  color: #fff;
  text-decoration: underline;
}
footer {
  padding: 1rem 0;
}
footer a {
  padding: .5em 1em;
  display: inline-block;
}

p {
  color: #9096a7;
  padding: 0 1em;
  text-align: left;
  line-height: 1.5em;
  max-width: 600px;
  margin: 2em auto 0 auto;
}
p a {
  color: #dbe4ff;
  text-decoration: underline;
}

.btn {
  position: absolute;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.btn a {
  padding: .5em 1em;
  border-radius: 5px;
  background: #54638e;
  color: #dbe4ff;
}
.btn-restart {
  opacity: 1;
  pointer-events: all;
  transition: opacity .5s .1s ease-in;
}
.btn-stop {
  opacity: 0;
  pointer-events: none;
}

.loading .btn-restart {
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.loading .btn-stop {
  opacity: 1;
  pointer-events: all;
  transition: opacity .5s .1s ease-in;
}

.image {
  margin: 0 auto;
  margin-bottom: 3rem;
  display: inline-block;
  width: 100%;
  max-width: 600px;
  background: #000;
  position: relative;
  overflow: hidden;
}
.image:before {
  display: block;
  content: "";
  width: 100%;
}
.image.x40-21:before {
  padding-top: 52.5%; /* 40:21 aspect */
}
.image img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  opacity: 0;
}

.loading-complete img {
  transition: all .8s ease-in;
  opacity: 1;
}

.image .progress-bar {
  position: absolute;
  background: #444;
  color: #fff;
  line-height: 0;
  text-align: left;
  top: 50%;
  left: 50%;

  width: 100px;
  margin-left: -50px;

  height: 4px;
  margin-top: -2px;
  z-index: 10;

  opacity: 0;
}
.loading .progress-bar {
  opacity: 1;
}
.loading-complete .progress-bar {
  transition: opacity .2s .2s ease-out;
  opacity: 0;
}

.progress-bar .progress {
  background: #1ac3c3;
  display: inline-block;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  box-sizing: border-box;
  height: 100%;
  box-shadow: 0 0 4px 1px #627188;
}

.loading .progress {
  transition: transform 100ms linear;
}

.error {
  margin-top: 3em;
  color: #f00;
  opacity: 0;
  height: 1em;
}
.error a {
  padding: 0;
  display: inline;
  color: inherit;
  text-decoration: underline;
}
.loading-error .error {
  transition: opacity .5s ease-in;
  opacity: 1;
}

@media (min-width: 700px) {
  main {
  margin-top: 3rem;
  }
}