@font-face {
  font-family: bebas;
  src: url(../fonts/bebas.ttf);
}

@font-face {
  font-family: sulphurPoint;
  src: url(../fonts/sulphurpoint.ttf);
}

:root {
  --delftBlue: #343f60;
  --royalBlue: #5171d1;
  --champagne: #f3dfc1;
  --hunyadi: #ffc46d;
  --moonStone: #3bb3cf;
  --aliceBlue: #f2f9ff;

  --smokedGlass: #0006;

  --ratio: calc((1vh + 1vw) * 0.36);

  --fontsize-t: calc(var(--ratio) * 1.6);
  --fontsize-s: calc(var(--ratio) * 2);
  --fontsize-m: calc(var(--ratio) * 2.4);
  --fontsize-l: calc(var(--ratio) * 2.8);
  --fontsize-b: calc(var(--ratio) * 4.6);

  --font-bebas: bebas;
  --font-sulphur: sulphurPoint;

  --infoDur1: 0.5s;
  --infoDur2: 0.25s;
}

/* ------------------------------------------------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
  position: fixed;
  height: 100%;
  width: 100%;
}

body {
  font-size: var(--fontsize-m);
  color: var(--aliceBlue);
  background: #0d0a0f;
}

/* ------------------------------------------------------------------------- */

aside,
section[data-index="5"],
section[data-index="6"] {
  background-color: var(--smokedGlass);
}

/* ------------------------------------------------------------------------- */

aside {
  position: fixed;
  height: 100%;
  font-family: var(--font-bebas);

  display: flex;
  flex-flow: column;
  justify-content: space-evenly;
}

canvas {
  position: fixed;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: opacity 0.4s;
}

canvas.mobile {
  background-color: #171423;
  background: url(../img/background.webp);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

main {
  position: fixed;
  font-family: var(--font-sulphur);
  font-size: var(--fontsize-m);
  height: 100%;
}

/* ------------------------------------------------------------------------- */

h1,
h2 {
  font-family: var(--font-bebas);
  font-size: var(--fontsize-b);
  text-align: center;

  background: url(../svg/turbulence.svg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  letter-spacing: 0.5vw;
  justify-self: center;
  align-self: center;
}

h3 {
  font-family: var(--font-bebas);
  font-size: var(--fontsize-m);
  color: var(--moonStone);
  letter-spacing: 0.3vw;
}

p {
  text-shadow: 0.15vmin 0.15vmin 0 #000;
}

button {
  cursor: pointer;
  height: fit-content;
  width: fit-content;
  margin-left: auto;
  margin-right: 0;
  padding: 1vmin 4vmin;
  border: none;
  font-family: var(--font-bebas);
  font-size: var(--fontsize-l);
  background-color: var(--delftBlue);
  color: #fff;
  opacity: 0.75;
  transform: scale(1);

  transition-property: opacity, background-color;
  transition-duration: 0.25s;
}

button:hover {
  background-color: var(--royalBlue);
  opacity: 1;
  transform: scale(1);
}

button:active {
  background-color: var(--delftBlue);
  color: #fff6;
  transform: scale(0.9);
}

button.off {
  cursor: none;
  pointer-events: none;
  opacity: 0.2;
}

input,
textarea {
  margin: 2vmin 0;
  padding: 1vmin;
  font-family: var(--font-sulphur);
  font-size: var(--fontsize-l);
  background-color: var(--smokedGlass);
  color: #fff;
  border: none;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--moonStone);
}

textarea {
  resize: none;
  overflow-x: hidden;
  overflow-y: scroll;
  cursor: auto;
}

textarea::-webkit-scrollbar {
  width: 1vmin;
  background-color: var(--smokedGlass);
}

textarea::-webkit-scrollbar-thumb {
  background-color: var(--delftBlue);
}

/* ------------------------------------------------------------------------- */

aside footer {
  padding: 1vh 0;
  font-size: var(--fontsize-s);
  text-align: center;
  color: var(--delftBlue);
}

aside nav:nth-of-type(1) p {
  color: var(--hue);
  transition: color 0.4s;
}

aside nav:nth-of-type(1) li {
  cursor: pointer;
  padding: 2vmin 0;
  list-style-type: none;
  --hue: var(--delftBlue);
  transition: filter 0.4s ease-in-out;
}

aside nav:nth-of-type(1) li:hover {
  --hue: var(--champagne);
}

aside nav:nth-of-type(1) li.off,
aside nav:nth-of-type(1) li.standby {
  pointer-events: none;
}

aside nav:nth-of-type(1) li.off {
  --hue: var(--royalBlue);
}

/* ------------------------------------------------------------------------- */

aside nav:nth-of-type(2) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1vw;
}

aside nav:nth-of-type(2) div {
  cursor: pointer;
  display: flex;
  flex-flow: column;
  align-items: center;
}

aside nav:nth-of-type(2) div.off {
  cursor: default;
  pointer-events: none;
}

aside nav:nth-of-type(2) div > svg {
  pointer-events: none;
  height: var(--size);
  width: var(--size);
  stroke: var(--delftBlue);
  fill: transparent;
  transition: stroke 0.4s, fill 0.4s, transform 0.4s ease-in-out;
}

aside nav:nth-of-type(2) div.off > svg {
  stroke: var(--royalBlue);
  fill: var(--royalBlue);
}

aside nav:nth-of-type(2) div:nth-of-type(1) > svg {
  transform: rotate(-120deg);
}

aside nav:nth-of-type(2) div:nth-of-type(1) > svg .displayer {
  font-family: var(--bebas);
  transform: rotate(240deg);
  transition: transform 0.4s ease-in-out;
}

