.section {
    position: absolute;
    z-index: 0;
    width: 50%;
    height: 50%;
    overflow: hidden;
    cursor: pointer;
    transform: scale(1);
    will-change: transform, contents;
    transition-property: all;
    transition-duration: 500ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  .section:nth-child(1) {
    top: 0;
    left: 0;
    background: #F06060;
  }
  .section:nth-child(2) {
    top: 0;
    left: 50%;
    background: #FA987D;
  }
  .section:nth-child(3) {
    top: 50%;
    left: 0;
    background: #72CCA7;
  }
  .section:nth-child(4) {
    top: 50%;
    left: 50%;
    background: #10A296;
  }
  .section.is-expanded {
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    cursor: initial;
  }
  .has-expanded-item .section:not(.is-expanded) {
    transform: scale(0);
  }
  
  .close-section {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 2rem;
    text-align: center;
    color: #fff;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    transition: opacity 150ms linear;
    will-change: opacity;
  }
  .section.is-expanded .close-section {
    opacity: 1;
    transition-delay: 500ms;
    pointer-events: initial;
  }
  
  * {
    box-sizing: border-box;
  }
  
  html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  
  body {
    margin: 0;
    font: 16px/1.5 "Roboto Slab", sans-serif;
    background: #000;
  }
  
  .demo-box {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
  }