/* ==========================================================================
   苹果风动态首页（仅在首页加载）
   —— 大留白、超大字重对比、滚动渐显、视差、毛玻璃导航、头像浮动

   注意：所有组件选择器都带 .ah-main 前缀，目的是压过 tech.css 里
   `body.tech-dark h1/img/article {...}` 这类基础规则（否则圆角、渐变字会被覆盖）。
   ========================================================================== */

.ah-main {
	--ah-fg: #f5f5f7;
	--ah-muted: #86868b;
	--ah-accent: #2997ff;
	--ah-card: rgba(255, 255, 255, 0.045);
	--ah-line: rgba(255, 255, 255, 0.09);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
		"PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
	overflow-x: clip;
}

/* 首页把粒子压淡一点，更接近苹果那种"干净" */
body.tech-dark #tech-particles {
	opacity: 0.5;
}

/* ---------- 滚动渐显：默认可见，只有 JS 就绪时才做动画 ---------- */
.ah-main .ah-reveal {
	opacity: 1;
	transform: none;
}

html.ah-js .ah-main .ah-reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

html.ah-js .ah-main .ah-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* ---------- 英雄区 ---------- */
.ah-main .ah-hero {
	position: relative;
	min-height: 92vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 96px 24px 120px;
	text-align: center;
	overflow: hidden;
}

.ah-main .ah-hero-glow {
	position: absolute;
	left: -10%;
	right: -10%;
	top: -20%;
	height: 130%;
	background:
		radial-gradient(46% 42% at 50% 18%, rgba(41, 151, 255, 0.20), transparent 70%),
		radial-gradient(40% 38% at 78% 42%, rgba(124, 92, 255, 0.16), transparent 72%);
	filter: blur(6px);
	pointer-events: none;
}

.ah-main .ah-hero-inner {
	position: relative;
	z-index: 1;
	max-width: 860px;
	width: 100%;
}

/* 头像：强制圆形（压过 tech.css 的 body.tech-dark img { border-radius: 12px }） */
.ah-main .ah-avatar {
	margin: 0 auto 34px;
	width: 168px;
	height: 168px;
	position: relative;
	animation: ah-float 7s ease-in-out infinite;
}

.ah-main .ah-avatar::after {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(41, 151, 255, 0.30), transparent 66%);
	filter: blur(12px);
	z-index: -1;
}

body.tech-dark .ah-main .ah-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50% !important;
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	display: block;
}

@keyframes ah-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-10px); }
}

/* 标题：渐变字（压过 tech.css 的 h1~h4 颜色） */
.ah-main .ah-title {
	margin: 0 0 18px;
	font-size: clamp(42px, 8.4vw, 92px);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -0.022em;
	background: linear-gradient(180deg, #ffffff 8%, #a9b2c4 96%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	text-shadow: none;
	-webkit-text-fill-color: transparent;
}

.ah-main .ah-sub {
	margin: 0 auto 34px;
	max-width: 560px;
	font-size: clamp(16px, 2vw, 21px);
	line-height: 1.75;
	color: var(--ah-muted) !important;
}

/* 按钮 */
.ah-main .ah-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

.ah-main .ah-btn {
	display: inline-block;
	padding: 13px 30px;
	border-radius: 980px;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s, box-shadow 0.25s;
}

.ah-main a.ah-btn-primary {
	background: var(--ah-accent);
	color: #ffffff !important;
	box-shadow: 0 10px 34px rgba(41, 151, 255, 0.34);
}

.ah-main a.ah-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 42px rgba(41, 151, 255, 0.46);
	text-shadow: none;
}

.ah-main a.ah-btn-ghost {
	border: 1px solid rgba(255, 255, 255, 0.26);
	color: var(--ah-fg) !important;
	background: rgba(255, 255, 255, 0.03);
}

.ah-main a.ah-btn-ghost:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, 0.09);
	text-shadow: none;
}

/* 统计数字 */
.ah-main .ah-stats {
	display: flex;
	justify-content: center;
	gap: 56px;
	flex-wrap: wrap;
	margin: 56px 0 0;
	padding: 26px 0 0;
	list-style: none;
	border-top: 1px solid var(--ah-line);
}

.ah-main .ah-stats li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: var(--ah-muted);
	letter-spacing: 0.04em;
}

.ah-main .ah-stats strong {
	font-size: 30px;
	font-weight: 600;
	color: var(--ah-fg);
	font-variant-numeric: tabular-nums;
}

/* 滚动提示 */
.ah-main .ah-scroll-hint {
	position: absolute;
	bottom: 34px;
	left: 50%;
	transform: translateX(-50%);
	width: 24px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 14px;
	display: flex;
	justify-content: center;
	padding-top: 7px;
}

