/* layout.css: ヘッダー・フッター・ドロワーメニュー・コンタクト共通 */

/* ===========================
   ロゴアニメーション
   =========================== */
.logo-appear {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(.4,0,.2,1);
}
.logo-hide  { opacity: 0 !important; }
.logo-slide { transform: translateX(36px); }

.brandMark {
  transition: opacity 0.5s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

/* ===========================
   ベース
   =========================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--ink); }

html { scroll-behavior: smooth; }

.container {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-inline: auto;
}

/* ===========================
   ヘッダー
   =========================== */
.siteHeader {
  background: var(--paper);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: none;
  border: none;
  border-radius: 0;
}
.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;
  box-shadow: none;
  min-height: var(--header-h);
}
.headerLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.headerRight {
  display: flex;
  border-radius: 0;
  box-shadow: none;
  justify-content: flex-end;
  gap: 10px;
}

/* ロゴ */
.brandMark {
  width: 110px;
  height: 110px;
  text-align: center;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  border-radius: 0;
}
.brandImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (min-width: 840px) {
  .brandMark { width: 140px; height: 140px; }
}

/* ヘッダーナビ（PC用ピル・SP用SNS） */
.headerPills {
  display: flex;
  align-items: center;
  border-radius: 0;
}
.pillLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}
.pillLink--wide { width: 170px; }

.headerNav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.iconBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  border: none;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.iconBtn:hover {
  background-color: var(--coral);
  color: white;
  transform: scale(1.05);
}
.iconBtn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.iconText { font-size: 11px; opacity: .8; }

/* PC: ピルのみ / SP: SNSのみ */
.headerNav--sp  { display: none; }
.headerPills--pc { display: flex; }

/* 現状は両方非表示（ドロワーに統一） */
.headerPills--pc, .headerNav--sp { display: none !important; }

/* ===========================
   ハンバーガーボタン
   =========================== */
.menuBtn {
  position: fixed;
  /* ヘッダー内でほぼ全面を使って配置 */
  top: 8px;
  right: 18px;
  z-index: 1200;
  width: 64px;
  height: calc(var(--header-h) - 16px);
  --menu-bar-w: 48px;
  --menu-bar-h: 3px;
  --menu-bar-gap: 12px;
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.menuBtn .bar {
  display: block;
  width: var(--menu-bar-w);
  height: var(--menu-bar-h);
  background: var(--ink);
  margin: 0;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  right: auto;
  transition: top 320ms cubic-bezier(.4,0,.2,1), transform 320ms cubic-bezier(.4,0,.2,1), opacity 240ms ease, background-color 240ms ease;
  transform-origin: center;
  transform: translateX(-50%);
}
.menuBtn .bar:nth-child(1) { top: calc(50% - var(--menu-bar-gap)); }
.menuBtn .bar:nth-child(2) { top: 50%; }
.menuBtn .bar:nth-child(3) { top: calc(50% + var(--menu-bar-gap)); }

.menuBtn.open .bar { background: var(--coral); }
.menuBtn.open .bar:nth-child(1) { top: 50%; transform: translateX(-50%) rotate(45deg); }
.menuBtn.open .bar:nth-child(2) { opacity: 0; }
.menuBtn.open .bar:nth-child(3) { top: 50%; transform: translateX(-50%) rotate(-45deg); }

/* ===========================
   ドロワーメニュー
   =========================== */
.menuDrawer {
  position: fixed;
  top: 0; right: 0;
  width: min(92vw, 370px);
  height: 100vh;
  background: var(--paper);
  box-shadow: none;
  border-radius: 0;
  overflow-y: auto;
  transform: translateX(110%);
  visibility: hidden;
  transition: transform 320ms cubic-bezier(.4,0,.2,1), visibility 0s linear 320ms;
  z-index: 1100;
  padding: 18px 0 12px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.siteHeader.menu-open .menuDrawer {
  transform: translateX(0);
  visibility: visible;
  transition: transform 320ms cubic-bezier(.4,0,.2,1);
}
.menuLinks { list-style: none; margin: 0; padding: 0; }
.menuLinks li { margin: 18px 0; text-align: left; padding-left: 32px; font-weight: 600; }
.menuLinks a {
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  letter-spacing: 0.02em;
  display: block;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.menuLinks a:hover { color: var(--coral); }
.menuSocials { display: flex; justify-content: center; gap: 18px; margin-top: auto; padding-bottom: 18px; }

/* 4ページ共通のドロワーレイアウト */
#index .menuDrawer,
#about .menuDrawer,
#jobs .menuDrawer,
#users .menuDrawer {
  width: fit-content;
  max-width: calc(100vw - 12px);
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 18px 24px 18px 24px;
}
#index .menuLinks,
#about .menuLinks,
#jobs .menuLinks,
#users .menuLinks {
  /* 右上の三本線ボタンとTOPリンクの被りを避ける */
  margin-top: 92px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}
#index .menuLinks li,
#about .menuLinks li,
#jobs .menuLinks li,
#users .menuLinks li {
  text-align: right;
  padding-left: 0;
  width: 100%;
}
#index .menuLinks a,
#about .menuLinks a,
#jobs .menuLinks a,
#users .menuLinks a {
  display: block;
  width: 100%;
  text-align: right;
  padding: 10px 0;
}
#index .menuSocials,
#about .menuSocials,
#jobs .menuSocials,
#users .menuSocials {
  justify-content: center;
  margin-top: 17px;
  padding-bottom: 0;
}

