/* ============================================================
   リセットと基本タイポグラフィ
   assets/css/base.css
   ============================================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-heading);
    line-height: var(--lh-heading);
    font-weight: 700;
}

p {
    margin: 0 0 1.25em;
}

p:last-child {
    margin-bottom: 0;
}

ul, ol {
    margin: 0 0 1.25em;
    padding-left: 1.4em;
}

li + li {
    margin-top: 0.4em;
}

a {
    color: var(--c-primary-dark);
    text-underline-offset: 0.2em;
    transition: color var(--transition);
}

a:hover {
    color: var(--c-accent-dark);
}

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

figure {
    margin: 0;
}

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

button {
    cursor: pointer;
}

table {
    border-collapse: collapse;
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    margin: var(--sp-7) 0;
}

/* キーボード操作時のフォーカスをはっきり見せる */
:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

/* 読み上げ専用テキスト */
.visually-hidden {
    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: var(--sp-4);
    z-index: 200;
    padding: var(--sp-3) var(--sp-5);
    background: var(--c-primary-dark);
    color: var(--c-text-inverse);
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 0;
    color: var(--c-text-inverse);
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
