@import url("https://fonts.googleapis.com/css2?family=Ephesis&display=swap");

html {
  height:100%;
  background-color: #074f57;
}

body {
  margin: 0;
  font-family: system-ui;
  text-align: center;
  min-height: 100vh;
  background-color: #074f57;
  background-image: url("../images/background_full.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  animation: fadeInAnimation ease 3s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}


.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide the landing layer once the book opens */
.hero.hidden {display: none;}

/* Book layer - hidden until 'Where did the moon go?' is clicked */
.book-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}
.book-screen.is-open {
 display: flex;
 
}
/*animation: fadeInAnimation ease 4s forwards; only the book fades */
/* Temporary placceholder so you can see the book area before images exist */
.book {
  --page-h: min(85vh, 60vw);
  --page-w:calc(var(--page-h)*3/4);
  position: relative; /*flip pieces position themselves inside it */
  display: flex;
  width: calc(var(--page-w)*2);
  height: var(--page-h);
  perspective: 6000px; /*depth for the turning leaf*/
  perspective-origin: 50% 50%;
  justify-content: center;
  transition: transform 1.1s ease, box-shadow 2s ease;
}

.book:not(.closed):not(.closed-right) { box-shadow: 0 10px 40px rgba(0,0,0,0.45); }
.book.closed { transform: translateX(calc(var(--page-w) / -2)); }
.book.closed-right {transform: translateX(calc(var(--page-w) / 2));}

.cover-closed {
  position: absolute;
  top: 0;
  left: var(--page-w);
}

.cover-closed-back {
  position: absolute;
  top: 0;
  left: 0;
}

/* fade just the book's contents, once */
.book-opening .page {
  animation: fadeInAnimation ease 1.2s forwards;
}

.page {
  width: var(--page-w);
  height: var(--page-h);
  overflow: hidden;
  background: #fff;
  cursor: pointer; /*signals the page is clickable*/
}

.page img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* Pieces used only during a flip */
/* The two static halves behind the turning leaf (tehy reuse .page for size) */
.half {position: absolute; top: 0; z-index: 1;}
.half-left { left: 0; }
.half-right { left: var(--page-w);}

/* The turning leaf: occupies the right half, swings on the spine */

.flip-leaf {
  position: absolute;
  top: 0;
  left: var(--page-w);
  width: var(--page-w);
  height: var(--page-h);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 2s ease;
  z-index: 2;
}
.flip-leaf.turn-forward { transform: rotateY(-180deg); }

.flip-leaf.back {
  left: 0;
  transform-origin: right center;
}

.flip-leaf.back.turn-back {transform: rotateY(180deg);}

.flip-leaf .face {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--page-w);
  height: var(--page-h);
  backface-visibility: hidden;
  overflow: hidden;
  background: #fff;
}

.flip-leaf .face img {
  width: var(--page-w);
  height: var(--page-h);
  object-fit: fill;
  display: block;
}

.flip-leaf .face.front { transform: translateZ(0.5px); }
.flip-leaf .face.back  { transform: rotateY(180deg) translateZ(0.5px); }

.container {
  max-width: 960px;
  max-height: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  
  
}

/* Define the 'fadeOut' animation */
@keyframes fadeOut {
  from {
    opacity: 1;  /*Set initial opacity to 1 */
  }
  to {
    opacity: 0; /* Set final opacity to 0 */
  }
}


.btn {
  border: none;
  background-color: inherit;
  padding: 10px 28px;
  font-family: Ephesis;
  font-size: 40px;
  cursor: pointer;
  display: inline-block;
}


.btn:hover {background: #cac;}

.read {
  color: white;
  position: relative;
  top:-160px;

}