/* -------------------------------- 

Primary style

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


/* -------------------------------- 

Patterns - reusable parts of our design

-------------------------------- */
.cd-btn {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------- 

Typography



/* -------------------------------- 

Main Content

-------------------------------- */
.cd-main-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  /* vertically align its content */
  display: table;
}
.cd-main-content .center {
  /* vertically align inside parent element */
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

/* -------------------------------- 

Modal window 

-------------------------------- */
.cd-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #36499B url(../img/modal-blue.jpg) no-repeat center center;
  background-size: cover;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 500ms 0s, visibility 0s 500ms;
  -moz-transition: opacity 500ms 0s, visibility 0s 500ms;
  transition: opacity 500ms 0s, visibility 0s 500ms;
  pointer-events: none;
}
.cd-modal .modal-content {
  height: 100%;
  overflow-y: auto;
  padding: 3em 5%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    -webkit-transition: opacity 300ms 0s, visibility 0s 300ms;
  -moz-transition: opacity 300ms 0s, visibility 0s 300ms;
  transition: opacity 300ms 0s, visibility 0s 300ms;
}

.cd-modal.visible {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 1s, visibility 0s;
  -moz-transition: opacity 1s, visibility 0s;
  transition: opacity 1s, visibility 0s;
}
.cd-modal.visible .modal-content {
  /* this fixes the buggy scrolling on webkit browsers - mobile devices only - when overflow property is applied */
  -webkit-overflow-scrolling: touch;
}

@media only screen and (min-width: 1100px) {
  .cd-modal .modal-content {
    padding: 6em 5%;
  }

  .cd-modal p {
    font-size: 2rem;
  }
}

/* -------------------------------- 

Transition Layer 

-------------------------------- */
.cd-transition-layer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  height: 100%;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}
.cd-transition-layer .bg-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  /*-webkit-transform: translateY(-50%) translateX(-2%);
  -moz-transform: translateY(-50%) translateX(-2%);
  -ms-transform: translateY(-50%) translateX(-2%);
  -o-transform: translateY(-50%) translateX(-2%);
  transform: translateY(-50%) translateX(-2%);*/
  -webkit-transform: translate3d(-2%, -50%, 0) ;
  -moz-transform: translate3d(-2%, -50%, 0) ;
  -ms-transform: translate3d(-2%, -50%, 0) ;
  -o-transform: translate3d(-2%, -50%, 0) ;
  transform: translate3d(-2%, -50%, 0) ;
  /* its dimentions will be overwritten using jQuery to proportionally fit the viewport */
  height: 100%;
  /* our sprite is composed of 25 frames */
  width: 2500%;
  background: url(../img/ink-blue.png) no-repeat 0 0;
  background-size: 100% 100%;
}
.cd-transition-layer.visible {
  opacity: 1 !important;
  visibility: visible !important;
}
.cd-transition-layer.opening .bg-layer {
  -webkit-animation: cd-sequence 0.8s steps(24);
  -moz-animation: cd-sequence 0.8s steps(24);
  animation: cd-sequence 0.8s steps(24);
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}
.cd-transition-layer.opening {
  opacity: 1 !important;
  visibility: visible !important;
}
.cd-transition-layer.closing .bg-layer {
  -webkit-animation: cd-sequence-reverse 1s steps(24);
  -moz-animation: cd-sequence-reverse 1s steps(24);
  animation: cd-sequence-reverse 1s steps(24);
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  opacity: 0;
}
.no-cssanimations .cd-transition-layer {
  display: none;
}

@-webkit-keyframes cd-sequence {
  0% {
    /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
    -webkit-transform: translate3d(-2%, -50%, 0);
  }
  100% {
    /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport  */
    -webkit-transform: translate3d(-98%, -50%, 0);
  }
}
@-moz-keyframes cd-sequence {
  0% {
    /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
    -moz-transform: translate3d(-2%, -50%, 0);
  }
  100% {
    /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport  */
    -moz-transform:  translate3d(-98%, -50%, 0);
  }
}
@keyframes cd-sequence {
  0% {
    /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
    -webkit-transform: translate3d(-2%, -50%, 0);
    -moz-transform: translate3d(-2%, -50%, 0);
    -ms-transform: translate3d(-2%, -50%, 0);
    -o-transform: translate3d(-2%, -50%, 0);
    transform: translate3d(-2%, -50%, 0);
  }
  100% {
    /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport  */
    -webkit-transform: translate3d(-98%, -50%, 0);
    -moz-transform: translate3d(-98%, -50%, 0);
    -ms-transform: translate3d(-98%, -50%, 0);
    -o-transform: translate3d(-98%, -50%, 0);
    transform: translate3d(-98%, -50%, 0);
  }
}
@-webkit-keyframes cd-sequence-reverse {
  0% {
    -webkit-transform:  translate3d(-98%, -50%, 0);
    opacity: 1;
  }
  20% {
    opacity: 0;
  }
  100% {
    -webkit-transform: translate3d(-2%, -50%, 0);
    opacity: 0;
  }
}
@-moz-keyframes cd-sequence-reverse {
  0% {
    -moz-transform:  translate3d(-98%, -50%, 0);
    opacity: 1;
  }
   20% {
    opacity: 0;
  }
  100% {
    -moz-transform:  translate3d(-2%, -50%, 0);
    opacity: 0;
  }
}
@keyframes cd-sequence-reverse {
  0% {
    -webkit-transform:  translate3d(-98%, -50%, 0);
    -moz-transform:  translate3d(-98%, -50%, 0);
    -ms-transform:  translate3d(-98%, -50%, 0);
    -o-transform:  translate3d(-98%, -50%, 0);
    transform:  translate3d(-98%, -50%, 0);
    opacity: 1,;
  }
   20% {
    opacity: 0;
  }
  100% {
    -webkit-transform:  translate3d(-2%, -50%, 0);
    -moz-transform: translate3d(-2%, -50%, 0);
    -ms-transform: translate3d(-2%, -50%, 0);
    -o-transform: translate3d(-2%, -50%, 0);
    transform: translate3d(-2%, -50%, 0);
    opacity: 0;
  }
}