aside nav:nth-of-type(2) div:nth-of-type(2) > svg {
  transform: rotateY(-180deg);
}

aside nav:nth-of-type(2) div:nth-of-type(3) > svg {
  transform: rotateX(-180deg);
}

aside nav:nth-of-type(2) div:hover > svg {
  stroke: var(--champagne);
  fill: var(--champagne);
}

aside nav:nth-of-type(2) div:nth-of-type(1):hover > svg {
  transform: rotate(0deg);
}

aside nav:nth-of-type(2) div:nth-of-type(1):hover > svg .displayer {
  transform: rotate(0deg);
}

aside nav:nth-of-type(2) div:nth-of-type(2):hover > svg {
  transform: rotateY(0deg);
}

aside nav:nth-of-type(2) div:nth-of-type(3):hover > svg {
  transform: rotateX(0deg);
}

/* ------------------------------------------------------------------------- */

main > section {
  height: 100%;
  display: grid;
  gap: 1vmin;
}

main > section[data-index="4"] > article {
  height: 100%;
  width: 100%;
}

main > section[data-index="4"] > article > div {
  position: absolute;
  width: 80%;
  height: 100%;
  left: 10%;
  display: flex;
  flex-flow: column;
  justify-content: center;
  transform: rotate(0);
  transition: transform 0.2s ease-in-out;
  transition-delay: 0.2s;
}

main > section[data-index="4"] > article > div.off {
  pointer-events: none;
  transform: rotateY(90deg);
  transition-delay: 0s;
}

main > section[data-index="5"],
main > section[data-index="6"] {
  padding: 0 2vmin 2vmin 2vmin;
  grid-template-rows: auto;
  align-items: center;
  justify-content: stretch;
}

main > section[data-index="5"] {
  grid-template-columns: 100%;
}
main > section[data-index="5"] h3 {
  padding: 2vmin 0;
}

main > section[data-index="6"] {
  grid-template-columns: auto 1fr;
}
main > section[data-index="6"] h2 {
  grid-column: 1 / 3;
}
main > section[data-index="6"] h3 {
  padding: 1vmin 2vmin 1vmin 0;
}

main > section[data-index="6"] img {
  height: 3.5vh;
  margin-left: 1vw;
  vertical-align: text-bottom;
}

/* ------------------------------------------------------------------------- */

.insert {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
}

.highlighted {
  font-family: var(--font-bebas);
  font-size: var(--fontsize-l);
  color: var(--champagne);
  text-shadow: 0.15vmin 0.15vmin 0 #000;
  animation: blowingWind 12s ease-out infinite;
}

.highlighted[data-ref="1"] {
  animation-delay: 0s;
}

.highlighted[data-ref="2"] {
  animation-delay: 0.25s;
}

.highlighted[data-ref="3"] {
  animation-delay: 0.5s;
}

.highlighted[data-ref="4"] {
  animation-delay: 0.75s;
}

@keyframes blowingWind {
  0%,
  70%,
  100% {
    color: var(--moonStone);
    opacity: 1;
    filter: blur(0);
  }

  70% {
    transform: rotateY(0);
  }

  85% {
    color: var(--delftBlue);
    opacity: 0.2;
    transform: rotateY(180deg);
    filter: blur(1vmin);
  }

  100% {
    transform: rotateY(360deg);
  }
}

/* ------------------------------------------------------------------------- */

.chapter {
  align-self: center;
  justify-self: center;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 1vmin 2vmin;
  margin: auto 2vmin;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 2vmin;
  justify-items: center;
  align-items: center;
  align-content: center;
  justify-content: center;
  text-align: center;
}

.chapter img {
  cursor: pointer;
  pointer-events: all;
  height: 3vmin;
  width: 3vmin;
  opacity: 0.5;
}

.chapter img:hover {
  opacity: 1;
}

.chapter img.off {
  cursor: none;
  pointer-events: none;
  opacity: 0.2;
}

.card {
  cursor: pointer;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: flex-start;
  transform: rotateY(0);
  transition: transform 0.25s ease-in;
}

.card.off {
  cursor: none;
  pointer-events: none;
  transform: rotateY(90deg);
  transition: transform 0.25s ease-out;
}

.card > div {
  background: url(../svg/card.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(0.8) rotateX(180deg);
  filter: brightness(50%);
  transition: transform ease-in-out 0.5s, filter 0.5s;
}

.card > div > img {
  position: absolute;
  height: 80%;
  width: 80%;
  top: 10%;
  left: 16%;
  opacity: 0;
  transition: opacity 0.5s;
}

.card > p:nth-of-type(1) {
  padding-top: 4vmin;
  font-size: var(--fontsize-l);
  color: var(--moonStone);
}

.card > p:nth-of-type(2),
.card > p:nth-of-type(3) {
  font-size: var(--fontsize-s);
}

.card > p:nth-of-type(2) {
  padding: 2vh 0;
}

.card > p:nth-of-type(3) {
  padding: 0 2vmin;
  transform: translateY(-2vh);
  opacity: 0;
  text-align: justify !important;
  transition-property: opacity, transform ease-in-out;
  transition-duration: 0.5s;
}

.card:hover > div {
  transform: scale(1) rotateX(0);
  filter: brightness(100%);
}

.card:hover > div > img {
  opacity: 1;
}

.card:hover > p:nth-of-type(3) {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------------------- */

.loader {
  position: fixed;
  height: 100%;
  width: 100%;
  background-color: #000;
}

.loader > svg {
  height: 100%;
  width: 100%;
}
