@import "./style.css";

header {
  height: 100vh;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--root);
}

#header-container {
  width: 100%;
  flex-grow: 1;
  max-width: var(--max-content-width);
  display: flex;
  gap: 32px;

  & #title {
    font-size: var(--font-size-title);
    font-weight: 900;
    line-height: 1.1;
  }

  & #subtitle {
    font-size: var(--font-size-heading);
    color: var(--foreground1);
    line-height: 1;
  }

  & #nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

#helmet-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(50% - 16px);
  aspect-ratio: 1/1;
  transform-origin: 50% 100%;

  #helmet-head-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1/1;
    transform-origin: 29% 59%;
  }

  #helmet-head {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0.5;
    transform-origin: 29% 59%;
    rotate: 25deg;
    translate: 5% 5%;
  }

  #helmet-neck {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0.25;
    transition: opacity 2s ease-in-out;
  }
}

@media (scripting: none) {
  #helmet-head{
    animation: activate 2s ease-in-out forwards;
  }
}

@media (max-width: 768px) {
  #helmet-container {
    width: 100%;
    max-height: calc(50% - 16px);
  }

  #helmet-head-wrapper, #helmet-head, #helmet-neck {
    width: 100%;
    max-height: 100%;
  }

  #header-container {
    flex-direction: column-reverse;
    align-items: center;
    z-index: 5;
    padding: 16px;
  }

  #nav-list,
  #scroll-indicator {
    display: none;
  }

  #title {
    font-size: 48px;
  }

  #subtitle {
    font-size: 24px;
  }
}

@keyframes activate {
  0% {
    opacity: 0.5;
    rotate: 25deg;
    translate: 5% 5%;
  }

  70% {
    opacity: 1;
    rotate: -5deg;
    translate: 0% 0%;
  }

  80% {
    translate: -2% 0%;
  }

  100% {
    opacity: 1;
    rotate: 0deg;
    translate: 0% 0%;
  }
}

@keyframes rotate {
  0% {
    rotate: 0deg;
    translate: 0% 0%;
  }

  100% {
    rotate: -30deg;
    translate: 50% -50%;
  }
}

@keyframes lookup {
  0% {
    rotate: 0deg;
    translate: 0% 0%;
  }

  100% {
    rotate: -60deg;
    translate: 10% 10%;
  }
}
