@charset "utf-8";
/* ==========================================================
   BURGER MENU（右上ボタン＋右からのスライドインパネル）
   js/burger.js とセットで使用。
   クラス：.menu-toggle / .nav-overlay / .nav-panel / .nav-close
           .nav-list / .nav-item / .nav-link / .nav-parent
           .nav-chevron / .nav-submenu / .nav-sublink
   状態：.is-open（JSが付け外し）、body.nav-is-locked
   ========================================================== */

/* ---------- 開閉ボタン（ハンバーガー） ---------- */
.menu-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle-line {
  position: absolute;
  left: 9px;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, .45);
  transition: transform .3s ease, opacity .3s ease, top .3s ease;
}
.menu-toggle-line:nth-child(1) { top: 14px; }
.menu-toggle-line:nth-child(2) { top: 21px; }
.menu-toggle-line:nth-child(3) { top: 28px; }

/* 開いている時は × に変形 */
.menu-toggle.is-open .menu-toggle-line:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle.is-open .menu-toggle-line:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle-line:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.menu-toggle:focus-visible,
.nav-close:focus-visible,
.nav-link:focus-visible,
.nav-sublink:focus-visible {
  outline: 2px solid #aabcbc;
  outline-offset: 2px;
}

/* ---------- 背面の暗幕 ---------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .4s ease, visibility 0s;
}

/* ---------- スライドインパネル ---------- */
.nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 210;
  width: min(86vw, 360px);
  height: 100vh;
  height: 100dvh;
  padding: 72px 0 40px;
  background: #FAF6F1;
  box-shadow: -4px 0 20px rgba(0, 0, 0, .15);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  /* 閉じる時：JS が transition-duration を 3s にするので、その間は表示を保つ */
  transition: transform .5s ease, visibility 0s linear .5s;
  font-family: 'Noto Serif JP', serif;
  text-align: left;
}
.nav-panel.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  transition: transform .5s ease, visibility 0s;
}

/* ---------- パネル内の閉じるボタン（×） ---------- */
.nav-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.nav-close span {
  position: absolute;
  top: 21px;
  left: 9px;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: #777;
}
.nav-close span:nth-child(1) { transform: rotate(45deg); }
.nav-close span:nth-child(2) { transform: rotate(-45deg); }

/* ---------- メニュー項目 ---------- */
/* reset.css が ul/li に文字サイズ・色などを当てているので明示的に上書き */
.nav-list,
.nav-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e4ddd3;
}
.nav-item:first-child {
  border-top: 1px solid #e4ddd3;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 16px 28px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .08em;
  color: #555;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color .3s ease, background-color .3s ease;
}
.nav-link:hover {
  color: #fff;
  background-color: #aabcbc;
}

/* アコーディオンの矢印 */
.nav-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-left: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .3s ease;
}
.nav-item.is-open > .nav-parent .nav-chevron {
  transform: rotate(-135deg) translate(-2px, -2px);
}

/* 第2階層（サブメニュー） */
.nav-submenu {
  max-height: 0;
  overflow: hidden;
  background: #fff;
  transition: max-height .4s ease;
}
.nav-item.is-open > .nav-submenu {
  max-height: 600px;
}
.nav-submenu li {
  margin: 0;
  padding: 0;
  border-top: 1px dashed #e4ddd3;
}
.nav-sublink {
  display: block;
  padding: 12px 28px 12px 44px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .04em;
  color: #777;
  text-decoration: none;
  transition: color .3s ease, background-color .3s ease;
}
.nav-sublink:hover {
  color: #fff;
  background-color: #aabcbc;
}

/* ---------- メニュー表示中は背面スクロールを止める ---------- */
/* reset.css で html に overflow:scroll が付いているため body だけでは止まらない */
body.nav-is-locked,
html:has(body.nav-is-locked) {
  overflow: hidden;
}

/* ---------- 動きを抑える設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .nav-panel,
  .nav-overlay,
  .nav-submenu,
  .menu-toggle-line,
  .nav-chevron {
    transition: none !important;
  }
}
