/* =========================================================
   base.css
   リセット・共通スタイル（全ページ共通）
   ========================================================= */

/* --- リセット --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* 固定ヘッダー分だけアンカー位置をずらす */
  scroll-padding-top: var(--header-h);
  /* オフキャンバスナビのはみ出しを切る（body 側と対で機能）。
     hidden ではなく clip：hidden だと overflow-y が auto に計算され
     html 自身がスクロールコンテナになり、ヘッダーの sticky が効かなくなる */
  overflow-x: clip;
}

body {
  /* オフキャンバスメニュー（画面外に隠すナビ）による横スクロールを防ぐ。
     body だけに指定するとビューポートの overflow は html から伝播するため
     効かない。html 側にも指定して確実に切る（上の html ルールと対で機能）。 */
  overflow-x: clip;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-base);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
}

/* --- 共通レイアウトユーティリティ --- */

/* コンテンツ幅を中央に制限 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* 汎用セクション余白 */
.section {
  padding-block: var(--section-py);
}

/* 画像プレースホルダー（画像確定まで） */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #D9D9D9;
  color: #8A8A8A;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  min-height: 200px;
  text-align: center;
}

/* --- 共通セクション見出し（英語ラベル＋日本語見出し） --- */
.section-head {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-head__sub {
  text-align: center;
  margin-bottom: var(--space-md2);
}
.section-head__label {
  display: inline-block;
  font-family: var(--font-en);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  color: var(--color-teal);
  margin-bottom: var(--space-xs);
}
.section-head__label::before {
  content: "• ";
}
.section-head__title {
  font-size: var(--fs-2xl);
  color: var(--color-navy);
}
.section-head__title__sub {
  font-size: var(--fs-2xl);
  color: var(--color-base);
}
.section-head__title__service {
  font-size: var(--fs-1xl);
  color: var(--color-navy);
}
/* 見出し頭のドット（旧ラベルのアクセントを見出しに引き継ぐ） */
.section-head__title::before {
  content: "• ";
  color: var(--navy-teal);
}
.section-head__title__sub::before {
  content: "• ";
  color: var(--navy-base);
}

/* --- 共通ボタン --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.9em 2.2em;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  /* body の --lh-base を継承すると行ボックスに leading が乗り、
     グリフが上寄りに見える。padding を直接効かせる。 */
  line-height: 1;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 42, 68, 0.18);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}
.btn--primary {
  background-color: var(--color-teal-soft);
  color: var(--color-text-invert);
}
/* ホバーで teal を一段濃くする（薄くするのではなく、押せる感じを強める） */
.btn--primary:hover {
  background-color: var(--color-teal);
}
.btn--ghost {
  background-color: var(--color-white);
  color: var(--color-teal-soft);
}

/* --- アクセシビリティ：視覚的に隠すが読み上げには残す --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== ブレークポイント別の共通調整 ===== */

/* タブレット以上（768px〜） */
@media (min-width: 768px) {
  :root {
    --container-pad: 2rem;
  }
}

/* PC（1024px〜） */
@media (min-width: 1024px) {
  .section-head__title {
    font-size: var(--fs-3xl);
  }
}
