/**
 * 才荟智 · 知识首页 Hero
 * 所有选择器均以 czh- / cz- 前缀限定，避免污染主题样式。
 */

.czh-shell,
.czh-page {
	--czh-primary: #1f6bf5;
	--czh-primary-deep: #1558d6;
	--czh-navy: #14213a;
	--czh-ink: #22314e;
	--czh-muted: #5d6e88;
	--czh-max: 1200px;
	--czh-radius: 20px;
	--czh-gap: 16px;
	--czh-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--czh-navy);
	font-family: var(--czh-font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.czh-shell *,
.czh-shell *::before,
.czh-shell *::after,
.czh-page *,
.czh-page *::before,
.czh-page *::after,
.czh-nav *,
.czh-foot * {
	box-sizing: border-box;
}

.czh-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.cz-icon {
	width: 18px;
	height: 18px;
	display: block;
}

/* ============================ 首屏 ============================ */

.cz-hz {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 62px 0 76px;
	background:
		linear-gradient(114deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 68%),
		radial-gradient(1120px 640px at 86% -4%, #cfe0fc 0%, rgba(207, 224, 252, 0) 62%),
		radial-gradient(820px 520px at 2% 98%, #e8f1fe 0%, rgba(232, 241, 254, 0) 68%),
		linear-gradient(168deg, #e3edfb 0%, #edf4fd 44%, #fbfdff 100%);
}

.cz-hz::before {
	content: "";
	position: absolute;
	left: -14%;
	bottom: -38%;
	width: 66%;
	height: 76%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 72%);
	pointer-events: none;
	z-index: 0;
}

.cz-hz__mesh {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.55;
	background-image:
		linear-gradient(118deg, rgba(31, 107, 245, 0.055) 1px, transparent 1px),
		linear-gradient(62deg, rgba(31, 107, 245, 0.04) 1px, transparent 1px);
	background-size: 44px 44px, 44px 44px;
	-webkit-mask-image: radial-gradient(58% 62% at 78% 42%, #000 0%, transparent 74%);
	mask-image: radial-gradient(58% 62% at 78% 42%, #000 0%, transparent 74%);
}

.cz-hz__glow {
	position: absolute;
	right: -10%;
	top: -30%;
	width: 70%;
	height: 80%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 70%);
	pointer-events: none;
	z-index: 0;
}

.cz-hz__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--czh-max);
	margin: 0 auto;
	padding: 0 30px;
}

.cz-hz__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
	align-items: center;
	gap: 48px;
}

/* ---------------------------- 左侧文案 ---------------------------- */

.cz-hz__title {
	margin: 0 0 22px;
	padding: 0;
	font-family: inherit;
	font-size: clamp(32px, 4.05vw, 58px);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -0.02em;
	color: var(--czh-navy);
}

.cz-hz__title-line {
	display: block;
}

.cz-hz__sub {
	margin: 0 0 38px;
	font-size: clamp(15px, 1.35vw, 19px);
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.1em;
	color: var(--czh-muted);
}

.cz-hz__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.cz-hz__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	padding: 0 34px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.28s ease,
		background-color 0.28s ease;
}

.cz-hz__btn:focus-visible {
	outline: 3px solid rgba(31, 107, 245, 0.4);
	outline-offset: 3px;
}

.cz-hz__btn--primary {
	color: #fff;
	background: linear-gradient(135deg, #3d84ff 0%, var(--czh-primary-deep) 100%);
	box-shadow: 0 14px 30px -12px rgba(21, 88, 214, 0.75);
}

.cz-hz__btn--primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 20px 36px -14px rgba(21, 88, 214, 0.8);
}

.cz-hz__btn--ghost {
	color: var(--czh-navy);
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.95);
	box-shadow: 0 12px 28px -18px rgba(20, 33, 58, 0.55);
}

.cz-hz__btn--ghost:hover {
	color: var(--czh-navy);
	background: #fff;
	transform: translateY(-2px);
	box-shadow: 0 18px 32px -18px rgba(20, 33, 58, 0.5);
}

/* ---------------------------- 搜索条 ---------------------------- */

.cz-hz__search {
	margin: 0 0 14px;
}

.cz-hz__search-field {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 56px;
	padding: 0 12px 0 20px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 999px;
	box-shadow: 0 18px 40px -26px rgba(20, 33, 58, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.cz-hz__search-field:focus-within {
	border-color: rgba(31, 107, 245, 0.35);
	box-shadow: 0 20px 44px -24px rgba(21, 88, 214, 0.5), 0 0 0 4px rgba(31, 107, 245, 0.1);
}

.cz-hz__search-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	color: #9aa8bd;
}

.cz-hz__search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	outline: none;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	line-height: 1;
	color: var(--czh-navy);
	-webkit-appearance: none;
	appearance: none;
}

