/* ============================================
   CSSリセット（Modern CSS Reset ベース）
   株式会社PHOSS コーポレートサイト
   ============================================ */

/* ボックスサイズ統一 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ブラウザデフォルトマージン・パディングリセット */
* {
  margin: 0;
  padding: 0;
}

/* html・bodyの基本設定 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* スクロールバーの幅によるレイアウトシフト防止 */
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--text-primary);
  background-color: var(--bg-base);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* リストのスタイルリセット（ナビゲーション等での使用前提） */
ul,
ol {
  list-style: none;
}

/* 見出しのフォントウェイトをデフォルトに */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

/* リンクのデフォルトスタイルリセット */
a {
  color: inherit;
  text-decoration: none;
}

/* 画像・メディアの最大幅設定 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* フォーム要素のフォント継承 */
input,
button,
textarea,
select {
  font: inherit;
}

/* テキストオーバーフロー対策 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* テーブルのスタイルリセット */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ボタンのデフォルトスタイルリセット */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* フォームリセット */
fieldset {
  border: none;
}

/* hr のリセット */
hr {
  border: none;
  border-top: var(--border-width-thin) solid var(--border-color-base);
}

/* アクセシビリティ: フォーカスアウトライン（ユーザー操作時のみ表示） */
:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

/* マウス操作時はフォーカスアウトラインを非表示 */
:focus:not(:focus-visible) {
  outline: none;
}

/* アニメーション軽減設定（ユーザー設定尊重） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
