* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  background: faf5f6;
  font-family: "Quicksand", sans-serif;
  color: #333;
}

aside.context {
  text-align: center;
  color: #333;
  line-height: 1.7;
}
aside.context a {
  text-decoration: none;
  color: #333;
  padding: 3px 0;
  border-bottom: 1px dashed;
}
aside.context .explanation {
  max-width: 700px;
  margin: 4em auto 0;
}


h1 {
  width: 100%;
  margin: 3em auto 1.5em;
  font-size: 40px;
  text-align: center;
}
h1 small {
  text-transform: none;
  display: block;
  margin: 20px 0;
  font: 300 20px "QuickSand", sans-serif;
  color: #999;
}

h4 {
  width: 100%;
  margin: 2em auto 0;
  font-size: 20px;
}
h4 small {
  text-transform: uppercase;
  display: block;
  margin: 10px 0;
  font: 300 15px "QuickSand", sans-serif;
  color: #999;
}


@media only screen and (min-width: 768px) {
.main-content {
  display: flex;
  /*flex-wrap: wrap;*/
  margin: 3em auto 0;
  max-width: 1430px;
  justify-content: space-around;
  align-items: center;
}
}


@media only screen and (max-width: 767px) {
.main-content {
  /*flex-wrap: wrap;*/
  margin: 3em auto 0;
  max-width: 1430px;
  justify-content: space-around;
  align-items: center;
}
}


.palette__wrapper {
  flex: 1;
  padding: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

@media only screen and (min-width: 768px) {
	.palette {
width: 250px;
    height: 250px;
    margin-top: 50px;
    margin-bottom: 90px;
  position: relative;
  display: inline-block;
  perspective: 800px;
}
}

@media only screen and (max-width: 767px) {
.palette {
        width: 350px;
        height: 350px;
        /* margin-top: 50px; */
        margin-bottom: 60px;
        position: relative;
        display: inline-block;
        perspective: 800px;
}}


.palette__cover {
  border-radius: 6px;
  width: inherit;
  height: inherit;
  position: absolute;
  top: 0;
  z-index: 2;
  transition: 0.3s ease;
  transform-origin: top left;
  font: 900 28px/0.9 "Poppins", sans-serif;
  text-transform: uppercase;
  color: #fff;
  overflow: hidden;
}
.palette__cover__border {
  width: 80%;
  height: 80%;
  border: 7px solid #fff;
  margin: 10%;
}
.palette__cover span {
  display: inline-block;
  position: absolute;
  bottom: 7.5px;
  left: 10px;
  padding: 10px;
  max-width: 50%;
}
.palette__cover__top {
  position: absolute;
  left: 0;
  width: calc(100% + 64px);
  margin-left: -32px;
  z-index: 4;
  border-radius: 3px 3px 4px 4px;
  opacity: 0;
}
.palette__base {
  background: #222;
  width: inherit;
  height: inherit;
  position: absolute;
  top: 0;
  border-radius: 8px;
  padding: 15px;
  grid-gap: 8px;
}
.palette:hover .palette__cover {
  transform: rotateX(81deg);
}
.palette:hover .palette__cover__top {
  animation: startTransition 0.17s forwards 0.1s;
}

@keyframes startTransition {
  0% {
    opacity: 0;
    top: 200px;
    transform: scale(0.5);
    height: 0;
  }
  100% {
    top: 22px;
    opacity: 0; /* Görünmez yapıyoruz */
    transform: scale(1);
    height: 0; /* Yüksekliği sıfırlıyoruz */
    box-shadow: none; /* Kutu gölgesini kaldırıyoruz */
  }
}
.palette__shade {
  border-radius: 4px;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.9);
}