.cz-hz__search-input::-webkit-search-cancel-button {
	display: none;
}

.cz-hz__search-input::placeholder {
	color: #93a2b9;
	opacity: 1;
}

.cz-hz__search-btn {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #90a0b8;
	background: transparent;
	border: 1px dashed rgba(20, 33, 58, 0.26);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.cz-hz__search-btn .cz-icon {
	width: 14px;
	height: 14px;
}

.cz-hz__search-btn:hover {
	color: var(--czh-primary);
	background: rgba(31, 107, 245, 0.06);
	border-color: rgba(31, 107, 245, 0.45);
}

/* ---------------------------- 卡片 ---------------------------- */

.cz-hz__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: auto;
	gap: var(--czh-gap);
}

.cz-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 184px;
	padding: 22px 24px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: var(--czh-radius);
	background: var(--czh-card-bg);
	box-shadow: 0 20px 40px -34px rgba(20, 33, 58, 0.55);
	text-decoration: none;
	isolation: isolate;
	transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.34s ease;
	-webkit-backdrop-filter: blur(6px) saturate(1.04);
	backdrop-filter: blur(6px) saturate(1.04);
}

.cz-card:focus-visible {
	outline: 3px solid rgba(31, 107, 245, 0.42);
	outline-offset: 3px;
}

