/**
 * 混元区块主题 · 补充样式
 *
 * 说明：颜色/字体/间距/布局等设计决策全部在 theme.json 中，用户可在「外观 → 编辑器 → 样式」里修改。
 * 本文件只承载 theme.json 难以表达的少量结构效果：渐变光球、吸顶导航、按钮变体、入场动画。
 */

/* ---------- 基础 ---------- */
html {
	scroll-behavior: auto;
}

body.hy-smooth-scroll,
html:has(body.hy-smooth-scroll) {
	scroll-behavior: smooth;
}

body.hy-theme {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks main.hy-main {
	flex: 1 0 auto;
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------- 吸顶导航 ---------- */
.hy-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
	backdrop-filter: saturate(180%) blur(12px);
}

.hy-site-header__inner {
	min-height: var(--wp--custom--hy-header-height, 56px);
	padding-block: 8px;
}

.hy-site-header__brand .wp-block-site-title {
	margin: 0;
}

.hy-site-header__actions .wp-block-search {
	margin-inline-end: 8px;
}

.hy-site-nav .wp-block-navigation-item__content {
	transition: color 0.18s ease;
}

/* ---------- 首屏渐变光球 ---------- */
.hy-hero {
	position: relative;
	overflow: hidden;
}

.hy-hero__inner {
	position: relative;
	padding-block: clamp(72px, 12vw, 160px) clamp(96px, 14vw, 200px);
	text-align: center;
}

.hy-hero__orb {
	position: absolute;
	top: 8%;
	left: 50%;
	width: min(560px, 80vw);
	height: min(560px, 80vw);
	transform: translateX(-50%);
	background: radial-gradient(circle at 38% 36%, rgba(255, 255, 255, 0.9) 0%, rgba(232, 240, 255, 0.85) 28%, rgba(216, 201, 255, 0.75) 55%, rgba(124, 77, 255, 0.12) 72%, transparent 78%);
	border-radius: 50%;
	filter: blur(4px);
	pointer-events: none;
	z-index: 0;
}

.hy-hero__title,
.hy-hero__desc,
.hy-hero__actions {
	position: relative;
	z-index: 1;
}

.hy-hero__title {
	background: linear-gradient(110deg, #111 0%, #0052d9 55%, #7c4dff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hy-hero__desc {
	max-width: 720px;
	margin-inline: auto;
}

.hy-hero__actions {
	margin-top: 32px;
}

/* ---------- 区块模式通用间距 ---------- */
.hy-section {
	padding-block: clamp(56px, 8vw, 112px);
}

.hy-section-head {
	margin-bottom: 40px;
	gap: 24px;
}

.hy-section-head__title {
	margin-bottom: 8px;
}

.hy-section-head__more a {
	color: var(--wp--preset--color--brand);
	text-decoration: none;
	font-weight: 500;
}

/* ---------- 卡片 ---------- */
.hy-research-card,
.hy-case-card {
	border-radius: var(--wp--custom--hy-radius, 8px);
	overflow: hidden;
	transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.hy-research-card:hover,
.hy-case-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--soft);
}

.hy-research-card__body,
.hy-case-card__body {
	padding: 24px;
}

.hy-research-card__meta {
	gap: 12px;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-soft);
	margin-bottom: 8px;
}

.hy-tag {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--wp--preset--color--brand);
	color: #fff;
	font-size: var(--wp--preset--font-size--xs);
}

.hy-model-card {
	padding: 32px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--hy-radius, 8px);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hy-model-card:hover {
	border-color: var(--wp--preset--color--brand);
	box-shadow: var(--wp--preset--shadow--soft);
}

.hy-model-card__cat {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--brand);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hy-direction-card {
	padding-inline: 16px;
}

/* ---------- 页脚 ---------- */
.hy-site-footer {
	padding-block: 64px 32px;
}

.hy-site-footer__inner {
	gap: 48px;
	margin-bottom: 48px;
}

.hy-site-footer__brand {
	flex: 1 1 260px;
	gap: 16px;
}

.hy-site-footer__brand .wp-block-site-title {
	color: var(--wp--preset--color--base);
}

.hy-site-footer__links {
	flex: 2 1 480px;
	gap: 32px;
}

.hy-site-footer__col {
	flex: 1 1 140px;
	gap: 12px;
}

.hy-site-footer__col h4 {
	font-size: var(--wp--preset--font-size--sm);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.9;
}

.hy-site-footer__list {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
	opacity: 0.75;
}

.hy-site-footer__list li {
	margin-bottom: 8px;
}

.hy-site-footer__sep {
	margin-block: 24px;
	opacity: 0.2;
}

.hy-site-footer__bottom {
	font-size: var(--wp--preset--font-size--xs);
	opacity: 0.55;
	gap: 12px;
}

/* ---------- 文章列表 ---------- */
.hy-archive-main,
.hy-single-main,
.hy-page-main {
	padding-block: 64px 96px;
}

.hy-page-head {
	margin-bottom: 48px;
}

.hy-post-card {
	padding-block: 24px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	gap: 12px;
}

.hy-post-card__meta {
	gap: 12px;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-soft);
}

.hy-single {
	gap: 20px;
}

.hy-single__meta,
.hy-single__tags {
	gap: 12px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--ink-soft);
}

.hy-comment {
	padding-block: 16px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.hy-related {
	margin-top: 72px;
}

/* ---------- 入场动画 ---------- */
@media (prefers-reduced-motion: no-preference) {
	.hy-theme .hy-main section {
		animation: hy-fade-in 0.6s ease both;
	}

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

/* ---------- 按钮变体（对应 register_block_style） ---------- */
.wp-block-button.is-style-hy-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--line);
}

.wp-block-button.is-style-hy-ghost .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand);
	background: transparent;
}

.wp-block-button.is-style-hy-gradient .wp-block-button__link {
	background: linear-gradient(110deg, #0052d9 0%, #7c4dff 100%);
	color: #fff;
}

.wp-block-button.is-style-hy-gradient .wp-block-button__link:hover {
	background: linear-gradient(110deg, #366ef4 0%, #8b6bff 100%);
	color: #fff;
}

.wp-block-button.is-style-hy-text .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--brand);
	padding-inline: 0;
}

.wp-block-button.is-style-hy-text .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--brand-hover);
}

.wp-block-group.is-style-hy-soft-card {
	border-radius: var(--wp--custom--hy-radius, 8px);
	box-shadow: var(--wp--preset--shadow--soft);
}

/* ---------- 响应式 ---------- */
@media (max-width: 782px) {
	.hy-site-header__actions .wp-block-search {
		display: none;
	}

	.hy-site-footer__inner {
		flex-direction: column;
	}

	.hy-hero__orb {
		width: 92vw;
		height: 92vw;
	}
}
