*,
*:after,
*:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    color: #fff;
    font-family: 'Lato', Arial, sans-serif;
    background: #d2d1d5;
}

.ms-wrapper {
    position: relative;
    margin: 0 auto 100px;
    width: 100%;
    max-width: 65em;
    padding: 0 1em;
}

.ms-perspective {
    position: relative;
    margin: 0px auto;
    width: 239.99952px;
    height: 508px;
    -webkit-perspective: 1200px;
    -moz-perspective: 1200px;
    perspective: 1200px;
    -webkit-perspective-origin: 50% 0%;
    -moz-perspective-origin: 50% 0%;
    perspective-origin: 50% 0%;
}

.ms-device {
    position: absolute;
    width: 100%;
    height: 80%;
    -webkit-transition: -webkit-transform 0.7s ease-in-out;
    -moz-transition: -moz-transform 0.7s ease-in-out;
    transition: transform 0.7s ease-in-out;
    -webkit-transform: rotateY(17deg) rotateX(10deg);
    -moz-transform: rotateY(17deg) rotateX(10deg);
    transform: rotateY(17deg) rotateX(10deg);
}

.ms-device,
.ms-object,
.ms-object > div,
.ms-screens a {
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.ms-object {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-transition: -webkit-transform 0.4s;
    -moz-transition: -moz-transform 0.4s;
    transition: transform 0.4s;
}

.ms-object > div {
    position: absolute;
    display: block;
    background: #181818;
}

.ms-front,
.ms-back {
    width: 239.99952px;
    height: 508px;
    border-radius: 34px;
}

.ms-top,
.ms-bottom {
    width: 30px;
    height: 179.99952px;
    -webkit-transform-origin: 50% 0;
    -moz-transform-origin: 50% 0;
    transform-origin: 50% 0;
}

.ms-left,
.ms-right {
    width: 30px;
    height: 448px;
}

.ms-object .ms-front {
    background: #181818 url(../images/iPhone5_front.png) no-repeat top left;
    -webkit-background-size: 100% 100%;
    -moz-background-size: 100% 100%;
    background-size: 100% 100%;
}

.ms-front {
    -webkit-transform: rotateY(0deg) translateZ(15px);
    -moz-transform: rotateY(0deg) translateZ(15px);
    transform: rotateY(0deg) translateZ(15px);
}

.ms-back {
    -webkit-transform: rotateX(180deg) translateZ(15px);
    -moz-transform: rotateX(180deg) translateZ(15px);
    transform: rotateX(180deg) translateZ(15px);
}

.ms-right {
    -webkit-transform: translateY(30px) rotateY(90deg) translateZ(224.99952px);
    -moz-transform: translateY(30px) rotateY(90deg) translateZ(224.99952px);
    transform: translateY(30px) rotateY(90deg) translateZ(224.99952px);
}

.ms-left {
    -webkit-transform: translateY(30px) rotateY(-90deg) translateZ(15px);
    -moz-transform: translateY(30px) rotateY(-90deg) translateZ(15px);
    transform: translateY(30px) rotateY(-90deg) translateZ(15px);
}

.ms-top {
    -webkit-transform: rotateZ(-90deg) translateY(15px) rotateY(90deg);
    -moz-transform: rotateZ(-90deg) translateY(15px) rotateY(90deg);
    transform: rotateZ(-90deg) translateY(15px) rotateY(90deg);
}

.ms-bottom {
    -webkit-transform: rotateZ(-90deg) translateY(15px) rotateY(-90deg) translateZ(508px);
    -moz-transform: rotateZ(-90deg) translateY(15px) rotateY(-90deg) translateZ(508px);
    transform: rotateZ(-90deg) translateY(15px) rotateY(-90deg) translateZ(508px);
}

.ms-side:before,
.ms-side:after {
    position: absolute;
    top: -25px;
    left: 0;
    width: 30px;
    height: 23px;
    background: #181818;
    background: -webkitlinear-gradient(bottom, #181818 0%, #333333 100%);
    background: -moz-linear-gradient(bottom, #181818 0%, #333333 100%);
    background: linear-gradient(to top, #181818 0%, #333333 100%);
    content: "";
    -webkit-transform: rotateX(22.5deg) translateZ(-7px);
    -moz-transform: rotateX(22.5deg) translateZ(-7px);
    transform: rotateX(22.5deg) translateZ(-7px);
}

.ms-side:after {
    top: 100%;
    background: -webkit-linear-gradient(top, #181818 0%, #333333 100%);
    background: -moz-linear-gradient(top, #181818 0%, #333333 100%);
    background: linear-gradient(to bottom, #181818 0%, #333333 100%);
    -webkit-transform: rotateX(-22.5deg) translateZ(-7px);
    -moz-transform: rotateX(-22.5deg) translateZ(-7px);
    transform: rotateX(-22.5deg) translateZ(-7px);
}

/* Screens */

.ms-screens a {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
}

.ms-screens > a {
    position: absolute;
    width: 203.99959px;
    height: 362.0008px;
    top: 72.9996px;
    left: 17.99996px;
    outline: none;
    display: block;
    cursor: pointer;
    opacity: 1;
    -webkit-transition: -webkit-transform 0.7s, opacity 0.4s;
    transition: -moz-transform 0.7s, opacity 0.4s;
    transition: transform 0.7s, opacity 0.4s;
    -webkit-transform: translateZ(16px);
    -moz-transform: translateZ(16px);
    transform: translateZ(16px);
}

.ms-screens > a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    -webkit-transition: opacity 0.3s;
    -moz-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

.ms-label {
    border: 3px solid #fff;
    color: #fff;
    position: absolute;
    left: 100%;
    margin-left: 18px;
    width: 200px;
    padding: 1px;
    opacity: 0;
    -webkit-transform: rotateX(0deg);
    -moz-transform: rotateX(0deg);
    transform: rotateX(0deg);
    -webkit-transition: opacity 0.7s, -webkit-transform 0.7s;
    -moz-transition: opacity 0.7s, -moz-transform 0.7s;
    transition: opacity 0.7s, transform 0.7s;
}

.ms-screens > a:hover .ms-label {
    border-color: #687fa7;
    color: #687fa7;
}

.ms-label::after {
    right: 100%;
    border: solid transparent;
    content: '';
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: transparent;
    border-right-color: #d9382e;
    border-width: 16px;
    top: 50%;
    margin-top: -16px;
}

.ms-label::after,
.ms-label::before {
    right: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.ms-label::after {
    border-color: transparent;
    border-right-color: #d2d1d5;
    border-width: 12px;
    top: 50%;
    margin-top: -12px;
}

.ms-label::before {
    border-color: transparent;
    border-right-color: #fff;
    border-width: 16px;
    top: 50%;
    margin-top: -16px;
}

.ms-screens > a:hover .ms-label::before {
    border-right-color: #687fa7
}

.ms-wrapper button {
    background: transparent;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    padding: 10px 30px;
    border: 3px solid #fff;
    color: #fff;
    position: absolute;
    top: 1em;
    left: 1em;
    text-transform: uppercase;
}

.ms-wrapper button:hover {
    border-color: #687fa7;
    color: #687fa7;
}

/* class applied to rotate phone (common effects) */
.ms-view-layers .ms-screens .ms-screen-1 {
    -webkit-transform: translateZ(65px);
    -moz-transform: translateZ(65px);
    transform: translateZ(65px);
    -webkit-transition-delay: 0.7s;
    -moz-transition-delay: 0.7s;
    transition-delay: 0.7s;
    opacity: 0.9;
}

.ms-view-layers .ms-screens .ms-screen-2 {
    -webkit-transform: translateZ(115px);
    -moz-transform: translateZ(115px);
    transform: translateZ(115px);
    -webkit-transition-delay: 0.6s;
    -moz-transition-delay: 0.6s;
    transition-delay: 0.6s;
    opacity: 0.9;
}

.ms-view-layers .ms-screens .ms-screen-3 {
    -webkit-transform: translateZ(165px);
    -moz-transform: translateZ(165px);
    transform: translateZ(165px);
    -webkit-transition-delay: 0.5s;
    -moz-transition-delay: 0.5s;
    transition-delay: 0.5s;
    opacity: 0.9;
}

.ms-view-layers .ms-screens .ms-screen-4 {
    -webkit-transform: translateZ(215px);
    -moz-transform: translateZ(215px);
    transform: translateZ(215px);
    -webkit-transition-delay: 0.4s;
    -moz-transition-delay: 0.4s;
    transition-delay: 0.4s;
    opacity: 0.9;
}

.ms-view-layers .ms-screens .ms-screen-5 {
    -webkit-transform: translateZ(265px);
    -moz-transform: translateZ(265px);
    transform: translateZ(265px);
    -webkit-transition-delay: 0.3s;
    -moz-transition-delay: 0.3s;
    transition-delay: 0.3s;
    opacity: 0.9;
}

.ms-view-layers .ms-screens > a:hover::after {
    opacity: 1
}

.ms-view-layers .ms-label {
    opacity: 1;
    -webkit-transform: rotateX(-90deg);
    -moz-transform: rotateX(-90deg);
    transform: rotateX(-90deg);
}

.ms-view-layers .ms-screen-1 .ms-label {
    -webkit-transition-delay: 1.1s;
    -moz-transition-delay: 1.1s;
    transition-delay: 1.1s;
}

.ms-view-layers .ms-screen-2 .ms-label {
    -webkit-transition-delay: 1s;
    -moz-transition-delay: 1s;
    transition-delay: 1s;
}

.ms-view-layers .ms-screen-3 .ms-label {
    -webkit-transition-delay: 0.9s;
    -moz-transition-delay: 0.9s;
    transition-delay: 0.9s;
}

.ms-view-layers .ms-screen-4 .ms-label {
    -webkit-transition-delay: 0.8s;
    -moz-transition-delay: 0.8s;
    transition-delay: 0.8s;
}

.ms-view-layers .ms-screen-5 .ms-label {
    -webkit-transition-delay: 0.7s;
    -moz-transition-delay: 0.7s;
    transition-delay: 0.7s;
}

/* Effect 1 */
.ms-effect-1.ms-view-layers .ms-device {
    -webkit-transform: rotateY(50deg) rotateX(20deg) translateZ(-15px) translateZ(-224px);
    -moz-transform: rotateY(50deg) rotateX(20deg) translateZ(-15px) translateZ(-224px);
    transform: rotateY(50deg) rotateX(20deg) translateZ(-15px) translateZ(-224px);
}


.ms-effect-1.ms-view-layers .ms-screens .ms-screen-1 {
    -webkit-transform: translateZ(85px);
    -moz-transform: translateZ(85px);
    transform: translateZ(85px);
}

.ms-effect-1.ms-view-layers .ms-screens .ms-screen-2 {
    -webkit-transform: translateZ(155px);
    -moz-transform: translateZ(155px);
    transform: translateZ(155px);
}

.ms-effect-1.ms-view-layers .ms-screens .ms-screen-3 {
    -webkit-transform: translateZ(225px);
    -moz-transform: translateZ(225px);
    transform: translateZ(225px);
}

.ms-effect-1.ms-view-layers .ms-screens .ms-screen-4 {
    -webkit-transform: translateZ(295px);
    -moz-transform: translateZ(295px);
    transform: translateZ(295px);
}

.ms-effect-1.ms-view-layers .ms-screens .ms-screen-5 {
    -webkit-transform: translateZ(365px);
    -moz-transform: translateZ(365px);
    transform: translateZ(365px);
}

/* Effect 2 */
.ms-effect-2 .ms-device {
    -webkit-transform: rotateY(-17deg) rotateX(10deg);
    -moz-transform: rotateY(-17deg) rotateX(10deg);
    transform: rotateY(-17deg) rotateX(10deg);
}

.ms-effect-2.ms-view-layers .ms-device {
    -webkit-transform: rotateX(90deg) rotateZ(-140deg) translateZ(-15px) translateZ(-97px);
    -moz-transform: rotateX(90deg) rotateZ(-140deg) translateZ(-15px) translateZ(-97px);
    transform: rotateX(90deg) rotateZ(-140deg) translateZ(-15px) translateZ(-97px);
}

/* Effect 3 */
.ms-effect-3.ms-view-layers .ms-device {
    -webkit-transform: rotateY(-30deg) rotateX(90deg) translateZ(-15px) translateZ(-97px);
    -moz-transform: rotateY(-30deg) rotateX(90deg) translateZ(-15px) translateZ(-97px);
    transform: rotateY(-30deg) rotateX(90deg) translateZ(-15px) translateZ(-97px);
}

.ms-effect-3 .ms-screens .ms-screen-1 {
 /*  box-shadow:-1px 1px 1px cyan;
  background-color:rgba(20, 83, 83, 0.33);*/
    background: url("../images/screen1_1.png") no-repeat center center
}

.ms-effect-3 .ms-screens .ms-screen-2 {
  /* box-shadow:-1px 1px 1px cyan;
  background-color:rgba(20, 83, 83, 0.33);*/
    background: url("../images/screen1_2.png") no-repeat center center
}

.ms-effect-3 .ms-screens .ms-screen-3 {
  /*
    box-shadow:-1px 1px 1px cyan;
  background-color:rgba(20, 83, 83, 0.33);*/
    background: url("../images/screen1_3.png") no-repeat center center
}

.ms-effect-3 .ms-screens .ms-screen-4 {
  /*
    background: url("../images/screen1_4.png") no-repeat center center
    */
    background: url("../images/screen1_3.png") no-repeat center center
  
}

.ms-effect-3 .ms-screens .ms-screen-5 {
  /*
    background: url("../images/screen1_5.png") no-repeat center center*/
}

@media screen and (max-width: 560px) { 
  .ms-wrapper button {
      position: relative;
      margin: 0 auto;
      left: auto;
      top: auto;
      display: block;
      margin-bottom: 30px;
  }
}
