Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="scene">
  <div class="level level-1 active">
    <div class="rotater">
      <div class="elem active">
        <div class="inner inner-1">
          <h2 class="art-heading">Article 1</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 1</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas, eaque.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-2">
          <h2 class="art-heading">Article 2</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 2</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, molestias.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-3">
          <h2 class="art-heading">Article 3</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 3</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sequi, facere.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-4">
          <h2 class="art-heading">Article 4</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 4</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eum, aliquid?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-5">
          <h2 class="art-heading">Article 5</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 5</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque, inventore.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-6">
          <h2 class="art-heading">Article 6</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 6</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque, maiores!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="level level-2">
    <div class="rotater">
      <div class="elem">
        <div class="inner inner-1">
          <h2 class="art-heading">Article 1</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 1</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem, animi!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-2">
          <h2 class="art-heading">Article 2</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 2</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque, iste.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-3">
          <h2 class="art-heading">Article 3</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 3</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt, culpa?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-4">
          <h2 class="art-heading">Article 4</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 4</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, voluptates.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="level level-3">
    <div class="rotater">
      <div class="elem">
        <div class="inner inner-1">
          <h2 class="art-heading">Article 1</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 1</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum, totam!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-2">
          <h2 class="art-heading">Article 2</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 2</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam, voluptate?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-3">
          <h2 class="art-heading">Article 3</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 3</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, explicabo.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-4">
          <h2 class="art-heading">Article 4</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 4</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quam, sint?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-5">
          <h2 class="art-heading">Article 5</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 5</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque, eum!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-6">
          <h2 class="art-heading">Article 6</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 6</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, cum!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-7">
          <h2 class="art-heading">Article 7</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 7</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis, eveniet.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-8">
          <h2 class="art-heading">Article 8</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 8</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa, vitae!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="level level-4">
    <div class="rotater">
      <div class="elem">
        <div class="inner inner-1">
          <h2 class="art-heading">Article 1</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 1</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, reprehenderit.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-2">
          <h2 class="art-heading">Article 2</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 2</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas, veritatis.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-3">
          <h2 class="art-heading">Article 3</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 3</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius, sed?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-4">
          <h2 class="art-heading">Article 4</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 4</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Velit, animi?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-5">
          <h2 class="art-heading">Article 5</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 5</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate, modi.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="level level-5">
    <div class="rotater">
      <div class="elem">
        <div class="inner inner-1">
          <h2 class="art-heading">Article 1</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 1</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, esse.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-2">
          <h2 class="art-heading">Article 2</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 2</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae, quod!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-3">
          <h2 class="art-heading">Article 3</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 3</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Obcaecati, quaerat.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-4">
          <h2 class="art-heading">Article 4</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 4</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minus, ad?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-5">
          <h2 class="art-heading">Article 5</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 5</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, doloremque!</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-6">
          <h2 class="art-heading">Article 6</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 6</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error, animi?</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-7">
          <h2 class="art-heading">Article 7</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 7</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quam, quia.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-8">
          <h2 class="art-heading">Article 8</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 8</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Harum, perspiciatis.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-9">
          <h2 class="art-heading">Article 9</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 9</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore, labore.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
      <div class="elem">
        <div class="inner inner-10">
          <h2 class="art-heading">Article 10</h2>
          <button class="art-btn">Read more</button>
          <div class="art-content">
            <h2 class="art-fullName">Article 10</h2>
            <p class="art-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores, sint.</p>
            <div class="art-close"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="nav-top">
  <h2 class="nav-top__heading">
    <span class="nav-top__btn up">-</span>
    Level <span class="nav-top__pagination">
    <div class="level-pagi">1</div>
    <div class="level-pagi">2</div>
    <div class="level-pagi">3</div>
    <div class="level-pagi">4</div>
    <div class="level-pagi">5</div>
    <div class="level-pagi">6</div>
    <div class="level-pagi">7</div>
    <div class="level-pagi">8</div>
    <div class="level-pagi">9</div>
    </span>
    <span class="nav-top__btn down">+</span>
  </h2>
