/* ====== Header (transparent, fixed, full width) ====== */
.site-header {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  width: 100%;
  z-index: 3000;
  background: transparent;
  pointer-events: none;
}
.is-drawer-open .site-header {
  z-index: 5001;
}

.site-header__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  padding: 12px clamp(16px, 4vw, 32px);
  gap: 16px;
}

/* ← 事前共有の通り 80px */
.site-logo img {
  display: block;
  height: 80px;
  width: auto;
}

/* ====== Hamburger (scalloped badge 80px) ====== */
.site-hamburger {
  --badge-size: 80px;
  position: relative;
  width: var(--badge-size);
  height: var(--badge-size);
  border: 0;
  cursor: pointer;
  background: none;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
  z-index: 5002;
}

/* ▼ ギザギザの塗り（SVGをマスクとして使用） */
.site-hamburger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  /* ここで“ふわふわ”の形状を確実に出す */
  -webkit-mask-image: url("../img/scallop.svg");
  mask-image: url("../img/scallop.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: transform 0.25s ease, background 0.25s ease;
}
.site-hamburger:hover::before {
  transform: scale(1.04);
}

/* 中のバー（2本） */
.site-hamburger__bar {
  position: absolute;
  left: 30%;
  right: 30%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.site-hamburger__bar:nth-child(1) {
  top: calc(var(--badge-size) * 0.42);
}
.site-hamburger__bar:nth-child(2) {
  top: calc(var(--badge-size) * 0.58);
}

/* X 変形（2本だけで作るので“＊”にならない） */
.site-hamburger[aria-expanded="true"] .site-hamburger__bar:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.site-hamburger[aria-expanded="true"] .site-hamburger__bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* 暗い背景用（必要なら） */
.header-invert .site-hamburger::before {
  background: #fff;
}
.header-invert .site-hamburger__bar {
  background: #000;
}

/* ====== Drawer ====== */
.drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4000;
}
.drawer--open {
  pointer-events: auto;
}
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 4000;
}
.drawer--open .drawer__backdrop {
  opacity: 1;
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92%);
  max-width: 480px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 4001;
}
.drawer--open .drawer__panel {
  transform: translateX(0);
}
.drawer__links {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  font-size: clamp(16px, 1.6vw, 18px);
  letter-spacing: 0.08em;
}
.drawer__links a {
  color: #111;
  text-decoration: none;
}
.drawer__links a:hover {
  text-decoration: underline;
}
/* 外部リンクアイコン（target_black.svg 用） */
.drawer__links .icon-ext {
  display: inline-block;
  margin-left: 6px;
  width: 14px;
  height: 14px;
  vertical-align: baseline;
  transition: transform 0.2s ease;
}
.drawer__links a:hover .icon-ext {
  transform: translateY(-1px);
}

.drawer__action {
  margin-top: auto;
}
.drawer__btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #e66;
  color: #fff;
  text-decoration: none;
}

/* SP 微調整 */
@media (max-width: 768px) {
  .site-header__inner {
    padding: 8px 16px;
  }
  .site-logo img {
    height: 32px;
  }
  .site-hamburger {
    --badge-size: 50px;
  }
  .drawer__panel {
    width: min(420px, 79%);
  }
}

/* ===== Drawer: list spacing & external mark ===== */
.drawer__links {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 16px; /* カテゴリ間の感覚 */
  font-size: clamp(16px, 1.6vw, 18px);
  letter-spacing: 0.08em;
}
.drawer__links a {
  color: #111;
  text-decoration: none;
}
.drawer__links a:hover {
  text-decoration: underline;
}
.drawer__links .ext {
  font-size: 0.9em;
  margin-left: 4px;
}

/* ===== CONTACT を同じ並びでバッジ化 ===== */
.drawer__links li.contact {
  /* 余白はリストのgapに従う。ここでは特別なマージンは付けない */
}
.drawer__links .contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 15px 40px;
  border-radius: 999px;
  background: #eb5628; /* 指定色 */
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.drawer__links .contact-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.drawer__links .contact-btn:active {
  transform: translateY(0);
}

/* メールアイコン（SVGを使わない場合のCSSマスク版） */
.icon-mail {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: #fff;
  /* アセットを置く場合は下の2行を有効化してパスを調整 */
  -webkit-mask: url("../img/icons/mail.svg") center / contain no-repeat;
  mask: url("../img/icons/mail.svg") center / contain no-repeat;
}

/* ===== Drawer footer (SNS area) ===== */
.drawer__footer {
  margin-top: auto; /* 下部へ追いやる */
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
}
.drawer__footer .sns {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.15s ease;
}
.drawer__footer .sns:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.drawer__footer .sns img {
  display: block;
  width: 22px;
  height: 22px;
}
