/* base.css — リセットと日本語組版の土台。値は theme.json のトークンを参照する */

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

/* 日本語組版の土台 */

html {
	/* iOS の横向き時に文字が勝手に拡大されるのを防ぐ */
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

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

body {
	/* 禁則処理を厳格に適用する（行頭に句読点や閉じ括弧を置かない） */
	line-break: strict;
	/* 和文は文節で折り返させ、長い英単語や URL だけを強制的に折る */
	word-break: normal;
	overflow-wrap: anywhere;
	/* 和欧混植の境界に自動で四分アキを入れる（対応ブラウザのみ） */
	text-spacing-trim: trim-start;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* 字間ぶんの右アキを相殺し、光学的な中央に寄せる */
.has-text-align-center {
	text-indent: var(--wp--custom--letter-spacing--wide);
}

/* 見出し・本文の基本 */

:where(h1, h2, h3, h4, h5, h6) {
	/* 長い英単語や URL 以外は単語単位で折る */
	overflow-wrap: normal;
}

/* リンクとフォーカス */

:where(a) {
	color: var(--wp--preset--color--brand);
	text-underline-offset: 0.25em;
}

/* キーボード操作時のみ、はっきり見えるフォーカスリングを出す */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 3px;
	border-radius: 2px;
}

/* メディア */

:where(img, svg, video, canvas, iframe) {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/* スクリーンリーダー専用テキスト */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* レイアウトの土台 */

/* フッターを最下部へ押す flex は body ではなく .wp-site-blocks に効かせる */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

.site-main {
	flex: 1 0 auto;
}

/* デザインでは帯・ヒーローがヘッダーに接する。blockGap の上マージンを消す */
.wp-site-blocks > .site-main {
	margin-block-start: 0;
}
