@font-face {
  font-family: "ArchivoExpanded ExtraBold";
  src: url("fonts/Archivo/ArchivoExpanded-ExtraBold.ttf");
}

:root {
  --app-height: 100vh;
  --dm-yellow: rgb(255, 229, 18);
  --card-title-width: 64px;
}

body {
  margin: 0;
  width: 100vw;
  background-color: black;
  color: var(--dm-yellow);
  font-size: 18px;
  font-family: "ArchivoExpanded ExtraBold";
  overscroll-behavior: contain;
  height: 100vh;
  overflow: hidden;
}

body.allowScroll {
  height: auto;
  overflow: auto;
}

#title {
  width: 100vw;
  height: 100%;
  height: var(--app-height);
  transition: transform 1s;
  z-index: 20;
  position: fixed;
}
#title.hide {
  pointer-events: none;
  transform: translateX(110%);
}
#titleBg {
  width: 100vw;
  height: 100%;
  object-fit: cover;
}
#titleContent {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  display: flex;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
#titleContent > img {
  max-width: 50vw;
  max-height: 33vh;
}

h1 {
  font-size: 64px;
  letter-spacing: -4px;
  margin: 1vw 0;
}

#verticalScroller {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 30px;
  height: 100%;
  overflow-y: hidden;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-orientation: mixed;
  white-space: nowrap;
}
#verticalScroller span > span {
  padding-top: 16px;
}

#main {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#mainIntro {
  font-size: 14px;
  width: 35vw;
  position: absolute;
  left: 64px;
  padding: 32px 0;
  height: 100%;
  box-sizing: border-box;
}

#mainIntro > div {
  padding: 16px 0;
}

#mainIntro > .logo {
  position: absolute;
  bottom: 32px;
  left: 50%;
  width: 100px;
  transform: translateX(-50%);
}

#cards {
  position: fixed;
  z-index: 2;
}

.cardQuote {
  font-size: 24px;
  padding: 48px 0 64px 0;
  width: 346px;
  max-width: 95vw;
  text-align: center;
  position: relative;
}
.cardQuote.smaller {
  font-size: 20px;
  width: 400px;
}
.cardQuoteContent {
  position: relative;
}

.cardQuoteContent::before {
  content: "“";
  position: absolute;
  left: 0;
  top: -36px;
  font-size: 38px;
}
.cardQuoteContent::after {
  content: "”";
  position: absolute;
  right: 0;
  bottom: -36px;
  font-size: 38px;
}
.cardQuote.smaller .cardQuoteContent::before {
  font-size: 32px;
}

.cardQuote.smaller .cardQuoteContent::after {
  font-size: 32px;
}

.card {
  position: fixed;
  top: 0;
  left: 100%;
  height: 100%;
  width: 100%;
  z-index: 10;
  background-color: rgba(79, 149, 138, 0.055);
  transition: transform 0.5s;
  will-change: transform;
}
.card:nth-child(3n + 1) {
  background-color: var(--dm-yellow);
  color: black;
}
.card:nth-child(3n + 2) {
  background-color: #dedede;
  color: black;
}
.card:nth-child(3n + 3) {
  background-color: #000;
  color: #fff;
}

.card:nth-child(3n + 1) .cardRight {
  /* background-color: var(--dm-yellow);
  color: black; */
  background-color: #000;
  color: #fff;
}
.card:nth-child(3n + 2) .cardRight {
  /* background-color: #dedede;
  color: black; */
  background-color: #000;
  color: var(--dm-yellow);
}
.card:nth-child(3n + 3) .cardRight {
  /* background-color: #000;
  color: #fff; */
  background-color: var(--dm-yellow);
  color: black;
}

.card:nth-child(3n + 1) .cardBack {
  /* background-color: var(--dm-yellow);
  color: black; */
  background-color: var(--dm-yellow);
  color: black;
}
.card:nth-child(3n + 2) .cardBack {
  /* background-color: #dedede;
  color: black; */
  background-color: #dedede;
  color: black;
}
.card:nth-child(3n + 3) .cardBack {
  /* background-color: #000;
  color: #fff; */
  background-color: #000;
  color: #fff;
}

.card:nth-child(3n + 1) .cardMainStory::after {
  content: "";
  display: block;
  width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 54px;
  background-image: url("images/DMs_Yellow_Bouncing Sole logo.png");
}
.card:nth-child(3n + 2) .cardMainStory::after {
  content: "";
  display: block;
  width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 54px;
  background-image: url("images/DMs_Yellow_Bouncing Sole logo.png");
}
.card:nth-child(3n + 3) .cardMainStory::after {
  content: "";
  display: block;
  width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 54px;
  background-image: url("images/DMs_Yellow_Bouncing Sole logo_black.png");
}

.cardTitle {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-orientation: mixed;
  height: 100%;
  font-size: 22px;
  line-height: 56px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
}

.cardLeft {
  position: absolute;
  top: 0px;
  padding: 64px;
  box-sizing: border-box;
  width: 50vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.cardLeft .cardHandwriting {
  width: 100%;
}
.cardLeft .cardPreviewImage {
  max-width: 90%;
  max-height: 80%;
  margin-bottom: 20%;
}
.cardBack {
  position: absolute;
  text-align: center;
  height: 100%;
  top: 0;
  right: 0;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  cursor: pointer;
}

.cardRight {
  position: absolute;
  left: 50vw;
  top: 0;
  height: 100%;
  padding-right: 64px;
  box-sizing: border-box;
  width: 50vw;
  font-size: 24px;
  line-height: 64px;
  text-align: center;
}

.cardRight video {
  max-width: 60vw;
  max-height: 50vh;
  min-height: 400px;
  margin-top: 64px;
}

.cardMainContent {
  height: 100%;
  overflow-y: scroll;
}
.cardMainStory > div {
  padding: 16px 0;
}

.cardMainStory {
  text-align: left;
  font-size: 14px;
  line-height: 16px;
  padding: 32px 100px;
}

.pointer {
  cursor: pointer;
}

#mainContent {
  position: absolute;
  height: 100vh;
}

#eventPopup {
  position: fixed;
  width: 315px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  background-color: var(--dm-yellow);
  border: 3px solid black;
  color: black;
  padding: 16px 100px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

#eventPopup .close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
}

#eventPopup.show {
  opacity: 1;
}

@media screen and (max-width: 792px) {
  h1 {
    font-size: 34px;
  }
}

@media screen and (max-width: 1200px) {
  #mainContent {
    height: auto;
    position: relative;
  }
  #mainIntro {
    position: relative;
    width: calc(100vw - 128px);
    height: auto;
  }
  #mainIntro > .logo {
    position: relative;
    bottom: 0;
  }
  #cards {
    position: relative;
  }
  .card {
    position: absolute;
    left: 0;
    top: 0;
    height: unset;
  }
  .cardTitle {
    transform: none;
    writing-mode: initial;
  }
  .cardLeft {
    padding: 0;
    width: 100%;
    position: relative;
  }
  .cardRight {
    width: 100%;
    position: relative;
    padding: 0;
    left: 0;
  }
  .cardBack {
    height: auto;
    width: 100%;
    top: unset;
    bottom: 0;
    writing-mode: initial;
    text-orientation: initial;
  }
  .cardMainContent {
    padding: 0 32px 64px;
    box-sizing: border-box;
  }
  .cardRight video {
    width: 100%;
    max-width: unset;
    max-height: 90vh;
    min-height: unset;
  }
  .cardMainStory {
    padding: 32px 0;
  }
  .cardLeft .cardPreviewImage {
    max-width: 100%;
    padding: 0 32px;
    box-sizing: border-box;
  }
}