.ah-main .ah-scroll-hint span {
	width: 3px;
	height: 8px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.75);
	animation: ah-scroll 1.8s ease-in-out infinite;
}

@keyframes ah-scroll {
	0%   { transform: translateY(0); opacity: 0; }
	35%  { opacity: 1; }
	100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- 通用区块 ---------- */
.ah-main .ah-section {
	max-width: 1040px;
	margin: 0 auto;
	padding: 132px 24px;
}

.ah-main .ah-section-title {
	margin: 0 0 18px;
	font-size: clamp(30px, 4.6vw, 52px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.018em;
	text-align: center;
	background: linear-gradient(180deg, #ffffff 10%, #b3bccd 98%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
}

.ah-main .ah-section-sub {
	margin: 0 auto 64px;
	max-width: 520px;
	text-align: center;
	color: var(--ah-muted) !important;
	font-size: 17px;
	line-height: 1.8;
}

/* ---------- 特性卡（压过 tech.css 的 article 卡片规则） ---------- */
.ah-main .ah-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 22px;
}

body.tech-dark .ah-main article.ah-card,
body.tech-dark .ah-main .ah-card {
	padding: 38px 32px;
	border-radius: 24px;
	background: var(--ah-card);
	border: 1px solid var(--ah-line);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s, background 0.4s, box-shadow 0.4s;
}

body.tech-dark .ah-main article.ah-card:hover,
body.tech-dark .ah-main .ah-card:hover {
	transform: translateY(-6px);
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(41, 151, 255, 0.35);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.ah-main .ah-card-icon {
	width: 46px;
	height: 46px;
	margin-bottom: 22px;
	color: var(--ah-accent);
}

.ah-main .ah-card-icon svg {
	width: 100%;
	height: 100%;
}

.ah-main .ah-card h3 {
	margin: 0 0 12px;
	font-size: 21px;
	font-weight: 600;
	color: var(--ah-fg) !important;
}

.ah-main .ah-card p {
	margin: 0;
	font-size: 15px;
	line-height: 1.85;
	color: var(--ah-muted) !important;
}

/* ---------- 最新文章 ---------- */
.ah-main .ah-section-posts {
	padding-top: 40px;
}

.ah-main .ah-posts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
	gap: 22px;
}

body.tech-dark .ah-main a.ah-post {
	display: block;
	padding: 32px 30px;
	border-radius: 24px;
	background: var(--ah-card);
	border: 1px solid var(--ah-line);
	text-decoration: none;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s, background 0.4s, box-shadow 0.4s;
}

body.tech-dark .ah-main a.ah-post:hover {
	transform: translateY(-6px);
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(41, 151, 255, 0.35);
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.ah-main .ah-post time {
	display: block;
	margin-bottom: 14px;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--ah-muted) !important;
}

.ah-main .ah-post h3 {
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--ah-fg) !important;
}

.ah-main .ah-post p {
	margin: 0 0 18px;
	font-size: 14.5px;
	line-height: 1.8;
	color: var(--ah-muted) !important;
}

.ah-main .ah-post-more {
	font-size: 14px;
	color: var(--ah-accent) !important;
}

.ah-main .ah-section-foot {
	margin-top: 56px;
	text-align: center;
}

/* ---------- 底部 CTA ---------- */
.ah-main .ah-cta {
	padding: 150px 24px 170px;
	text-align: center;
}

.ah-main .ah-cta h2 {
	margin: 0 0 20px;
	font-size: clamp(30px, 5.4vw, 62px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	background: linear-gradient(180deg, #ffffff 10%, #a9b2c4 96%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
}

.ah-main .ah-cta p {
	margin: 0;
	color: var(--ah-muted) !important;
	font-size: 15px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
	.ah-main .ah-hero {
		min-height: auto;
		padding: 72px 20px 96px;
	}

	.ah-main .ah-avatar {
		width: 128px;
		height: 128px;
		margin-bottom: 26px;
	}

	.ah-main .ah-stats {
		gap: 30px;
	}

	.ah-main .ah-section {
		padding: 92px 20px;
	}

	body.tech-dark .ah-main .ah-card,
	body.tech-dark .ah-main a.ah-post {
		padding: 28px 22px;
	}

	.ah-main .ah-cta {
		padding: 104px 20px 120px;
	}

	.ah-main .ah-scroll-hint {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.ah-js .ah-main .ah-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.ah-main .ah-avatar,
	.ah-main .ah-scroll-hint span {
		animation: none;
	}
}
