@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: Rubik, serif;
    display: grid;
    place-content: center;
    background: url('images/joshua-rivera-usmhPmT5sj0-unsplash.jpg') fixed no-repeat center;
    height: 100vh;
}

.credits {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 16px;
}

.credits a {
    color: #fff;
}

.container {
    position: relative;
    width: 300px;
    height: 200px;
    background: #38383d;
    border-radius: 16px;
}

.hint {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px 12px;
}

span {
    font-size: 12px;
    color: #fff;
}

.stack {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    position: relative;
    transition: all 0.4s;
    transform-origin: 292px 8px;
    box-shadow: 0 0 12px #000;
}

.stack:hover {
    transform: rotateZ(-10deg);
}

.stack--item {
    background: #dedede;
    width: 100%;
    height: 200px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
}

.stack--item {
    position: absolute;
    right: 0;
    top: 0;
    transform-origin: 292px 8px;
    /* z-index: -1; */
}

h2 {
    text-shadow: 0 0 #333;
}

.none {
    opacity: 0;
    z-index: -1;
}

.show {
    opacity: 100;
    z-index: 1;
}

.out-animation {
    animation: gone 0.4s forwards linear;
}

@keyframes gone {
    0% {
        opacity: 100%;
    }
    70% {
        transform: rotateZ(-20deg);
        opacity: 0;
        z-index: -1;
    }
    100% {
        /* transform: rotateZ(-20deg);
        opacity: 0; */
        z-index: -1;
    }
}