/* =========================
   FONTS
========================= */

@font-face {
  font-family: "TT-Norms-Regular";
  src: url("/assets/fonts/TT-Norms-Pro-Regular.otf") format("opentype");
}

@font-face {
  font-family: "TT-Norms-Bold";
  src: url("/assets/fonts/TT-Norms-Pro-Bold.otf") format("opentype");
}

@font-face {
  font-family: "Blush-Asliring";
  src: url("/assets/fonts/Blush-Asliring.otf") format("opentype");
}

/* =========================
   ANIMATION
========================= */

@keyframes spin {
  0% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  5% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(15deg);
  }
  10% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(45deg);
  }
  20% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(180deg);
  }
  30% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(450deg);
  }
  40% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(900deg);
  }
  55% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(1800deg);
  }
  70% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(3000deg);
  }
  85% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(7000deg);
  }
  100% {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 300px;
    transform: translate(-50%, -50%) rotate(10000deg);
  }
}

@keyframes zoom-in-out {
  0% {
    transform: scale(1, 1);
  }
  25% {
    transform: scale(1.1, 1.1);
  }
  50% {
    transform: scale(1, 1);
  }
  75% {
    transform: scale(1.1, 1.1);
  }
  100% {
    transform: scale(1, 1);
  }
}

@keyframes wiggle {
  0%   { transform: rotate(0deg); }
  70%  { transform: rotate(0deg); }

  /* 1ère oscillation */
  75%  { transform: rotate(10deg); }
  80%  { transform: rotate(-10deg); }

  /* 2ème oscillation */
  85%  { transform: rotate(10deg); }
  90%  { transform: rotate(-10deg); }

  100% { transform: rotate(0deg); }
}

/* =========================
   GLOBAL
========================= */

* {
  box-sizing: border-box;
}

body {
  background-color: #8627FF;
  overflow: hidden;
  font-size: 18px;
}

@media (min-width: 1024px) {
  body {
    font-size: 20px;
  }
}

/* =========================
   TYPO
========================= */

h1 {
  font-family: "Blush-Asliring", sans-serif;
  font-size: 50px;
  margin: 0;
  margin-top: 1rem;
  font-weight: normal;
  color: #FFFFFF;
}

@media (min-width: 1024px) {
  h1 {
    font-size: 65px;
  }
}

h2 {
  font-family: "Blush-Asliring", sans-serif;
  font-size: 24px;
  margin: 0;
  font-weight: normal;
  color: #FFFFFF;
  max-width: 400px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  h2 {
    margin-top: 5rem;
  }
}

p {
  font-family: "TT-Norms-Regular", sans-serif;
  color: #FFFFFF;
}

p b {
  font-family: "TT-Norms-Bold", sans-serif;
}

/* =========================
   LAYOUT
========================= */

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
}

/* =========================
   LOGO
========================= */

.cdc-logo {
  text-decoration: none;
  color: #000;
  background: #FFFFFF;
  padding: 1rem;
  border-radius: 0 0 10px 10px;
  display: inline-flex;
  align-items: flex-end;
  min-height: 170px;
  margin-top: -40px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  transform: translateY(-100%);
  transition: transform 750ms cubic-bezier(0.175, 0.885, 0.32, 1.275), margin-top 0.25s;
}

.cdc-logo.visible {
  transform: translateY(0);
}

.cdc-logo:hover,
.cdc-logo:focus {
  margin-top: 0;
}

.cdc-logo svg {
  width: 30px;
  height: auto;
}

@media (min-width: 1024px) {
  .cdc-logo {
    min-height: 245px;
  }

  .cdc-logo svg {
    width: 52px;
  }
}

.icon-pick {
  color: #FFFFFF;
}

.icon-pick svg {
  width: 90px;
  height: 90px;
}

/* =========================
   SCREEN
========================= */

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* =========================
   CARDS CONTAINER
========================= */

.screen .cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =========================
   CARD BASE
========================= */

.screen .cards .card {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  transition:
    left 1.5s,
    top 1.5s,
    right 1.5s,
    bottom 1.5s,
    width 1.5s,
    opacity 1.5s,
    transform 0.25s;
}

