/*
 * 「關於學到」品牌頁樣式（/about/）。
 *
 * - 只在 body.page-about 載入（inc/theme-hooks.php 條件式 enqueue）。
 * - 全 class 以 about- 前綴、selector 一律 scope 於 .page-about，避免與 style.css（6500+ 行）衝突
 *   （例：.eyebrow / .section-head 已存在）。
 * - 設計 token 一律對齊 style.css :root（--color-brand / --color-text-* / --color-border / --color-bg…），
 *   不自創色票（根 §3）。白卡用中性 #fff（非品牌色）。
 * - 斷點改用站台既有 @media（設計稿 1100→991、720→767；根 §4 勿自創斷點）。
 * - 滿版區塊沿用站台 full-bleed 技法（100vw + calc(50% - 50vw)），溢出由 .page-about .site-main 的
 *   overflow-x: clip 收斂（同 .home .site-main / .home-carousel-band）。
 */

/* ── 版面外框：清掉 site-main 預設留白、收斂滿版溢出 ─────────────────────────── */
.page-about .site-main {
	padding: 0;
	overflow-x: clip;
}

/* 滿版底色帶：突破 .site-container（max 1200 + 左右 gutter）到整個 viewport 寬 */
.page-about .about-bleed {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* 內層對齊站台 .site-container 寬度（min(100% - 48px, 1200)），水平 gutter 一致 24px */
.page-about .about-shell {
	width: min(calc(100% - 48px), var(--container-width));
	margin: 0 auto;
}

/* 錨點跳轉時，避開 sticky header + nav（用 token、不寫死 px；根 §4） */
.page-about .about-section,
.page-about .about-hero {
	scroll-margin-top: calc(var(--site-header-height) + var(--site-nav-height, 44px) + 16px);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.page-about .about-hero {
	position: relative;
	overflow: hidden;
	padding: 120px 0 168px;
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
}

.page-about .about-hero__bg {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 100%;
	z-index: 0;
	pointer-events: none;
}

.page-about .about-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center bottom;
	display: block;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
	mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
}

/* 由下而上暖白漸層：下方（文字區塊）以半透明暖白淡覆蓋、確保可讀，往上逐漸透出主視覺。
   起點非全白（0.9，非 var(--color-bg) 實心）→ 最淡處仍能極淡地看到背景主視覺。 */
.page-about .about-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(250, 250, 247, 0.9) 0%,
		rgba(250, 250, 247, 0.82) 40%,
		rgba(250, 250, 247, 0.45) 70%,
		rgba(250, 250, 247, 0) 100%
	);
}

.page-about .about-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 760px;
}

.page-about .about-hero__title {
	margin: 0;
	max-width: 780px;
	color: var(--color-text-primary);
	font-family: var(--font-serif);
	font-weight: 800;
	line-height: 1.22;
	font-size: clamp(48px, 7vw, 92px);
}

.page-about .about-hero__subtitle {
	margin: 16px 0 0;
	color: var(--color-brand-dark);
	font-family: var(--font-serif);
	font-size: clamp(22px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.35;
}

.page-about .about-hero__lead {
	max-width: 720px;
	margin: 26px 0 0;
	color: var(--color-text-secondary);
	font-size: 20px;
	line-height: 1.85;
	text-wrap: pretty;
}

/* eyebrow（前綴小標 + 短橫線） */
.page-about .about-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	color: var(--color-brand-dark);
	font-size: 14px;
	font-weight: 800;
}

.page-about .about-eyebrow::before {
	content: "";
	width: 38px;
	height: 2px;
	background: var(--color-brand);
}

/* ── 區段共用 ──────────────────────────────────────────────────────────────── */
.page-about .about-section {
	padding: 96px 0;
	border-bottom: 1px solid var(--color-border);
}

.page-about .about-section--paper {
	background: var(--color-bg);
}

.page-about .about-section--white {
	background: #fff;
}

.page-about .about-section--tint {
	background: var(--color-brand-soft);
}

.page-about .about-section__header {
	margin-bottom: 40px;
}

.page-about .about-section__title {
	margin: 0;
	color: var(--color-text-primary);
	font-family: var(--font-serif);
	font-weight: 800;
	line-height: 1.22;
	font-size: clamp(31px, 4vw, 52px);
}