.cz-card--article {
	--czh-card-bg: linear-gradient(152deg, #f3f5f9 0%, #e5eaf3 100%);
}

.cz-card--topic {
	--czh-card-bg: linear-gradient(152deg, #edf1fe 0%, #dde6fb 100%);
}

.cz-card--special {
	--czh-card-bg: linear-gradient(152deg, #e8f6f4 0%, #d8eef0 100%);
}

.cz-card--note {
	--czh-card-bg: linear-gradient(152deg, #ffffff 0%, #eff5fb 100%);
}

.cz-card__title {
	position: relative;
	z-index: 2;
	display: block;
	flex: 0 0 auto;
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.42;
	letter-spacing: 0.01em;
	color: var(--czh-navy);
	transition: color 0.25s ease;
}

.cz-card__desc {
	position: relative;
	z-index: 2;
	display: block;
	flex: 0 0 auto;
	max-width: 64%;
	font-size: 12px;
	line-height: 1.9;
	letter-spacing: 0.01em;
	color: #6a7b95;
	word-break: normal;
	overflow-wrap: break-word;
}

.cz-card__art {
	position: absolute;
	right: -14px;
	bottom: -16px;
	z-index: 1;
	display: block;
	width: 58%;
	max-width: 208px;
	pointer-events: none;
	opacity: 0.98;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cz-card__art svg,
.cz-art {
	display: block;
	width: 100%;
	height: auto;
}

.cz-card__shine {
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	background: radial-gradient(120% 90% at 88% 0%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 62%);
	opacity: 0.75;
	pointer-events: none;
}

/* 个人卡片 */
.cz-card--profile {
	padding: 20px 22px 22px;
}

.cz-card__avatar {
	position: relative;
	z-index: 2;
	display: block;
	width: 42px;
	height: 42px;
	margin-bottom: 12px;
	border-radius: 50%;
	overflow: hidden;
	background: #e2eaf6;
	box-shadow: 0 8px 18px -12px rgba(20, 33, 58, 0.7);
}

.cz-card__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cz-card--profile .cz-card__title {
	font-size: 16.5px;
	line-height: 1.5;
	margin-bottom: 8px;
}

.cz-card--profile .cz-card__desc {
	max-width: 100%;
	font-size: 12px;
	line-height: 1.85;
	color: #78879d;
}

@media (hover: hover) {
	.cz-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 30px 50px -32px rgba(20, 33, 58, 0.42);
	}

	.cz-card:hover .cz-card__title {
		color: var(--czh-primary-deep);
	}

	.cz-card:hover .cz-card__art {
		transform: translateY(-4px) scale(1.03);
	}
}

/* 入场动画：仅在 JS 就绪时生效，脚本失效则内容始终可见 */
.czh-reveal {
	opacity: 1;
	transform: none;
}

.czh-js .czh-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
	transition-delay: var(--czh-delay, 0ms);
}

.czh-js .czh-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* ============================ 导航 ============================ */

.czh-nav {
	position: relative;
	z-index: 5;
	background: #fff;
	border-bottom: 1px solid rgba(20, 33, 58, 0.05);
}

.czh-nav__inner {
	display: flex;
	align-items: center;
	gap: 44px;
	max-width: var(--czh-max, 1200px);
	height: 78px;
	margin: 0 auto;
	padding: 0 30px;
}

.czh-nav__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: var(--czh-navy, #14213a);
	text-decoration: none;
}

.czh-nav__mark {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 30% 28%, #9ed0ff 0%, rgba(158, 208, 255, 0) 55%),
		conic-gradient(from 200deg, #7fb6ff, #a99bf6, #f3a6c8, #8fc7f2, #7fb6ff);
	box-shadow: 0 6px 14px -8px rgba(31, 107, 245, 0.9);
}

.czh-nav__links {
	display: flex;
	align-items: center;
	gap: 38px;
	flex: 1 1 auto;
	min-width: 0;
}

.czh-nav__link {
	position: relative;
	font-size: 15.5px;
	font-weight: 500;
	line-height: 78px;
	color: #24334d;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.24s ease;
}

.czh-nav__link::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 22px;
	width: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--czh-primary, #1f6bf5);
	transform: translateX(-50%);
	transition: width 0.26s ease;
}

.czh-nav__link:hover,
.czh-nav__link.is-current {
	color: var(--czh-primary, #1f6bf5);
}

.czh-nav__link.is-current::after {
	width: 18px;
}

.czh-nav__side {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 0 0 auto;
}

.czh-nav__icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: #3d4b63;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.24s ease, color 0.24s ease;
}

.czh-nav__icon:hover {
	color: var(--czh-primary, #1f6bf5);
	background: rgba(31, 107, 245, 0.08);
}

.czh-nav__avatar {
	display: block;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	overflow: hidden;
	background: #e2eaf6;
	box-shadow: 0 0 0 2px #fff, 0 6px 14px -8px rgba(20, 33, 58, 0.8);
	transition: transform 0.24s ease;
}

.czh-nav__avatar:hover {
	transform: scale(1.06);
}

.czh-nav__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================ 页脚 ============================ */

.czh-foot {
	background: #fff;
	padding: 22px 0 30px;
}

.czh-foot__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: var(--czh-max, 1200px);
	margin: 0 auto;
	padding: 0 30px;
}

.czh-foot__pill {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	background: #f3f6fb;
	font-size: 12.5px;
	color: #5d6e88;
	letter-spacing: 0.02em;
}

.czh-foot__meta {
	position: absolute;
	right: 30px;
	font-size: 12px;
	color: #9aa8bd;
}

/* ============================ 整页模板 ============================ */

.czh-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: #fff;
}

.czh-page .czh-shell {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.czh-page .cz-hz {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	padding: 56px 0 64px;
}

.czh-page .cz-hz__inner {
	width: 100%;
}

body.czh-body {
	margin: 0;
	padding: 0;
	background: #fff;
}

/* 接管首页时，首屏下方的页面正文区域 */
.czh-after {
	max-width: 1100px;
	margin: 0 auto;
	padding: 56px 30px 76px;
	font-family: var(--czh-font, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif);
	font-size: 15px;
	line-height: 1.95;
	color: #38465e;
}

.czh-after > *:first-child {
	margin-top: 0;
}

.czh-after img {
	max-width: 100%;
	height: auto;
}

/* ============================ 响应式 ============================ */

@media (max-width: 1080px) {
	.cz-hz__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.cz-hz {
		padding: 46px 0 56px;
	}

	.cz-hz__aside {
		max-width: 640px;
	}

	.cz-card__desc {
		max-width: 58%;
	}
}

@media (max-width: 860px) {
	.czh-nav__links {
		gap: 26px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.czh-nav__links::-webkit-scrollbar {
		display: none;
	}

	.czh-nav__inner {
		gap: 26px;
		padding: 0 20px;
	}

	.cz-hz__inner {
		padding: 0 20px;
	}
}

@media (max-width: 640px) {
	.cz-hz {
		padding: 38px 0 46px;
	}

	.cz-hz__title {
		margin-bottom: 14px;
	}

	.cz-hz__sub {
		margin-bottom: 26px;
		letter-spacing: 0.04em;
	}

	.cz-hz__btn {
		height: 46px;
		padding: 0 26px;
		font-size: 15px;
	}

	.cz-hz__cards {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: minmax(150px, auto);
	}

	.cz-card__desc {
		max-width: 66%;
	}

	.cz-card__art {
		right: -10px;
		bottom: -10px;
		width: 46%;
		max-width: 168px;
	}

	.cz-hz__search-field {
		height: 50px;
	}

	.czh-nav__links {
		display: none;
	}

	.czh-foot__meta {
		position: static;
		margin-left: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.czh-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.cz-card,
	.cz-hz__btn,
	.cz-card__art {
		transition: none;
	}
}
