/* ------------------------- ANIMATIONS START ---------------------------- */

/* --- PATTERNS DEFAULT STYLING --- */
.animation.scale-in-center p,
.animation.flip-in p,
.animation.shrink p,
.animation.tada p {
  margin: 0;
  padding: 10px;
}

.animation {
  margin-bottom: 10px;
}


/* ----------------------- ON PAGE LOAD/ENTRANCE -------------------------- */

/* --- Slow Scale in Center --- */
@keyframes slowScaleInCenter {
  from {
  	transform: scale(0.9) translateX(-50%) translateY(-50%);
    -ms-transform: scale(0.9) translateX(-50%) translateY(-50%); /* IE 9 */
    -webkit-transform: scale(0.9) translateX(-50%) translateY(-50%); /* Safari and Chrome */
    -moz-transform: scale(0.9) translateX(-50%) translateY(-50%); /* Firefox */
  }
  to {
  	transform: scale(1.0) translateX(-50%) translateY(-50%);
    -ms-transform: scale(1.0) translateX(-50%) translateY(-50%); /* IE 9 */
    -webkit-transform: scale(1.0) translateX(-50%) translateY(-50%); /* Safari and Chrome */
    -moz-transform: scale(1.0) translateX(-50%) translateY(-50%); /* Firefox */
  }
}
/* --- necessary rules for slow scale in --- */
#hero-outer {
  position: relative;
  overflow: hidden;
}
#hero-outer::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 130%;
  transform: translateX(-50%) translateY(-50%);
  left: 50%;
  top: 50%;
  background-image: url("/assets/templates/main/images/hero-still.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
}
/* --- necessary rules for slow scale in end --- */

#hero-outer .hero-bottom {
  margin-top: 20px;
}
#hero-outer .hero-top {
  background-color: rgba(34,34,34,0.4);
  margin: 0 auto;
  width: 50%;
  text-align: center;
}
#hero-outer .hero-top .hero-top-img img {
  max-width: 250px;
  width: 100%;
}
#hero-outer ul.brand-promises {
  list-style-position: inside;
  padding-left: 0;
}

@media all and (max-width: 800px) {
  #hero-outer .hero-top {
    width: 100%;
  }
  #hero-outer {
    background-image: none;
    position: relative;
    padding-top: 310px;
  }
  #hero-outer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 300px;
    background-image: url("/assets/templates/main/images/hero/hero.jpg"); /*replace with tablet hero path */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
  }
}

@media all and (max-width: 570px) {
  #hero-outer {
    padding-top: 210px;
  }
  #hero-outer::before {
    height: 200px;
    background-image: url("/assets/templates/main/images/hero/hero.jpg"); /*replace with mobile hero path */
  }
}

/* Quicklinks not part of this pattern, just filler */
#quicklinks .secondary-tools-heading {
  text-align: center;
}
#quicklinks div.quicklink-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;  
}
#quicklinks div.quicklink-container > a {
  width: 100%;
  margin: 10px 10px 10px;
  background-color: #e8e8e8;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  text-align: center;
  padding: 120px 15px 15px;
  text-decoration: none;
  position: relative;
}
#quicklinks div.quicklink-container > a:hover,
#quicklinks div.quicklink-container > a:active {
  background-color: #b3b3b3;
}
#quicklinks div.quicklink-container > a:first-of-type {
  margin-left: 0px;
}
#quicklinks div.quicklink-container > a:last-of-type {
  margin-right: 0px;
}

#quicklinks div.quicklink-container > a span {
  margin: 0 auto;
}
#quicklinks a div.ql-image {
  height: 100px;
  width: 100%;
  position: absolute;
  top: 15px;
  left:0px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url(/assets/templates/main/images/quicklinks/icon-placeholder.png);
}

@media all and (max-width: 800px) {
  #quicklinks div.quicklink-container > a {
    padding-top: 80px;
  }

  #quicklinks a div.ql-image {
    height: 60px;
  }
}
@media all and (max-width: 570px) {
  #quicklinks div.quicklink-container {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  #quicklinks div.quicklink-container > a {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin: 2px 0px;
    padding-top: 15px;
    padding-left: 90px;
    min-height: 90px;
  }
  #quicklinks div.quicklink-container > a:last-of-type {
    margin-bottom: 0px;
  }
  #quicklinks a div.ql-image {
    left: 15px;
    top: 0px;
    width: 60px;
    height: 100%;
  }
  #quicklinks div.quicklink-container > a span {
    text-align: left;
    margin: 0px;
  }
}
/* End quicklinks */