.page-about .about-section__intro {
	max-width: 900px;
	margin: 14px 0 0;
	color: var(--color-text-secondary);
	font-size: 18px;
	line-height: 1.85;
	text-wrap: pretty;
}

.page-about .about-nowrap {
	white-space: nowrap;
}

/* ── 5 個面向 ─────────────────────────────────────────────────────────────── */
.page-about .about-topic-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.page-about .about-topic-card {
	flex: 0 0 calc((100% - 32px) / 3);
	min-height: 210px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 30px;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--shadow-soft);
	color: inherit;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.about-topic-card:hover,
a.about-topic-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--shadow-card, 0 4px 16px rgba(0, 0, 0, 0.06));
}

.page-about .about-topic-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.page-about .about-topic-card__icon {
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	display: grid;
	place-items: center;
	color: var(--color-brand);
	border: 1px solid rgba(0, 109, 99, 0.18);
	border-radius: 50%;
	background: var(--color-brand-soft);
}

.page-about .about-topic-card__icon svg {
	width: 24px;
	height: 24px;
}

.page-about .about-topic-card__label {
	color: var(--color-brand-dark);
	font-family: var(--font-serif);
	font-size: 25px;
	font-weight: 800;
}

.page-about .about-topic-card__slogan {
	display: block;
	/* 副標題用深墨色（非品牌綠）：與綠色標題、灰色描述分出層次（依設計參考圖） */
	color: var(--color-text-primary);
	font-family: var(--font-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.page-about .about-topic-card__desc {
	display: block;
	color: var(--color-text-secondary);
	font-size: 15px;
	line-height: 1.7;
}

/* ── 學到編輯群 ───────────────────────────────────────────────────────────── */
.page-about .about-author-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	overflow: hidden;
	margin-top: 24px;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--shadow-soft);
}

.page-about .about-author-card {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 26px;
	align-items: start;
	padding: 28px;
	border-bottom: 1px solid var(--color-border);
	background: #fff;
}

.page-about .about-author-card:last-child {
	border-bottom: 0;
}

.page-about .about-author-card__photo {
	position: relative;
	flex: 0 0 auto;
	width: 112px;
	height: 112px;
	border: 2px solid rgba(0, 109, 99, 0.16);
	border-radius: 18px;
	background: var(--color-brand-soft);
	overflow: hidden;
}

/* 頭像 fallback：未設定或圖片失效時顯示柔和品牌色人像剪影（不留空白、不像出錯）。 */
.page-about .about-author-card__photo-fallback {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 60%;
	height: 60%;
	fill: #a6c1bb;
}

.page-about .about-author-card__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* 「關於作者」語意小標：保留於 DOM、視覺隱藏（同設計稿） */
.page-about .about-author-card__eyebrow {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.page-about .about-author-card__name {
	margin: 0;
	color: var(--color-text-primary);
	font-family: var(--font-serif);
	font-weight: 800;
	font-size: 28px;
	line-height: 1.2;
}

.page-about .about-author-card__name a {
	color: inherit;
	text-decoration: none;
}

.page-about .about-author-card__name a:hover,
.page-about .about-author-card__name a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.page-about .about-author-card__role {
	margin: 6px 0 0;
	color: var(--color-brand);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.5;
}

.page-about .about-author-card__bio {
	max-width: 860px;
	margin: 14px 0 0;
	color: var(--color-text-secondary);
	font-size: 15px;
	line-height: 1.9;
}

.page-about .about-author-card__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.page-about .about-author-card__fields li {
	padding: 7px 10px;
	color: var(--color-brand-dark);
	background: var(--color-brand-soft);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 800;
}

/* ── CMoney 數據 + CTA ────────────────────────────────────────────────────── */
.page-about .about-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	background: var(--color-border);
}

.page-about .about-metric {
	min-height: 205px;
	padding: 28px;
	background: #fff;
}

.page-about .about-metric__value {
	display: block;
	color: var(--color-brand-dark);
	font-family: var(--font-serif);
	font-weight: 800;
	font-size: clamp(36px, 5vw, 58px);
	line-height: 1;
}

.page-about .about-metric__label {
	display: block;
	margin-top: 12px;
	color: var(--color-text-primary);
	font-weight: 800;
}

