/* ==========================================================
   01-header.css — ヘッダー
   SP: 390px基準(モバイルファースト) / PC: 768px以上
   ========================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 17, 40, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* MV表示中はヘッダーを隠し、MV通過後にスライドイン(クラスはJSが付与。JS無効時は常時表示) */
.header--auto-hide {
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

.header--auto-hide.is-shown {
  transform: translateY(0);
}

.header__inner {
  position: relative;
  z-index: 2; /* ドロワーよりロゴ・ハンバーガーを前面に保つ */
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

/* --- ロゴ --- */
.header__logo {
  display: block;
  flex-shrink: 0;
}

.header__logo-img {
  width: 132px;
  height: 18px;
}

/* --- PCナビ(SPでは非表示) --- */
.header__nav {
  display: none;
}

/* --- CTAボタン(共通 → SPサイズ基準) --- */
.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10.5px 14px 11.5px;
  background: linear-gradient(135deg, #e3c87e 0%, #c9a24b 100%);
  border-radius: 4px;
  color: #0a1128;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.header__cta:hover {
  opacity: 0.85;
}

/* --- SPアクション(CTA + ハンバーガー) --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
}

.header__menu-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 開いた状態(js-menu-toggle が aria-expanded を切り替える) */
.header__menu[aria-expanded="true"] .header__menu-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.header__menu[aria-expanded="true"] .header__menu-bar:nth-child(2) {
  opacity: 0;
}

.header__menu[aria-expanded="true"] .header__menu-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- SPドロワー --- */
.header__drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1;
  width: min(80vw, 320px);
  height: 100dvh;
  padding: calc(var(--header-height) + 24px) 24px 40px;
  overflow-y: auto;
  background: rgba(10, 17, 40, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-left: 1px solid rgba(201, 162, 75, 0.18);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}

.header__drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.header__drawer-link {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.6px;
  transition: color 0.3s ease;
}

.header__drawer-link:hover {
  color: var(--color-gold);
}

.header__drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #e3c87e 0%, #c9a24b 100%);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(201, 162, 75, 0.35);
  color: #0a1128;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.header__drawer-cta:hover {
  opacity: 0.85;
}

/* ==========================================================
   PC (768px〜)
   ========================================================== */
@media (min-width: 768px) {
  .header {
    background: rgba(10, 17, 40, 0.55);
  }

  .header__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
  }

  .header__logo-img {
    width: 180px;
    height: 25px;
  }

  .header__nav {
    align-items: center;
    gap: 32px;
  }

  .header__nav-list {
    display: flex;
    align-items: center;
    gap: 28.8px;
  }

  .header__nav-link {
    display: block;
    padding: 2.5px 2px 1px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.9;
    letter-spacing: 0.6px;
    transition: color 0.3s ease;
  }

  .header__nav-link:hover {
    color: var(--color-gold);
  }

  .header__cta {
    padding: 8px 24px 9px;
    box-shadow: 0 8px 24px rgba(201, 162, 75, 0.35);
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 1.1px;
  }

}

/* ==========================================================
   ナビゲーションの表示切り替え
   ナビ項目が多いため、1200px未満はハンバーガーメニューを使う
   ========================================================== */
@media (min-width: 1200px) {
  .header__nav {
    display: flex;
  }

  .header__actions,
  .header__drawer {
    display: none;
  }
}

/* 1200〜1359px はナビの間隔を詰めて1行に収める */
@media (min-width: 1200px) and (max-width: 1359px) {
  .header__inner {
    padding: 0 32px;
  }

  .header__nav {
    gap: 20px;
  }

  .header__nav-list {
    gap: 16px;
  }

  .header__nav-link {
    font-size: 13px;
    letter-spacing: 0.3px;
  }
}
