/* 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, #fee, rgba(255, 238, 238, .4) 30%, rgba(255, 238, 238, .4) 70%, #fee);
    background: linear-gradient(to bottom, #fee, rgba(255, 238, 238, .4) 30%, rgba(255, 238, 238, .4) 70%, #fee);
      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/yogi_berra.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 p {
    opacity: 1;
    -webkit-transform: none;
            transform: none;
  }
  
  .quote.is-visible .background {
    -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 {
    box-shadow: 1em 1em 2em .25em rgba(0,0,0,.2);
    opacity: 0;
    -webkit-transform: translateY(4em) rotateZ(-3deg);
            transform: translateY(4em) rotateZ(-3deg);
    -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);
  
    will-change: transform, opacity;
  }
  
  .inline-photo.is-visible {
    opacity: 1;
    -webkit-transform: rotateZ(0deg);
            transform: rotateZ(0deg);
  }
  
  
  