.history-page { padding-bottom: 0; }
.history-page .page-header { min-height: 400px; }
.history-hero {
	position: relative;
	width: min(1200px, calc(100% - var(--gutter) * 2));
	aspect-ratio: 2400 / 901;
	margin-inline: auto;
	overflow: hidden;
	background: var(--color-background);
}
.history-hero-image {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.history-hero.is-parallax {
	/* Clip the viewport-fixed photo to this scrolling window. */
	clip-path: inset(0);
}
.history-hero.is-parallax .history-hero-image {
	position: fixed;
	top: 0;
	left: var(--history-image-left);
	width: var(--history-image-width);
	height: 100vh;
	/* Keep photo scale steady as the mobile browser toolbar moves. */
	height: 100lvh;
	object-position: center 32%;
	transform: none;
}


/* Use the final fixed geometry from the first paint on PC and mobile. */
@supports (clip-path: inset(0)) {
	@media screen and (prefers-reduced-motion: no-preference) {
		.history-hero {
			clip-path: inset(0);
		}
		.history-hero .history-hero-image {
			position: fixed;
			top: 0;
			left: 50%;
			width: min(1200px, calc(100% - var(--gutter) * 2));
			height: 100vh;
			height: 100lvh;
			object-position: center 32%;
			transform: translateX(-50%);
		}
		/* Match the existing measured position after initialization. */
		.history-hero.is-parallax .history-hero-image {
			left: var(--history-image-left);
			width: var(--history-image-width);
			transform: none;
		}
	}
}

.history-content { padding-top: 40px; }
.history-content p { margin: 0; line-height: 2; }
.history-content figure { margin: 0; }
.history-content figcaption { margin-top: 12px; font-size: 14px; text-align: center; line-height: 1.7; }
.history-section-title {
	position: relative;
	margin: 0 0 72px;
	padding-bottom: 32px;
	border-bottom: 1px solid currentColor;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: .12em;
	text-align: center;
}
.history-section-title::after { position: absolute; inset: auto 8.33% -12px; border-bottom: 1px solid currentColor; content: ""; }
.history-origins-intro { display: grid; grid-template-columns: minmax(0, 412px) minmax(0, 1fr); gap: 56px; align-items: start; }
.history-origins-text { grid-column: 2; grid-row: 1; }
.history-origins-text p + p { margin-top: 32px; }
.history-satomi { grid-column: 1; grid-row: 1; }
.history-satomi img { width: 100%; height: auto; }
.history-narrative { max-width: 820px; margin: 64px auto 0; }
.history-narrative figure { max-width: 765px; margin: 56px auto 72px; }
.history-narrative img { width: 100%; height: auto; }
.history-narrative figure:last-child { margin-bottom: 0; }
.history-teachings { margin-top: 96px; }
.history-teachings-intro { max-width: 820px; margin-inline: auto; text-align: center; }
.history-teachings-intro p + p { margin-top: 48px; }
.history-subtitle { margin: 80px 0 48px; font-size: 24px; font-weight: 400; text-align: center; line-height: 1.8; }
.history-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.history-principle { display: flex; flex-direction: column; border: 1px solid var(--principle-color); border-block-width: 12px; padding: 24px 16px; background: #fff; }
.history-principle--sutra { --principle-color: #9933cc; }
.history-principle--chant { --principle-color: #338800; }
.history-principle--present { --principle-color: #ffd700; }
.history-principle h4 { margin: 0 0 20px; font-size: 21px; font-weight: 400; text-align: center; }
.history-principle .history-principle-lead { min-height: 64px; margin-bottom: 24px; font-size: 15px; text-align: center; }
.history-daily-lead { text-align: center; }
.history-daily-table { width: 100%; max-width: 780px; margin: 40px auto 0; border-collapse: collapse; table-layout: fixed; }
.history-daily-table th, .history-daily-table td { width: 50%; padding: 20px 12px; border: 1px solid #444; font-weight: 400; text-align: center; vertical-align: middle; line-height: 1.8; }
.history-daily-table thead th { background: #e6e6e6; }
.history-qa { margin-top: 128px; }
.history-qa > .history-subtitle { margin: 0 0 64px; }
.history-qa-item { display: grid; grid-template-columns: minmax(0, 1fr) 250px; column-gap: 32px; align-items: center; }
.history-qa-item + .history-qa-item { margin-top: 64px; }
.history-qa-item h3 { grid-column: 1 / -1; margin: 0 0 20px; font-size: 16px; font-weight: 400; line-height: 2; }
.history-qa-item .history-answer-lead { grid-column: 1 / -1; margin-bottom: 16px; }
.history-answer { padding: 12px 16px; background: #f1f1f1; }
.history-qa-flower { width: 100%; height: auto; }
.history-qa-item--reverse { grid-template-columns: 280px minmax(0, 1fr); }
.history-qa-item--reverse .history-answer { grid-column: 2; grid-row: 3; }
.history-qa-item--reverse .history-qa-flower { grid-column: 1; grid-row: 3; }
.history-visit { padding-block: 144px 128px; text-align: center; }
.history-visit-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 112px; align-items: start; margin-top: 96px; }
.history-visit-photos img { width: 100%; height: auto; }
.history-visit-photos .history-visit-goshudai { margin-top: -36px; }
.history-visit-goshudai figcaption { margin: 0 0 12px; }
.history-visit .history-visit-closing { margin-top: 80px; font-size: 20px; }
@media (width < 1120px) {
	.history-origins-intro { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.history-principles { gap: 16px; }
	.history-principle h4 { font-size: 18px; }
	.history-visit-photos { gap: 56px; }
}
@media (width < 768px) {
	.history-page .page-header { min-height: 250px; }
	.history-hero { width: 100%; aspect-ratio: 390 / 360; max-height: 75svh; }
	.history-content { padding-top: 40px; }
	.history-content p { line-height: 1.9; }
	.history-section-title { margin-bottom: 48px; padding-bottom: 28px; font-size: 24px; }
	.history-origins-intro { display: flex; flex-direction: column; gap: 40px; }
	.history-satomi { width: 100%; }
	.history-origins-text p + p { margin-top: 32px; }
	.history-narrative { margin-top: 48px; }
	.history-narrative figure { margin: 40px auto 48px; }
	.history-teachings { margin-top: 88px; }
	.history-teachings-intro { padding-inline: 12px; text-align: left; }
	.history-pc-break { display: none; }
	.history-subtitle { margin: 72px 0 36px; font-size: 20px; }
	.history-principles { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-inline: 12px; }
	.history-principle { padding: 24px 20px; }
	.history-principle h4 { font-size: 20px; }
	.history-principle .history-principle-lead { min-height: 0; margin-bottom: 40px; }
	.history-daily-lead { padding-inline: 12px; text-align: left; }
	.history-daily-table { margin-top: 32px; font-size: 14px; }
	.history-daily-table th, .history-daily-table td { padding: 16px 8px; }
	.history-qa { margin-top: 96px; }
	.history-qa > .history-subtitle { margin-bottom: 56px; }
	.history-qa-item, .history-qa-item--reverse { display: flex; flex-direction: column; align-items: stretch; }
	.history-qa-item + .history-qa-item { margin-top: 64px; }
	.history-qa-item h3 { margin-bottom: 32px; }
	.history-answer { padding: 12px; }
	.history-qa-flower { width: 250px; max-width: 90%; margin: 36px auto 0; }
	.history-visit { padding-block: 80px 128px; }
	.history-visit-message span { display: block; }
	.history-visit-photos { display: flex; flex-direction: column; align-items: center; gap: 72px; margin-top: 88px; }
	.history-visit-photos figure { width: 243px; max-width: 100%; }
	.history-visit-photos .history-visit-goshudai { margin-top: 0; }
	.history-visit .history-visit-closing { margin-top: 96px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.history-hero.is-parallax .history-hero-image { will-change: auto; }
}
@media print {
	.history-page .page-header { min-height: 0; padding-block: 24px; }
	.history-hero.is-parallax .history-hero-image { position: static; width: 100%; height: 100%; transform: none; will-change: auto; }
	.history-hero { break-inside: avoid; }
	.history-principle, .history-qa-item, .history-content figure { break-inside: avoid; }
}
