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

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

/* 縦並びにして、内容が短いページでもフッターを画面下端に置く（.site-footer の margin-top: auto） */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	/* サイト共通: 指定がなければヒラギノ角ゴ Pro W3（太字は W6）16px */
	font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: #111;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Header ------------------------------------------------------------------ */

/* 通常ページではスクロールで流れる（フロントページは section-scroll.css で固定） */
.site-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 100;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: center;
	justify-content: space-between;
	padding-block: 18px;
	/* ロゴ〜グローバルナビの幅をコンテンツ幅 1200px にして中央寄せ（狭い画面では最小余白を確保） */
	padding-inline: max(clamp(20px, 4vw, 48px), (100% - 1200px) / 2);
	/* --ink / --accent は表示中セクションの色（section-scroll.js が切り替え） */
	color: var(--ink, #111);
	transition: color 0.4s ease;
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header__logo {
	display: block;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.site-header__logo svg {
	display: block;
	width: min(188px, 40vw);
	height: auto;
}

/* SVG 側の白指定をヘッダーの文字色（反転）に追従させる */
.site-header__logo svg path {
	fill: currentColor;
	stroke: currentColor;
}

.site-header__nav ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * グローバルナビは常に文字だけ。:hover（キーボードでは :focus-visible）で角丸の背景を付ける。
 * 背景色 --pill・文字色 --accent は表示中セクション（白背景のページでは #F6F6F6 / #333）。
 */
.site-header__link {
	display: flex;
	align-items: center;
	height: 56px;
	padding: 2px 24px 0; /* 上 2px: デザインに合わせて文字を 1px 下げる */
	border-radius: 999px;
	font-family: "Inter", sans-serif;
	font-weight: 500;
	text-decoration: none;
	background: transparent;
	transition:
		color 0.3s ease,
		background-color 0.3s ease;
}

/* 表示中のページ（Journal カテゴリー・その記事 / Contact）は :hover と同じ見た目 */
.site-header__link[aria-current="page"],
.site-header__link:hover,
.site-header__link:focus-visible {
	color: var(--accent, #333);
	background: var(--pill, #f6f6f6);
}

@media (max-width: 480px) {
	/* ナビの背景（:hover / 表示中）を広げた分、ロゴとの間隔を詰めて 1 行に収める */
	.site-header {
		column-gap: 12px;
	}

	.site-header__logo svg {
		width: 34vw;
	}

	.site-header__link {
		height: 44px;
		padding-inline: 16px;
	}
}

/* Footer ------------------------------------------------------------------ */

/*
 * 直前のコンテンツとの間隔は最低 196px（padding-top）。内容が少ないページでは
 * margin-top: auto（body は縦並び・min-height: 100vh）で画面の一番下に置く。
 * そのため各ページのメイン要素は下の余白を持たない。
 */
.site-footer {
	margin-top: auto;
	padding: 196px 20px 32px;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	color: var(--ink, #111);
	text-align: center;
	transition: color 0.4s ease;
}

.site-footer__copyright {
	margin: 0;
}
/* Button ------------------------------------------------------------------ */

.button {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	height: 60px;
	padding-inline: 24px 23px;
	border-radius: 999px;
	font-weight: 600;
	line-height: 1;
	color: var(--accent, #0062ff);
	text-decoration: none;
	background: #fff;
}

/* 矢印は icon_arrow.svg をマスクにして文字色で塗る（セクションごとの色に追従） */
.button__icon {
	flex: none;
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("../images/icon_arrow.svg") center / contain no-repeat;
	mask: url("../images/icon_arrow.svg") center / contain no-repeat;
	transition: transform 0.3s ease;
}

.button:hover .button__icon {
	transform: translateX(3px);
}

/* 「もっと見る」など、アイコンなしの控えめなボタン */
.button--more {
	height: 56px;
	padding-inline: 24px;
	background: #f6f6f6;
}

/* Journal list（フロントページの Journal セクション / カテゴリーページ共通） ---- */

.journal__heading {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-size: 48px;
	font-weight: 600;
	line-height: 1.7;
	letter-spacing: -0.06em;
}

.journal__list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.journal__item {
	position: relative;
	padding-left: 24px;
}

.journal__item + .journal__item {
	margin-top: 26px;
}

.journal__item::before {
	content: "";
	position: absolute;
	top: 10.5px;
	left: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bullet, currentColor);
}

.journal__date {
	font-weight: 600;
}

.journal__title {
	text-decoration: none;
}

.journal__title:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.journal__empty {
	margin: 9px 0 0;
}

/* Archive (category) ------------------------------------------------------ */

.journal-archive {
	--bullet: #efefef;

	/* 見出しの行ボックス上端 165px（Journal#tag.png。カテゴリーページも同じ） */
	padding: 165px max(clamp(20px, 4vw, 48px), (100% - 1200px) / 2) 0;
	color: #333;
}

/* タグページ見出しの「#タグ名」 */
.journal-archive__tag {
	color: #7d1fb3;
}

.journal-archive .pagination {
	margin-top: 40px;
}

.journal-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.journal-archive .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: 12px;
	border-radius: 999px;
	text-decoration: none;
}

.journal-archive .page-numbers.current,
.journal-archive a.page-numbers:hover {
	background: #f6f6f6;
}

@media (max-width: 767px) {
	.journal-archive {
		padding-top: 120px;
	}
}

/* Single ------------------------------------------------------------------ */

.post-single {
	/* 本文幅 960px（single.png） */
	padding: 191px max(clamp(20px, 4vw, 48px), (100% - 960px) / 2) 0;
	color: #333;
}

.single__title {
	margin: 0;
	font-family: "Inter", "Hiragino Kaku Gothic Pro", "Hiragino Sans", sans-serif;
	font-size: 48px;
	font-weight: 600;
	line-height: 1.4;
}

.single__meta {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 9px;
}

/* 著者アイコン。アバターが無い（透明画像・非表示設定）ときはグレーの丸 */
.single__avatar {
	flex: none;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 50%;
	background: #d9d9d9;
}

.single__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single__byline {
	display: flex;
	flex-direction: column;
	min-width: 0;
	font-size: 14px;
	line-height: 1.4;
	overflow-wrap: anywhere; /* 長い著者名でもはみ出さない */
}

.single__thumbnail {
	margin: 40px 0 0;
	overflow: hidden;
	border-radius: 14px;
	aspect-ratio: 3 / 2;
}

.single__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single__content {
	margin-top: 41px;
}

.single__content > * {
	margin-block: 0;
}

.single__content > * + * {
	margin-top: 26px;
}

.single__content h2 {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.5;
}

.single__content h3 {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
}

.single__content > :is(h2, h3) {
	margin-top: 56px;
}

.single__content img {
	height: auto;
	border-radius: 14px;
}

.single__content a,
.single__tags a {
	text-underline-offset: 3px;
}

.single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.4em;
	margin: 41px 0 0;
}

@media (max-width: 767px) {
	.post-single {
		padding-top: 120px;
	}

	.single__title {
		font-size: 32px;
	}
}

/* Page（Contact など。本文幅 960px） ----------------------------------------- */

.page-entry {
	/* 見出しの行ボックス上端 165px（contact.png） */
	padding: 165px max(clamp(20px, 4vw, 48px), (100% - 960px) / 2) 0;
	color: #333;
}

.page-entry__content {
	margin-top: 15px;
}

.page-entry__content > * {
	margin-block: 0;
}

.page-entry__content > * + * {
	margin-top: 26px;
}

.page-entry__content > .wpcf7 {
	margin-top: 39px;
}

@media (max-width: 767px) {
	.page-entry {
		padding-top: 120px;
	}
}

/* Contact Form 7 ---------------------------------------------------------- */

.wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wpcf7-form > br {
	display: none;
}

.wpcf7-form-control-wrap {
	display: block;
}

.wpcf7-form :is(.wpcf7-text, .wpcf7-email, .wpcf7-textarea) {
	display: block;
	width: 100%;
	height: 64px;
	margin: 0;
	padding: 0 23px;
	border: 1px solid #cfcfd6;
	border-radius: 8px;
	font: inherit;
	line-height: 1.7;
	color: #333;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7-form .wpcf7-textarea {
	height: 219px;
	padding-block: 15px;
	resize: vertical;
}

.wpcf7-form ::placeholder {
	color: #aaa;
	opacity: 1;
}

.wpcf7-form :is(.wpcf7-text, .wpcf7-email, .wpcf7-textarea):focus {
	border-color: #333;
	outline: none;
	box-shadow: 0 0 0 1px #333;
}

.wpcf7-form .wpcf7-not-valid {
	border-color: #dc3232;
}

/* 入力エラーの文言は欄の直下に重ねて出し、下の要素を押し下げない */
.wpcf7-form .wpcf7-not-valid-tip {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 1px;
	font-size: 12px;
	line-height: 1.2;
}

/* 同意チェック（[acceptance]。チェックするまで送信ボタンは無効。textarea との間は 37px = gap 16px + 21px） */
.wpcf7-form-control-wrap:has(.wpcf7-acceptance, .wpcf7-checkbox) {
	margin-top: 21px;
}

.wpcf7-form .wpcf7-list-item {
	display: block;
	margin: 0;
}

.wpcf7-form .wpcf7-list-item > label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
}

.wpcf7-form .wpcf7-list-item input[type="checkbox"] {
	display: grid;
	flex: none;
	place-content: center;
	width: 20px;
	height: 20px;
	margin: 3.6px 0 0; /* 1 行目（行ボックス 27.2px）の中央に揃える */
	border-radius: 4px;
	background: #efefef;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7-form .wpcf7-list-item input[type="checkbox"]:checked {
	background: #333;
}

.wpcf7-form .wpcf7-list-item input[type="checkbox"]:checked::before {
	content: "";
	width: 10px;
	height: 6px;
	border: solid #fff;
	border-width: 0 0 2px 2px;
	transform: translateY(-1px) rotate(-45deg);
}

.wpcf7-form .wpcf7-list-item input[type="checkbox"]:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}

/* Cloudflare Turnstile（プラグインのインライン margin を上書きし、ウィジェット後ろの改行は詰める） */
.wpcf7-form .cf7-cf-turnstile {
	margin: 16px 0 0 !important;
}

.wpcf7-form .cf7-cf-turnstile .cf-turnstile-br {
	display: none;
}

/* 送信ボタン（同意チェックとの間は 32px = gap 16px + 16px） */
.wpcf7-form .wpcf7-submit {
	align-self: flex-start;
	height: 56px;
	margin-top: 16px;
	padding: 0 48px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background: #333;
	cursor: pointer;
	/* Turnstile プラグインが入れる .wpcf7-submit { opacity: .5 } を打ち消し、見た目は disabled の状態だけで決める */
	opacity: 1;
	transition: opacity 0.2s ease;
}

/* Turnstile があるときは、そのすぐ下（gap 16px だけ）に置く */
.wpcf7-form .cf7-cf-turnstile ~ .wpcf7-submit {
	margin-top: 0;
}

.wpcf7-form .wpcf7-submit:hover {
	opacity: 0.85;
}

.wpcf7-form .wpcf7-submit:disabled,
.wpcf7-form.submitting .wpcf7-submit {
	cursor: not-allowed;
	opacity: 0.5;
}

/* スピナーは縦並びのレイアウトを崩すので出さない（送信中はボタンを半透明にする） */
.wpcf7-form .wpcf7-spinner {
	display: none;
}

.wpcf7 form .wpcf7-response-output {
	margin: 8px 0 0;
	padding: 12px 16px;
	border-radius: 8px;
}

/* Company（トップページのセクション / 固定ページ「Company」共通） ------------ */

.company {
	--bullet: #efefef;

	color: #333;
}

.company__catch {
	margin: 12px 0 0;
	font-family: "Caveat", cursive;
	font-size: 74px;
	line-height: 1.1;
	letter-spacing: -0.07em;
	color: #9497a5;
}

/* 本文（Markdown）: 段落 / 見出し（### → h3）/ 箇条書き（項目名は太字） */
.company__content {
	margin-top: 19px;
}

.company__content > * {
	margin-block: 0;
}

.company__content p + p {
	margin-top: 27px;
}

.company__content h3 {
	margin-top: 77px;
	font-family: "Inter", sans-serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: -0.06em;
}

.company__content ul {
	margin-top: 24px;
	padding: 0;
	list-style: none;
}

.company__content li {
	position: relative;
	padding-left: 24px;
}

.company__content li + li {
	margin-top: 26px;
}

.company__content li::before {
	content: "";
	position: absolute;
	top: 10.5px;
	left: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bullet, currentColor);
}

.company__content strong {
	font-weight: 600;
}

/* 2 つ目以降のリスト（History など）は行ピッチ 64px */
.company__content ul ~ h3 + ul {
	margin-top: 30px;
}

.company__content ul ~ h3 + ul > li + li {
	margin-top: 36.8px;
}

@media (max-width: 767px) {
	.company__catch {
		font-size: 40px;
	}
}

/* Fallback pages ---------------------------------------------------------- */

.site-main {
	max-width: 48rem;
	margin-inline: auto;
	padding: 120px 20px 0;
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header__link,
	.site-header__link::after {
		transition: none;
	}
}
