/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-tan);
  border-bottom: 1px solid var(--color-divider);
  z-index: 500;
  transition: height 0.3s ease;
}

.site-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: padding 0.3s ease;
}

.site-header__logo img {
  height: 56px;
  width: auto;
  transition: height 0.3s ease;
}

.site-header__right {
  display: flex;
  align-items: center;
  height: 100%;
  transition: padding 0.3s ease;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  gap: 28px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-text);
  white-space: nowrap;
}

.site-nav__list a {
  transition: opacity 0.2s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  opacity: 0.6;
}

.header-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: opacity 0.2s ease;
}

.header-instagram:hover,
.header-instagram:focus-visible {
  opacity: 0.6;
}

.header-instagram--row {
  display: none;
}


.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  transition: gap 0.3s ease;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 501;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
  margin: 0 auto;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   デスクトップ・初期表示 (未スクロール): Figmaデザイン通りの2段組みヘッダー
   ナビ上段 + Instagram/予約ボタン下段。JSでスクロールを検知し
   body に .header-scrolled が付くとこれらは解除され、
   ロゴ/予約ボタン/ハンバーガーの1段組み(追跡ヘッダー)に切り替わる。
   ========================================================================== */
@media (min-width: 861px) {
  body:not(.header-scrolled) .site-header__inner {
    padding: 0 clamp(24px, 4.86vw, 70px);
  }

  body:not(.header-scrolled) .site-header__logo img {
    height: clamp(70px, 7.5vw, 108px);
  }

  body:not(.header-scrolled) .site-header__right {
    flex: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    padding: clamp(50px, 4.97vw, 70px) 0 clamp(28px, 2.77vw, 39px);
  }

  body:not(.header-scrolled) .site-nav {
    position: static;
    background: transparent;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    padding: 0;
    transform: none;
    overflow: visible;
    height: auto;
  }

  body:not(.header-scrolled) .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 33px;
    font-size: clamp(13px, 1.1vw, 16px);
    letter-spacing: 0.05em;
  }

  body:not(.header-scrolled) .header-instagram--menu {
    display: none;
  }

  body:not(.header-scrolled) .header-instagram--row {
    display: inline-flex;
  }

  body:not(.header-scrolled) .header-instagram--row img {
    width: clamp(24px, 2.1vw, 30px);
    height: auto;
  }

  body:not(.header-scrolled) .site-header__actions {
    gap: clamp(12px, 1.4vw, 20px);
  }

  body:not(.header-scrolled) .reserve-btn--nav {
    font-size: clamp(13px, 1.1vw, 16px);
    letter-spacing: 0.1em;
    padding: 10px clamp(24px, 2.85vw, 41px);
  }

  body:not(.header-scrolled) .hamburger {
    display: none;
  }

  /* スクロール後: ヘッダー実体だけ縮める(予約分の余白は動かさないのでズレない) */
  body.header-scrolled .site-header {
    height: 84px;
  }
}


/* ハンバーガーメニュー(PC/スマホ共通): ロゴ・予約ボタン・ハンバーガーの
   1段組みヘッダーとし、ナビはハンバーガーから開くスライドパネルに統一 */
.site-nav {
  position: fixed;
  top: var(--header-bar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-tan);
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 40px;
  padding: 48px 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.site-nav.is-open {
  transform: translateX(0);
}

/* PC⇔追跡ヘッダーの切り替え中はtransitionを止め、
   ナビが一瞬右にスライドして隠れて見える現象を防ぐ */
.site-nav.is-switching {
  transition: none !important;
}

.site-nav__list {
  flex-direction: column;
  align-items: center;
  gap: 24px;
  font-size: 16px;
}

.header-instagram img {
  width: 26px;
  height: auto;
}


@media (max-width: 680px) {
  .site-header__logo img {
    height: 40px;
  }
}
