/* Document Styles */

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

::-webkit-scrollbar {
  display: none !important;
}

body,
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 12pt;
  line-height: 18pt;
  font-weight: 400;
  color: white;
}

body {
  margin: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

article {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: normal;
  scroll-behavior: smooth;
}

.preloader {
  position: absolute;
  width: 0;
  height: 0;
  top: 0;
  left: 0;
  opacity: 0;
}

.preloader img {
  width: 0;
  height: 0;
  opacity: 0;
}

.navigation {
  position: fixed;
  left: 37px;
  top: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  z-index: 50;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 7px;
  backdrop-filter: blur(6px);
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.navigation ol {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 10px;
}

.navigation ol li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
  border-radius: 100%;
  width: 30px;
  height: 30px;
  transition: all 0.2s ease-in-out;
}

.navigation ol li:hover {
  background: black;
  transform: scale(1.25);
  transition: all 0.2s ease-in-out;
}

.navigation ol li a {
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.navigation ol li:hover > a {
  color: white;
}

/* Global Styles */

.block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  z-index: 1;
  scroll-snap-align: start;
}

.prev-block,
.next-block {
  position: absolute;
  top: 40px;
  right: 40px;
  background: white;
  color: black;
  text-decoration: none;
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  font-size: 18pt;
  margin: 0;
  padding: 0;
  z-index: 10;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  transition: all 0.2s ease-in-out;
}

.prev-block:hover,
.next-block:hover {
  background: black;
  color: white;
  transition: all 0.2s ease-in-out;
  transform: scale(1.05);
}

.prev-block::after,
.next-block::after {
  position: absolute;
  right: 120%;
  content: "PREV";
  font-weight: 600;
  color: white;
  font-size: 12pt;
  line-height: 14pt;
  text-align: right;
  text-shadow: 1px 1px 3px black;
}

.next-block {
  top: unset;
  bottom: 40px;
}

.next-block::after {
  content: "NEXT";
}

.fwx-window {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  width: 240px;
  height: 70%;
  max-height: 435px;
  border-radius: 7px;
  background: white;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  transition: all 0.5s ease-in-out;
}

.fwx-window::before {
  position: absolute;
  width: calc(100% + 19px);
  height: calc(100% + 20px);
  content: "";
  z-index: -1;
  border-radius: 7px;
  transition: all 0.5s ease-in-out;
}

label {
  position: relative;
  width: auto;
  height: auto;
  padding: 18px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 0px black, 2px 2px 4px black;
  border: 1px solid white;
  font-weight: 500;
  z-index: 1;
}

label::before {
  position: absolute;
  width: 100%;
  height: 100%;
  content: "";
  z-index: -1;
  border-radius: 7px;
}

label:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.left-content,
.right-content {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  width: 0px;
  height: 100%;
  max-height: 270px;
  opacity: 0;
  border-radius: 7px;
  padding: 20px 40px;
  border: 1px solid var(--blockclr);
}

.right-content {
  align-items: flex-end;
}

.left-content h2 {
  position: relative;
  margin: 0;
  margin-bottom: 10px;
  font-size: 24pt;
  line-height: 34pt;
  color: white;
  text-shadow: 1px 1px 0px var(--blockclr), 2px 2px 0px var(--blockclr),
    1px 1px 7px var(--blockclr);
  opacity: 0;
}

.left-content h2::after {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 25%;
  background: var(--blockclr);
  content: "";
  z-index: -1;
}

.left-content p,
.right-content p {
  font-size: 12pt;
  line-height: 22pt;
  margin: 0;
  opacity: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  color: black;
}

.right-content p {
  text-align: right;
  margin-bottom: 30px;
}

.right-content a {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 40px;
  background: black;
  color: white;
  border-radius: 7px;
  z-index: 1;
  text-decoration: none;
  border: 3px solid var(--blockclr);
  transition: all 0.3s ease-in-out;
}

.right-content a::after {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: 100%;
  left: -100%;
  content: "";
  background: var(--blockclr);
  border-radius: 7px;
  transform: rotateZ(170deg) rotateX(50deg) scale(0);
  z-index: -1;
  transition: all 0.3s ease-in-out;
}

.right-content a:hover::after {
  bottom: 0;
  left: 0;
  transform: rotateZ(0deg) rotateX(0deg) scale(1);
  transition: all 0.3s ease-in-out;
}

.right-content a:hover {
  border: 1px solid black;
  transform: translateY(-5px);
  transition: all 0.3s ease-in-out;
}

.right-content a:active {
  transform: scale(0.9);
  transition: all 0.3s ease-in-out;
}

input {
  display: none;
}

input:checked ~ .fwx-window {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0px;
  transition: all 0.5s ease-in-out;
}

input:checked ~ .fwx-window::before {
  width: 100%;
  height: 100%;
  border-radius: 0px;
  transition: all 0.5s ease-in-out;
}

input:checked ~ .fwx-window > label {
  display: none;
}

input:checked ~ .fwx-window > .left-content,
input:checked ~ .fwx-window > .right-content {
  display: flex;
  animation: fade-in 0.5s ease-in-out 1;
  animation-fill-mode: forwards;
}

input:checked ~ .fwx-window > .left-content h2,
input:checked ~ .fwx-window > .left-content p,
input:checked ~ .fwx-window > .right-content p,
input:checked ~ .fwx-window > .right-content a {
  animation: pop-in 0.5s ease-in-out 1;
  animation-fill-mode: forwards;
}

@keyframes fade-in {
  0% {
    width: 0%;
    opacity: 0;
  }
  10% {
    width: 0%;
    opacity: 0;
  }
  100% {
    width: 30%;
    opacity: 1;
  }
}

@keyframes pop-in {
  0% {
    opacity: 0;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Purple Block */

#Purple {
  background: linear-gradient(210deg, #5f0596 50%, #9e16f2 50%);
  --blockclr: #9e16f2;
}

#Purple > .fwx-window {
  background: url("assets/icon-3.png");
}

#Purple > .fwx-window::before,
#Purple > .fwx-window > label::before {
  background: linear-gradient(210deg, #9e16f2 50%, #5f0596 50%);
}

/* Green Block */

#Green {
  background: linear-gradient(330deg, #19e672 50%, #1f8049 50%);
  --blockclr: #1f8049;
}

#Green > .fwx-window {
  background: url("assets/icon-2.png");
}

#Green > .fwx-window::before,
#Green > .fwx-window > label::before {
  background: linear-gradient(330deg, #1f8049 50%, #19e672 50%);
}

/* Chocolate Block */

#Chocolate {
  background: linear-gradient(
    210deg,
    rgba(66, 49, 23, 1) 50%,
    rgba(245, 187, 100, 1) 50%
  );
  --blockclr: rgba(66, 49, 23, 1);
}

