/* ==========================================================================
   layout.css
   ヘッダー、左右の固定帯、コンテンツ幅、フッター
   ブレークポイント：768px 以下をスマホ表示とする
   ========================================================================== */

/* コンテンツ幅 ------------------------------------------------------------ */

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.site-main {
  padding-top: 140px;
}

/* ロゴ（左上・固定） ----------------------------------------------------- */

.site-logo {
  position: fixed;
  top: 28px;
  left: 10px;
  z-index: 60;
  width: 90px;
}

/* ヘッダー ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* スクロール後は背景を付けて、ナビの文字を読みやすくする（再構築での改善） */
.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.global-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  padding-right: 176px;
}

.global-nav__list {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.global-nav__link {
  display: block;
  padding: 8px 0 6px;
  color: var(--color-nav);
  transition: opacity 0.3s var(--ease);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 56px; /* メニュー間隔（20px）の約2.8倍。note までと言語切り替えを分けて見せる */
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1;
}

.lang-switch__current {
  color: var(--color-text);
}

.lang-switch__sep {
  width: 1px;
  height: 14px;
  background: var(--color-line);
}

.lang-switch__link {
  padding: 8px 0 6px;
  color: var(--color-link);
  transition: opacity 0.3s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .global-nav__link:hover,
  .lang-switch__link:hover {
    opacity: 0.6;
  }
}

@media (max-width: 1100px) {
  .global-nav {
    padding-right: 110px;
  }

  .global-nav__list {
    gap: 14px;
    font-size: 15px;
  }

  .lang-switch {
    margin-left: 40px;
  }
}

/* スマホ用ヘッダーのボタン（言語切り替え・メニュー） ------------------------- */

.sp-actions {
  display: none;
}

.icon-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  color: var(--color-link);
}

.icon-button svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* 3本線のメニューアイコン */
.menu-icon {
  position: relative;
  display: block;
  width: 32px;
  height: 22px;
}

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 9.5px; }
.menu-icon span:nth-child(3) { bottom: 0; }

/* 左端の縦書きキャッチコピー（固定） --------------------------------------- */

.side-catch {
  position: fixed;
  top: 50%;
  left: 44px;
  z-index: 40;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-script);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* 右端の note バナー（固定） ----------------------------------------------- */

.note-pill {
  position: fixed;
  top: 50%;
  right: 36px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 38px;
  padding: 14px 0 16px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  color: var(--color-text-note);
  transform: translateY(-50%);
  transition: box-shadow 0.3s var(--ease);
}

.note-pill__icon {
  width: 16px;
  height: 16px;
  fill: var(--color-icon);
}

.note-pill__text {
  writing-mode: vertical-rl;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
}

@media (hover: hover) and (pointer: fine) {
  .note-pill:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  }
}

/* フッター ---------------------------------------------------------------- */

.site-footer {
  padding: 28px 0 32px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-align: center;
}

/* スマホ表示 -------------------------------------------------------------- */

@media (max-width: 768px) {
  .site-main {
    padding-top: 90px;
  }

  .site-logo {
    top: 7px;
    left: 10px;
    width: 50px;
  }

  /* スマホではヘッダーを固定し、常にメニューを開けるようにする（再構築での変更） */
  .site-header {
    background-color: rgba(255, 255, 255, 0.92);
  }

  .global-nav {
    display: none;
  }

  .sp-actions {
    position: absolute;
    top: 0;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
  }

  /* スマホでは左右の固定要素を小さくし、画面端から少し離す */
  .side-catch {
    left: 5px;
    font-size: 12px;
  }

  .note-pill {
    right: 4px;
    gap: 6px;
    width: 24px;
    padding: 10px 0 12px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  }

  .note-pill__icon {
    width: 12px;
    height: 12px;
  }

  .note-pill__text {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
}
