/* ヘッダー */
.l-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--container-padding);
  z-index: 100;
}

/* ロゴ */
.p-logo__frame {
  display: flex;
  align-items: flex-end;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

/* ロゴ画像 */
.p-logo__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

/* ロゴテキストエリア */
.p-logo__text {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-left: 24px;
  padding-right: 8px;
}

/* 「創作バッグ」テキスト */
.p-logo__sub {
  font-family: var(--font-serif-jp);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text-gray);
  letter-spacing: 1.1px;
  line-height: 1.71;
  white-space: nowrap;
}

/* 「Inori」テキスト（FigmaはCormorant Garamond Medium・非italic） */
.p-logo__name {
  font-family: var(--font-en);
  font-weight: 500;
  font-style: normal;
  font-size: 42px;
  color: var(--color-brand);
  letter-spacing: 0.84px;
  line-height: 1;
  white-space: nowrap;
}

/* スペーサー（ロゴとナビの間） */
.p-header__spacer {
  flex: 1;
  min-width: 0;
}

/* グローバルナビ */
.p-nav {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex-shrink: 0;
}

/* ナビアイテム */
.p-nav-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  transition: opacity var(--transition);
}

.p-nav-item:hover {
  opacity: 0.7;
}

/* ナビ英語テキスト */
.p-nav-item__en {
  font-family: var(--font-sans-jp);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-text-dark);
  white-space: nowrap;
  line-height: 1.4;
}

/* ナビ日本語テキスト */
.p-nav-item__ja {
  font-family: var(--font-sans-jp);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* ヘッダー分のページトップ余白 */
body {
  padding-top: 80px;
}

/* PC時は非表示（SPメディアクエリ内で表示） */
.l-header__hamburger {
  display: none;
}

.l-header__drawer {
  display: none;
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* PC用ナビを非表示 */
  .p-nav {
    display: none;
  }
  /* ハンバーガーボタンを表示 */
  .l-header__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
  }
  .l-header__hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-gold);
    transition: transform 0.3s, opacity 0.3s;
  }
  /* ドロワー：タブレット時ヘッダー高さ80pxに合わせてtopを設定 */
  .l-header__drawer {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--color-bg-white);
    border-top: 0.5px solid var(--color-border);
    padding: 24px 40px;
    gap: 0;
    z-index: 999;
  }
  .l-header__drawer.is-open {
    display: flex;
    flex-direction: column;
  }
  .l-header__drawer .l-header__nav-item {
    border-bottom: 0.5px solid var(--color-border);
  }
  .l-header__drawer .l-header__nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    text-decoration: none;
  }
  .l-header__drawer .l-header__nav-en {
    font-family: var(--font-sans-jp);
    font-weight: 500;
    font-size: 16px;
    color: var(--color-text-dark);
  }
  .l-header__drawer .l-header__nav-ja {
    font-family: var(--font-sans-jp);
    font-size: 11px;
    color: var(--color-text-light);
  }
  /* ハンバーガーアイコン→Xに変化 */
  .l-header__hamburger.is-active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .l-header__hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .l-header__hamburger.is-active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

@media (max-width: 767px) {
  /* ヘッダー：高さ縮小・縦中央揃えを明示 */
  .l-header {
    height: 60px;
    padding: 0 20px;
    align-items: center;
  }
  body {
    padding-top: 60px;
  }
  /* ロゴアイコン縮小 */
  .p-logo__icon {
    width: 50px;
    height: 50px;
  }
  /* ロゴアイコンimg：SP時に50pxを明示指定 */
  .p-logo__icon img {
    width: 50px !important;
    height: 50px !important;
    display: block;
  }
  /* 「創作バッグ」テキストの縦位置修正 */
  .p-logo__sub {
    line-height: 28px;
    vertical-align: middle;
  }
  /* 「Inori」テキストの縦位置修正 */
  .p-logo__name {
    font-size: 28px;
    line-height: 1;
    vertical-align: middle;
  }
  /* PC用ナビを非表示 */
  .p-nav {
    display: none;
  }
  /* ハンバーガーボタンを表示 */
  .l-header__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
  }
  .l-header__hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-gold);
    transition: transform 0.3s, opacity 0.3s;
  }
  /* ドロワーメニュー：クローズ時はdisplay:noneで完全に非表示 */
  .l-header__drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--color-bg-white);
    border-top: 0.5px solid var(--color-border);
    padding: 24px 20px;
    gap: 0;
    z-index: 999;
  }
  .l-header__drawer.is-open {
    display: flex;
    flex-direction: column;
  }
  .l-header__drawer .l-header__nav-item {
    border-bottom: 0.5px solid var(--color-border);
  }
  .l-header__drawer .l-header__nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    text-decoration: none;
  }
  .l-header__drawer .l-header__nav-en {
    font-family: var(--font-sans-jp);
    font-weight: 500;
    font-size: 16px;
    color: var(--color-text-dark);
  }
  .l-header__drawer .l-header__nav-ja {
    font-family: var(--font-sans-jp);
    font-size: 11px;
    color: var(--color-text-light);
  }
  /* ハンバーガーアイコン→Xに変化 */
  .l-header__hamburger.is-active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .l-header__hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .l-header__hamburger.is-active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}
