/* ===============================
   base: リセット / タイポグラフィ / コンテナ
   モバイルファースト。基準は375幅のSP参考画像
   =============================== */

/* ---- リセット ---- */

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

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

body {
	font-family: var(--font-base);
	font-size: var(--fs-body);
	font-weight: var(--fw-normal);
	line-height: var(--lh-body);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

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

ul,
ol {
	list-style: none;
}

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

button {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
}

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

/* ---- タイポグラフィ ---- */

h1,
h2,
h3,
h4 {
	font-weight: var(--fw-medium);
	line-height: var(--lh-tight);
}

h2 {
	font-size: var(--fs-h2-mobile);
}

h3 {
	font-size: var(--fs-h3);
}

@media (min-width: 768px) {
	h2 {
		font-size: var(--fs-h2);
	}
}

/* ---- コンテナ ---- */

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-gutter-mobile);
}

@media (min-width: 768px) {
	.container {
		padding-inline: var(--container-gutter);
	}
}

/* ---- アクセシビリティ / モーション ---- */

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@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;
	}
}