</div>
<div class="nav-bot">
  <span class="nav-bot__btn left"></span>
  <span class="nav-bot__pagi active" data-page="1"></span>
  <span class="nav-bot__pagi" data-page="2"></span>
  <span class="nav-bot__pagi" data-page="3"></span>
  <span class="nav-bot__pagi" data-page="4"></span>
  <span class="nav-bot__pagi" data-page="5"></span>
  <span class="nav-bot__pagi" data-page="6"></span>
  <span class="nav-bot__btn right"></span>
</div>
              
            
!

CSS

              
                @import "compass/css3";

@font-face {
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/pirou.otf');
  font-family: pirou;
}
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
$red: #F44336;
$pirou: pirou, Helvetica, Arial, sans-serif;
$openSans: 'Open Sans', Helvetica, Arial, sans-serif;
$level1Elems: 6;
$level1Angle: 360deg / $level1Elems;
$level1Z: 0 - $level1Elems * 15vw;
html, body {
  height: 100%;
  font-size: 62.5%;
  overflow: hidden;
  
  @media (max-width: 992px) {
    font-size: 50%;
  }
}
body {
  background: lightseagreen;
  //background: #cfcfcf;
}
.shake {
  animation: shake 0.5s infinite;
}
.instant-transition {
  transition: 0s 0s !important;
}
.scene {
  z-index: 1;
  position: relative;
  height: 100%;
  perspective: 200vw;
  
  &.content-visible {
    z-index: 11;
  }
}
.level {
  z-index: 2;
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.7s;
  transform-style: preserve-3d;
  
  @for $i from 1 through 5 {
    &.level-#{$i} {
      top: ($i - 1) * 150%;
    }
  }
}
/*
originally .rotater was 80% width and 100% height and all was ok
until i checked demo in FF...
i even tried SO http://stackoverflow.com/questions/28751990/firefox-bug-with-multiple-nested-z-index-elements-and-preserve-3d
but then i came up with hack. I made .rotater 2px width/height and placed child element with vw/vh units and negative left/top. At least now it works in FF
*/
.rotater {
  z-index: 3;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  transition: transform 0.7s;
  transform-style: preserve-3d;
}
.elem {
  z-index: 4;
  position: absolute;
  top: calc(-50vh - 1px);
  left: calc(-40vw - 1px);
  width: calc(80vw + 2px);
  height: calc(100vh + 2px);
  transition: transform 1s;
  backface-visibility: hidden;
  font-size: 5rem;
  text-align: center;
  transform-style: preserve-3d;
  
  &.full-screen {
    left: calc(-50vw - 1px);
    width: calc(100vw + 2px);
  }
  
  &.content-visible {
    
    .inner {
      z-index: 20;
      
      .art-fullName {
        transform: scale(1);
      }
      .art-text {
        transform: scale(1);
        opacity: 1;
        transition: transform 0.5s 0.2s, opacity 0.5s 0.2s;
      }
      .art-close {
        transform: rotate(45deg);
        transition: transform 0.5s 0.4s, opacity 0.3s;
      }
      
      .art-btn,
      .art-heading {
        display: none;
      }
    }
  }
  
  &:not(.active):hover {
    cursor: pointer;
  }

  @for $i from 1 through $level1Elems {
    &:nth-child(#{$i}) {
      transform: rotateY(0 - ($i - 1) * $level1Angle) translateZ($level1Z);
    }
  }
}

