@import '../../index.scss';

header {
  position: fixed;
  z-index: 2;
  margin: auto;
  top: 0;
  width: 50vw;
  left: 25vw;
}

.head-block {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 50px;
  overflow: hidden;
  transform: translateY(2rem);
  transition: color .3s ease, background-color .5s ease;

  &__icon {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0.6em 1em;
    cursor: pointer;
  }

  &__drop {
    overflow: hidden;
    width: 50vw;
  }

  &.dark {
    @include dark-theme;
  }

  &.light {
    @include light-theme;
  }

  p {
    font-style: italic;
    font-size: 1.25rem;
    margin: 1rem 2rem;
    height: fit-content;
  } 

  &.expand {
    animation: expandOn .5s ease forwards;
  }

  &.collapse {
    animation: expandOff .6s ease forwards;
  }

  @keyframes expandOn {
    0% {
      border-radius: 25px;
      width: 50px;
      box-shadow: 0 11px 30px rgba(31,31,31,.5);
    }
    40% {
      transform: translateY(2rem);
      padding: 0 2rem 2rem 2rem;
      height: 50px;
      border-radius: 15px;
      width: 100%;
      box-shadow: 0 11px 30px transparent;
    }
    100% {
      transform: translateY(0);
      height: 32rem;
      width: 100%;
      padding: 2rem;
      border-radius: 0 0 6px 6px;
    }
  }

  @keyframes expandOff {
    0% {
      transform: translateY(0);
      height: 32rem;
      width: 100%;
      padding: 2rem;
      border-radius: 0 0 6px 6px;
    }
    40% {
      transform: translateY(2rem);
      padding: 0 2rem 2rem 2rem;
      height: 50px;
      border-radius: 15px;
      width: 100%;
      box-shadow: 0 11px 30px transparent;
    }
    100% {
      border-radius: 25px;
      width: 50px;
      box-shadow: 0 11px 30px rgba(31,31,31,.5);
    }
  }
}


h1 {
  font-size: 5.5vw;
  line-height: 1;
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  transform: skewY(-6deg);
  margin-bottom: 3rem;
  margin-top: 1rem;
  text-shadow: 5px 5px rgba(94, 238, 81, 0.65);
}

@media (max-width: 768px) {
  
  header {
    left: 0vw;
    width: 100%;
  }

  h1 {
    font-size: 3rem;
  }

  .head-block {
    p {
      font-size: 1.15rem;
      margin: 0;
    }

    &__drop {
      width: 100%;
    }

    &.expand {
      width: 100vw;
    }
  }
}

@media (min-width: 769px) and (max-width: 980px) {
  header {
    left: 15vw;
    width: 70vw;
  }

  .head-block {
    &__drop {
      width: 500px;
    }
  }
}