/* 全ページ共通ヘッダー／フッター（ハブ見た目を正とする） */

:root {
  --noukigu-chrome-ink: #1a1f24;
  --noukigu-chrome-ink-strong: #0f1317;
  --noukigu-chrome-muted: #5c6670;
  --noukigu-chrome-line: #dde3df;
  --noukigu-chrome-accent: #1f7a4c;
  --noukigu-chrome-accent-deep: #16633c;
  --noukigu-chrome-wrap: 1080px;
  --noukigu-chrome-font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--noukigu-chrome-line);
  backdrop-filter: blur(8px);
  font-family: var(--noukigu-chrome-font);
}

.site-header__inner {
  position: relative;
  max-width: var(--noukigu-chrome-wrap);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.site-header .brand__mark {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.site-header .brand__name {
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--noukigu-chrome-ink-strong);
  line-height: 1.25;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.site-header__nav a:not(.site-header__cta) {
  color: var(--noukigu-chrome-muted);
  text-decoration: none;
}

.site-header__nav a:not(.site-header__cta):hover {
  color: var(--noukigu-chrome-accent);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  background: var(--noukigu-chrome-accent);
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none;
}

.site-header__cta:hover {
  background: var(--noukigu-chrome-accent-deep);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle__box {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
  margin: 0 auto;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--noukigu-chrome-ink-strong);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, top 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle__bar:nth-child(1) { top: 0; }
.nav-toggle__bar:nth-child(2) { top: 7px; }
.nav-toggle__bar:nth-child(3) { top: 14px; }

.site-header.is-open .nav-toggle__bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle__bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.site-footer {
  border-top: 1px solid var(--noukigu-chrome-line);
  background: #fff;
  padding: 1.75rem 1.25rem 2.25rem;
  color: var(--noukigu-chrome-muted);
  font-family: var(--noukigu-chrome-font);
}

.site-footer__inner {
  max-width: var(--noukigu-chrome-wrap);
  margin: 0 auto;
  display: grid;
  gap: 0.45rem;
}

.site-footer__brand {
  margin: 0;
  font-weight: 900;
  color: var(--noukigu-chrome-ink-strong);
}

.site-footer__note {
  margin: 0;
  font-size: 0.8rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.8rem;
}

.site-footer__links a {
  color: var(--noukigu-chrome-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * 記事など SWELL シェル利用時: 見た目のヘッダーだけ差し替え。
 * body_class は #body_wrap に付く（SWELL仕様）。
 * SWELL は #header 等のIDセレクタが多いので、それ以上の詳細度で隠す。
 * フッター・#body_wrap・#content・本文は触らない。
 */
#body_wrap.noukigu-swell-shell > #header.l-header,
#body_wrap.noukigu-swell-shell > #header,
#body_wrap.noukigu-swell-shell .l-header,
#body_wrap.noukigu-swell-shell #header,
#body_wrap.noukigu-swell-shell #fix_header,
#body_wrap.noukigu-swell-shell .l-fixHeader,
#body_wrap.noukigu-swell-shell #sp_menu,
#body_wrap.noukigu-swell-shell .p-spMenu,
#body_wrap.noukigu-swell-shell .l-header__bar,
#body_wrap.noukigu-swell-shell .w-header {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* 注入ヘッダーは #body_wrap の外。常に前面へ */
body > .site-header {
  position: sticky;
  top: 0;
  z-index: 100050;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 1.25rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid var(--noukigu-chrome-line);
    box-shadow: 0 16px 28px rgba(20, 40, 28, 0.12);
  }

  .site-header.is-open .site-header__nav {
    display: flex;
  }

  .site-header__nav a:not(.site-header__cta) {
    display: block;
    padding: 0.9rem 0.15rem;
    border-bottom: 1px solid var(--noukigu-chrome-line);
    color: var(--noukigu-chrome-ink-strong);
    font-size: 0.98rem;
  }

  .site-header__nav a.site-header__cta {
    margin-top: 0.85rem;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 8px;
  }
}