.inner {
  z-index: 5;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #EEEEEE;
  //background: #888;
  transition: transform 0.3s;
  box-shadow: 1.2rem 2rem 2rem rgba(0,0,0,0.3);
  
  &.inner-1 {
    background: rgb(229, 115, 115);
  }
  &.inner-2 {
    background: rgb(186, 104, 200);
  }
  &.inner-3 {
    background: rgb(238,238,238);
  }
  &.inner-4 {
    background: rgb(66, 165, 245);
  }
  &.inner-5 {
    background: rgb(38, 198, 218);
  }
  &.inner-6 {
    background: rgb(102, 187, 106);
  }
  &.inner-7 {
    background: rgb(255, 167, 38);
  }
  &.inner-8 {
    background: rgb(96, 125, 139);
  }
  &.inner-9 {
    background: rgb(121, 85, 72);
  }
  &.inner-10 {
    background: rgb(103, 58, 183);
  }
  
  
  &.clicked {
    transform: translateZ(15vw);
    
    .art-heading {
      transform: scale(0.01);
    }
    .art-btn {
      transform: translateX(-50%) translateY(-50%) scale(0.01);
    }
  }
  
  &:not(.clicked):hover {
    transform: translateZ(5vw);
  }
}
.art-heading {
  margin-top: 1rem;
  font-family: $openSans;
  text-transform: uppercase;
  font-size: 6rem;
  transition: transform 0.3s;
}
.art-btn {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 10rem;
  overflow: hidden;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  outline: none;
  border: 0.5rem solid;
  background: transparent;
  font-size: 5rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  
  &:after {
    content: "";
    display: block;
    position: absolute;
    top: -0.5rem;
    left: -45%;
    width: 30%;
    height: calc(100% + 1rem);
    transform: skewX(-30deg);
    background: linear-gradient(to right, rgba(229, 172, 142, 0), rgba(255,255,255,0.5) 50%, rgba(229, 172, 142, 0));
  }
  
  &:hover {
    background-color: #000;
    border-color: #000;
    color: #fff;
    
    &:after {
      animation: shine 1.2s;
    }
  }
}
.art-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  padding: 3rem;
  text-align: left;
  
  &.visible {
    display: block;
  }
}
.art-fullName {
  font-size: 8rem;
  font-family: $pirou;
  transform: translateX(-150%) translateY(-150%) scale(0.5);
  transition: transform 0.3s;
}
.art-text {
  font-size: 3rem;
  font-family: $openSans;
  transform: scale(0.1);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: 50% 100%;
}
.art-close {
  position: absolute;
  top: -1.8rem;
  right: 0.5rem;
  transform: translateX(150%) translateY(-150%) scale(0.5);
  transition: transform 0.3s;
  
  &:hover {
    opacity: 0.5;
  }
  
  &:before {
    content: "+";
    font-size: 8rem;
    font-family: $openSans;
    cursor: pointer;
  }
}
.svg-matter {
  z-index: 10;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  &.above {
    z-index: 30;
  }
}
.nav-top {
  z-index: 10;
  position: fixed;
  width: 100%;
  top: 1rem;
  left: 0;
  text-align: center;
  
  @media (max-width: 992px) {
    top: 0.2rem;
  }
  
  &__heading {
    font-size: 4rem;
    line-height: 4rem;
    font-family: $pirou;
    text-transform: uppercase;
    color: #fff;
  }
  
  &__pagination {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    height: 4rem;
    
    .level-pagi {
      transition: transform 0.3s;
    }
  }
  
  &__btn {
    display: inline-block;
    vertical-align: top;
    transition: color 0.3s;
    cursor: pointer;
    line-height: 4rem;
    user-select: none;
    
    &:hover {
      color: $red;
    }
    
    &.up {
      font-size: 5rem;
    }
  }
}
.nav-bot {
  z-index: 10;
  position: fixed;
  width: 100%;
  bottom: 1rem;
  left: 0;
  transition: transform 0.2s cubic-bezier(.72,.17,.68,1.46);
  text-align: center;
  
  @media (max-width: 992px) {
    bottom: 0.2rem;
  }
  
  &.inactive {
    transform: scale(0.01);
  }
  
  span {
    display: inline-block;
  }
  
  &__btn {
    width: 2rem;
    height: 2rem;
    border: 0.4rem solid #fff;
    border-left: none;
    border-bottom: none;
    transition: border-color 0.3s;
    cursor: pointer;
    user-select: none;
    
    &.left {
      transform: translateY(-0.2rem) rotate(-135deg);
    }
    &.right {
      transform: translateY(-0.2rem) rotate(45deg);
    }
    
    &:hover {
      border-color: $red;
    }
  }
  
  &__pagi {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid #fff;
    border-radius: 50%;
    margin: 0 0.2rem;
    transition: border-color 0.3s, background-color 0.3s;
    cursor: pointer;
    
    &:hover {
      border-color: $red;
    }
    
    &.active {
      background: #fff;
    }
  }
}

