/* Styles for the animated quote */

.quote {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-weight: bold;
  height: 40em;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  overflow: hidden;
  position: relative;
  text-shadow: 0 0 1em #fff;
}

.quote:after {
  background: -webkit-linear-gradient(top, #99CCCC, rgba(171, 209, 211, .4) 30%, rgba(255, 238, 238, .4) 70%, #99CCCC);
  background: linear-gradient(to bottom, #99CCCC, rgba(171, 209, 211, .4) 30%, rgba(255, 238, 238, .4) 70%, #99CCCC);
    bottom: 0;
  content: "";
    left: 0;
  position: absolute;
    right: 0;
    top: 0;
}

/* This is a lovely trick for getting content to go full width in a container */
.full-width {
    left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  position: relative;
    right: 50%;
  width: 100vw;
}

.quote p {
    bottom: 1em;
  font-size: 2em;
  max-width: 20em;
  opacity: 0;
  position: absolute;
  -webkit-transform: translateY(2em) scale(1.4);
          transform: translateY(2em) scale(1.4);
  -webkit-transition: none;
  transition: none;
  width: 80%;
  z-index: 1;
}



.quote .source {
  font-style: italic;
  opacity: .8;
}

.quote .background {
  background: url("../images/school.png") no-repeat;
  background-size: cover;
    bottom: 0;
    left: 0;
  opacity: 0;
  position: absolute;
    right: -20%;
    top: 0;
  -webkit-transform: translateX(-10%);
          transform: translateX(-10%);
  -webkit-transition: none;
  transition: none;
  z-index: 0;
}

.quote .background2 {
  background: url("../images/tablet.jpg") no-repeat;
  background-size: cover;
    bottom: 0;
    left: 0;
  opacity: 0;
  position: absolute;
    right: -20%;
    top: 0;
  -webkit-transform: translateX(-10%);
          transform: translateX(-10%);
  -webkit-transition: none;
  transition: none;
  z-index: 0;
}


.quote .background3 {
  background: url("../images/escapegame.jpg") no-repeat;
  background-size: cover;
    bottom: 0;
    left: 0;
  opacity: 0;
  position: absolute;
    right: -20%;
    top: 0;
  -webkit-transform: translateX(-10%);
          transform: translateX(-10%);
  -webkit-transition: none;
  transition: none;
  z-index: 0;
}

.quote.is-visible .background,.quote.is-visible .background2,.quote.is-visible .background3, .quote.is-visible p {
  opacity: 1;
  -webkit-transform: none;
          transform: none;
}

.quote.is-visible .background, .quote.is-visible .background2 ,.quote.is-visible .background3{
  -webkit-transition: opacity 3s .4s ease-out,
              -webkit-transform 2s .4s cubic-bezier(0,1,.3,1);
  transition: opacity 3s .4s ease-out,
              -webkit-transform 2s .4s cubic-bezier(0,1,.3,1);
  transition: transform 2s .4s cubic-bezier(0,1,.3,1),
              opacity 3s .4s ease-out;
  transition: transform 2s .4s cubic-bezier(0,1,.3,1),
              opacity 3s .4s ease-out,
              -webkit-transform 2s .4s cubic-bezier(0,1,.3,1);
}


.quote.is-visible p {
  -webkit-transition: opacity 4s ease-out,
              -webkit-transform 2s cubic-bezier(0,1,.2,1.1);
  transition: opacity 4s ease-out,
              -webkit-transform 2s cubic-bezier(0,1,.2,1.1);
  transition: transform 2s cubic-bezier(0,1,.2,1.1),
              opacity 4s ease-out;
  transition: transform 2s cubic-bezier(0,1,.2,1.1),
              opacity 4s ease-out,
              -webkit-transform 2s cubic-bezier(0,1,.2,1.1);
}


/* Header stuff */

header {
  opacity: 0;
  -webkit-transition: opacity .5s .25s ease-out;
  transition: opacity .5s .25s ease-out;
}

header.is-visible {
  opacity: 1;
}

.main-photo {
  -webkit-transform: scale(.8);
          transform: scale(.8);
}

.heading {
  -webkit-transform: translate(-50%, calc(-50% + 1em));
          transform: translate(-50%, calc(-50% + 1em));
}

.is-visible .main-photo {
  -webkit-transform: none;
          transform: none;
}

.is-visible .heading {
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

.main-photo, .heading {
  -webkit-transition: -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: transform 4s .25s cubic-bezier(0,1,.3,1), -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  will-change: transform;
}

/* Inline photos */

.inline-photo {
  border: 1em solid #fff;
  border-bottom: 4em solid #fff;
  border-radius: .25em;
  box-shadow: 1em 1em 2em .25em rgba(0,0,0,.2);
  margin: 2em auto;
  max-width: 600px;
  opacity: 0;

  -webkit-transform: translateY(4em) rotateZ(-5deg);
          transform: translateY(4em) rotateZ(-5deg);
  -webkit-transition: opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: transform 4s .25s cubic-bezier(0,1,.3,1),
              opacity .3s .25s ease-out;
  transition: transform 4s .25s cubic-bezier(0,1,.3,1),
              opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  width: 90%;

  will-change: transform, opacity;
}

.inline-photo.is-visible {
  opacity: 1;
  -webkit-transform: rotateZ(-2deg);
          transform: rotateZ(-2deg);
}

.inline-bg {
  border: 1em solid #fff;
  box-shadow: 1em 1em 2em .25em rgba(0,0,0,.2);
  margin: 1em auto;
  max-width: 600px;
  opacity: 0;
  -webkit-transform: translateY(4em) rotateZ(-5deg);
          transform: translateY(4em) rotateZ(-5deg);
  -webkit-transition: opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  transition: transform 4s .25s cubic-bezier(0,1,.3,1),
              opacity .3s .25s ease-out;
  transition: transform 4s .25s cubic-bezier(0,1,.3,1),
              opacity .3s .25s ease-out,
              -webkit-transform 4s .25s cubic-bezier(0,1,.3,1);
  width: 90%;

  will-change: transform, opacity;
	text-align: center;
	font-size: 1.8em;
}

.inline-bg.is-visible {
  opacity: 1;
  -webkit-transform: rotateZ(-2deg);
          transform: rotateZ(-2deg);
}

.text{
  opacity: 0;
  -webkit-transition: opacity .3s .25s ease-out;
  transition: opacity .3s .25s ease-out;
}

.text.is-visible {
  opacity: 1;
}