.screen .cards .card.animate-scale img {
  animation: wiggle 2s ease;
}

.screen .cards .card.invisible {
    opacity: 0;
    pointer-events: none;
}

.screen .cards .card img {
  width: 100%;
  filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.2));
}

@media (min-width: 1024px) {
  .screen .cards .card img {
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.4));
  }
}

/* =========================
   ROTATE STATE
========================= */

.screen .cards .card.rotate {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 300px !important;
  transform: translate(-50%, -50%) !important;
}

.screen .cards .card.start-rotating {
    animation: spin 7s linear forwards;
}

/* =========================
   CARD VARIANTS
========================= */

/* CARD 1 */
.screen .cards .card.card--1 {
  position: absolute;
  top: -100%;
  left: 25%;
  width: clamp(150px, 14vw, 300px);
  transform: rotate(-17deg);
}

.screen .cards .card.card--1:hover,
.screen .cards .card.card--1:focus {
  transform: scale(1.05) rotate(-17deg);
}

.screen .cards .card.card--1.visible {
  top: calc(0px - clamp(120px, 15vw, 220px));
}

/* CARD 2 */
.screen .cards .card.card--2 {
  position: absolute;
  top: calc(50% - clamp(100px, 15vw, 150px));
  left: -100%;
  width: clamp(100px, 15vw, 150px);
  transform: rotate(18deg);
}

.screen .cards .card.card--2:hover,
.screen .cards .card.card--2:focus {
  transform: scale(1.05) rotate(18deg);
}

.screen .cards .card.card--2.visible {
  left: -50px;
}

@media (min-width: 1024px) {
  .screen .cards .card.card--2.visible {
    left: 15%;
  }
}

/* CARD 3 */
.screen .cards .card.card--3 {
  position: absolute;
  bottom: -100%;
  left: 25%;
  width: clamp(170px, 15vw, 270px);
  transform: rotate(-22deg);
}

.screen .cards .card.card--3:hover,
.screen .cards .card.card--3:focus {
  transform: scale(1.05) rotate(-22deg);
}

.screen .cards .card.card--3.visible {
  bottom: calc(0px - clamp(140px, 15vw, 270px));
}

/* CARD 4 */
.screen .cards .card.card--4 {
  position: absolute;
  top: -100%;
  left: -100%;
  width: clamp(160px, 20vw, 360px);
  transform: rotate(37deg);
}

.screen .cards .card.card--4:hover,
.screen .cards .card.card--4:focus {
  transform: scale(1.05) rotate(37deg);
}

.screen .cards .card.card--4.visible {
  top: calc(0px - clamp(100px, 10vw, 130px));
  left: calc(0px - clamp(0px, 10vw, 130px));
}

/* CARD 5 */
.screen .cards .card.card--5 {
  position: absolute;
  top: -100%;
  right: -100%;
  width: clamp(165px, 20vw, 465px);
  transform: rotate(28deg);
}

.screen .cards .card.card--5:hover,
.screen .cards .card.card--5:focus {
  transform: scale(1.05) rotate(28deg);
}

.screen .cards .card.card--5.visible {
  top: calc(0px - clamp(0px, 17vw, 250px));
  right: calc(0px - clamp(0px, 17vw, 140px));
}

/* CARD 6 */
.screen .cards .card.card--6 {
  position: absolute;
  bottom: -100%;
  left: 8%;
  width: clamp(150px, 20vw, 250px);
  transform: rotate(17deg);
  z-index: 2;
}

.screen .cards .card.card--6:hover,
.screen .cards .card.card--6:focus {
  transform: scale(1.05) rotate(17deg);
}

.screen .cards .card.card--6.visible {
  bottom: calc(0px - clamp(150px, 20vw, 170px));
}

/* CARD 7 */
.screen .cards .card.card--7 {
  position: absolute;
  bottom: -100%;
  right: clamp(-190px, 20vw, 0px);
  width: clamp(190px, 20vw, 390px);
  transform: rotate(-27deg);
}

.screen .cards .card.card--7:hover,
.screen .cards .card.card--7:focus {
  transform: scale(1.05) rotate(-27deg);
}

