// ===========================================
// Button ボタン・リンク（文字中心テイスト）
// ===========================================

/* 主要ボタン（黒背景・白文字、矢印付き）
/* ホバー: 右側の水平ラインが枠外へ半分はみ出る
--------------------------------- */
.com-btn-01 {
  --btn-pad-x: 28px;
  --btn-line-w: 32px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 280px;
  max-width: 100%;
  padding: 22px var(--btn-pad-x);
  background: map-get($colors, black);
  color: map-get($colors, text-invert);
  font-family: $font-family-base;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  border: 1px solid map-get($colors, black);
  box-sizing: border-box;
  overflow: visible;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  // 右側の水平ライン
  &::after {
    content: '';
    width: var(--btn-line-w);
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  &:hover {
    opacity: 1;
    &::after {
      // 1.5倍に伸ばしつつ右 padding を超えて半分枠外へ
      transform: translateX(var(--btn-pad-x)) scaleX(1.5);
    }
  }

  // 反転（黒背景セクション内・白枠）
  &.invert {
    background: transparent;
    color: map-get($colors, text-invert);
    border-color: map-get($colors, text-invert);
    &:hover {
      background: transparent;
      color: map-get($colors, text-invert);
    }
  }

  // ゴーストボタン（線のみ、白背景セクション向け）
  &.ghost {
    background: transparent;
    color: map-get($colors, text);
    border-color: map-get($colors, text);
    &:hover {
      background: transparent;
      color: map-get($colors, text);
    }
  }

  // 大型ボタン
  &.large {
    --btn-pad-x: 36px;
    min-width: 360px;
    padding-block: 28px;
    font-size: 16px;
  }

  // フル幅
  &.full {
    width: 100%;
    min-width: 0;
  }
}

/* フォーム送信ボタン
--------------------------------- */
.com-btn-02 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 320px;
  padding: 22px 32px;
  background: map-get($colors, black);
  color: map-get($colors, text-invert);
  border: 1px solid map-get($colors, black);
  font-family: $font-family-base;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  &:hover {
    background: transparent;
    color: map-get($colors, black);
    opacity: 1;
  }
}

/* テキストリンク
--------------------------------- */
.com-link-01 {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  font-family: $font-family-base;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
  &::after {
    content: '→';
    font-family: $font-family-sofia;
    font-size: 14px;
    transition: transform 0.3s ease;
  }
  &:hover {
    opacity: 1;
    gap: 20px;
    &::after {
      transform: translateX(4px);
    }
  }
}

/* シンプルテキストリンク（下線のみ）
--------------------------------- */
.com-link-02 {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  &:hover {
    opacity: 0.7;
  }
}
