:root {
  font-family: 'Albert Sans', sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: #ffffff;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --bg: rgb(21, 21, 22);
}

html {
  background-color: var(--bg);
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  display: flex;
  margin: 0;
  place-items: center;
  min-width: 320px;
  min-height: 100dvh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.title {
  font-family: "Oswald", sans-serif;
  font-size: 5.5rem;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

p {
  font-size: 1.5rem;
  font-weight: 300;
  margin: 0.5em 0 1em;
}

.powered-by {
  display: block;
  font-size: 0.65rem;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: none;
}
.powered-by > img {
  margin-left: 0.25em;
  vertical-align: middle;
  width: 2em;
}

.title .powered-by {
  margin-top: 0.5rem;
  margin-left: 3px;
}
#preview .powered-by {
  margin-top: 0.6rem;
}

#container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1184px;
  padding: 2em;
  margin: 0 auto;
}

#lenses {
  margin-top: 2rem;
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 1em;
  row-gap: 1em;
}

#preview {
  width: 100%;
  margin: 0 auto;
  display: none;
  /* display: inline-block; */
    /* margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); */
}

.lens-item {
  cursor: pointer;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lens-item img {
  width: 100%;
  /* -webkit-clip-path: url(#shape);
  clip-path: url(#shape); */
}
.lens-item:hover { transform: scale(1.1); }

#selva-shape { display: none; }
#selva-shape-clone {
  width: 10rem;
  fill: transparent;
  animation: spin 6s linear infinite;
}

.loading-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  text-transform: uppercase;
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(359deg); }
}
#shape path {
  transform: scale(1.82) translate(0px, 1px);
}

#canvas {
  border-radius: 25px;
  margin-top: 3rem;
  width: 100%;
}
#canvas-container {
  /* max-height: 80vh; */
  overflow: hidden;
}

.label {
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
  margin: 1rem 0 0;
}

#selected-lens-name {
  font-size: 1.25rem;
  margin: 0;
}

#switch-camera,
#back-to-lenses {
  background: none;
  border: 0;
  outline: none;
  padding: 0;
}
#switch-camera { 
  margin-top: 1rem;
  margin-bottom: 1rem;
}
#back-to-lenses {
  position: fixed;
  top: 1em;
  left: 1em;
}
#back-to-lenses > svg {
  display: inline-block;
  top: 6px;
  position: relative;
}

#loading {
  background-color: var(--bg);
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  font-size: 2rem;
}

#transition {
  background-color: var(--bg);
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 110;
  overflow: hidden;
}
#transition:before {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  content: "";
  background-color: white;
}

#transition.animate {
  animation: tr1b 1s 1;
  animation-fill-mode: forwards;
}
#transition.end {
  animation: tr1b 1s 1;
  animation-fill-mode: forwards;
}
#transition.animate:before {
  animation: tr1w 0.5s 2;
  animation-fill-mode: forwards;
}

@keyframes tr1b {
  0% {
    left: 0%;
    width: 100%;
  }

  50% {
    left: 0%;
    width: 100%;
  }

  95% {
    left: 0%;
    width: 0%;
  }

  100% {
    left: 0%;
    width: 0%;
  }
}

@keyframes tr1w {
  0% {
    left: 100%;
    width: 100%;
  }

  50% {
    left: 0%;
    width: 100%;
  }

  100% {
    left: 0%;
    width: 0%;
  }
}

@media screen and (min-width: 600px) {
  #lenses {  
    margin-top: 5rem;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }

  #preview { 
    width: 75%;
  }
  
  #shape path {
    transform: scale(2.73) translate(0, 1px);
  }

  .title .powered-by { display: inline-block; }
}

/* @media screen and (min-aspect-ratio: 16/9) and (max-width: 1720px) {
  #preview { 
    width: 75%;
  }
} */

/* .totem {
  display: block;
} */
.totem #container {
  max-width: 100%;
}

#totem {
  position: relative;
  width: 100%;
}
.totem #select-lens {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%; 
}

.totem #lenses {
  display: block;
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 1rem 0;
  text-align: center;
  white-space: nowrap;
}
.totem .lens-item {
  aspect-ratio: 1;
  margin-right: 1rem;
  text-align: center;;
  width: 15%;
  position: relative;
}
.totem .lens-item:last-child {
  margin-right: 0;
}
.totem .lens-item > img {
  position: absolute;
  width: 80%;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}
.totem .lens-item.selected > img {
  width: 100%;
  top: 0;
}

.totem #canvas {
  margin-top: 0;
}

.totem #switch-camera {
  display: none;
  position: fixed;
  top: 2rem;
  left: 3rem;
  background: black;
  padding: 1rem;
}

