@charset "utf-8";
/* =================================================
   Header Custom Properties
================================================= */
.site-header {
  /* Color */
  --hdr-accent:        #b81c22;
  --hdr-accent-hover:  #c4001e;
  --hdr-text:          #222;

  /* Island shared */
  --hdr-island-bg:     rgba(255, 255, 255, 0.72);
  --hdr-island-border: 1px solid rgba(255, 255, 255, 0.45);
  --hdr-island-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  --hdr-island-blur:   blur(14px) saturate(1.4);

  /* Radius */
  --hdr-radius-pill:   999px;

  /* Transition */
  --hdr-transition:    0.18s ease;
}


/* =================================================
   Base Reset
================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}


/* =================================================
   Header Wrapper
================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 102;
  padding: 20px 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
}


/* =================================================
   Island — 共通レイアウト
================================================= */
.header-island {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 1.5rem;
}


/* =================================================
   Logo Island
================================================= */
.logo-island {
  pointer-events: auto;
  flex-shrink: 0;
  background: var(--hdr-island-bg);
  backdrop-filter: var(--hdr-island-blur);
  -webkit-backdrop-filter: var(--hdr-island-blur);
  border-radius: var(--hdr-radius-pill);
  border: var(--hdr-island-border);
  box-shadow: var(--hdr-island-shadow);
  padding: clamp(8px,  calc(8px  + 14 * ((100vw - 740px) / 460)), 22px)
         clamp(16px, calc(16px + 41.6 * ((100vw - 740px) / 460)), 57.6px)
         clamp(6px,  calc(6px  + 5  * ((100vw - 740px) / 460)), 11px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-island a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* SVG ロゴ用プレースホルダー*/
.logo-placeholder {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hdr-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-placeholder svg {
  width: 32px;
  height: 32px;
}


/* =================================================
   Nav Island
================================================= */
.nav-island {
  pointer-events: auto;
  background: var(--hdr-island-bg);
  backdrop-filter: var(--hdr-island-blur);
  -webkit-backdrop-filter: var(--hdr-island-blur);
  border-radius: var(--hdr-radius-pill);
  border: var(--hdr-island-border);
  box-shadow: var(--hdr-island-shadow);
  padding: 8px 11px 9px;
  display: flex;
  align-items: center;
}

.main-nav {
  width: 100%;
}

.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
}

.main-nav a {
  display: block;
  padding: 16px;
  border-radius: var(--hdr-radius-pill);
  font-size: 15px;
  font-weight: 700;
  color: var(--hdr-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--hdr-transition), color var(--hdr-transition);
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-current {
  background: rgba(0, 0, 0, 0.07);
  outline: none;
}

.contact-btn {
  background: var(--hdr-accent) !important;
  color: #fff !important;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  background: var(--hdr-accent-hover) !important;
  color: #fff !important;
}


/* =================================================
   Right Controls（ハンバーガー + SNS）
================================================= */
.right-controls {
  pointer-events: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.8rem;
}


/* =================================================
   Hamburger Button
================================================= */
.hamburger {
  width: 72px;
  height: 72px;
  border-radius: 50% !important;
  border: none;
  background: var(--hdr-accent);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(230, 0, 35, 0.35);
  transition: background var(--hdr-transition), transform var(--hdr-transition);
}

.hamburger:hover {
  background: var(--hdr-accent-hover);
  transform: scale(1.02);
}

.hamburger:active {
  transform: scale(0.98);
}

.hamburger:focus-visible {
  outline: 3px solid var(--hdr-accent);
  outline-offset: 3px;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  will-change: transform;
  transition:
    transform 0.45s cubic-bezier(.25, .8, .25, 1),
    opacity 0.3s ease;
}

.hamburger span:nth-child(1) { transform: translate(-50%, -10px); }
.hamburger span:nth-child(2) { transform: translate(-50%, -50%); }
.hamburger span:nth-child(3) { transform: translate(-50%, 7px); }

/* Open state — ✕ 形 */
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(315deg) scale(1.06);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(405deg) scale(1.06);
  transition-delay: 0.06s;
}

/* メニューオープン時：ロゴ・ナビ・右SNSを隠す */
.menu-is-open .logo-island,
.menu-is-open .nav-island,
.menu-is-open .sns-links {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ハンバーガーはz-indexをオーバーレイより上に */
.hamburger {
  position: relative;
  z-index: 103;
}

.menu-is-open .hamburger {
  box-shadow: none;
}

/* =================================================
   SNS Links（Right Controls 内）
================================================= */
.sns-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sns-links a {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background var(--hdr-transition), transform var(--hdr-transition);
}

.sns-links a:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.04);
}

.sns-links a:focus-visible {
  outline: 3px solid var(--hdr-accent);
  outline-offset: 2px;
}

.sns-links svg {
  fill: var(--hdr-text);
}

/* =================================================
   Mega Menu（PC用 — 1025px以上）
================================================= */
.mega-menu {
  position: fixed;
  inset: 0;
  z-index: 101;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: none; /* JSで制御 */
}

.mega-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mega-menu-inner {
  padding: clamp(60px, 8vw, 120px) clamp(24px, 4vw, 60px) clamp(32px, 4vw, 60px);
  max-width: min(90vw, 1356px);
  margin: 0 auto;
  text-align: left;
}

/* トップページリンク */
.mega-top-link {
  display: block;
  width: fit-content;
  color: #fff;
  font-size: clamp(1.4rem, 1.8vw, 2.0rem);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: clamp(28px, 3vw, 48px);
  transition: color 0.18s ease;
}

.mega-top-link:hover { color: #fff; }

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 1.2vw, 40px) clamp(8px, 1.2vw, 32px); /* row gap / column gap */
}

