body {
  margin: 0;
}
.background {
  width: 100%;
  height: 100vh;
  display: block;
  background: gray;
  overflow: hidden;
  perspective: 1500px;
}
.card h2 {
  margin-top: 60px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  transition: all .3s;
}
.card h2 + p {
  color: white;
  font-size: 20px;
  margin-top: -10px;
  transition: all .3s;
}
h3 {
  color: white;
  font-size: 30px;
  font-weight: 300;
}
input {
  display: none;
}
input + .card {
  width: 300px;
  height: 400px;
  margin: auto;
  position: absolute;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  text-align: center;
  transform-style: preserve-3d;
  transition: all 0.3s;
  border-radius: 20px;
  transform-origin: 50% 50% 200px;
}
input + .card::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
  background: black;
  z-index: -2;
  transition: inherit;
  border-radius: inherit;
}
input + .card .layer {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
}
input + .card .photo {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
  background: url("img/318621.jpg") no-repeat;
  background-size: cover;
  z-index: -1;
  border-radius: inherit;
}
input + .card .photo::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
  background: rgba(255, 255, 0, 0);
  border-radius: inherit;
  transition: inherit;
}
input + .card .chart {
  font-size: 0;
}
input + .card .bar {
  width: 20px;
  height: 20px;
  display: inline-block;
  font-size: 12px;
  margin: 10px;
  transform: rotate(-60deg);
  transform-style: preserve-3d;
  position: relative;
  text-align: center;
  line-height: 20px;
  transition: all 0.3s;
}
input + .card .bar::before {
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
  content: "";
  background: #e0dcdc;
  transform-origin: 50% 0 0;
  transform: translateY(20px) rotateX(90deg);
  height: 0px;
  transition: inherit;
}
input + .card .bar::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
  content: "O";
  background: white;
  transition: inherit;
}
input + .card .bar span {
  width: 0px;
  display: block;
  background: #e0dcdc;
  transform-origin: 0 50% 0;
  transform: rotateY(-90deg);
  position: absolute;
  top: 0px;
  left: 0;
  transition: inherit;
}
input + .card .bar1 {
  transition: all 0.3s;
}
input + .card .bar2 {
  transition: all 0.39s;
}
input + .card .bar3 {
  transition: all 0.27s;
}
input + .card .bar4 {
  transition: all 0.36s;
}
input + .card .bar5 {
  transition: all 0.51s;
}
input + .card .bar6 {
  transition: all 0.24s;
}
input + .card .bar7 {
  transition: all 0.48s;
}
input:checked + .card h2 {
  transform: translateZ(-2px);
}
input:checked + .card p {
  transform: translateZ(-2px);
}
input:checked + .card h3 {
  transform: translateZ(10px);
}
input:checked + .card {
  transform: rotateX(61deg) translateZ(100px);
}
input:checked + .card::after {
  transform: translateZ(-20px);
}
input:checked + .card .photo::before {
  background: rgba(46, 129, 224, 0.4);
}
input:checked + .card .chart .bar1::before {
  height: 100px;
}
input:checked + .card .chart .bar1::after {
  transform: translateZ(100px);
}
input:checked + .card .chart .bar1 span {
  width: 100px;
}
input:checked + .card .chart .bar2::before {
  height: 130px;
}
input:checked + .card .chart .bar2::after {
  transform: translateZ(130px);
}
input:checked + .card .chart .bar2 span {
  width: 130px;
}
input:checked + .card .chart .bar3::before {
  height: 90px;
}
input:checked + .card .chart .bar3::after {
  transform: translateZ(90px);
}
input:checked + .card .chart .bar3 span {
  width: 90px;
}
input:checked + .card .chart .bar4::before {
  height: 120px;
}
input:checked + .card .chart .bar4::after {
  transform: translateZ(120px);
}
input:checked + .card .chart .bar4 span {
  width: 120px;
}
input:checked + .card .chart .bar5::before {
  height: 170px;
}
input:checked + .card .chart .bar5::after {
  transform: translateZ(170px);
}
input:checked + .card .chart .bar5 span {
  width: 170px;
}
input:checked + .card .chart .bar6::before {
  height: 80px;
}
input:checked + .card .chart .bar6::after {
  transform: translateZ(80px);
}
input:checked + .card .chart .bar6 span {
  width: 80px;
}
input:checked + .card .chart .bar7::before {
  height: 160px;
}
input:checked + .card .chart .bar7::after {
  transform: translateZ(160px);
}
input:checked + .card .chart .bar7 span {
  width: 160px;
}
