/* ============================================================
   base.css
   リセットCSSと、サイト全体に共通する基本スタイル（文字・リンク・見出し等）
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* アクセシビリティ: 動きに敏感なユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--color-black);
  color: var(--color-text);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
picture {
  max-width: 100%;
  display: block;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* ---------- 見出しの共通サイズ ---------- */
h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

p {
  color: var(--color-text-dim);
  font-size: var(--font-size-body);
}

/* ---------- キーボード操作時のフォーカス表示（アクセシビリティ） ---------- */
:focus-visible {
  outline: 2px solid var(--color-tiffany);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- スクリーンリーダー専用テキスト ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 「本文へスキップ」リンク（アクセシビリティ） ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 999;
  background: var(--color-tiffany);
  color: var(--color-black);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- 選択テキストの色 ---------- */
::selection {
  background: var(--color-tiffany);
  color: var(--color-black);
}

/* ---------- スクロールバー ---------- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-black);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--color-tiffany), var(--color-gold));
  border-radius: var(--radius-full);
}
