/* =========================================================
   中島重久堂：ヘッダー・フッター共通CSS（全ページで読み込み）
   下層ページは旧テーマの reset.css / style.css と一緒に読み込まれるため、
   ヘッダー・フッター内だけで効くように書いている
   ========================================================= */
:root {
  --ink: #333333;
  --ink-soft: #555555;
  --line: #d9d6d2;
  --bg: #fff;
  --bg-gray: #f1f0ef;
  --footer: #5c5c5c;
  --footer-line: #808080;
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --en: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: 11%;
}

/* ---------- ヘッダー・フッター内の基本設定（旧CSSの a / img / p 指定を打ち消す） ---------- */
.site-header, .site-footer {
  font-family: var(--sans); font-size: 1.4rem; font-weight: 400; line-height: 2; letter-spacing: .06em;
  -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums;
}
:where(.site-header, .site-footer), :where(.site-header, .site-footer) *, :where(.site-header, .site-footer) ::before, :where(.site-header, .site-footer) ::after { box-sizing: border-box; }
:where(.site-header, .site-footer) img { display: block; max-width: 100%; }
:where(.site-header, .site-footer) a { color: inherit; text-decoration: none; transition: none; }
:where(.site-header, .site-footer) a:hover, :where(.site-header, .site-footer) a:focus { opacity: 1; }
:where(.site-header, .site-footer) ul { list-style: none; margin: 0; padding: 0; }
:where(.site-header, .site-footer) p, :where(.site-header, .site-footer) small { margin: 0; font-weight: 400; }
:where(.site-header, .site-footer) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- 矢印（フッターの Page Top とトップページで共用） ---------- */
/* 細い線＋上側だけの矢じり（⇀）。ホバーで線が伸びる */
.arrow-line {
  position: relative; display: inline-block; flex-shrink: 0;
  width: 48px; height: 7px; color: inherit; opacity: .5;
  transition: width .5s var(--ease), opacity .5s;
}
.arrow-line::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleY(.6); transform-origin: bottom; }
.arrow-line::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 9px; height: 1px; background: currentColor;
  transform-origin: right center; transform: rotate(35deg) scaleY(.6);
}
a:hover .arrow-line, button:hover .arrow-line { width: 68px; opacity: .85; }
.arrow-line--prev { transform: scaleX(-1); }

