@charset "UTF-8";
/* =========================================================
 * NAWANO 共通ハンバーガーメニュー
 * ========================================================= */

.nwm {
  --nwm-green:  #2f4a3a;
  --nwm-green2: #3c5c48;
  --nwm-cream:  #f6f1e6;
  --nwm-rope:   #c9a46a;
  --nwm-rope2:  #e0c08c;
  --nwm-accent: #e08a5a;
  --nwm-ease:   cubic-bezier(.22, .8, .24, 1);
  --nwm-bounce: cubic-bezier(.34, 1.4, .64, 1);
  --nwm-top:    calc(14px + var(--wp-admin--admin-bar--height, 0px)); /* ログイン中は管理バーの分下げる */
}
.nwm *, .nwm *::before, .nwm *::after { box-sizing: border-box; }

/* ---------- Cocoon の既存メニューを隠す（設定で切り替え） ---------- */
body.nawano-hide-navi #navi { display: none !important; }
body.nawano-hide-mh .mobile-header-menu-buttons { display: none !important; }
body.nawano-hide-mf .mobile-footer-menu-buttons { display: none !important; }

/* メニューを開いている間は後ろのページをスクロールさせない */
html.nwm-lock, html.nwm-lock body { overflow: hidden; }

/* =========================================================
 * 開閉ボタン
 * ========================================================= */
.nwm-btn {
  position: fixed;
  z-index: 10001;
  top: var(--nwm-top);
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--nwm-green);
  color: var(--nwm-cream);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .5s var(--nwm-ease), transform .4s var(--nwm-ease);
}
.nwm-btn:hover { transform: scale(1.06); }
.nwm-btn:focus-visible { outline: 3px solid var(--nwm-accent); outline-offset: 3px; }

.nwm-btn__icon { width: 30px; height: 22px; overflow: visible; }
.nwm-btn__rope {
  fill: none;
  stroke: var(--nwm-rope);
  stroke-width: 2.6;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .6s var(--nwm-bounce), stroke .4s, stroke-dashoffset .4s var(--nwm-ease), opacity .3s;
}
.nwm-btn__rope--2 { stroke-dasharray: 100; stroke-dashoffset: 0; }

/* 押していないときも、縄がゆらゆら */
.nwm-btn:hover .nwm-btn__rope--1 { animation: nwm-sway 1.2s ease-in-out infinite; }
.nwm-btn:hover .nwm-btn__rope--3 { animation: nwm-sway 1.2s ease-in-out .2s infinite; }
@keyframes nwm-sway { 50% { transform: translateX(2px); } }

.nwm-btn__text {
  position: relative;
  width: 44px;
  height: 11px;
  text-align: center;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  line-height: 11px;
  letter-spacing: .14em;
}
.nwm-btn__open, .nwm-btn__close { display: block; transition: transform .5s var(--nwm-ease); }
.nwm-btn__close { position: absolute; left: 0; right: 0; top: 0; transform: translateY(100%); }
/* letter-spacing の分だけ右に寄るのを補正 */
.nwm-btn__open, .nwm-btn__close { padding-left: .14em; }

/* 開いているとき：上下の縄がねじれて×に、真ん中の縄はほどけて消える */
.nwm.is-open:not(.is-closing) .nwm-btn { background: var(--nwm-cream); color: var(--nwm-green); }
.nwm.is-open:not(.is-closing) .nwm-btn__rope { stroke: var(--nwm-green); animation: none; }
.nwm.is-open:not(.is-closing) .nwm-btn__rope--1 { transform: translateY(8px) rotate(45deg) scaleX(1.05); }
.nwm.is-open:not(.is-closing) .nwm-btn__rope--3 { transform: translateY(-8px) rotate(-45deg) scaleX(1.05); }
.nwm.is-open:not(.is-closing) .nwm-btn__rope--2 { stroke-dashoffset: 100; opacity: 0; }
.nwm.is-open:not(.is-closing) .nwm-btn__open  { transform: translateY(-100%); }
.nwm.is-open:not(.is-closing) .nwm-btn__close { transform: translateY(0); }

/* =========================================================
 * メニュー本体
 * ========================================================= */
.nwm-panel {
  position: fixed;
  z-index: 10000;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--nwm-cream);
  pointer-events: none;
}
.nwm.is-open .nwm-panel { pointer-events: auto; }
.nwm-panel[hidden] { display: none; }

/* 緑の幕：上から下りてきて、閉じるときは上がる */
.nwm-panel__bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(201, 106, 58, .25) 0, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(111, 143, 99, .45) 0, transparent 45%),
    var(--nwm-green);
  transform: translateY(-101%);
  border-radius: 0 0 50% 50% / 0 0 12% 12%;
  transition: transform .55s cubic-bezier(.6, 0, .8, .4) .3s, border-radius .55s ease .3s;
}
.nwm.is-open:not(.is-closing) .nwm-panel__bg {
  transform: none;
  border-radius: 0;
  transition: transform .75s var(--nwm-bounce), border-radius .9s var(--nwm-ease);
}

.nwm-panel__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  width: min(1080px, 100% - 48px);
  min-height: 100%;
  margin: 0 auto;
  padding: calc(var(--nwm-top) + 96px) 0 64px;
}

