@font-face {
  font-family: 'Velvelyne';

  src:
    url('../assets/fonts/velvelyne/Velvelyne-Book.woff') format('woff');

  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Josafronde';

  src:
    url('../assets/fonts/josafronde-regular/Josafronde-Regular.woff') format('woff');

  font-weight: 400;
  font-style: normal;
}

body {
  margin: 0;
  font-family: 'Josafronde', sans-serif;
  color: white;
  height: 100vh;

  background: linear-gradient(120deg, #d6a4a4, #c0b6f2, #a1c4fd);
  background-size: 200% 200%;

  animation: gradientMove 12s ease infinite;

  overflow: hidden;
}

/* léger voile violet à gauche */
body::before {
  content: "";

  position: fixed;
  top: 0;
  left: 0;

  width: 200px;
  height: 100vh;

  background: linear-gradient(
    90deg,
    rgba(75, 46, 131, 0.25) 0%,
    rgba(75, 46, 131, 0.1) 50%,
    rgba(75, 46, 131, 0) 100%
  );

  pointer-events: none;
  z-index: 1;
}

/* animation du fond */
@keyframes gradientMove {

  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ===== HEADER ===== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  z-index: 20;
}

/* ===== MENU BAR ===== */

.menu-bar {
  position: fixed;

  top: 0;
  left: 0;

  width: 60px;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 30;
  cursor: pointer;
}

.menu-bar span {
  transform: rotate(-90deg);

  color: white;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

/* fade gauche */
#menu-fade {
  position: fixed;

  top: 0;
  left: 0;

  width: 180px;
  height: 100vh;

  background: linear-gradient(
    90deg,
    rgba(75, 46, 131, 0.25) 0%,
    rgba(75, 46, 131, 0.15) 40%,
    rgba(75, 46, 131, 0.05) 70%,
    rgba(75, 46, 131, 0) 100%
  );

  pointer-events: none;
  z-index: 5;
}

/* ===== MENU ===== */

#side-menu {
  position: fixed;

  top: 0;
  left: 0;

  width: 50%;
  height: 100vh;

  background: linear-gradient(
    90deg,
    rgba(75, 46, 131, 0.95) 0%,
    rgba(75, 46, 131, 0.6) 60%,
    rgba(75, 46, 131, 0) 100%
  );

  transform: translateX(-100%);
  transition: transform 0.4s ease;

  z-index: 25;

  display: flex;
  align-items: center;

  padding-left: 100px;
}

#side-menu.open {
  transform: translateX(0);
}

#side-menu nav {
  display: flex;
  flex-direction: column;
}

#side-menu a {
  color: white;
  font-size: 1.5rem;
  text-decoration: none;
  margin: 0.8rem 0;
}

#side-menu a:hover {
  opacity: 0.6;
}

/* ===== MAIN ===== */

main {
  width: 100vw;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding-left: 60px;
  box-sizing: border-box;
}

/* ===== HERO TEXT ===== */

.hero-text {

  display: flex;
  flex-direction: column;

  justify-content: center;

  line-height: 0.9;

  font-family: 'Velvelyne', sans-serif;

  font-weight: 300;

  letter-spacing: -0.04em;

  z-index: 2;

  animation: heartbeat 18s cubic-bezier(0.4, 0, 0.2, 1) infinite;

  transition: opacity 0.4s ease;
  
  cursor: pointer;
}

.hero-text span:nth-child(1) {
  align-self: flex-start;
}

.hero-text span:nth-child(2) {
  align-self: center;

  margin-left: 8vw;
}

.hero-text .volume {
  align-self: flex-end;

  margin-top: 2rem;
  margin-right: -4vw;

  font-size: clamp(2rem, 4vw, 4rem);

  opacity: 0.9;
}

/* texte principal */
.hero-text span {

  font-size: clamp(3rem, 8vw, 8rem);

  white-space: nowrap;
}

/* vol.1 un peu plus petit */
.hero-text .volume {
  margin-top: 2rem;

  font-size: clamp(2rem, 4vw, 4rem);

  opacity: 0.9;
}

/* ===== HEARTBEAT ===== */

@keyframes heartbeat {

  0% {
    transform: scale(0.94);
  }

  10% {
    transform: scale(1.06);
  }

  18% {
    transform: scale(1.01);
  }

  28% {
    transform: scale(1.09);
  }

  40% {
    transform: scale(0.98);
  }

  100% {
    transform: scale(0.94);
  }
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

  .hero-text span {
    white-space: normal;
  }

  #side-menu {
    width: 100%;
  }

}

@media (max-width: 768px) {

  .hero-text .volume {
    align-self: center;
    margin-right: 0;
    margin-left: 0;
    text-align: center;
  }

}