/*-----------------------------------
DEFAULTS
-----------------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

body {
  font-family: Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: #4db5a6;
	background-image: 
    url("../assets/background/universal-bg-pattern.png"),  linear-gradient(#4db5a6, #8adfb0, #f1b1a6);
    background-blend-mode: soft-light, normal;
  background-attachment: fixed;
  height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 12.5% 75% 12.5%;
}
nav {
  grid-column: 1/2;
  height: 100%;
}
nav ul, aside ul {
  height: 100%;
  width: 100%;
  text-decoration: none;
  list-style: none;
  display: grid;
  grid-template-rows: auto;
  padding: 0.5rem 0;
  justify-content: center;
  align-items: center;
}

nav ul {
  padding-left: 0.5rem;
}
aside ul {
  padding-right: 0.5rem;
}

nav li, aside li {
  display: flex;
  justify-content: center;
  align-content: center;
}

main {
  grid-column: 2/3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 100vh;
  position: relative;
}
main>* {
  width: inherit;
}

@media screen and (orientation:portrait) {
  body {
    display: grid;
    grid-template-rows: 12.5% 75% 12.5%;
    grid-template-columns: 1fr;
  }
  aside {
    grid-row: 1/2;
    grid-column: 1/2;
  }
  main {
    grid-row: 2/3;
    grid-column: 1/2;
  }
  nav>ul, aside>ul {
    height: 100%;
    width: 100%;
    display: flex;
    padding: 0 0.5rem;
    gap: 0.25rem;
    justify-content: space-evenly;
    align-items: center;
  }
  nav ul>li, aside ul>li {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  ul img {
    max-height: 11vh;
    margin: auto;
  }
  nav ul {
    padding-bottom: 0.5rem;
  }
  aside ul {
    padding-top: 0.5rem;
  }
}

/*home page*/
.home-title>* {
  max-height: 75vh;
  padding-top: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}
.enter-button {
  max-height: 20vh;
  padding-bottom: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

/* popups default behaviour*/
.popup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index:10;
  width: 100vw;
  height: 100vh;
  background-color: #4db5a5b7;
  opacity: 0;
  transition: opacity 200ms;
}

.popup-container:target {
  pointer-events: all;
  opacity: 1;
}

.popup {
  position: absolute;
}

.popup-background {
  max-width: 100vw;
  max-height: 100vh;
}

.popup-content {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 2%;
  margin-left: auto;
  margin-right: auto;
}

/*project info popup*/
.info-img {
  position: absolute;
  bottom: 2%;
  right: 0;
  pointer-events: all;
  z-index: 3;
}

/*stream-safe popup*/
.stream-safe-popup-content {
  width: 60%;
  height: 50%;
  position: absolute;
  top: 30%;
  left: 20%;
  display: grid;
  grid-auto-flow: row;
  justify-content: center;
  align-items: center;
  gap: 2%;
  margin-left: auto;
  margin-right: auto;
  overflow: auto;
}

.popup-content img {
  max-height: 100px;
}

@media screen and (width<800px){
  .popup-content img {
    max-height: 75px;
  }
  .info-img {
    max-width: 20vh;
  }

  .stream-safe-popup-background {
    /* transform: rotate(270deg) rotateX(180deg); */
    max-width: 110vw;
  }

  .stream-safe-popup-title {
    font-size: 1em;
  }

  .stream-safe-popup-content {
    width: 57%;
    height: 69%;
    top: 17%;
    left: 22%;
  }
}

.project-info-popup .popup-text {
  position: absolute;
  top: 0;
  right: 0;
}

.close-popup {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  pointer-events: all;
  z-index: 12;
}

@media screen and (width<500px){
  .close-popup {
    width: 80px;
    height: 80px;
  }

  .stream-safe-close-popup {
    top: 0%;
    right: 4%;
    width: 102px;
    height: 112px;
  }
}

