.pc-header {
  * {
    transition: var(--transition-default);
    user-select: none;
  }

  z-index: var(--z-index-header);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 9rem;

  @media (max-width: 1100px) {
    display: none;
  }

  .pc-header__area {
    width: 100%;
    margin: 0 auto;
    height: 100%;
    position: relative;
    z-index: 2;
  }

  .pc-header__inner {
    max-width: 1920px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .pc-header__logo {
    font-size: var(--font-lg);
    font-weight: var(--font-weight-bold);
    height: 100%;
    padding: var(--space-md);
  }

  .pc-header__logo-link {
    text-decoration: none;
  }

  .pc-header__logo-image {
    height: 100%;
    width: auto;
  }

  .pc-header__nav {
    display: flex;
    gap: var(--space-md);
  }

  .pc-header__nav a {
    text-decoration: none;
    color: var(--color-foreground);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-sm);
    font-family: var(--font-family-serif);
    letter-spacing: var(--letter-spacing-widest);

    &:hover {
      opacity: var(--opacity-70);
    }
  }
}

.sp-header {
  * {
    transition: var(--transition-default);
    user-select: none;
  }
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 9rem;
  z-index: var(--z-index-header);

  @media (max-width: 1100px) {
    display: block;
  }
  .sp-header__area {
    width: 100%;
    margin: 0 auto;
    height: 100%;
    position: relative;
    z-index: var(--z-index-sp-menu);
  }
  .sp-header__inner {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .sp-header__menu-button.active .menu-icon {
    transform: rotate(90deg);
  }
  .sp-header__logo {
    height: 100%;
  }
  .sp-header__logo-image {
    font-size: var(--font-lg);
    font-weight: var(--font-weight-bold);
    height: 100%;
    width: auto;
    padding: var(--space-md);
  }
  .sp-header__menu-button {
    user-select: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 6rem;
    height: 6rem;
    cursor: pointer;
    z-index: var(--z-index-header);
    .sp-header__menu-bar {
      user-select: none;
      position: absolute;
      top: 2.3rem;
      left: 1.5rem;
      display: block;
      width: 3rem;
      height: 1px;
      background-color: var(--color-foreground);
      position: relative;
      transition: 0.3s;
      &:nth-child(2) {
        width: 2.4rem;
        top: 3rem;
      }
    }
    &.active {
      .sp-header__menu-bar {
        &:nth-child(1) {
          transform: rotate(45deg);
          top: 2.9rem;
          width: 3rem;
          left: 1.9rem;
        }
        &:nth-child(2) {
          transform: rotate(-45deg);
          top: 2.8rem;
          width: 3rem;
          left: 1.8rem;
        }
      }
    }
  }
  .sp-header__nav {
    position: fixed;
    top: 0;
    right: -5rem;
    width: 100%;
    z-index: -1;
    opacity: 0;
    height: 100%;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    a {
      font-size: var(--font-md);
      &:hover {
        opacity: var(--opacity-70);
      }
    }
    transition: 0.3s;
    &.active {
      right: 0;
      opacity: 1;
      transition: 0.3s;
      z-index: calc(var(--z-index-header) - 100);
    }
  }
}

.header__background {
  &:before {
    content: "";
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    position: absolute;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.8) 25%,
      rgba(255, 255, 255, 0.6) 45%,
      rgba(255, 255, 255, 0.35) 65%,
      rgba(255, 255, 255, 0.15) 80%,
      rgba(255, 255, 255, 0.05) 90%,
      rgba(255, 255, 255, 0) 100%
    );
    /* ぼかしも段階的に適用 */
    filter: blur(0px);
    -webkit-filter: blur(0px);
    z-index: 1;
  }
  &:after {
    content: "";
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    position: absolute;
    background: radial-gradient(
        ellipse at top,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 255, 255, 0.1) 70%,
        transparent 100%
      ),
      linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
      );
    backdrop-filter: blur(12px) saturate(1.2) brightness(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.2) brightness(1.1);
    /* ぼかしのマスクで段階的に弱くする */
    mask: linear-gradient(
      to bottom,
      black 0%,
      rgba(0, 0, 0, 0.9) 20%,
      rgba(0, 0, 0, 0.7) 40%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0.2) 75%,
      rgba(0, 0, 0, 0.1) 85%,
      transparent 95%
    );
    -webkit-mask: linear-gradient(
      to bottom,
      black 0%,
      rgba(0, 0, 0, 0.9) 20%,
      rgba(0, 0, 0, 0.7) 40%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0.2) 75%,
      rgba(0, 0, 0, 0.1) 85%,
      transparent 95%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
}