.loaded .animation.slow-scale-in-center#hero-outer::before,
.no-js .animation.slow-scale-in-center#hero-outer::before {
  animation: slowScaleInCenter 5s ease infinite; /* Change this to alternate to stop the loop. */
}
/* --- Slow Scale in Center end --- */


/* --- Slide in left --- */
@keyframes slideInLeft {
	0% {
		left: -1100px;
	}
	100% {
		left: 0;
	}
}

.animation.slide-in-left {
  left: -1100px;
  position: relative;
}

.loaded .animation.slide-in-left,
.no-js .animation.slide-in-left {
  animation: slideInLeft 0.8s ease both 0.3s;
}
/* --- Slide in left end --- */


/* --- Scale in center --- */
@keyframes scale-in-center {
 0% {
  -webkit-transform: scale(0);
  transform: scale(0);
  opacity: 1;
  animation-timing-function: ease-out;
 }
 100% {
  -webkit-transform:scale(1);
  transform:scale(1);
  opacity:1;
 }
}

.animation.scale-in-center {
  visibility: hidden;
  background-color: #797979;
  display: inline-block;
  text-align: center;
}

.loaded .animation.scale-in-center,
.no-js .animation.scale-in-center {
  visibility: visible;
  -webkit-animation: scale-in-center .8s cubic-bezier(.25,.46,.45,.94) both;
  animation: scale-in-center .8s cubic-bezier(.25,.46,.45,.94) both;
}
/* --- Scale in center end --- */


/* --- Fade in --- */
@keyframes fadeIn {
 from {
  opacity:0
 }
 to {
  opacity:1
 }
}

.animation.fade-in {
  visibility: hidden;
}

.loaded .animation.fade-in,
.no-js .animation.fade-in {
  visibility: visible;
  animation: fadeIn 1s both;
}
/* --- Fade in end --- */



/* ------------------- ON SCROLL ------------------- */


/* --- Flip in Y --- */
@keyframes flipInY {
 from {
  transform:perspective(400px) rotate3d(0,1,0,90deg);
  animation-timing-function: ease-in;
  opacity: 0;
 }
 40% {
  transform:perspective(400px) rotate3d(0,1,0,-20deg);
  animation-timing-function: ease-in;
 }
 60% {
  transform:perspective(400px) rotate3d(0,1,0,10deg);
  opacity: 1;
 }
 80% {
  transform:perspective(400px) rotate3d(0,1,0,-5deg);
 }
 to {
  transform:perspective(400px);
 }
}

.animation.flip-in {
  visibility: hidden;
  display: inline-block;
  background-color: #797979;
}

.animation.flip-in.animated {
  visibility: visible;
  -ms-animation: flipInY .8s ease both;
  -webkit-animation: flipInY .8s ease both;
  animation: flipInY .8s ease both;
}
/* --- Flip in Y end --- */


/* --- Van slide in --- */
@keyframes van-slide-in {
  0% {
    transform: translateX(-750px) skewX(0);
    opacity: 0.75;
  }
  95% {
    transform: translateX(0px) skewX(-15deg);
    opacity: 1;
  }
  100% {
    transform: translateX(0px);
  }
}

.animation.van-slide-in {
  visibility: hidden;
}

.animation.van-slide-in.animated {
  visibility: visible;
  animation: van-slide-in 1s ease both;
}
/* --- Van slide in end --- */



/* -------------------------- ON HOVER ----------------------- */

/* --- basic styles --- */
.hovers {
  display: flex;
  flex-direction: column;
}

.hovers .animation {
  width: 50%;
}


/* --- Color slide down --- */
.animation.color-slide-down {
  -ms-transform:perspective(1px) translateZ(0);
  -webkit-transform:perspective(1px) translateZ(0);
  transform:perspective(1px) translateZ(0);
  transition:all .3s;

  display: inline-block;
  padding: 10px;
  border: 2px solid #000;
}

