@charset "UTF-8";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  position: fixed; /* prevents new scrollbars from appearing */
}

li {
  list-style: none;
}

#toc li {
  padding: 0.5rem;
  color: black;
  cursor: pointer;
  transition: border-left 0.3s ease;
  -webkit-transition: border-left 0.3s ease;
  border-left: 0.5rem solid transparent;
}
#toc li:hover {
  border-left: 0.5rem solid #41220a;
}

#pic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}
#pic-overlay.hidden {
  display: none;
}
#pic-overlay div {
  display: flex;
  background-color: #fff;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 25px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  z-index: 10;
}
#pic-overlay div img {
  width: auto;
  height: auto;
  max-height: calc(var(--vh, 1vh) * 80);
  max-width: 70vw;
  align-self: center;
  border: none;
  -webkit-object-fit: contain;
  -o-object-fit: contain;
  object-fit: contain;
  cursor: default;
}
#pic-overlay div i {
  position: absolute;
  top: 5px;
  right: 5px;
  color: white;
  opacity: 0.6;
  background-color: black;
  border-radius: 50%;
}
#pic-overlay div i:hover {
  opacity: 0.8;
}

.dating {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0 1rem;
  gap: 1rem;
}
.dating img {
  width: 100%;
  height: 100%;
}

#book-marker {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-5%);
  -webkit-transform: translateY(-5%);
  width: 100px;
  height: 90%;
  background-color: red;
  color: white;
  z-index: 4;
  cursor: pointer;
}
#book-marker::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 1px);
  -webkit-transform: translate(-50%, 1px);
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 50px solid white;
}

#book-marker-top {
  position: absolute;
  top: 5px;
  left: 0;
  transform: translateX(-101.6%);
  -webkit-transform: translateX(-101.6%);
  width: 99px;
  height: 20px;
  z-index: 23;
  background-color: red;
  cursor: pointer;
}
#book-marker-top.hidden {
  display: none;
}

/* Book styles */
.book {
  position: relative;
  width: 350px;
  height: 500px;
  transition: transform 0.5s;
  -webkit-transition: -webkit-transform 0.5s;
}
div.front-content,
div.back-content {
  background-image: repeating-linear-gradient(
    to bottom,
    #fff 0px,
    #fff 23px,
    #e0e0e0 24px
  );
  border-right: 1px solid #41220a;
}

.page {
  display: flex;
  gap: 2px;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  perspective: 1500px;
  -webkit-perspective: 1500px;
  transform: translateZ(0); /* force GPU compositing */
  -webkit-transform: translateZ(0);
  will-change: transform, z-index;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.page.hidden {
  content-visibility: hidden;
}

.front,
.back {
  display: flex;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left;
  -webkit-transform-origin: left;
  transition: transform 0.5s;
  -webkit-transition: -webkit-transform 0.5s;
}

.front {
  z-index: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.back {
  z-index: 0;
}

img {
  cursor: pointer;
  width: 235px;
  -o-object-fit: contain;
  object-fit: contain;
  -webkit-object-fit: contain;
  border: none;
  border-radius: 5px;
}

/* Final page adjustments */
#last-page div.back div.back-content h3 {
  text-align: center;
  font-size: 1.5rem;
}
#last-page div.back div.back-content div {
  display: flex;
}
#last-page div.back div.back-content div img {
  width: 150px;
  height: auto;
}
#last-page div.back div.back-content div div {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
#last-page div.back div.back-content div div div div.contact-logo a {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 1rem;
  width: 50px;
  height: 50px;
  overflow: hidden;
}
#last-page div.back div.back-content div div div div.contact-logo a:hover {
  box-shadow: 0 0 10px #d4af37;
}
#last-page div.back div.back-content div div div div.contact-logo a img {
  border: none;
  width: 50px;
  height: auto;
}

.front-content,
.back-content {
  color: black;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  justify-content: flex-start;
  align-items: center;
  align-self: center;
}

/* Buttons */
button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  margin: 1rem;
  transition: transform 0.5s;
  -webkit-transition: -webkit-transform 0.5s;
}
button.hidden {
  display: none;
}
button:focus {
  outline: none;
}

i {
  font-size: 2rem;
  color: #e0e0e0;
}

p,
h3 {
  text-align: justify;
  font-size: 18px;
  margin: 0 1rem;
}

small {
  font-size: 14px;
  margin: 0 1rem;
}

#first-page .back {
  background-color: #41220a;
}

.art {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.art div {
  margin: 0 0.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
}
.art div div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.art div div p {
  margin: 0;
}
.art div img {
  width: 100%;
  height: auto;
  margin: auto;
}
.art img {
  margin: 0.5rem;
  border-radius: 5px;
}
.art i {
  font-size: 18px;
  color: black;
}

#first-page img,
#last-page img {
  border: 5px solid #d4af37;
  box-shadow: none;
}

#first-page .front-content,
#last-page .back-content {
  height: 100%;
  width: 100%;
}

#last-page .back-content,
#first-page .front-content {
  border: 1rem solid #41220a;
  background: radial-gradient(circle at top left, #d4af37 5%, transparent 6%)
      no-repeat,
    radial-gradient(circle at top right, #d4af37 5%, transparent 6%) no-repeat,
    radial-gradient(circle at bottom left, #d4af37 5%, transparent 6%) no-repeat,
    radial-gradient(circle at bottom right, #d4af37 5%, transparent 6%)
      no-repeat;
  box-shadow: inset 0 0 0 3px #d4af37;
  background-color: #41220a;
  position: relative;
}
#last-page .back-content::before,
#first-page .front-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

#last-page .back .back-content,
#first-page .front .front-content {
  color: white;
  font-size: 1.5rem;
  text-align: center;
  font-family: "Courier New", Courier, monospace;
}

#last-page .front {
  background-color: #41220a;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#last-page p {
  text-align: center;
}

/* Page order */
#first-page {
  z-index: 3;
}

#first-page,
#last-page {
  content-visibility: visible;
}

.back-content {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

/* Page flip effect */
.flipped .front,
.flipped .back {
  transform: rotateY(-180deg);
  -webkit-transform: rotateY(-180deg);
}