.palette--one .palette__base {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.palette--one .palette__shade:nth-child(1) {
  grid-row: 1/span 2;
  grid-column: 2/span 1;
  margin: 20px 0;
  background: #fadc89;
}
.palette--one .palette__shade:nth-child(2) {
  background: #fce95b;
}
.palette--one .palette__shade:nth-child(3) {
  background: #ffd03a;
}
.palette--one .palette__shade:nth-child(4) {
  background: #fde008;
}
.palette--one .palette__shade:nth-child(5) {
  background: #fec309;
}
.palette--one .palette__cover {
  background: #ffc303;
}
.palette--one .palette__cover__top {
  background: #ecb404;
}
.palette--one .palette__cover span {
  max-width: 70%;
  background: #ffc303;
}

.palette--two .palette__base {
  display: grid;
  grid-gap: 12px;
  justify-self: center;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.palette--two .palette__cover {
  background: #ee4266;
}
.palette--two .palette__cover__top {
  background: #e23a5d;
}
.palette--two .palette__cover span {
  max-width: 70%;
  background: #ee4266;
}
.palette--two .palette__shade:nth-child(1) {
  background: #ee898d;
}
.palette--two .palette__shade:nth-child(2) {
  background: #ec6b73;
}
.palette--two .palette__shade:nth-child(3) {
  background: #d25980;
}
.palette--two .palette__shade:nth-child(4) {
  background: #c24d88;
}

.palette--three .palette__cover {
  background: #0075c4;
}
.palette--three .palette__cover__top {
  background: #016cb4;
}
.palette--three .palette__cover span {
  max-width: 70%;
  background: #0075c4;
}
.palette--three .palette__base {
  display: grid;
  grid-gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.palette--three .palette__shade:nth-child(1) {
  grid-row: 1/span 2;
  grid-column: 1/span 2;
  background: #93dfe3;
}
.palette--three .palette__shade:nth-child(2) {
  grid-row: 3/span 2;
  background: #01c0f3;
}
.palette--three .palette__shade:nth-child(3) {
  grid-row: 1/span 2;
  grid-column: 3/span 2;
  background: #21d0e5;
}
.palette--three .palette__shade:nth-child(4) {
  grid-row: 3/span 2;
  grid-column-start: 4;
  background: #00aae7;
}
.palette--three .palette__shade:nth-child(6) {
  background: #69b3cd;
}
.palette--three .palette__shade:nth-child(5) {
  background: #4ad1eb;
}
.palette--three .palette__shade:nth-child(8) {
  background: #0983d5;
}
.palette--three .palette__shade:nth-child(7) {
  background: #149ecb;
}

.palette--four .palette__base {
  display: grid;
  grid-template-columns: 50% auto;
  grid-template-rows: auto 20% 20%;
}
.palette--four .palette__shade:nth-child(1) {
  grid-row: 1/span 2;
  background: #bfbfbf;
}
.palette--four .palette__shade:nth-child(2) {
  grid-row: 3/span 1;
  background: #a1a1a1;
}
.palette--four .palette__shade:nth-child(3) {
  background: #717171;
}
.palette--four .palette__shade:nth-child(4) {
  background: #585858;
}
.palette--four .palette__shade:nth-child(5) {
  background: #4b4b4b;
}
.palette--four .palette__cover {
  background: #ECB176;
}
.palette--four .palette__cover__top {
  background: #171926;
}
.palette--four .palette__cover span {
  max-width: 70%;
  background: #ECB176;
}

.palette--five .palette__base {
  display: grid;
  grid-template-columns: 50% auto;
  grid-template-rows: auto 20% 20%;
}
.palette--five .palette__shade:nth-child(1) {
  grid-row: 1/span 2;
  background: #bfbfbf;
}
.palette--five .palette__shade:nth-child(2) {
  grid-row: 3/span 1;
  background: #a1a1a1;
}
.palette--five .palette__shade:nth-child(3) {
  background: #717171;
}
.palette--five .palette__shade:nth-child(4) {
  background: #585858;
}
.palette--five .palette__shade:nth-child(5) {
  background: #4b4b4b;
}
.palette--five .palette__cover {
  background: #A67B5B;
}
.palette--five .palette__cover__top {
  background: #171926;
}
.palette--five .palette__cover span {
  max-width: 70%;
  background: #A67B5B;
}