.header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 99;
  background-color: hsl(0deg 0% 100% / 80%);
  display: flex;
  gap: 2rem;
  padding-inline: 1.25rem;
  height: 5rem;
  @media (min-width: 1200px) {
    padding-right: 0;
  }
  
  & .header__logo {
    align-self: center;
    width: 7.5rem;
    & img {
      width: 100%;
    }
    @media (min-width: 1200px) {
      width: 10rem;
    }
  }
  
  & .collapsible {
    position: relative;
    & .collapsible__trigger {
      cursor: pointer;

      & .icon {
        transition: transform 200ms ease;
      }

      &.open .icon {
        transform: rotate(180deg);
      }
    }

    & .collapsible__content {
      background-color: var(--snow);
      padding: 1.5rem;
      position: absolute;
      left: 50%;
      bottom: -1rem;
      transform: translate(-50%, 100%);
      width: fit-content;
      min-width: 15rem;
      display: grid;
      white-space: nowrap;
      & > a {
        width: fit-content
      }
      gap: 1rem;
      &.closed {
        display: none;
      }
    }
  }
}

.header-nav__trigger {
  align-self: center;
  width: 3rem;
  height: 3rem;
  display: flex;
  cursor: pointer;
  position: relative;

  & .header-nav__trigger-toggle {
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%);
    border-radius: 1px;
    height: 2px;
    width: 1.25rem;
    display: block;
    background-color: var(--blue);
    position: absolute;
    transition: all 150ms ease;

    &::before,
    &::after {
      content: "";
      top: 0;
      left: 0;
      border-radius: 1px;
      height: 2px;
      width: 1.25rem;
      display: block;
      background-color: var(--blue);
      position: absolute;
      transition: all 150ms ease;
    }

    &::before {
      animation: toggler-top 800ms ease forwards;
    }

    &::after {
      animation: toggler-bottom 800ms ease forwards;
    }
  }

  &.active .header-nav__trigger-toggle {
    transition-delay: 200ms;
    transform: translate(-50%, -50%) rotate(135deg);

    &::before {
      animation: toggler-top-open 800ms ease forwards;
    }

    &::after {
      animation: toggler-bottom-open 800ms ease forwards;
    }
  }
}

.header-nav__content {
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 10rem;
  height: 100%;
  width: 100%;
  background-color: var(--white);
  transition: all 400ms ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: -1;
  color: var(--ink);
}

@media screen and (min-width: 1200px) {
  .header-nav__content,
  .header-nav__trigger {
    display: none;
  }
}

/** Keyframes **/
@keyframes toggler-top-open {
  0% {
    transform: translateY(6px);
  }

  30% {
    transform: translateY(0);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes toggler-bottom-open {
  0% {
    transform: translateY(-6px);
  }

  30% {
    transform: translateY(0);
  }

  to {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes toggler-bottom {
  0% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(0);
  }

  to {
    transform: translateY(6px);
  }
}

@keyframes toggler-top {
  0% {
    transform: translateY(0) rotate(90deg);
  }

  30% {
    transform: translateY(0);
  }

  to {
    transform: translateY(-6px);
  }
}

/**
 * 開発時にLoading Spinnerで隠れないようにするためのスタイル
 */
.loading-spinner {
  display: none;
}