@media screen and (width>501px) and (width<1000px){
  .close-popup {
    width: 110px;
    height: 110px;
  }

  .stream-safe-close-popup {
    top: 0%;
    right: 4%;
    width: 92px;
    height: 100px;
  }
}

@media screen and (width>800px) and (width<1000px){
  .stream-safe-close-popup {
    top: 4%;
    right: 0%;
    width: 141px;
    height: 128px;
  }
}

/*decorative frame graphics*/
.frame-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.frame-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.frame {
  background-image: url("../assets/frames/content-frame.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  border: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  scroll-behavior: smooth;
  z-index: 1;
  z-index: 1;
}
.parchment {
  background-image: url("../assets/frames/parchment-frame.png");
  background-size: 100% 100%;
  z-index: -1;
}
.frame.overlay {
  z-index: 2;
  z-index: 2;
  pointer-events: none;
}
@media screen and (orientation:portrait) {
  .frame.portrait {
    background-image: url("../assets/frames/content-frame-portrait.png");
    background-size: 100% 100%;
  }
  .frame.portrait.parchment {
    background-image: url("../assets/frames/parchment-frame-portrait.png");
    background-size: 100% 100%;
  }
}

/*flipbook and video display*/
iframe {
  height: auto;
  max-width: 140vh; /*142vh chosen based on max-height 80vh/9*16; was rounded down for improved display; needs to be overridden for portrait mode*/
  max-height: 80vh; /*chosen because this height consistently fits within the landscape orientation wood frame*/
  aspect-ratio: 16 / 9; /*necessary to display iframes with correct aspect ratio*/
  border: 0;
  flex-shrink: 0;
}
.fp-iframe {
  width: 90%; 
  height: 90%; 
}
.next-page-button {
  pointer-events: all;
  position: absolute;
  padding-bottom: 2px;
  bottom: 0;
  right: 0;
  left: 0;
  margin: auto;
  max-width: 20%;
}
@media screen and (orientation: portrait) {
  iframe {
    max-width: 90vw;
  }
  .fp-iframe {
  padding-top: 5%;
  }
  .next-page-button {
    bottom: 5%;
    max-width: 75%;
  }
}
@media screen and (min-aspect-ratio: 1/1) and (max-aspect-ratio: 32/15) { /*necessary to contain iframe inside wooden frame where wooden frame is not touching an edge of the viewport*/
  iframe {
    max-width: 90%;
  }
  .next-page-button {
    max-width: 30%;
  }
}

@media screen and (min-height:1000px) and (min-width:1800px){
  iframe {
    max-width: 1240px;
    max-height: 700px;
  }
}


/*-----------------------------------
CREDITS PAGE
-----------------------------------*/
.credits-container {
  display: flex;
  flex-wrap: wrap;
  overflow: auto;
  height: 36vw;
  width: 85%;
}

.credits-column {
  padding-top: 3%;
  flex: 50%;
  text-align: center;
  z-index: -1;
}

.credits-row {
  display: flex;
  justify-content: center;
}

.credits-full-column {
  flex: 100%;
  text-align: center;
  justify-content: center;
  z-index: -1;
}

.frow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
}

.fcolumn {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
}

@media screen and (orientation:portrait) {
  .credits-container {
    height: 80%;
    width: 30vh;
  }
  .credits-column {
    flex: 100%;
  }
}

/*-----------------------------------
SCRAPBOOK PAGES
-----------------------------------*/
/*.scrapbook-container {
  grid-column-start: 2;
  grid-column-end: 7;
  display: flex;
  justify-content: space-around;
}

figure {
  height: 100%;
}

figcaption {
  text-align: center;
}

.submission-area {
  height: 500px;
  width: 500px;
}

/*canvas {
  margin: auto;
  background-size: cover;
  width: 100%;
  max-width: 750px;
  cursor: crosshair;
  cursor: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/circular-cursor.png) 53 53, crosshair;
}*/