/* ========================================
   グローバルレイアウト - スティッキーフッター
======================================== */

html {
  height: 100%;
  font-size: 100%; /* 16px固定（ブラウザデフォルト） */
}

/* iOS対応：固定背景を疑似要素で実現 */
html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/background-gradient.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: -1;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN',
    'Hiragino Sans', 'Yu Gothic UI', 'Yu Gothic', YuGothic, Meiryo, sans-serif;
  background: transparent;
  /* ウェブフォント読み込み中は非表示 */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

/* ウェブフォント読み込み完了後に表示 */
body.fonts-loaded {
  opacity: 1;
}

/* ヘッダーは自然な高さ */
#header {
  flex-shrink: 0;
}

/* メインコンテンツは残りのスペースを埋める */
main {
  flex: 1 0 auto;
}

/* フッターは自然な高さで最下部に配置 */
#footer {
  flex-shrink: 0;
}

/* ========================================
   グローバルリセット
======================================== */

/* ボタンやインプット要素にもbodyのフォントを継承 */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* ========================================
   ユーティリティ
======================================== */

.pc-only {
  display: inline;
}

.sp-only {
  display: none;
}

@media (max-width: 768px) {
  .pc-only {
    display: none;
  }

  .sp-only {
    display: inline;
  }
}

/* ========================================
   スクロールアニメーション
======================================== */

/* フェードイン＆上にスライド */
.fadeIn {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fadeIn.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   共通コンポーネント - ボタン
======================================== */

/* プライマリーボタン（黒背景） */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background-color: #000000;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-decoration: none;
  border-radius: 100px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #4A4A4A;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  transform: scaleX(1);
}

/* レスポンシブ: SP */
@media screen and (max-width: 768px) {
  .btn-primary {
    padding: 0.8203rem 1.75rem;
    font-size: 0.75rem;
    line-height: 1.2031rem;
  }
}
