/* ============================================
   Base: Reset & Typography
   モバイルファースト（〜599px が基準、PC向けは @media で上書き）
   ============================================ */

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-loose);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-accent-hover); }
a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--fs-h1); text-align: center; }
h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-5);  /* 下線と次の本文の間に余白 */
  text-align: center;  /* 2026-05-31 既定ルール：H1・H2＝中央／H3以下＝左 */
  /* 見出し下のアクセント線（モダンLP定番パターン） */
}
h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto 0;  /* 下線も中央既定 */
}
/* text-center 指定の h2 は線も中央寄せ */
h2.text-center::after,
.text-center > h2::after {
  margin-left: auto;
  margin-right: auto;
}
h3 { font-size: var(--fs-h3); font-weight: var(--fw-medium); line-height: var(--lh-normal); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-medium); line-height: var(--lh-normal); }

p {
  margin: 0 0 var(--space-3);
  line-height: var(--lh-loose);
}

small { font-size: var(--fs-sm); color: var(--color-text-sub); }

strong, b { font-weight: var(--fw-bold); }

hr {
  border: none;
  border-top: var(--border-thin);
  margin: var(--space-5) 0;
}

/* セクション標準余白（モバイル基準、PC向けに広げる） */
section {
  padding: var(--space-6) 0;
}
@media (min-width: 900px) {
  section { padding: var(--space-7) 0; }
}

/* 動きを抑える設定を尊重 */
@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;
  }
}