.mega-col h3 {
  font-size: clamp(1.2rem, 1.5vw, 2.0rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #666;
}

.mega-col h3 a {
  color: #fff;
}

.mega-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-col ul li a {
  display: block;
  padding: 6px 0;
  color: #fff;
  font-size: clamp(0.85rem, 1.1vw, 1.5rem);
  text-decoration: none;
  transition: color 0.18s ease;
}

.mega-col ul li a:hover { 
  color: #fff;
  text-decoration: underline;
}

/* SNSアイコン（PC版メガメニュー内） */
.mega-sns {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  justify-content: center;
}

.mega-sns a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}
.mega-sns a:hover {
  background: rgba(255,255,255,0.95);
  transform: scale(1.04);
}
.mega-sns svg { fill: rgba(255,255,255,0.85); }

/* =================================================
   Responsive 出し分け — 740px 境界
================================================= */
@media (min-width: 740px) {
  .mega-menu   { display: block; }
  .mobile-menu { display: none !important; }
}

@media (max-width: 740px) {
  .mega-menu  { display: none !important; }
  .nav-island { display: none; }
}

/* =================================================
   Mobile Menu — SP版（〜1024px）
================================================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 10, 10, 0.93);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  padding: 100px 2.5rem 80px;
  width: 100%;
  text-align: left;
}

/* トップページリンク */
.mobile-top-link {
  display: block;
  padding: 16px 0;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid #666;
  transition: color 0.18s ease;
}
.mobile-top-link:hover { color: #fff; }

/* リスト */
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid #666;
  /* アニメーション用 初期値（メニューを開いたとき） */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.is-open .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.mobile-menu.is-open .mobile-nav-item:nth-child(1)  { transition-delay: 0.04s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(2)  { transition-delay: 0.08s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(3)  { transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(4)  { transition-delay: 0.16s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(5)  { transition-delay: 0.20s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(6)  { transition-delay: 0.24s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(7)  { transition-delay: 0.28s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(8)  { transition-delay: 0.32s; }
.mobile-menu.is-open .mobile-nav-item:nth-child(9)  { transition-delay: 0.36s; }

/* アコーディオントグルボタン */
.mobile-nav-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border: none;
  background: none;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}
.mobile-nav-toggle:hover {
  background: rgba(255,255,255,0.05);
}

/* 子なし — 通常リンク */
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: background 0.18s ease;
}
.mobile-nav-link:hover {
  background: rgba(255,255,255,0.05);
}

/* お問い合わせボタン */
.mobile-nav-link.contact-btn {
  background: #b81c23;
  justify-content: center;
  margin: 24px 32px 0;
  border-radius: 999px;
  padding: 16px 32px;
}
.mobile-nav-link.contact-btn:hover {
  background: #c4001e;
}

/* シェブロンアイコン */
.toggle-icon {
  width: 28px;
  height: 28px;
  margin-right: 1.6rem;
  color: rgba(255,255,255,0.9);
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
  transform: rotate(90deg);
  transition: transform 0.25s ease, stroke 0.18s ease;
}
.mobile-nav-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(-90deg);
  stroke: #fff;
}

/* サブメニュー */
.mobile-nav-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-sub.is-open {
  max-height: 600px; /* 十分な高さ */
}

.mobile-nav-sub li a {
  display: block;
  padding: 12px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.mobile-nav-sub li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

/* トップページリンク（サブメニュー1行目） */
.mobile-nav-sub .sub-top-link a {
  color: #fff;
  font-size: 1.5rem;
}

/* SNS（SP版メニュー内） */
.mobile-menu-sns {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  opacity: 0;
  transition: opacity 0.3s ease 0.4s;
}
.mobile-menu.is-open .mobile-menu-sns {
  opacity: 1;
}
.mobile-menu-sns a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.18s ease;
}
.mobile-menu-sns a:hover {
  background: rgba(255,255,255,0.95);
  transform: scale(1.04);
}
.mobile-menu-sns svg { fill: rgba(255,255,255,0.85); }

/* =================================================
   Header — 1200px〜740px で全体を滑らかに縮小
================================================= */

/* site-header の gap */
.site-header {
  gap: clamp(8px, calc(8px + (16 - 8) * ((100vw - 740px) / (1200 - 740))), 16px);
  padding-top: clamp(12px, calc(12px + (20 - 12) * ((100vw - 740px) / (1200 - 740))), 20px);
}

.header-island {
  gap: clamp(0.5rem, calc(0.5rem + (1.5 - 0.5) * ((100vw - 740px) / (1200 - 740))), 1.5rem);
}

.logo-island img {
  width: clamp(120px, calc(120px + 59 * ((100vw - 740px) / 460)), 179px);
  height: auto;
}

.logo-placeholder {
  font-size: clamp(0.9rem, calc(0.9rem + (1.2 - 0.9) * ((100vw - 740px) / (1200 - 740))), 1.2rem);
  height: clamp(26px, calc(26px + (36 - 26) * ((100vw - 740px) / (1200 - 740))), 36px);
}

.logo-placeholder svg {
  width:  clamp(22px, calc(22px + (32 - 22) * ((100vw - 740px) / (1200 - 740))), 32px);
  height: clamp(22px, calc(22px + (32 - 22) * ((100vw - 740px) / (1200 - 740))), 32px);
}

/* ナビ island */
.nav-island {
  padding: clamp(4px, calc(4px + (8 - 4) * ((100vw - 740px) / (1200 - 740))), 8px)
           clamp(6px, calc(6px + (11 - 6) * ((100vw - 740px) / (1200 - 740))), 11px)
           clamp(5px, calc(5px + (9 - 5) * ((100vw - 740px) / (1200 - 740))), 9px);
}

.main-nav a {
  font-size: clamp(11px, calc(11px + (15 - 11) * ((100vw - 740px) / (1200 - 740))), 15px);
  padding:   clamp(8px,  calc(8px  + (16 - 8)  * ((100vw - 740px) / (1200 - 740))), 16px);
}

.hamburger {
  width:  clamp(48px, calc(48px + (72 - 48) * ((100vw - 740px) / (1200 - 740))), 72px);
  height: clamp(48px, calc(48px + (72 - 48) * ((100vw - 740px) / (1200 - 740))), 72px);
}

.hamburger span {
  width:  clamp(20px, calc(20px + (30 - 20) * ((100vw - 740px) / (1200 - 740))), 30px);
}

.right-controls {
  align-self: auto;
}

.hamburger {
  width:  clamp(48px, calc(48px + (72 - 48) * ((100vw - 740px) / 460)), 72px);
  height: clamp(48px, calc(48px + (72 - 48) * ((100vw - 740px) / 460)), 72px);
  aspect-ratio: 1 / 1;
}

/* SNS アイコン */
.sns-links a {
  width:  clamp(40px, calc(40px + (60 - 40) * ((100vw - 740px) / (1200 - 740))), 60px);
  height: clamp(40px, calc(40px + (60 - 40) * ((100vw - 740px) / (1200 - 740))), 60px);
}


/* =================================================
   740px以下 — ロゴ・ハンバーガーを通常サイズに戻す
================================================= */
@media (max-width: 740px) {
  .site-header {
    padding: 20px 24px 0;
    gap: 16px;
  }

  .header-island {
    gap: 1.5rem;
  }

  .logo-island {
    padding: 22px 2.25rem 11px;
    height: auto;
  }

  .logo-placeholder {
    font-size: 1.2rem;
    height: 36px;
  }

  .logo-placeholder svg {
    width: 32px;
    height: 32px;
  }

  .hamburger {
    width: 72px;
    height: 72px;
    aspect-ratio: auto;
  }

  .hamburger span {
    width: 30px;
  }

  .logo-island img {
    width: 179px;
  }

  .right-controls .sns-links {
    display: none;
  }
}

.side-link {
  position: fixed;
  top: 450px;
  right: 0;
  width: 49px;
  z-index: 98;
  transform: translateX(0);
  -webkit-transform: translateX(0);
}

.side-link a {
  display: block;
  position: relative;
  padding: 34px 10px 18px;
  background-color: #b81c22;
  font-size: 15px;
  color: #fff;
  -ms-writing-mode: tb-rl;
  writing-mode: vertical-rl;
  text-indent: 0;
  -webkit-text-size-adjust: none;
}

.side-link a:hover {
  text-decoration: none;
  background-color: #be0000;
  transition: background .3s ease-in-out;
}

.side-link a::after {
  position: absolute;
  top: 17px;
  left: 50%;
  width: 17px;
  height: 12px;
  margin-left: -8px;
  content: "";
  background: url(/common/img/header/icn-sidelink-book.png) no-repeat;
  background-size: 100%;
  transition: top 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.35s ease,
              visibility 0.35s ease;
}

/* =================================================
   Mobile Menu — 二重スクロール対策
================================================= */

html {
  scrollbar-gutter: stable;
}

body.menu-is-open {
  overflow: hidden;
  /* iOS Safari 対策 — position:fixed で慣性スクロールも止める */
  position: fixed;
  width: 100%;
}

.mobile-menu {
  /* iOS Safari の慣性スクロールを有効化 */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* 親へのスクロール伝播を防ぐ */
}