.page-about .about-metric__desc {
	margin: 10px 0 0;
	color: var(--color-text-secondary);
	font-size: 15px;
	line-height: 1.7;
}

.page-about .about-cmoney__lead {
	max-width: 880px;
	margin: 40px 0 0;
	color: var(--color-text-secondary);
	font-size: 18px;
	line-height: 1.9;
	text-wrap: pretty;
}

.page-about .about-cmoney__cta {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px 32px;
	margin-top: 52px;
}

.page-about .about-cmoney__cta-text {
	margin: 0;
	color: var(--color-text-secondary);
	font-family: var(--font-serif);
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 700;
}

.page-about .about-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 30px;
	border-radius: 999px;
	color: #fff;
	background: var(--color-brand);
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
	transition: background 0.2s ease;
}

.page-about .about-btn:hover,
.page-about .about-btn:focus-visible {
	background: var(--color-brand-dark);
}

.page-about .about-btn svg {
	width: 18px;
	height: 18px;
}

/* ── 常見問題 ─────────────────────────────────────────────────────────────── */
.page-about .about-faq-list {
	display: grid;
	gap: 12px;
}

.page-about .about-faq__item {
	border: 1px solid var(--color-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--shadow-soft);
}

.page-about .about-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	cursor: pointer;
	padding: 22px 24px;
	color: var(--color-text-primary);
	font-weight: 800;
	list-style: none;
}

.page-about .about-faq__q::-webkit-details-marker {
	display: none;
}

/* chevron 箭頭：收合朝下、展開朝上，旋轉絲滑過渡（取代原本 +/− 字元切換，使其可動畫） */
.page-about .about-faq__q::after {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	margin-right: 2px;
	border-right: 2px solid var(--color-brand);
	border-bottom: 2px solid var(--color-brand);
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.3s ease;
}

.page-about .about-faq__item[open] .about-faq__q::after {
	transform: translateY(1px) rotate(225deg);
}

/* 答案收展：grid-template-rows 0fr↔1fr 絲滑過渡（自適應高度，無需 JS 量測）。
   .about-faq__a 設 display:grid 會覆寫 <details> 未開啟時 UA 對非 summary 子元素的
   display:none，讓內容常駐以便過渡；visibility 在收合動畫結束後才隱藏，兼顧無障礙
   （收合時內容不被輔助技術讀取、也不可被 Tab 聚焦）。 */
.page-about .about-faq__a {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 0.32s ease, visibility 0.32s;
}

.page-about .about-faq__item[open] .about-faq__a {
	grid-template-rows: 1fr;
	visibility: visible;
}

.page-about .about-faq__a-inner {
	overflow: hidden;
	min-height: 0;
}

.page-about .about-faq__a p {
	margin: 0;
	padding: 0 24px 24px;
	color: var(--color-text-secondary);
	line-height: 1.8;
}

/* 尊重「減少動態效果」系統偏好：關閉收展與箭頭過渡（仍可正常開合，只是瞬間） */
@media (prefers-reduced-motion: reduce) {
	.page-about .about-faq__a,
	.page-about .about-faq__q::after {
		transition: none;
	}
}

/* ── 平板（設計稿 1100 → 站台 991）──────────────────────────────────────────── */
@media (max-width: 991px) {
	.page-about .about-section__header {
		grid-template-columns: 1fr;
	}

	.page-about .about-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.page-about .about-topic-card {
		flex-basis: calc((100% - 16px) / 2);
	}
}

/* ── 手機（設計稿 720 → 站台 767）──────────────────────────────────────────── */
@media (max-width: 767px) {
	.page-about .about-hero {
		padding: 56px 0 120px;
	}

	.page-about .about-hero__lead {
		font-size: 18px;
	}

	.page-about .about-section {
		padding: 58px 0;
	}

	.page-about .about-metrics {
		grid-template-columns: 1fr;
	}

	.page-about .about-topic-card {
		flex-basis: 100%;
		min-height: auto;
	}

	.page-about .about-metric {
		min-height: auto;
	}

	.page-about .about-topic-card__slogan {
		white-space: normal;
		text-wrap: balance;
	}

	.page-about .about-author-card {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 14px;
		padding: 22px;
	}

	.page-about .about-author-card__photo {
		width: 88px;
		height: 88px;
	}

	.page-about .about-cmoney__cta {
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
	}
}
