/* 

flipbook code taken and adapted from https://github.com/farooqdadai/css-book-flip/blob/master/index.html <3

*/

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:var(--black);
    overflow:hidden;
}

input {
    display: none;
}

img {
    width: 100%;
    height: 100%;
}

.book {
    position:relative;
    display: flex;
    color:var(--black);
}

.book::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    box-shadow: rgb(0, 0, 0) 0px 20px 30px -10px;
  }

#cover {
    width:calc(50vw - 2rem);
    max-width: 35rem;
    height:calc(100vh - 4rem);
    max-height: 55rem;
    background:var(--white);

    box-shadow: inset -15px -2px 40px 0px rgba(0,0,0,0.15), inset -2px 0px 15px 0px rgba(0,0,0,0.2);
}

.flip-book {
    width:calc(50vw - 2rem);
    max-width: 35rem;
    height:calc(100vh - 4rem);
    max-height: 55rem;
    position: relative;
    perspective: 1500px;
}

.flip {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: left;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: 0.5s ease-in-out;
    color: var(--black);

    background:var(--white);
}

p {
    font-size: 1rem;
    line-height: 1.33;
}

.front {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:var(--white);
    box-sizing: border-box;
    padding: 1rem 2rem;
    box-shadow: inset 15px -2px 40px 0px rgba(0,0,0,0.15), inset 2px 0px 15px 0px rgba(0,0,0,0.2);
}

.front:not(:has(h2, h3, h4, h5, h6)) {
  padding-block:1.75rem;
}

.back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99;
    transform: rotateY(180deg);
    padding:1rem 2rem;
    backface-visibility: hidden;
    background:var(--white);
    box-shadow: inset -15px -2px 40px 0px rgba(0,0,0,0.15), inset -2px 0px 15px 0px rgba(0,0,0,0.2);
}

.next-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    cursor: pointer;
}

.back-btn {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    cursor: pointer;
}