@font-face {
  font-family: "Matter of Sans";
  src: url("/assets/fonts/MatterofSans.woff2") format("woff2"),
    url("/assets/fonts/MatterofSans.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
::-moz-selection {
  /* Code for Firefox */
  color: white;
  background: black;
}

::selection {
  color: white;
  background: black;
}

* {
  margin: 0;
  padding: 0;
  font-family: "Matter of Sans", sans-serif;
  text-transform: uppercase;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}
html {
  height: -webkit-fill-available;
  overflow: hidden;
}
body {
  padding: 0;
  margin: 0;
  overflow: hidden;
  height: -webkit-fill-available;
}
a {
  color: currentColor;
  text-decoration: none;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: -webkit-fill-available;
  align-items: center;
  width: 100%;
}

.header {
  width: 100vw;
  height: 4.3rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.4rem;
  font-size: 1.6rem;
  transition: 0.6s height;
  position: relative;
  z-index: 1;
}

.header span {
  opacity: 0;
  transition: 0.4s ease;
}

.prestate {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 9.2vw;
  font-size: 11vw;
  pointer-events: none;
}

.images {
  height: calc(100vh - 17rem);
  width: calc((100vh - 17rem) * 2);
  max-width: calc(100vw - 2rem);
  max-height: calc(50vw - 2rem);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: 0.6s;
  position: relative;
}

.images__prestate,
.footer__prestate {
  height: 0;
  opacity: 0;
}

.images__title {
  position: absolute;
  z-index: -1;
  font-size: 11.9vw;
  line-height: 82%;
  padding: 0 3rem;
  text-align: center;
  color: black;
  opacity: 1;
  pointer-events: none;
  width: 100%;
  word-spacing: 100vw;
}

.image {
  position: relative;
  height: 100%;
  width: 50%;
  max-width: calc(50vw - 1rem);
  max-height: calc(50vw - 1rem);
  cursor: pointer;
  overflow: hidden;
}

.image img,
.answer {
  width: 100%;
  height: 100%;
}
.image img {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.2s ease;
}
.image img:hover {
  transform: scale(1.05);
}

.image img.overlay-image {
  opacity: 1;
  pointer-events: auto;
}

.answer {
  position: absolute;
  left: 0;
  top: 0;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  display: none;
  line-height: 1.5rem;
  font-size: 1.6rem;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.answer__text {
  max-width: 30rem;
  margin: 1rem;
}

.answer__text p {
  display: inline;
}

.answer__label {
  position: relative;
}

.answer__arrow {
  position: relative;
  width: 1.8rem;
  height: 1.5rem;
  text-align: left;
}
.answer__arrow.right {
  transform: scale(-1);
}

.answer__arrow::after {
  content: "";
  border-right: 2px solid black;
  border-top: 2px solid black;
  height: 13px;
  width: 13px;
  display: block;
  position: absolute;
  transform: rotate(45deg);
  right: 0.2rem;
  bottom: 0.29rem;
}
.answer__arrow::before {
  content: "";
  height: 2px;
  width: 23px;
  background: black;
  display: block;
  position: absolute;
  right: 0.2rem;
  bottom: 0.7rem;
}

footer {
  z-index: 1;
}

.footer {
  height: 4rem;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: 0.6s;
}

.footer__wrap {
  width: calc((100vh - 17rem) * 2);
  max-width: calc(100vw - 2rem);
  display: flex;
  justify-content: space-between;
}

.chrono {
  width: 1rem;
  white-space: nowrap;
}

.instruction {
  position: absolute;
  line-height: 1.4rem;
  font-size: 1.6rem;
  z-index: -2;
  transition: 0.5s;
  opacity: 1;
  top: calc(50vh - 4.2rem);
}

.instruction.top {
  top: 4.3rem;
  color: #cbcbcb;
  transition: 0.8s ease;
}

.hide {
  opacity: 0;
  transition: 0.3s ease;
}

.about {
  position: fixed;
  top: 1rem;
  left: 1rem;
  cursor: pointer;
  line-height: 0.7rem;
  z-index: 1;
}
.about__overlay {
  position: fixed;
  transition: 0.5s ease;
  padding: 2rem;
  box-sizing: border-box;
  background: white;
  width: 100%;
  height: 100%;
  font-size: 2.5vw;
  text-transform: none !important;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  top: 0;
}

.about__overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.about__overlay p,
.return {
  text-transform: none !important;
  font-size: 3vw;
  line-height: 3.2vw;
}

.return {
  margin: 3rem 0 0 0;
  cursor: pointer;
}

.about__overlay a,
.return {
  text-decoration: underline;
  text-decoration-thickness: 0.2vw;
  text-underline-offset: 0.4vw;
  text-transform: none;
}

.instagram {
  position: fixed;
  top: 1rem;
  right: 1rem;
  line-height: 0.7rem;
  z-index: 1;
}

.popup {
  position: fixed;
  top: 0;
  width: 100vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.popup__score {
  font-size: 14rem;
  line-height: 11.5rem;
}
.popup__message {
  line-height: 1.7rem;
  font-size: 1.6rem;
  width: 30rem;
  text-align: center;
}
.popup__next {
  margin: 2rem 0 0 0;
  width: 9rem;
  position: relative;
  cursor: pointer;
}
.popup__next::after {
  content: "";
  border-right: 1px solid black;
  border-top: 1px solid black;
  height: 9px;
  width: 9px;
  display: block;
  position: absolute;
  transform: rotate(45deg);
  right: 0.3rem;
  bottom: 0.42rem;
}
.popup__next::before {
  content: "";
  height: 1px;
  width: 18px;
  background: black;
  display: block;
  position: absolute;
  right: 0.2rem;
  bottom: 0.7rem;
}

@media screen and (max-width: 700px) {
  .header,
  .answer,
  .instruction {
    line-height: 1.1rem;
    font-size: 1.1rem;
  }
  .image {
    width: 100%;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vw - 2rem);
  }
  .images {
    height: calc((100vh - 33rem) * 2);
    width: calc(100vh - 33rem);
    margin: 3rem 0 0;
    max-width: none;
    max-height: none;
    flex-direction: column;
  }
  .images__title {
    font-size: 11vw;
    width: calc(100vw - 2rem);
  }
  .answer__arrow.right {
    transform: rotate(270deg);
  }
  .answer__arrow {
    transform: rotate(90deg);
  }
  .image:last-child .answer {
    flex-direction: column-reverse;
  }
  .answer__arrow::after {
    right: 0.5rem;
    bottom: 0.39rem;
  }
  .answer__arrow::before {
    right: 0.4rem;
    bottom: 0.77rem;
  }
  .about__overlay p,
  .return {
    font-size: 4.4vw;
    line-height: 4.6vw;
  }
  .header {
    position: fixed;
    top: 1rem;
    justify-content: normal;
    pointer-events: none;
  }
  footer {
    position: fixed;
    bottom: 1rem;
  }
  .instruction.top {
    top: 3.3rem;
    pointer-events: auto;
  }
  .instruction {
    top: calc(50vh - 3.2rem);
  }
  .popup__message {
    line-height: 1.1rem;
    font-size: 1.1rem;
    width: 20rem;
  }
  .popup__score {
    font-size: 9.2rem;
    line-height: 8.5rem;
  }
}
@media screen and (min-width: 1500px) {
  .images__title {
    font-size: 10rem;
  }
}
@media screen and (max-height: 700px) and (max-width: 740px) {
  .images {
    height: calc((var(--viewport-height) - 25.9rem) * 2);
    width: calc(var(--viewport-height) - 25.9rem);
  }
  .answer__arrow::after {
    border-right: 1px solid black;
    border-top: 1px solid black;
    height: 8px;
    width: 8px;
  }
  .answer__arrow::before {
    height: 1px;
    width: 19px;
    right: 0.4rem;
    bottom: 0.63rem;
  }
  .instruction {
    top: calc(50vh - 1.8rem);
  }
}
/* @media screen and (max-height: 630px) {
  .images {
    height:calc((var(--viewport-height) - 29rem) * 2);
    width: calc(var(--viewport-height) - 29rem);
  }
} */
@media screen and (max-height: 540px) and (max-width: 740px) {
  .images {
    height: calc((var(--viewport-height) - 25rem) * 2);
    width: calc(var(--viewport-height) - 25rem);
  }
}
@media screen and (max-height: 800px) and (max-width: 740px) {
  .answer {
    line-height: 0.8rem;
    font-size: 0.8rem;
  }
  .answer__arrow::after {
    border-right: 1px solid black;
    border-top: 1px solid black;
    height: 8px;
    width: 8px;
  }
  .answer__arrow::before {
    height: 1px;
    width: 19px;
    right: 0.4rem;
    bottom: 0.63rem;
  }
}

@media screen and (min-width: 750px) and (max-height: 850px) {
  .images__title {
    font-size: 5rem;
  }
  .answer__text {
    line-height: 1.7rem;
    font-size: 1.6rem;
  }
}

/* Avoid Chrome to see Safari hack */
@supports (-webkit-touch-callout: none) {
  body {
    /* The hack for Safari */
    min-height: -webkit-fill-available;
  }
}