.totem .powered-by {
  position: absolute;
  right: 0;
  bottom: -2rem;
}

.totem-2:not(.mirror-test),
.totem-2:not(.mirror-test) * {
  cursor: none;
}

.totem-2 #canvas {
  border-radius: 0 !important;
  position: fixed;
  left: 50%;
  top: 50%;
  /* min-width: 100vw;
  min-height: 100vh; */
  transform: translate(-50%, -50%) rotate(270deg);
  height: auto;
  width: auto;
}
.totem-2 #canvas.vertical {
  transform: translate(-50%, -50%) rotate(0);
}

/* .totem-2 #canvas.rotate-90 { transform: translate(-50%, -50%) rotate(90deg); }
.totem-2 #canvas.rotate-180 { transform: translate(-50%, -50%) rotate(180deg); }
.totem-2 #canvas.rotate-270 { transform: translate(-50%, -50%) rotate(270deg); } */

.totem-2 #select-lens {
  bottom: 0;
  top: 0;
  right: 3rem;
  left: auto;
  overflow: hidden;
  position: fixed;
  width: 11.5vw;

  right: 7rem;
}
.totem-2 #lenses {
  /* height: 100vh; */
  margin-top: 0 !important;
  overflow-x: hidden;
  overflow-y: scroll;
  width: 12vw;

  padding-right: 2rem;
  position: absolute;
  top: 5vh;
  bottom: 5vh;
  mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%);
}
.totem-2 #lenses.top-reached {
  mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(0,0,0,1) 100%);
}
.totem-2 #lenses.bottom-reached {
  mask-image: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%);
}

.totem-2 #lenses::-webkit-scrollbar {
  margin-top: 15px;
  width: 11px;
}

.totem-2 #lenses::-webkit-scrollbar-track {
  background-color: rgba(0,0,0,0.25);
}

.totem-2 #lenses::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: rgba(255,255,255,0.5);
}


.totem-2 .lens-item {
  display: block;
  width: 100%;
  transform: rotate(-90deg);
}
.totem-2 .lens-item:first-child { margin-top: 0; }


.dev-playground #select-lens {
  width: 100vw;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
}
.dev-playground #lenses {
  position: relative;
  width: 100%;
  top: 0;
  bottom: 0;
}
.dev-playground .lens-item {
  display: inline-block;
  transform: none;
  width: 20%;
}

.joburg-lens-selector .lens-item {
  width: 30%;
}

@media screen and (min-width: 600px) {
  .dev-playground .lens-item {
    width: 10%;
  }
}
@media screen and (min-width: 1920px) {
  .dev-playground .lens-item {
    width: 7%;
  }

  .joburg-lens-selector .lens-item {
    width: 10.5%;
  }
}

.totem-2:not(.dev-playground) .powered-by {
  position: fixed;
  transform: rotate(-90deg);
  top: 2.5rem;
  right: -0.75rem;
  bottom: auto;

  font-size: 2rem;
  top: 4em;
  right: -2em;
}
.totem-2.dev-playground .powered-by {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
}

.totem-2 .loading-text { transform: translate(-50%, -50%) rotate(-90deg); }
.totem-2.dev-playground .loading-text { transform: translate(-50%, -50%) rotate(0); }

body.hide-cursor,
body.hide-cursor * {
  cursor: none !important;
}

body.joburg-lens-selector #select-lens {
  bottom: 2rem;
}
body.joburg-single-lens .powered-by,
body.joburg-lens-selector .powered-by {
  bottom: 2rem !important;
}

#scrollLeftBtn,
#scrollRightBtn,
#scrollUpBtn,
#scrollDownBtn {
  width: 3em;
  height: 3em;
  border-radius: 50%;
  border: none;
  background-color: #111;
  color: #fff;
    font-size: 0.9rem;
  cursor: pointer;
  display: block;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: absolute;
  z-index: 10;
  outline: none;
}

@media screen and (min-width: 600px) {
  #scrollLeftBtn,
  #scrollRightBtn,
  #scrollUpBtn,
  #scrollDownBtn {
    font-size: 1.5rem;
  }
  
}

#scrollUpBtn,
#scrollDownBtn { 
  left: 53%;
  transform: translateX(-50%);
}
#scrollUpBtn {
  top: 0.7em;
}
#scrollDownBtn {
  bottom: 0.7em;
}

#scrollLeftBtn,
#scrollRightBtn {
  top: 50%;
  transform: translateY(-50%);
}
#scrollLeftBtn {
  left: 0.7em;
}
#scrollRightBtn {
  right: 0.7em;
}

#debug {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: black;
  color: white;
}