.animation.color-slide-down p {
  position: relative;
  margin:0;
}

.animation.color-slide-down::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0ce6ce;
    -ms-transform: scaleY(0);
    -webkit-transform: scaleY(0);
    transform: scaleY(0);
    -ms-transform-origin: 50% 0;
    -webkit-transform-origin: 50% 0;
    transform-origin: 50% 0;
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transition-duration: .3s;
    transition-duration: .3s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

.animation.color-slide-down:active::before,
.animation.color-slide-down:hover::before {
    -ms-transform: scaleY(1);
    -webkit-transform: scaleY(1);
    transform: scaleY(1);
}
/* --- color slide down end --- */


/* --- color slide left --- */
.animation.color-slide-left {
  -ms-transform:perspective(1px) translateZ(0);
  -webkit-transform:perspective(1px) translateZ(0);
  transform:perspective(1px) translateZ(0);
  transition:all .5s;

  display: inline-block;
  padding: 10px;
  border: 2px solid #000;
}

.animation.color-slide-left p {
  position: relative;
  margin:0;
}

.animation.color-slide-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0ce6ce;
    -ms-transform: scaleX(0);
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
    -ms-transform-origin: 0 50%;
    -webkit-transform-origin: 0 50%;
    transform-origin: 0 50%;
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transition-duration: .5s;
    transition-duration: .5s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

.animation.color-slide-left:active::before,
.animation.color-slide-left:hover::before {
    -ms-transform: scaleX(1);
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}
/* --- color slide left end --- */


/* --- color spread center --- */
.animation.color-spread-center {
  display: inline-block;
  position: relative;
  margin: 20px auto;
}

.animation.color-spread-center a {
  display: block;
  border-radius: 50%;
  transition: 0.7s ease;
  padding: 10px;
  background-color: #ffb700;
  -webkit-transition: .7s ease;
  transition: .7s ease;
  position: relative;
  width: 100%;
  text-align: center;
  max-width: 217px;
  text-decoration: none;
}

.animation.color-spread-center a:active,
.animation.color-spread-center a:focus,
.animation.color-spread-center a:hover {
  background-color: #127700;
}

.animation.color-spread-center a .text-wrap::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0073e8;
    border-radius: 100%;
    -webkit-transform: scale(0);
    transform: scale(0);
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transition-duration: .5s;
    transition-duration: .5s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

.animation.color-spread-center a:active .text-wrap::after,
.animation.color-spread-center a:focus .text-wrap::after,
.animation.color-spread-center a:hover .text-wrap::after {
    -webkit-transform: scale(2);
    transform: scale(2);
}

.animation.color-spread-center a .text-wrap {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white,#000);
  -webkit-transition: border .7s ease,color .5s ease;
  transition: border .7s ease,color .5s ease;
  border: 8px solid #1d2c4b;
  padding: 60px 15px 60px;
  background-color: #fff;
  display: block;
}

.animation.color-spread-center a:active .text-wrap,
.animation.color-spread-center a:focus .text-wrap,
.animation.color-spread-center a:hover .text-wrap {
    color: #fff;
    border-color: #fff;
}

.animation.color-spread-center a .text-wrap span {
  position: relative;
  z-index: 10;
  font-size: 18px;
  text-decoration: none;
}
/* --- color spread center end --- */


/* --- shrink --- */
.animation.shrink {
  background-color: #797979;
  display: inline-block;
  text-align: center;
  transition:.5s;
  transition-timing-function:ease-out;
}

.animation.shrink:active,
.animation.shrink:hover {
 background-color:#2e77b2;
 transform:scale(.9);
 transition:.3s ease-in-out;
}
/* --- shrink end --- */


/* --- tada --- */
@keyframes tada {
  from {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }

  10%,
  20% {
    -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
    transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
  }

  30%,
  50%,
  70%,
  90% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  }

  40%,
  60%,
  80% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  }

  to {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}

.animation.tada {
  background-color: #797979;
  display: inline-block;
  text-align: center;
  border-radius: 50%;
  padding: 50px 0;
}

.animation.tada:hover,
.animation.tada:active {
  animation: tada 0.8s both;
}

/* --------------------- ANIMATIONS END ---------------------- */
