/* 線上心經 — 深色+金,莊嚴肅穆風格 */

:root {
	--ink: #0b0906;
	--ink-2: #141009;
	--gold: #cda45e;
	--gold-bright: #f1d79a;
	--gold-dim: rgba(205, 164, 94, .35);
	--text: #f3ead9;
	--text-dim: #c9bfae;
	--serif: 'Noto Serif TC', 'PMingLiU', serif;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--ink);
	color: var(--text);
	font-family: var(--serif);
}

body {
	overflow-x: hidden;
}

/* ---------- Hero ---------- */

.hero {
	min-height: 72vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: var(--ink);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 6vh 20px;
}

@media (min-width: 720px) {
	.hero { background-attachment: fixed; min-height: 86vh; }
}

.hero-inner { max-width: 760px; }

.hero-eyebrow {
	letter-spacing: .35em;
	font-size: clamp(.7rem, 2vw, .85rem);
	color: var(--gold);
	margin: 0 0 1.2rem;
	text-indent: .35em; /* 補letter-spacing造成的右側視覺留白 */
}

.hero-title {
	font-weight: 900;
	font-size: clamp(2.1rem, 8vw, 4rem);
	line-height: 1.3;
	margin: 0;
	letter-spacing: .06em;
	background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, #8a6a33);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: 0 0 40px rgba(241, 215, 154, .25);
}

.hero-sub {
	margin: 1.1rem 0 0;
	font-size: clamp(.95rem, 2.4vw, 1.15rem);
	color: var(--text-dim);
	letter-spacing: .1em;
}

.wheel {
	display: inline-block;
	margin-top: 2.4rem;
	font-size: 1.6rem;
	color: var(--gold);
	animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* ---------- 經文主體 ---------- */

.scripture {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
	padding: 8vh 20px 10vh;
}

.mandala-layer {
	position: absolute;
	inset: 0;
	background-size: min(900px, 140%);
	background-position: top center;
	background-repeat: no-repeat;
	opacity: .05;
	pointer-events: none;
	z-index: 0;
}

.scripture > * {
	position: relative;
	z-index: 1;
}

.intro {
	text-align: center;
	color: var(--text-dim);
	font-size: clamp(.95rem, 2.2vw, 1.05rem);
	line-height: 2;
	max-width: 560px;
	margin: 0 auto 6vh;
}

.lotus {
	display: block;
	width: 92px;
	height: 92px;
	margin: 0 auto 1.6rem;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--gold-dim);
	box-shadow: 0 0 30px rgba(205, 164, 94, .2);
}

.verse-card,
.mantra {
	background: rgba(255, 255, 255, .03);
	border: 1px solid var(--gold-dim);
	border-radius: 14px;
	padding: clamp(1.6rem, 4vw, 2.6rem);
	margin: 0 0 2.4rem;
	box-shadow: inset 0 0 60px rgba(205, 164, 94, .05), 0 10px 30px rgba(0, 0, 0, .35);
}

.verse-card p,
.mantra p {
	margin: 0 0 1rem;
	font-size: clamp(1.05rem, 2.6vw, 1.35rem);
	line-height: 2.15;
	letter-spacing: .02em;
	text-align: center;
}

.verse-card p:last-child,
.mantra p:last-child { margin-bottom: 0; }

.mantra {
	text-align: center;
	background: linear-gradient(180deg, rgba(205, 164, 94, .1), rgba(205, 164, 94, .03));
}

.mantra p {
	font-weight: 700;
	font-size: clamp(1.25rem, 3.4vw, 1.9rem);
	letter-spacing: .12em;
	color: var(--gold-bright);
	text-shadow: 0 0 24px rgba(241, 215, 154, .35);
	animation: glow-pulse 4.5s ease-in-out infinite;
}

@keyframes glow-pulse {
	0%, 100% { text-shadow: 0 0 18px rgba(241, 215, 154, .25); }
	50% { text-shadow: 0 0 34px rgba(241, 215, 154, .55); }
}

.divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 0 0 2.4rem;
	color: var(--gold);
	opacity: .8;
}

.divider::before,
.divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
	max-width: 160px;
}

.divine-figure {
	max-width: 360px;
	margin: 0 auto 2.6rem;
	border: 1px solid var(--gold-dim);
	border-radius: 50% 50% 10px 10px;
	overflow: hidden;
	box-shadow: 0 0 40px rgba(205, 164, 94, .18), 0 14px 34px rgba(0, 0, 0, .4);
}

.divine-figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center 18%; /* 佛像照片主體(臉部)多半偏上,裁切保留上段而非正中央 */
}

.divine-figure figcaption {
	padding: .8rem 1rem 1.1rem;
	text-align: center;
	font-size: .8rem;
	color: var(--text-dim);
	background: var(--ink-2);
}

.divine-figure figcaption a {
	color: var(--gold);
	margin-left: .4rem;
}

.outro {
	text-align: center;
	color: var(--gold);
	letter-spacing: .3em;
	text-indent: .3em;
	font-size: clamp(.95rem, 2.4vw, 1.1rem);
	margin: 4vh 0 0;
}

/* ---------- 入場動畫(純 CSS,無 JS) ---------- */

.hero-inner,
.intro,
.verse-card,
.mantra,
.divine-figure,
.divider,
.outro {
	animation: fade-up .9s ease both;
	animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes fade-up {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.hero-inner, .intro, .verse-card, .mantra, .divine-figure, .divider, .outro,
	.wheel, .mantra p {
		animation: none !important;
	}
}

/* ---------- 頁尾圖片來源 ---------- */

.credits {
	max-width: 760px;
	margin: 0 auto;
	padding: 0 20px 6vh;
	color: var(--text-dim);
	font-size: .78rem;
	line-height: 1.9;
}

.credits p { margin: 0 0 .6rem; }

.credits ul {
	margin: 0;
	padding-left: 1.2rem;
}

.credits a {
	color: var(--gold);
}