#Chocolate > .fwx-window {
  background: url("assets/icon-3.png");
}

#Chocolate > .fwx-window::before,
#Chocolate > .fwx-window > label::before {
  background: linear-gradient(
    210deg,
    rgba(245, 187, 100, 1) 50%,
    rgba(66, 49, 23, 1) 50%
  );
}

/* Blue Block */

#Blue {
  background: linear-gradient(
    330deg,
    rgba(45, 130, 183, 1) 50%,
    rgba(7, 0, 77, 1) 50%
  );
  --blockclr: rgba(45, 130, 183, 1);
}

#Blue > .fwx-window {
  background: url("assets/icon-4.png");
}

#Blue > .fwx-window::before,
#Blue > .fwx-window > label::before {
  background: linear-gradient(
    330deg,
    rgba(7, 0, 77, 1) 50%,
    rgba(45, 130, 183, 1) 50%
  );
}

/* Yellow Block */

#Yellow {
  background: linear-gradient(
    210deg,
    rgba(21, 23, 6, 1) 50%,
    rgba(211, 235, 33, 1) 50%
  );
  --blockclr: rgba(211, 235, 33, 1);
}

#Yellow > .fwx-window {
  background: url("https://flakeworks.com/images/codepen/canal.jpg");
}

#Yellow > .fwx-window > .left-content > h2 {
  color: black;
  text-shadow: 1px 1px 0px var(--blockclr), 2px 2px 0px var(--blockclr);
}

