html,
body {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  color: grey;
  text-align: left;
  font-family: 'Roboto', Helvetica, sans-serif;
  background-color: white;
}

p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}

a {
  color: #c3749d;
  white-space: nowrap;
}

a:hover {
  text-decoration: none;
}

ul {
  padding-left: 2rem;
  list-style: none;
}

ul li::before {
  content: "\2022";
  color: #c3749d;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.demo-mode .info__list,
.demo-mode a[download] {
  display: none;
}

.demo-mode.image-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.demo-mode .interactive {
  max-width: unset;
  margin-top: 0;
}

.demo-mode .allow-motion-button {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translate(-50%, 0);
}

.info {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding-top: 0.5rem;
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100vh;
  overflow: hidden;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none;
}

.interactive {
  position: relative;
  width: 100%;
  max-width: 50rem;
  display: block;
  height: auto;
  margin-top: 2rem;
  margin-right: auto;
  margin-left: auto;
  transform: scale(1, 1);
  transition: all 250ms ease-in-out;
}

.canvas {
  width: 100%;
  background-color: #eb7167;
  backface-visibility: hidden;
  transform: translate(0,0,0);
}

@keyframes fade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.loading-screen {
  opacity: 1;
  visibility: visible;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 40px;
  background-color: white;
  color: #999;
  transform: translateZ(50px);
  transition: 0.25s ease all 0.75s;
}

.loading-screen.hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateZ(0);
  display: none;
}

.version {
  position: absolute;
  bottom: 0;
  left: 0;
}

.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-left: 1rem;
  margin-right: auto;
  margin-bottom: 1rem;
  padding: 1rem;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  text-decoration: none;
  font-family: sans-serif;
  text-align: center;
  color: #c3749d;
  background-color: white;
  border-radius: 1rem;
  border: 2px solid #c3749d;
  transition: 0.15s ease all;
}

.allow-motion-button {
  opacity: 0;
  visibility: hidden;
  min-width: 15.2rem;
  margin-left: 1rem;
  margin-right: auto;
  padding: 1rem;
  font-size: 1rem;
  color: white;
  background-color: #c3749d;
  border: 2px solid #c3749d;
  border-radius: 1rem;
}

.allow-motion-button.visible {
  visibility: visible;
  opacity: 1;
}

.title {
  font-weight: 700;
  color: #c3749d;
}

.only-mobile {
  display: none;
}

.video {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 46rem;
  margin: 2rem auto;
  display: block;
  border-radius: 2rem;
}

.video.invisible,
.canvas.invisible {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
}

@media screen and (max-width: 37rem) {
  body {
    font-size: 0.9rem;
  }

  .title {
    margin-top: 1rem;
  }

  .interactive {
    max-width: 100%;
    height: auto;
  }
}

@media screen and (max-height: 50rem) {
  .interactive {
    width: auto;
    margin: 0 auto;
  }
}

@media screen and (max-height: 33rem) {
  .interactive {
    max-width: 88%;
    height: auto;
    margin: 0 auto;
  }

  .button[download] {
    padding: 0.5rem;
  }
}

@media only screen and (hover: none) and (pointer: coarse) {
  .only-mobile {
    display: block;
  }

  .only-desktop {
    display: none;
  }
}

@media (orientation: landscape) {
  .image-container {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
  }

  .interactive {
    width: 50%;
    max-height: 100%;
    height: auto;
    margin-top: 0;
  }

  .video {
    width: 56.7%;
  }
}

.camera {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 4rem;
  cursor: pointer;
}

.camera__icon {
  width: 100%;
  animation: iddle 1s infinite;
}

.stop .camera__icon {
  animation-name: none;
  filter: grayscale(1);
  opacity: 0.8;
}

.camera__shadow {
  width: 100%;
  animation: shadow-iddle 1s infinite;
}

.stop .camera__shadow {
  animation-name: none;
  filter: grayscale(1);
  opacity: 0.3;
}

.close-video {
  display: none;
  position: relative;
  top: 0.5rem;
  left: 0rem;
  width: 2rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: #342f2f;
  text-align: center;
  text-transform: uppercase;
}

.play-video {
  position: relative;
  top: -0.2rem;
  left: -0.4rem;
  width: 3rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: #c3749d;
  text-align: center;
  text-transform: uppercase;
  animation: iddle 1s infinite;
}

.stop .close-video {
  display: block;
}

.stop .play-video {
  display: none;
}

@keyframes iddle {
  0% {
    transform: translateY(-50%);
  }

  50% {
    transform: translateY(-38%) scaleX(1.05);
  }

  100% {
    transform: translateY(-50%);
  }
}

@keyframes shadow-iddle {
  0% {
    transform: translateY(-50%) scaleX(1);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-50%) scale(1.3, 1);
    opacity: 0.5;
  }

  100% {
    transform: translateY(-50%) scaleX(1);
    opacity: 0.7;
  }
}

.instagram-feed {
  width: 20rem;
}

.surprise {
  animation: surprise 250ms;
}

@-webkit-keyframes surprise {
  from, to {
    -webkit-transform: scale(1, 1);
    transform: scale(1, 1);
  }
  25% {
    -webkit-transform: scale(0.9, 1.1);
    transform: scale(0.9, 1.1);
  }
  50% {
    -webkit-transform: scale(1.1, 0.9);
    transform: scale(1.1, 0.9);
  }
  75% {
    -webkit-transform: scale(0.95, 1.05);
    transform: scale(0.95, 1.05);
  }
}

@keyframes surprise {
  from, to { transform: scale(1, 1); }
  25% { transform: scale(0.9, 1.1); }
  50% { transform: scale(1.1, 0.9); }
  75% { transform: scale(0.95, 1.05); }
}

.canvas.flip {
  background-color: white;
  transition: transform 150ms ease-in-out;
  transform: rotateX(0deg) rotateY(0deg) !important;
}

.canvas.flip + .video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px black;
}

.fade {
  animation: fade 1s ease-in-out;
}

.bounceIn {
  animation-duration: 250ms;
  animation-name: bounceIn;
}

@keyframes bounceIn {
  from,
  20%,
  40%,
  60%,
  80%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }

  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }

  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  }

  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }

  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  }

  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}