@keyframes shake {
  5% {
    transform: translateX(-1%) translateY(1%);
  }
  15% {
    transform: translateX(1%) translateY(-1%);
  }
  25% {
    transform: translateX(-1%) translateY(-1%);
  }
  35% {
    transform: translateX(1%) translateY(1%);
  }
  45% {
    transform: translateX(-1%) translateY(1%);
  }
  55% {
    transform: translateX(1%) translateY(-1%);
  }
  65% {
    transform: translateX(-1%) translateY(-1%);
  }
  75% {
    transform: translateX(1%) translateY(1%);
  }
  85% {
    transform: translateX(-1%) translateY(1%);
  }
  95% {
    transform: translateX(1%) translateY(-1%);
  }
}

@keyframes shine {
  to {
    transform: skewX(-30deg) translateX(600%);
  }
}
              
            
!

JS

              
                $(document).ready(function() {
  
  var $levels = $(".level"),
      numOfLevels = $levels.length,
      curLevel = 1,
      $curLevel = $(".level.active"),
      $levelPagi = $(".level-pagi"),
      $elems = $curLevel.find(".elem"),
      numOfPages = $elems.length,
      curPage = 1,
      $rotater = $curLevel.find(".rotater"),
      stepAngle = 360 / numOfPages,
      $botPagi = $(".nav-bot__pagi"),
      $navBot = $(".nav-bot"),
      SCENEPERS = 200,
      MULTI_Z = 13,
      LEVELANIM = 1000,
      SIDEANIM = 500,
      animating = false;
  
  function placeElems() {
    $levels.each(function() {
      var $elems = $(this).find(".elem"),
          len = $elems.length,
          angle = 360 / len,
          ELEM_Z = len * MULTI_Z;
      
      $(this).attr("data-elemZ", ELEM_Z);
      $elems.each(function(i) {
        $(this).css("transform", "rotateY("+ (0 - i * angle) +"deg) translateZ("+ (0 - ELEM_Z) +"vw)");
      });
    });
  }
  
  placeElems();
  
  function recreateBottomNav() {
    $(".nav-bot__pagi").remove();
    var newPagi = [];
    for (var i = 1; i <= numOfPages; i++) {
      var $botPagiEl = $("<span class='nav-bot__pagi' data-page='"+ i +"'></span>"),
          activeEl = +$curLevel.attr("data-curpage") || 1;
      if (i === activeEl) $botPagiEl.addClass("active");
      newPagi.push($botPagiEl);
    }
    $(".nav-bot__btn.left").after(newPagi);
    $botPagi = $(".nav-bot__pagi");
  }
  
  function redefineVars() {
    $curLevel = $(".level.active");
    $elems = $curLevel.find(".elem");
    numOfPages = $elems.length;
    curPage =  $curLevel.find(".elem.active").index() + 1 || 1;
    $rotater = $curLevel.find(".rotater");
    stepAngle = 360 / numOfPages;
  }
  
  function changeLevel() {
    $(".level").removeClass("active");
    $(".level-" + curLevel).addClass("active");
    $navBot.addClass("inactive");
    
    animating = true;
    
    setTimeout(function() {
      redefineVars();
      recreateBottomNav();

      $levels.css("transform", "translate3d(0,"+ (0 - (curLevel - 1) * 150) +"%,0)");
      $levelPagi.css("transform", "translate3d(0,"+ (0 - (curLevel - 1) * 100) +"%,0)");
      
      setTimeout(function() {
        $navBot.removeClass("inactive");
      }, 600);
      
    }, 200);
    
    setTimeout(function() {
      animating = false;
    }, LEVELANIM);
  }
  
  function navigateUp() {
    if (curLevel > 1) {
      curLevel--;
      changeLevel();
    }
  }

  function navigateDown() {
    if (curLevel < numOfLevels) {
      curLevel++;
      changeLevel();
    }
  }
  
  function sideNavigation(directPage) {
    if (directPage) {
      var diff = Math.abs(directPage - curPage),
          dirRight = directPage > curPage,
          curAngle = +$rotater.attr("data-angle") || 0;
      if (dirRight && diff > numOfPages/2) {
        dirRight = false;
        diff = numOfPages - diff;
      } else if (!dirRight && diff > numOfPages/2) {
        dirRight = true;
        diff = numOfPages - diff;
      }
      var nextAngle = (dirRight) ? curAngle + stepAngle * diff : curAngle - stepAngle * diff;
      curPage = directPage;
      $rotater.attr("data-angle", nextAngle).css("transform", "rotateY("+ nextAngle +"deg)");
    }
    $elems.removeClass("active");
    $elems.eq(curPage - 1).addClass("active");
    $botPagi.removeClass("active");
    $botPagi.eq(curPage - 1).addClass("active");
    $curLevel.attr("data-curpage", curPage);
    animating = true;
    setTimeout(function() {
      animating = false;
    }, SIDEANIM);
  }
  
  function navigateLeft() {
    var curAngle = +$rotater.attr("data-angle") || 0,
        nextAngle = curAngle - stepAngle;
    $rotater.attr("data-angle", nextAngle).css("transform", "rotateY("+ nextAngle +"deg)");
    (curPage > 1) ? curPage-- : curPage = numOfPages;
    sideNavigation();
  }
  
  function navigateRight() {
    var curAngle = +$rotater.attr("data-angle") || 0,
        nextAngle = curAngle + stepAngle;
    $rotater.attr("data-angle", nextAngle).css("transform", "rotateY("+ nextAngle +"deg)");
    (curPage < numOfPages) ? curPage++ : curPage = 1;
    sideNavigation();
  }
  
  var winW = $(window).width(),
      winH = $(window).height(),
      pathD,
      pathDCopy,
      bigArr = [],
      path,
      rndArr,
      $pickedElem,
      pickedZ;
  
  function range(n) {
    return Array.apply(null, {length: n}).map(Number.call, Number)
  }
  
  function createSvg($el, points) {
    var $el = $el,
        points = points,
        bgColor = $el.css("background-color"),
        elW = $el.width(),
        elH = $el.height(),
        minW = (winW - elW) / 2,
        maxW = winW - minW,
        minH = (winH - elH) / 2,
        maxH = (winH - minH),
        pps = Math.round(points / 4), // POINTS PER SIDE
        stepW = elW / pps,
        stepH = elH / pps,
        bigStepW = winW / pps,
        bigStepH = winH / pps,
        arr = [],
        $svg = $("<svg class='svg-matter'><path fill='"+ bgColor +"' /></svg>");

    rndArr = range(pps * 4);

    if (pps > 1) {
      for (var i = 0; i < pps; i++) {
        arr[i] = (minW + stepW * i) + "," + minH;
        bigArr[i] = (bigStepW * i) + ",0";
        arr[i + pps] = maxW + "," + (minH + stepH * i);
        bigArr[i + pps] = winW + "," + (bigStepH * i);
        arr[i + pps*2] = (maxW - stepW * i) + "," + maxH;
        bigArr[i + pps*2] = (winW - bigStepW * i) + "," + winH;
        arr[i + pps*3] = minW + "," + (maxH - stepH * i);
        bigArr[i + pps*3] = "0," + (winH - bigStepH * i);
      }
    }

    arr[0] = "M" + arr[0];
    bigArr[0] = "M" + bigArr[0];
    pathDCopy = arr;
    pathD = arr.join(" ");
    $svg.find("path").attr("d", pathD);
    $("body").append($svg);
    return $svg;
  }
  
  function newD(points, p) {
    var arr = points.split(" ");
    arr[p] = bigArr[p];
    return arr.join(" ");
  }
  
  function animateLoop(elem, len, justAnimate) {
    var length = $(elem).attr("d").split(" ").length,
        len = len,
        ast = 8,
        dur = 100,
        duration = Math.floor(Math.random() * dur  + dur / 2),
        atSameTime = Math.floor(len / ast) || 8;
    if (rndArr.length) {
      while (atSameTime--) {
        var num = rndArr.splice(Math.floor(Math.random() * rndArr.length), 1)[0];
        pathD = newD(pathD, num);
      }
      Snap(elem).animate( { 'path' : pathD }, duration, mina.easeinout, function() { animateLoop(elem, len, justAnimate) } );
    } else {
      if (justAnimate)  {
        $(".svg-matter").remove();
        $(".inner").removeClass("clicked");
        activateHandlers();
        animating = false;
        return;
      }
      $pickedElem.find(".art-content").addClass("visible");
      $pickedElem.addClass("instant-transition");
      $pickedElem.find(".inner").addClass("instant-transition");
      $pickedElem.css("top");
      $pickedElem.find(".inner").css("transform", "translateZ("+ pickedZ +"vw)")
      bigArr = pathDCopy;
      $(".scene").addClass("content-visible");
      $pickedElem.addClass("content-visible full-screen");
    }
  }
  
  function elemClick() {
    if (animating) return;
    var $inner = $(this).parent(),
        $elem = $inner.parent(),
        bgColor = $inner.css("background-color"),
        innerZDiff = 15,
        z = +$elem.parents(".level.active").attr("data-elemz"),
        coef = SCENEPERS / (SCENEPERS + z - innerZDiff),
        w = Math.ceil($elem.width() * coef) + 1,
        h = Math.ceil($elem.height() * coef),
        left = ($elem.width() - w) / 2 + $(window).width() / 10,
        top = ($elem.height() - h) / 2;
    
    animating = true;
    removeHandlers();
    $pickedElem = $elem;
    pickedZ = z;

    var $div = $("<div></div>");
    $div.css({"position": "absolute", 
              "width": w,
              "height": h, 
              "background": bgColor, 
              "z-index": 15,
              "top": top, 
              "left": left});

    $inner.addClass("clicked");
    setTimeout(function() {
      $curLevel.append($div);
      $div.addClass("shake");
      setTimeout(function() {
        $div.removeClass("shake");
        createSvg($div, 32);
        $div.remove();
        animateLoop(".svg-matter path", 32);
      }, 400);
    }, 300);
  }
  
  $(document).on("click", ".elem:not(.active) .art-btn", function() {
    if (animating) return;
    var that = this;
    setTimeout(function() {
      $(that).trigger("click");
    }, SIDEANIM + 50);
  });
  
  $(document).on("click", ".elem.active .art-btn", elemClick);
  
  function activateHandlers() {
    
    $(document).on("mousewheel DOMMouseScroll", function(e) {
      if (animating) return;
      if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
        navigateUp();
      } else { 
        navigateDown();
      }
    });

    $(document).on("keydown", function(e) {
      if (animating) return;
      if (e.which === 37) {
        navigateLeft();
      } else if (e.which === 38) {
        navigateUp();
      } else if (e.which === 39) {
        navigateRight();
      } else if (e.which === 40) {
        navigateDown();
      }
    });
    
  }
  
  activateHandlers();
  
  function removeHandlers() {
    $(document).off("mousewheel DOMMouseScroll");
    $(document).off("keydown");
  }
  
  $(document).on("click", ".nav-top__btn", function() {
    if (animating) return;
    if ($(this).hasClass("up")) {
      navigateUp();
    } else {
      navigateDown();
    }
  });
  
  $(document).on("click", ".nav-bot__btn", function() {
    if (animating) return;
    if ($(this).hasClass("left")) {
      navigateLeft();
    } else {
      navigateRight();
    }
  });
  
  $(document).on("click", ".nav-bot__pagi:not(.active)", function() {
    if (animating) return;
    sideNavigation(+$(this).attr("data-page"));
  });
  
  $(document).on("click", ".elem:not(.active)", function() {
    if (animating) return;
    sideNavigation(+$(this).index() + 1);
  });
  
  $(document).on("click", ".art-close", function() {
    $pickedElem.removeClass("content-visible");
    setTimeout(function() {
      $(".svg-matter").attr("class", "svg-matter above");
      $pickedElem.removeClass("full-screen instant-transition");
      $pickedElem.find(".inner").attr("style", "");
      $pickedElem.find(".art-content").removeClass("visible").removeClass("instant-transition");
      $pickedElem.find(".inner").removeClass("instant-transition");
      $pickedElem.css("top");
      $(".scene").removeClass("content-visible");
      rndArr = range(32);
      animateLoop(".svg-matter path", 32, true);
    }, 300);
    
  });
  
  $(window).resize(function() {
    winW = $(window).width();
    winH = $(window).height();
  });
    
});
              
            
!
999px

Console