/* ---------- HEADER ---------- */
/* ヒーロー写真が白背景のため、ヘッダーは最初から濃色の文字・ロゴ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: stretch; gap: 40px;
  height: 76px; padding: 0 40px;
  color: var(--ink); border-bottom: 1px solid rgba(51,51,51,.12);
  transition: background .5s, color .5s, border-color .5s, transform .5s var(--ease);
}
.site-header__logo { position: relative; width: 180px; flex-shrink: 0; align-self: center; }
.site-header__logo img { width: 100%; height: auto; transition: opacity .5s; }
.site-header__logo .logo-w { position: absolute; inset: 0; opacity: 0; }
.site-nav { display: flex; gap: 36px; margin: 0 auto; font-family: var(--serif); font-size: 1.3rem; }
.site-nav__sub { display: none; }

/* 親項目：ヘッダーの高さいっぱいに広げ、サブメニューとの間にすき間を作らない */
.nav-item { position: relative; display: flex; align-items: center; gap: 6px; }
.nav-link { position: relative; padding: 6px 0; white-space: nowrap; transition: color .3s; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-item:not(.has-sub) .nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* 下向きの V */
.sub-toggle { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.sub-toggle::before {
  content: ''; width: 6px; height: 6px; margin-top: -4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}

/* サブメニュー（白いパネル・区切り線） */
.sub {
  position: absolute; top: 100%; left: 0; z-index: 10; min-width: 240px;
  background: #fff; color: var(--ink); font-family: var(--serif); font-size: 1.4rem; letter-spacing: .04em;
  border-bottom: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.06);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .3s, visibility .3s, transform .3s var(--ease);
}
.sub li { position: relative; padding-left: 14px; transition: background .25s; }
.sub li:hover { background: #e4e3e1; }
.sub a { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 0; line-height: 1.6; }
.sub li + li > a { border-top: 1px solid var(--line); }
.sub li:hover + li > a { border-top-color: transparent; }

/* NJK Brand・TSUNAGO の右向き > とフライアウト */
.has-fly > a::after {
  content: ''; width: 6px; height: 6px; margin-left: auto; flex-shrink: 0;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg);
}
.sub--fly { top: 0; left: 100%; transform: translateX(-6px); box-shadow: 8px 10px 24px rgba(0,0,0,.06); }
.sub--fly a { white-space: nowrap; }

/* 開いた状態（ホバー・キーボード・タップ） */
.nav-item:hover > .sub, .nav-item:focus-within > .sub, .nav-item.is-open > .sub,
.has-fly:hover > .sub, .has-fly:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.nav-item.has-sub:hover > .nav-link, .nav-item.has-sub.is-open > .nav-link,
.nav-item.has-sub:hover > .sub-toggle, .nav-item.has-sub.is-open > .sub-toggle { color: #888888; }
.nav-item:hover > .sub-toggle::before, .nav-item.is-open > .sub-toggle::before { transform: rotate(225deg); margin-top: 4px; }
.has-fly:hover > a { color: #555555; }

.site-header__right { display: flex; align-items: center; gap: 28px; font-family: var(--en); font-weight: 600; font-size: 1.2rem; }
.nav-item--lang { align-self: stretch; }
.lang-switch { font-family: var(--en); font-weight: 600; font-size: 1.3rem; letter-spacing: .06em; padding: 6px 0; white-space: nowrap; }
.lang-switch i { display: inline-block; font-style: normal; margin-left: 4px; transition: transform .3s var(--ease); }
.nav-item--lang:hover .lang-switch i, .nav-item--lang.is-open .lang-switch i { transform: rotate(45deg); }
.sub--lang { left: auto; right: -20px; min-width: 150px; font-family: var(--sans); font-size: 1.3rem; }
.sub--lang a[aria-current] { color: #888888; }
.btn-pill {
  display: inline-block; padding: 5px 30px; border-radius: 20px;
  background: var(--ink); color: #fff; font-size: 1.1rem; letter-spacing: .14em;
  transition: background .4s, color .4s;
}
.btn-pill:hover { background: #555555; }

.site-header.is-solid { background: rgba(255,255,255,.96); border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.menu-btn { display: none; }

/* 下層ページ：固定ヘッダーの分だけ本文を下げる（トップページはヒーローの上に重ねるので不要） */
body:not(.njk-front) { padding-top: 76px; }
/* WordPress 管理バー（ログイン中のみ表示）の分ずらす */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ---------- FOOTER（キャッチ大型＋横並びメニュー） ---------- */
/* clear：下層ページの旧テーマ本文は float で組まれているため、回り込みを解除 */
.site-footer { clear: both; background: var(--footer); color: #fff; padding: 80px var(--gutter) 32px; }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.22); }
.site-footer__copy { font-family: var(--serif); font-size: clamp(2.6rem, 3.2vw, 4rem); line-height: 1.6; letter-spacing: .12em; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; text-align: right; }
.site-footer__logo { width: 170px; height: auto; }
.site-footer__addr { font-size: 1.15rem; line-height: 2; color: rgba(255,255,255,.7); }
.site-footer__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 40px; padding: 44px 0; }
.f-main { display: block; font-family: var(--serif); font-size: 1.4rem; margin-bottom: 14px; transition: opacity .3s; }
.f-sub { display: block; font-family: var(--serif); font-size: 1.3rem; letter-spacing: .04em; color: rgba(255,255,255,.85); margin-bottom: 10px; transition: opacity .3s; }
.f-main:hover, .f-sub:hover { opacity: .6; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.22); }
.site-footer__legal { display: flex; align-items: baseline; gap: 20px; }
.site-footer__legal a { font-family: var(--en); font-weight: 600; font-size: 1.25rem; }
.site-footer__legal small { font-family: var(--en); font-style: italic; font-weight: 500; font-size: 1.15rem; color: rgba(255,255,255,.55); }
.site-footer__util { display: flex; align-items: center; gap: 28px; font-family: var(--en); font-weight: 600; font-size: 1.3rem; }
.sns { display: flex; gap: 18px; }
.sns a { display: block; width: 20px; opacity: .9; transition: opacity .3s; }
.sns a:hover { opacity: .55; }
.sns svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-sw { display: flex; gap: 14px; }
.lang-sw a { opacity: .55; }
.lang-sw a.is-current { opacity: 1; }
.pagetop { display: inline-flex; align-items: center; gap: 4px; font-family: var(--en); font-weight: 600; font-size: 1.3rem; letter-spacing: inherit; }
.arrow-line--up { width: 22px; margin: 0 2px 0 -4px; transform: rotate(-90deg); transition: transform .4s var(--ease); }
.pagetop:hover .arrow-line--up { width: 22px; transform: rotate(-90deg) translateX(4px); }

/* =========================================================
   RESPONSIVE（960px）
   ========================================================= */
@media (max-width: 1200px) {
  .site-header { gap: 24px; padding: 0 24px; }
  .site-header__logo { width: 150px; }
  .site-nav { gap: 18px; }
  .site-header__right { gap: 18px; }
  .btn-pill { padding: 5px 20px; }
}
@media (max-width: 960px) {
  :root { --gutter: 6%; }
  body:not(.njk-front) { padding-top: 60px; }

  .site-header { height: 60px; padding: 0 20px; }
  .site-header__logo { width: 140px; }
  .site-header__right { display: none; }
  .menu-btn { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 32px; height: 32px; margin-left: auto; position: relative; z-index: 2; }
  .menu-btn span { display: block; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
  .site-nav {
    position: fixed; inset: 0; margin: 0; padding: 100px 10% 40px;
    flex-direction: column; gap: 0; background: var(--footer); color: #fff; font-size: 1.6rem;
    opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
  }
  .site-nav { overflow-y: auto; }
  .nav-item { flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--footer-line); }
  .nav-link { flex: 1; padding: 18px 0; }
  .nav-link::after { display: none; }
  .nav-item.has-sub:hover > .nav-link, .nav-item.has-sub:hover > .sub-toggle { color: inherit; }
  .nav-item:hover > .sub-toggle::before { transform: rotate(45deg); margin-top: -4px; }
  .nav-item.is-open > .sub-toggle::before { transform: rotate(225deg); margin-top: 4px; }
  .nav-item.has-sub.is-open > .nav-link, .nav-item.has-sub.is-open > .sub-toggle { color: inherit; }
  .sub-toggle { width: 44px; height: 44px; margin-right: -12px; }
  /* サブメニューはアコーディオン。フライアウトは字下げして常に表示 */
  .sub, .sub--fly {
    position: static; width: 100%; min-width: 0; background: none; color: #fff; box-shadow: none; border: 0;
    font-size: 1.4rem; opacity: 1; visibility: visible; transform: none; display: none; padding-bottom: 12px;
  }
  .nav-item.is-open > .sub { display: block; }
  .sub--fly { display: block; padding: 0 0 0 16px; }
  .sub li { padding-left: 14px; }
  .sub li:hover { background: none; }
  .sub a { padding: 10px 0; }
  .sub li + li > a { border-top: 1px solid rgba(255,255,255,.15); }
  .sub--fly a { white-space: normal; }
  .has-fly > a::after { display: none; }
  .site-nav__sub { display: flex; gap: 10px; margin-top: 32px; font-family: var(--en); }
  .site-nav__sub .lang { opacity: .5; }
  .site-nav__sub .is-current { opacity: 1; }
  .site-header.is-open .site-nav { opacity: 1; visibility: visible; }
  .site-header.is-open { color: #fff; background: transparent; border-color: transparent; }
  .site-header__logo { z-index: 2; }
  .site-header.is-open .logo-w { opacity: 1; }
  .site-header.is-open .logo-k { opacity: 0; }
  .site-header.is-open .menu-btn span:first-child { transform: translateY(4px) rotate(30deg); }
  .site-header.is-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-30deg); }

  .site-footer { padding: 64px var(--gutter) 28px; }
  .site-footer__top { flex-direction: column; align-items: flex-start; }
  .site-footer__brand { align-items: flex-start; text-align: left; }
  .site-footer__nav { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column-reverse; align-items: flex-start; }
  .site-footer__legal { flex-wrap: wrap; gap: 4px 20px; }
}

/* =========================================================
   英語版（html[lang|="en"]）：明朝を欧文書体に替え、日本語用の広い字間を詰める
   ========================================================= */
html[lang|="en"] { --serif: 'Cormorant Garamond', 'Noto Serif JP', serif; }
html[lang|="en"] .site-header, html[lang|="en"] .site-footer { letter-spacing: .02em; }
html[lang|="en"] .site-nav { font-size: 1.6rem; font-weight: 500; }
html[lang|="en"] .sub { font-size: 1.6rem; }
html[lang|="en"] .site-footer__copy { font-weight: 500; letter-spacing: .03em; line-height: 1.3; }
html[lang|="en"] .f-main { font-size: 1.7rem; font-weight: 500; }
html[lang|="en"] .f-sub { font-size: 1.6rem; }
@media (max-width: 960px) {
  html[lang|="en"] .site-nav { font-size: 2rem; }
}
