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

Primary style

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

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

 Main Content

-------------------------------- */
.cd-main {
  height: 100vh;
  overflow: hidden;
}

.cd-section {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  padding-left: 70px;
  /* Force Hardware Acceleration */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-transform: translateX(-100%);
  -moz-transform: translateX(-100%);
  -ms-transform: translateX(-100%);
  -o-transform: translateX(-100%);
  transform: translateX(-100%);
  -webkit-transition: -webkit-transform 0s 0.5s;
  -moz-transition: -moz-transform 0s 0.5s;
  transition: transform 0s 0.5s;
}
.cd-section.overflow-hidden {
  /* this class is used to hide the scrolling bar while a new section is entering the viewport */
  overflow: hidden;
}
.cd-section header {
  position: relative;
  height: 100vh;
  width: 100%;
  background: #83b0b9;
  overflow: hidden;
}
.cd-section.services header {
  background-color: #d35657;
}
.cd-section.projects header {
  background-color: #343943;
}
.cd-section.contact header {
  background-color: #e4b162;
}
.cd-section .cd-scroll {
  /* this is the arrow at the bottom of the header */
  display: block;
  position: absolute;
  bottom: 60px;
  left: -webkit-calc(50vw - (74px - 4px)/2);
  left: calc(50vw - (74px - 4px)/2);
  width: 44px;
  height: 44px;
  /* image replacement */
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  visibility: hidden;
  -webkit-transition: -webkit-transform 0s 0.5s, visibility 0s 0.5s;
  -moz-transition: -moz-transform 0s 0.5s, visibility 0s 0.5s;
  transition: transform 0s 0.5s, visibility 0s 0.5s;
  -webkit-transform: translateX(-50%) scale(0);
  -moz-transform: translateX(-50%) scale(0);
  -ms-transform: translateX(-50%) scale(0);
  -o-transform: translateX(-50%) scale(0);
  transform: translateX(-50%) scale(0);
  background: url("../img/cd-icon-arrow.svg") no-repeat center center;
}
.cd-section.visible {
  /* this is the visible/selected section */
  position: relative;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
  transform: translateX(0);
  -webkit-transition: -webkit-transform 0.5s 0s;
  -moz-transition: -moz-transform 0.5s 0s;
  transition: transform 0.5s 0s;
}
.cd-section.visible .cd-scroll {
  visibility: visible;
  -webkit-transform: translateX(-50%) scale(1);
  -moz-transform: translateX(-50%) scale(1);
  -ms-transform: translateX(-50%) scale(1);
  -o-transform: translateX(-50%) scale(1);
  transform: translateX(-50%) scale(1);
  -webkit-transition: -webkit-transform 0.3s 0.5s, visibility 0s 0s;
  -moz-transition: -moz-transform 0.3s 0.5s, visibility 0s 0s;
  transition: transform 0.3s 0.5s, visibility 0s 0s;
  -webkit-animation: cd-scroll-down 1.2s 0.9s;
  -moz-animation: cd-scroll-down 1.2s 0.9s;
  animation: cd-scroll-down 1.2s 0.9s;
  -webkit-animation-iteration-count: 2;
  -moz-animation-iteration-count: 2;
  animation-iteration-count: 2;
}
@media only screen and (min-width: 480px) {
  .cd-section {
    padding-left: 90px;
  }
  .cd-section .cd-scroll {
    left: -webkit-calc(50vw - (94px - 4px)/2);
    left: calc(50vw - (94px - 4px)/2);
  }
}

@-webkit-keyframes cd-scroll-down {
  0% {
    -webkit-transform: translateX(-50%) scale(1);
  }
  50% {
    -webkit-transform: translateY(10px) translateX(-50%) scale(1);
  }
  100% {
    -webkit-transform: translateX(-50%) scale(1);
  }
}
@-moz-keyframes cd-scroll-down {
  0% {
    -moz-transform: translateX(-50%) scale(1);
  }
  50% {
    -moz-transform: translateY(10px) translateX(-50%) scale(1);
  }
  100% {
    -moz-transform: translateX(-50%) scale(1);
  }
}
@keyframes cd-scroll-down {
  0% {
    -webkit-transform: translateX(-50%) scale(1);
    -moz-transform: translateX(-50%) scale(1);
    -ms-transform: translateX(-50%) scale(1);
    -o-transform: translateX(-50%) scale(1);
    transform: translateX(-50%) scale(1);
  }
  50% {
    -webkit-transform: translateY(10px) translateX(-50%) scale(1);
    -moz-transform: translateY(10px) translateX(-50%) scale(1);
    -ms-transform: translateY(10px) translateX(-50%) scale(1);
    -o-transform: translateY(10px) translateX(-50%) scale(1);
    transform: translateY(10px) translateX(-50%) scale(1);
  }
  100% {
    -webkit-transform: translateX(-50%) scale(1);
    -moz-transform: translateX(-50%) scale(1);
    -ms-transform: translateX(-50%) scale(1);
    -o-transform: translateX(-50%) scale(1);
    transform: translateX(-50%) scale(1);
  }
}
.cd-title {
  position: absolute;
  top: 50%;
  left: 0;
  /* this prevents title from jumping when the section scroll bar is visible */
  width: calc(100vw - 90px);
  padding: 1em;
  color: #ffffff;
  text-align: center;
  /* Force Hardware Acceleration */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  opacity: 0;
  -webkit-transform: translateY(-50%) translateX(-80px);
  -moz-transform: translateY(-50%) translateX(-80px);
  -ms-transform: translateY(-50%) translateX(-80px);
  -o-transform: translateY(-50%) translateX(-80px);
  transform: translateY(-50%) translateX(-80px);
  -webkit-transition: -webkit-transform 0s 0.5s, opacity 0s 0.5s;
  -moz-transition: -moz-transform 0s 0.5s, opacity 0s 0.5s;
  transition: transform 0s 0.5s, opacity 0s 0.5s;
}
.cd-title h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.cd-title span {
  opacity: 0.6;
}
.visible .cd-title {
  opacity: 1;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  -webkit-transition: -webkit-transform 0.4s 0.3s, opacity 0.4s 0.3s;
  -moz-transition: -moz-transform 0.4s 0.3s, opacity 0.4s 0.3s;
  transition: transform 0.4s 0.3s, opacity 0.4s 0.3s;
}
@media only screen and (min-width: 768px) {
  .cd-title h2 {
    font-size: 5rem;
  }
}

.cd-content {
  padding: 2em 0;
  background-color: #ebebeb;
}
.cd-content p {
  width: 90%;
  max-width: 800px;
  margin: 0 auto 2em;
  font-size: 1.4rem;
  line-height: 1.6;
  color: #999999;
}
@media only screen and (min-width: 768px) {
  .cd-content {
    padding: 4em 0;
  }
  .cd-content p {
    font-size: 1.6rem;
  }
}

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

 Loading Bar

-------------------------------- */
#cd-loading-bar {
  position: fixed;
  z-index: 2;
  left: 0;
  height: 4px;
  visibility: hidden;
  /* Force Hardware Acceleration */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
}
#cd-loading-bar.index {
  background-color: #83b0b9;
}
#cd-loading-bar.services {
  background-color: #d35657;
}
#cd-loading-bar.projects {
  background-color: #343943;
}
#cd-loading-bar.contact {
  background-color: #e4b162;
}
#cd-loading-bar.loading {
  visibility: visible;
}
@media only screen and (min-width: 480px) {
  #cd-loading-bar {
/*    left: 90px;*/
  }
}