.screen .cards .card.card--7.visible {
  bottom: calc(0px - clamp(190px, 20vw, 390px));
}

/* CARD 8 */
.screen .cards .card.card--8 {
  position: absolute;
  top: -100%;
  left: 50%;
  width: clamp(135px, 20vw, 335px);
  transform: rotate(26deg);
}

.screen .cards .card.card--8:hover,
.screen .cards .card.card--8:focus {
  transform: scale(1.05) rotate(26deg);
}

.screen .cards .card.card--8.visible {
  top: calc(0px - clamp(135px, 20vw, 335px));
}

/* CARD 9 */
.screen .cards .card.card--9 {
  position: absolute;
  bottom: -100%;
  left: -100%;
  width: clamp(125px, 20vw, 325px);
  transform: rotate(-12deg);
}

.screen .cards .card.card--9:hover,
.screen .cards .card.card--9:focus {
  transform: scale(1.05) rotate(-12deg);
}

.screen .cards .card.card--9.visible {
  bottom: calc(0px - clamp(0px, 10vw, 108px));
  left: calc(0px - clamp(0px, 10vw, 108px));
}

/* CARD 10 */
.screen .cards .card.card--10 {
  position: absolute;
  right: -100%;
  bottom: -100%;
  width: clamp(165px, 20vw, 565px);
  transform: rotate(23deg);
}

.screen .cards .card.card--10:hover,
.screen .cards .card.card--10:focus {
  transform: scale(1.05) rotate(23deg);
}

.screen .cards .card.card--10.visible {
  right: calc(0px - clamp(82px, 10vw, 150px));
  bottom: calc(0px - clamp(82px, 20vw, 182px));
}

/* CARD 11 */
.screen .cards .card.card--11 {
  position: absolute;
  top: -100%;
  right: 15%;
  width: clamp(82px, 10vw, 182px);
  transform: rotate(-15deg);
}

.screen .cards .card.card--11:hover,
.screen .cards .card.card--11:focus {
  transform: scale(1.05) rotate(-15deg);
}

.screen .cards .card.card--11.visible {
  top: calc(0px - clamp(0px, 10vw, 60px));
}

/* CARD 12 */
.screen .cards .card.card--12 {
  position: absolute;
  top: calc(50% - clamp(100px, 10vw, 170px));
  right: -100%;
  width: clamp(100px, 10vw, 170px);
  transform: rotate(-5deg);
}

.screen .cards .card.card--12:hover,
.screen .cards .card.card--12:focus {
  transform: scale(1.05) rotate(-5deg);
}

.screen .cards .card.card--12.visible {
  right: -50px;
}

@media (min-width: 1024px) {
  .screen .cards .card.card--12.visible {
    right: 5%;
  }
}

/* =========================
   STARTING SCREEN
========================= */

.screen .starting-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 880px;
  width: 100%;
  z-index: 3;
  padding-inline: 1rem;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  transition: opacity 1.5s;
}

.screen .starting-screen.invisible {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.screen .starting-screen > * {
  opacity: 0;
  color: #FFFFFF;
  transform: translateY(-10px);
  transition: opacity 0.25s, transform 0.25s;
}

.screen .starting-screen > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   FINAL SCREEN
========================= */

.screen .final-screen {
    color: #FFFFFF;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s;
}

.screen .final-screen.visible {
    opacity: 1;
    pointer-events: auto;
}

.screen .final-screen button {
    background-color: transparent;
    border: 2px solid #FFFFFF;
    border-radius: 7px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #FFFFFF;
    font-family: "Blush-Asliring", sans-serif;
    cursor: pointer;
}

.screen .final-screen button:hover,
.screen .final-screen button:focus {
    background-color: #FFFFFF;
    color: #8627FF;
}

.screen .final-screen .container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 1024px) {
    .screen .final-screen .container {
        flex-direction: row;
        align-items: center;
    }
}

.screen .final-screen .container .video {
    min-height: 200px;
}

@media (min-width: 1024px) {
    .screen .final-screen .container .video,
    .screen .final-screen .container .text {
        flex: 1;
    }
}

/* =========================
   CANVAS
========================= */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0.8;
}