/* ========== 株式会社キハラ サイト共通CSS ========== */

:root {
  --kihara-green: #2e4f2b;
  --kihara-green-light: #3d6b39;
  --kihara-amber: #c2841d;
  --kihara-cream: #f5f0e3;
}

/* 日本語フォント */
.font-jp {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  font-feature-settings: "palt";
}

/* 明朝体（見出し用） */
.font-serif,
h1, h2, h3,
.font-serif * {
  font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* リンクのフォーカス可視化（アクセシビリティ） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--kihara-amber);
  outline-offset: 2px;
}

/* details/summary カスタマイズ */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary i.fa-chevron-down {
  transform: rotate(180deg);
}

/* ボタンのタップターゲット最低44pxを保証 */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
  }

  /* モバイル底部の固定バーがある分、余白を取る */
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 画像が空の場合のフォールバック */
img[src=""],
img:not([src]) {
  visibility: hidden;
}

/* セクション内アンカーリンクオフセット */
section[id] {
  scroll-margin-top: 80px;
}

/* スクロール時アニメーション（軽量） */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* アクセシビリティ：高コントラストモード対応 */
@media (prefers-contrast: more) {
  body {
    color: #000;
    background: #fff;
  }
}

/* 印刷時：装飾を消す */
@media print {
  header, footer,
  .fixed,
  [class*="bg-gradient"] {
    background: white !important;
    color: black !important;
  }
}

/* テーブルのモバイル横スクロールヒント */
.overflow-x-auto::-webkit-scrollbar {
  height: 6px;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
  background: var(--kihara-green);
  border-radius: 3px;
}

/* セレクション色 */
::selection {
  background: var(--kihara-green);
  color: white;
}