#Yellow > .fwx-window > .right-content > a:hover {
  color: black;
}

#Yellow > .fwx-window::before,
#Yellow > .fwx-window > label::before {
  background: linear-gradient(
    210deg,
    rgba(211, 235, 33, 1) 50%,
    rgba(21, 23, 6, 1) 50%
  );
}

/* Red Block */

#Red {
  background: linear-gradient(
    330deg,
    rgba(219, 2, 56, 1) 50%,
    rgba(97, 20, 39, 1) 50%
  );
  --blockclr: rgba(219, 2, 56, 1);
}

#Red > .fwx-window {
  background: url("assets/icon-2.png");
}

#Red > .fwx-window::before,
#Red > .fwx-window > label::before {
  background: linear-gradient(
    330deg,
    rgba(97, 20, 39, 1) 50%,
    rgba(219, 2, 56, 1) 50%
  );
}

/* Pink Block */

#Pink {
  background: linear-gradient(
    210deg,
    rgba(138, 13, 143, 1) 50%,
    rgba(239, 56, 245, 1) 50%
  );
  --blockclr: rgba(239, 56, 245, 1);
}

#Pink > .fwx-window {
  background: url("assets/icon-1.png");
}

#Pink > .fwx-window::before,
#Pink > .fwx-window > label::before {
  background: linear-gradient(
    210deg,
    rgba(239, 56, 245, 1) 50%,
    rgba(138, 13, 143, 1) 50%
  );
}

/* Orange Block */

#Orange {
  background: linear-gradient(
    330deg,
    rgba(255, 120, 23, 1) 50%,
    rgba(138, 74, 29, 1) 50%
  );
  --blockclr: rgba(255, 120, 23, 1);
}

#Orange > .fwx-window {
  background: url("assets/icon-4.png");
}

#Orange > .fwx-window::before,
#Orange > .fwx-window > label::before {
  background: linear-gradient(
    330deg,
    rgba(138, 74, 29, 1) 50%,
    rgba(255, 120, 23, 1) 50%
  );
}

/* Responsive, but maybe some overlap issues on small devices */

@media (max-width: 1500px) {
  @keyframes fade-in {
    0% {
      width: 0%;
      opacity: 0;
    }
    10% {
      width: 0%;
      opacity: 0;
    }
    100% {
      width: 45%;
      opacity: 1;
    }
  }
  .navigation ol {
    flex-direction: row;
  }
  .navigation ol li {
    margin-bottom: unset;
    margin-right: 7px;
  }
}

@media (max-width: 1050px) {
  .left-content,
  .right-content {
    max-height: 350px;
  }
  .prev-block {
    top: 15px;
  }
  .next-block {
    bottom: 15px;
  }
}

@media (max-width: 799px) {
  .left-content {
    display: none !important;
  }
  .right-content {
    width: 75% !important;
    max-height: 260px;
    align-items: center;
  }
  .right-content p {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .right-content {
    width: 93% !important;
  }
}

@media (max-width: 520px) {
  .navigation {
    display: none;
  }
}

@media (min-height: 590px) {
  .left-content,
  .right-content {
    max-height: 370px;
  }
}

@media (max-width: 490px) {
  .right-content {
    max-height: 400px;
  }
}

@media (max-height: 460px) {
  .prev-block {
    top: 15px;
  }
  .next-block {
    bottom: 15px;
  }
}

@media (max-height: 360px) {
  .prev-block,
  .next-block {
    display: none;
  }
  .navigation {
    display: none;
  }
}

@media (max-width: 1050px) and (max-height: 449px) {
  .navigation {
    display: none;
  }
  .prev-block,
  .next-block {
    display: none;
  }
}

@media (max-width: 799px) and (max-height: 449px) {
  .navigation {
    display: flex;
  }
  .prev-block,
  .next-block {
    display: flex;
  }
}

@media (max-width: 509px) {
  .navigation {
    display: none;
  }
  .prev-block,
  .next-block {
    display: none;
  }
}
