.nittai-page { padding-bottom: 0; }
.nittai-page .page-header { min-height: 400px; }
.nittai-hero {
	width: min(1200px, calc(100% - var(--gutter) * 2));
	aspect-ratio: 2400 / 901;
	margin-inline: auto;
	overflow: hidden;
	background: var(--color-background);
	--subpage-hero-position: center top;
}
.nittai-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.nittai-content { padding-block: 56px 144px; }
.nittai-section-title {
	position: relative;
	margin: 0 0 64px;
	padding-bottom: 32px;
	border-bottom: 1px solid currentColor;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.8;
	letter-spacing: .08em;
	text-align: center;
}
.nittai-section-title::after { position: absolute; inset: auto 8.33% -12px; border-bottom: 1px solid currentColor; content: ""; }
.nittai-content p { margin: 0; line-height: 1.9; }
.nittai-content p + p { margin-top: 28px; }
.nittai-introduction-text { max-width: 780px; margin-inline: auto; }
.nittai-biography { margin-top: 88px; }
.nittai-story { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 56px; align-items: start; }
.nittai-story + .nittai-story { margin-top: 104px; }
.nittai-story-text { min-width: 0; grid-column: 2; grid-row: 1; }
.nittai-story-figure { min-width: 0; grid-column: 1; grid-row: 1; margin: 0; }
.nittai-story-figure img { display: block; width: 100%; height: auto; }
.nittai-story-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.8; text-align: center; }
.nittai-story-text h3 { margin: 0 0 28px; font-size: 24px; font-weight: 400; line-height: 1.8; }
.nittai-story--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); }
.nittai-story--reverse .nittai-story-text { grid-column: 1; }
.nittai-story--reverse .nittai-story-figure { grid-column: 2; margin-top: 64px; }
.nittai-story-text .nittai-story-note { font-size: 15px; }
@media (width < 1120px) {
	.nittai-story, .nittai-story--reverse { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
@media (width < 768px) {
	.nittai-page .page-header { min-height: 250px; }
	.nittai-hero { width: 100%; aspect-ratio: 390 / 360; max-height: 75svh; }
	.nittai-content { padding-block: 40px 96px; }
	.nittai-section-title { margin-bottom: 48px; padding-bottom: 28px; font-size: 24px; letter-spacing: .04em; }
	.nittai-section-title span { display: block; }
	.nittai-content p { line-height: 2; }
	.nittai-content p + p { margin-top: 32px; }
	.nittai-biography { margin-top: 72px; }
	.nittai-story, .nittai-story--reverse { display: flex; flex-direction: column; gap: 48px; }
	.nittai-story + .nittai-story { margin-top: 88px; }
	.nittai-story-figure { width: 100%; }
	.nittai-story--reverse .nittai-story-figure { margin-top: 0; }
	.nittai-story-text h3 { margin-bottom: 32px; font-size: 24px; }
	.nittai-story-text .nittai-story-note { font-size: 16px; }
}
@media print {
	.nittai-page .page-header { min-height: 0; padding-block: 24px; }
	.nittai-content { padding-block: 32px; }
	.nittai-story, .nittai-story--reverse { display: block; }
	.nittai-story-figure { max-width: 50%; margin: 24px auto; break-inside: avoid; }
	.nittai-story--reverse .nittai-story-figure { margin: 24px auto; }
}

/* Preserve the approved initial portrait composition; fix the image to the viewport. */
@media screen and (prefers-reduced-motion: no-preference) {
	.nittai-hero { position: relative; clip-path: inset(0); --nittai-photo-scale: 1; }
	.nittai-hero > .subpage-parallax-image {
		position: absolute;
		top: 22%;
		left: 50%;
		width: 104.166666667%;
		max-width: none;
		height: auto;
		transform-origin: center 22%;
		transform: translate(-50%, -22%) scale(var(--nittai-photo-scale)) translateX(1%);

	}
	.nittai-hero.is-portrait-parallax > .subpage-parallax-image {
		position: fixed;
		top: var(--nittai-fixed-top);
		left: var(--nittai-fixed-left);
		width: var(--nittai-fixed-width);
	}
	@media (width < 768px) {
		.nittai-hero { --nittai-photo-scale: 2.4; }
	}
}
@media screen and (width < 768px) and (prefers-reduced-motion: reduce) {
	.nittai-hero img {
		transform: scale(2.4);
		transform-origin: center 22%;
	}
}

/* Continuation: faith, teaching, and the connection to Ryusenji. */
.nittai-continuation { margin-top: 104px; }
.nittai-continuation .nittai-story-figure { margin-top: 64px; }
.nittai-ryusenji { margin-top: 112px; }
.nittai-ryusenji-text { max-width: 780px; margin-inline: auto; }
.nittai-hondo-figure { max-width: 870px; margin: 96px auto 0; }
.nittai-hondo-figure img { display: block; width: 100%; height: auto; }
.nittai-hondo-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.8; text-align: center; }
@media (width < 768px) {
	.nittai-continuation { margin-top: 88px; }
	.nittai-continuation .nittai-story-figure { margin-top: 0; }
	.nittai-story-text h3 span { display: block; }
	.nittai-ryusenji { margin-top: 88px; }
	.nittai-hondo-figure { margin-top: 48px; }
}
@media print {
	.nittai-continuation, .nittai-ryusenji { margin-top: 32px; }
	.nittai-continuation .nittai-story-figure { margin: 24px auto; }
	.nittai-hondo-figure { margin-top: 32px; break-inside: avoid; }
}