/* ===========================
   コンタクトセクション（共通）
   =========================== */
.contactSection {
  background: #fff;
  padding: 34px 0 46px;
}
.contactBox {
  border: 2px solid #333;
  border-radius: 26px;
  background: #fff;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 26px 18px;
}
.contactTitle {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: .02em;
}
.contactSub {
  margin: 0;
  color: rgba(0,0,0,.55);
  font-size: 12px;
  line-height: 1.7;
}
.contactBtns {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.btn--contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.btn--contact img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.contactBack { text-align: center; margin-top: 16px; }
.contactBackLink {
  color: #777;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.18);
  padding-bottom: 2px;
  font-size: 12px;
}

/* ===========================
   フッター
   =========================== */
.siteFooter { background: var(--page-bg, #FDF6EC); }
.footerInner { padding-bottom: 26px; text-align: center; }
.footerLogo {
  width: 110px;
    height: 110px;
    border-radius: 0;
    background: transparent;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
    overflow: hidden;
}

.footerLogo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 840px) {
  .footerLogo {
    width: 140px;
    height: 140px;
  }
}
.footerNote { color: rgba(0,0,0,.55); font-size: 12px; }
.copyright { display: block; margin-top: 6px; color: rgba(0,0,0,.55); font-size: 11px; }

/* ===========================
   アニメーション（共通キーフレーム）
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 各ページのセクションはデフォルト表示（アニメはJSで制御） */
#index .hero, #index .instagram, #index .faq, #index .contact,
#about .a-hero, #about .a-section,
#jobs .j-hero, #jobs .j-section,
#users .u-hero, #users .u-section {
  opacity: 1;
}

/* リンク・ボタンのトランジション */
a { transition: color 0.2s ease; }
.navCard a, .menuLinks a { transition: color 0.2s ease, text-decoration 0.2s ease; }

/* ===========================
   SP 調整
   =========================== */
@media (max-width: 820px) {
  .headerPills--pc { display: none; }
  .headerNav--sp   { display: flex; }
  .siteHeader { min-height: 56px; }
  .menuBtn {
    /* SPでもヘッダー高の中央に厳密配置 */
    top: calc((var(--header-h) - 72px) / 2);
    right: 12px;
    width: 52px;
    height: 72px;
    --menu-bar-w: 38px;
    --menu-bar-h: 3px;
    --menu-bar-gap: 11px;
  }
  .menuDrawer { padding: 10px 0 6px 0; }

  #index .menuDrawer,
  #about .menuDrawer,
  #jobs .menuDrawer,
  #users .menuDrawer { padding: 10px 14px 8px 14px; }

  #index .menuLinks,
  #about .menuLinks,
  #jobs .menuLinks,
  #users .menuLinks { margin-top: 68px; }

  #index .menuSocials,
  #about .menuSocials,
  #jobs .menuSocials,
  #users .menuSocials { margin-top: 15px; }

  .contactBox { max-width: 520px; border-radius: 22px; padding: 28px 16px; }
  .contactTitle { font-size: 16px; font-weight: 600; }
  .contactSub { font-size: 12px; line-height: 1.6; }
  .contactBtns { gap: 16px; }
}
