* {
  box-sizing: border-box;
}

$color1: #5271C2;
$color2: #35a541;
$color3: #bdb235;
$color4: #db6623;
$color5: #3e5eb3;
$color6: #aa9e5c;

@mixin cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@mixin easeOut {
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@function longshadow($color_a,$color_b,$stepnum, $opacity: 1){
	$gradient_steps: null;
	@for $i from 1 through $stepnum {
		$weight: ( ( $i - 1 ) / $stepnum ) * 100;
		$colour_mix: mix($color_b, rgba($color_a, $opacity), $weight);
		$seperator: null;
		@if($i != $stepnum){ 
			$seperator: #{','}; 
		}
		$gradient_steps: append( #{$gradient_steps}, #{$i}px #{$i}px $colour_mix $seperator );
 }
  @return $gradient_steps;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato';
  background: lighten(black, 10);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.tabs {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  
  &__item {
    will-change: transform, opacity, box-shadow;
    @include cover;
    margin-bottom: 50px;
    z-index: 1;
    padding: 0 50px;
    color: white;
    box-shadow: 0 30px 60px rgba(0,0,0,0);
    transform-origin: center 5%;
    overflow: hidden;
    @include easeOut;
    
    h2 {
      margin-top: 24px;
      font-size: 16px;
      line-height: 1;
      span {
        display: block;
        font-size: 36px;
      }
    }
  }
  
  &__num {
    text-align: center;
    font-size: 200px;
    font-weight: 700;
    margin: 0;
  }
  
  &__stats {
    text-align: center;
    font-size: 14px;
    margin: 25px 0 0;
    font-weight: 700;
  }
}

.views-toggle {
  position: absolute;
  top: 25px;
  right: 50px;
  width: 40px;
  height: 40px;
  z-index: 10;
  cursor: pointer;
  @include easeOut;
  transition-duration: .3s;
  visibility: visible;
  opacity: 0.6;
  
  &--hidden {
    opacity: 0;
    visibility: hidden;
    z-index: 0;
  }
  
  &:hover {
    opacity: 1;
  }
}

.color1 {
  background: $color1;
  
  .tabs__num {
     text-shadow: longshadow(darken($color1, 15%),$color1,100, 0.7);
    }
}
.color2 {
  background: $color2;
  
  .tabs__num {
     text-shadow: longshadow(darken($color2, 15%),$color2,100, 0.7);
    }
}
.color3 {
  background: $color3;
  
  .tabs__num {
     text-shadow: longshadow(darken($color3, 15%),$color3,100, 0.7);
    }
}
.color4 {
  background: $color4;
  .tabs__num {
     text-shadow: longshadow(darken($color4, 15%),$color4,100, 0.7);
    }
}
.color5 {
  background: $color5;
  
  .tabs__num {
     text-shadow: longshadow(darken($color5, 15%),$color5,100, 0.7);
    }
}
.color6 {
  background: $color6;
  
  .tabs__num {
     text-shadow: longshadow(darken($color6, 15%),$color6,100, 0.7);
    }
}

@media screen and (max-width: 600px) {
  .tabs__item {
    
    h2 span {
      font-size: 24px;
    }
  }
  
  .tabs__num {
    font-size: 120px;
  }
}