/* ==========================================================================
   reset.css
   Modern CSS Reset (2025)
   Josh Comeau / Andy Bell の考え方をベースに、最新のベストプラクティスを統合
   全LP共通。ここではデザインに関する指定は行わない。
========================================================================== */

/* 1. box-sizingを全要素で統一 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. デフォルトマージンをリセット */
* {
  margin: 0;
}

/* 3. ルート要素の設定 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* 4. bodyの基本設定 */
body {
    min-height: 100svh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 5. 見出し・段落等の折り返し設定 */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

p,
li,
dt,
dd {
    text-wrap: pretty;
}

/* 6. リストのスタイルを除去（role指定で読み上げアクセシビリティを担保） */
ul[role="list"],
ol[role="list"],
ul,
ol {
    list-style: none;
    padding: 0;
}

/* 7. リンクの基本設定 */
a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* 8. 画像・メディア要素の設定 */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

img {
    font-style: italic; /* altテキストが表示された際のスタイル */
    background-repeat: no-repeat;
    background-size: cover;
}

/* 9. フォーム要素はフォントを継承する */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    appearance: none;
}

textarea {
    resize: vertical;
}

/* 10. テーブルの基本設定 */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* 11. フォーカス時のアウトライン（アクセシビリティのため完全除去はしない） */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* 12. 無効化された要素 */
:disabled {
    cursor: not-allowed;
}

/* 13. アニメーションを希望しないユーザーへの配慮 */
@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;
    }
}

/* 14. iOSでのフォームパーツの見た目統一 */
input,
textarea,
select,
button {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* 15. #root, #__next 等のマウント要素の高さ確保（SPA互換用） */
#root,
#__next {
    isolation: isolate;
}

/* 16. 隠し要素 */
[hidden] {
    display: none !important;
}

/* 17. svgのデフォルト色をテキストカラーに追従させる */
svg {
    fill: currentColor;
}