/* ---------- 垂れ下がる縄 ---------- */
.nwm-nav { position: relative; padding-left: 64px; }
.nwm-rope {
  position: absolute;
  left: 8px;
  top: calc((var(--nwm-top) + 96px) * -1); /* 画面の一番上から垂らす */
  width: 24px;
  height: calc(100% + var(--nwm-top) + 96px);
  overflow: visible;
}
.nwm-rope__line {
  fill: none;
  stroke: var(--nwm-rope);
  stroke-width: 3.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  /* 閉じるとき：下から上へ巻き取られる */
  transition: stroke-dashoffset .4s cubic-bezier(.6, 0, .8, .4);
}
.nwm-rope__line--2 { stroke: var(--nwm-rope2); }
/* 開くとき：幕が下りたあと、上から縄が垂れてくる */
.nwm.is-open:not(.is-closing) .nwm-rope__line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--nwm-ease) .35s;
}
.nwm.is-open:not(.is-closing) .nwm-rope__line--2 { transition-delay: .45s; }

/* ---------- メニュー項目（結び目にぶら下がって揺れる） ---------- */
.nwm .nwm-list { margin: 0; padding: 0; list-style: none; }
.nwm .nwm-item {
  position: relative;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform-origin: -44px 50%; /* 縄の結び目を支点に揺れる */
}
.nwm .nwm-item + .nwm-item { margin-top: clamp(14px, 2.4vh, 26px); }
.nwm.is-open:not(.is-closing) .nwm-item {
  animation: nwm-swing-in 1.1s var(--nwm-ease) both;
  animation-delay: calc(.55s + var(--i) * .1s);
}
.nwm.is-closing .nwm-item {
  opacity: 1;
  animation: nwm-swing-out .32s cubic-bezier(.6, 0, .8, .4) both;
  animation-delay: calc(var(--i) * .03s);
}
@keyframes nwm-swing-in {
  0%   { opacity: 0; transform: rotate(-22deg) translateY(-14px); }
  35%  { opacity: 1; transform: rotate(8deg); }
  58%  { transform: rotate(-4deg); }
  78%  { transform: rotate(1.6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes nwm-swing-out {
  to { opacity: 0; transform: rotate(-16deg) translateY(-10px); }
}

/* 結び目 */
.nwm-knot {
  position: absolute;
  left: -51px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--nwm-rope);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .15), 0 0 0 4px rgba(201, 164, 106, .25);
}
/* 結び目から項目へのひも */
.nwm-knot::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 8px;
  width: 26px;
  height: 2px;
  background: var(--nwm-rope2);
}

.nwm .nwm-link {
  display: inline-flex;
  flex-direction: column;
  padding: 4px 0;
  color: var(--nwm-cream) !important;
  text-decoration: none !important;
  transition: transform .5s var(--nwm-bounce), color .3s;
  transform-origin: left center;
}
.nwm-link__en {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--nwm-rope2);
}
.nwm-link__title {
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .06em;
}
.nwm .nwm-link:hover,
.nwm .nwm-link:focus-visible { color: #fff !important; transform: translateX(10px) rotate(-1.5deg); }
.nwm .nwm-link:hover .nwm-link__en { color: var(--nwm-accent); }
.nwm .nwm-link.is-current .nwm-link__title { color: var(--nwm-rope2); }
.nwm .nwm-link.is-current .nwm-link__title::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 12px;
  border-radius: 50%;
  background: var(--nwm-accent);
  vertical-align: middle;
}
.nwm-link:focus-visible { outline: 3px solid var(--nwm-accent); outline-offset: 6px; border-radius: 6px; }

/* ---------- 右側の案内 ---------- */
.nwm-side {
  align-self: end;
  padding-bottom: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
}
.nwm.is-open:not(.is-closing) .nwm-side {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--nwm-ease) 1.1s, transform .8s var(--nwm-ease) 1.1s;
}
.nwm .nwm-side__title { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: .12em; color: var(--nwm-cream); }
.nwm .nwm-side__text { margin: 10px 0 0; font-size: 14px; line-height: 1.9; opacity: .85; }
.nwm .nwm-side__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.nwm .nwm-side__links a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid rgba(246, 241, 230, .6);
  border-radius: 999px;
  font-size: 13px;
  color: var(--nwm-cream) !important;
  text-decoration: none !important;
  transition: background .3s, color .3s;
}
.nwm .nwm-side__links a:hover { background: var(--nwm-cream); color: var(--nwm-green) !important; }

/* =========================================================
 * スマホ
 * ========================================================= */
@media (max-width: 834px) {
  .nwm-panel__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    width: calc(100% - 32px);
    padding-top: calc(var(--nwm-top) + 88px);
  }
  .nwm-rope { top: calc((var(--nwm-top) + 88px) * -1); height: calc(100% + var(--nwm-top) + 88px); }
  .nwm-side { align-self: start; padding-left: 64px; }
  .nwm .nwm-side__title { font-size: 28px; }
}
@media (max-width: 600px) {
  .nwm-btn { width: 56px; height: 56px; right: 12px; }
  .nwm-btn__icon { width: 26px; height: 20px; }
  .nwm-nav { padding-left: 54px; }
  .nwm .nwm-item { transform-origin: -36px 50%; }
  .nwm-knot { left: -43px; width: 16px; height: 16px; margin-top: -8px; }
  .nwm-knot::after { left: 14px; top: 7px; width: 20px; }
  .nwm-side { padding-left: 54px; }
}

/* 動きを減らす設定の人には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .nwm *, .nwm *::before, .nwm *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}