/* ==========================================================================
   fff-foundation — 03-base.css
   reset + html/body/基本タイポグラフィ
   全ページ共通の基本スタイル。02-tokens.css の変数を使う
   ========================================================================== */

/* ========== reset（軽量版） ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

/* ========== html / body ========== */
html {
    background: var(--fff-color-paper);
    color: var(--fff-color-ink);
    font-family: var(--fff-font-body);
    font-size: 16px;
    line-height: var(--fff-lh-normal);
    letter-spacing: var(--fff-ls-normal);
    overflow-x: hidden;
}

body {
    font-family: var(--fff-font-body);
    font-size: var(--fff-fs-sm);
    line-height: var(--fff-lh-normal);
}

body.is-menu-open {
    overflow: hidden;
}

/* ========== 見出し ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fff-font-heading);
    font-weight: normal;
    line-height: var(--fff-lh-tight);
}

h1 { font-size: var(--fff-fs-xl); }
h2 { font-size: var(--fff-fs-lg); }
h3 { font-size: var(--fff-fs-md); }
h4 { font-size: var(--fff-fs-md); }
h5 { font-size: var(--fff-fs-sm); }
h6 { font-size: var(--fff-fs-sm); }

/* ========== 段落 ========== */
p {
    font-size: var(--fff-fs-sm);
    line-height: var(--fff-lh-normal);
}

/* ========== リンク ========== */
a {
    color: var(--fff-color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--fff-color-ink);
}

/* ========== 画像 ========== */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========== フォーム要素（フォント継承させる） ========== */
button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
}

button {
    cursor: pointer;
}

/* ========== アクセシビリティ：視覚的に隠す（読み上げソフトは読む） ========== */
.screen-reader-text,
.skip-link:not(:focus) {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: var(--fff-space-2) var(--fff-space-3);
    background: var(--fff-color-black);
    color: var(--fff-color-paper);
}

/* アンカーリンク（フッター等）のジャンプ先がヘッダーに隠れないよう上に余白 */
.fff-8grid-item[id] {
    scroll-margin-top: 100px;
}
