/*
Theme Name: AI灯塔
Theme URI: https://ailighthouse.net
Author: AI灯塔
Description: AI灯塔官网主题（区块主题，深色科技风）。颜色、字体在「外观 → 编辑器 → 样式」里修改；首页内容在「页面 → 首页」里直接编辑。
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: ailighthouse
*/

:root {
	--lh-base: var(--wp--preset--color--base);
	--lh-surface: var(--wp--preset--color--surface);
	--lh-border: var(--wp--preset--color--border);
	--lh-text: var(--wp--preset--color--contrast);
	--lh-muted: var(--wp--preset--color--muted);
	--lh-gold: var(--wp--preset--color--accent);
	--lh-cyan: var(--wp--preset--color--accent-2);
	--lh-radius: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(245, 196, 81, .35); }
h1, h2, h3, .wp-block-heading { text-wrap: balance; }
p { text-wrap: pretty; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }

/* ---------- 页头 ---------- */
/* 吸顶要加在外层 <header>（模板部件容器）上：sticky 只能在父元素范围内生效，而外层和 .lh-header 一样高 */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.lh-header {
	position: relative;
	padding-top: 14px; padding-bottom: 14px;
	border-bottom: 1px solid rgba(36, 50, 77, .7);
}
/* 毛玻璃放在伪元素上：backdrop-filter 写在 .lh-header 本身会让手机全屏菜单（position: fixed）被困在页头里 */
.lh-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(10, 15, 30, .78);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
}
.lh-header .wp-block-site-title { margin: 0; display: flex; align-items: center; gap: 10px; letter-spacing: .02em; }
.lh-header .wp-block-site-title::before {
	content: ""; width: 26px; height: 26px; flex: none; border-radius: 8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23131C31'/%3E%3Cpath d='M32 10l8 10H24z' fill='%23F5C451'/%3E%3Crect x='26' y='22' width='12' height='28' rx='2' fill='%23E6EBF5'/%3E%3Crect x='20' y='50' width='24' height='5' rx='2.5' fill='%235EC8FF'/%3E%3C/svg%3E") center / cover;
}
.lh-header .wp-block-site-title a { text-decoration: none; }
.lh-header .wp-block-navigation a { text-decoration: none; transition: color .2s; }
.lh-header .wp-block-navigation a:hover { color: var(--lh-text); }
.lh-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--lh-base) !important; color: var(--lh-text) !important;
	padding: 24px;
}
.lh-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.15rem; padding: 8px 0; }
.lh-header .wp-block-navigation__responsive-container-open svg,
.lh-header .wp-block-navigation__responsive-container-close svg { fill: var(--lh-text); }

/* ---------- 首屏 ---------- */
.lh-hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding-top: clamp(80px, 14vh, 150px); padding-bottom: clamp(80px, 14vh, 150px);
	background:
		radial-gradient(900px 480px at 50% 0%, rgba(94, 200, 255, .12), transparent 70%),
		radial-gradient(700px 400px at 50% 100%, rgba(245, 196, 81, .08), transparent 70%);
}
.lh-hero::before {
	content: ""; position: absolute; z-index: -1; pointer-events: none;
	left: 50%; top: 42%; width: 160vmax; height: 160vmax; border-radius: 50%;
	transform: translate(-50%, -50%);
	background: conic-gradient(from 0deg, transparent 0deg, rgba(245, 196, 81, .10) 10deg, transparent 28deg);
	animation: lh-sweep 14s linear infinite;
}
.lh-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: linear-gradient(rgba(147, 161, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(147, 161, 184, .07) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
@keyframes lh-sweep { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lh-eyebrow {
	display: table; margin-left: auto !important; margin-right: auto !important;
	padding: 6px 16px; border: 1px solid var(--lh-border); border-radius: 999px;
	background: rgba(19, 28, 49, .7); color: var(--lh-muted);
	font-size: .85rem; letter-spacing: .12em;
}
.lh-hero-title {
	letter-spacing: -0.01em;
	background: linear-gradient(120deg, #FFFFFF 10%, var(--lh-gold) 55%, var(--lh-cyan) 95%);
	-webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.lh-hero-sub { color: var(--lh-muted); font-size: var(--wp--preset--font-size--large); max-width: 680px; margin-left: auto !important; margin-right: auto !important; }
.lh-hero .wp-block-buttons { margin-top: 36px !important; }
.lh-hero .wp-block-buttons, .lh-cta .wp-block-buttons { gap: 14px !important; }
.lh-hero { border-bottom: 1px solid rgba(36, 50, 77, .55); }

/* 描边按钮 */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--lh-text); border: 1px solid var(--lh-border);
	padding: calc(.8rem - 1px) calc(1.6rem - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--lh-gold); color: var(--lh-gold); background: transparent; }

/* ---------- 通用区块 ---------- */
.lh-section { padding-top: clamp(64px, 10vw, 112px); padding-bottom: clamp(64px, 10vw, 112px); }
.lh-section.lh-alt { background: var(--wp--preset--color--base-2); border-top: 1px solid rgba(36, 50, 77, .5); border-bottom: 1px solid rgba(36, 50, 77, .5); }
.lh-kicker { color: var(--lh-cyan); font-family: var(--wp--preset--font-family--mono); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px !important; }
.lh-section-title { margin-top: 0 !important; }
.lh-section-sub { color: var(--lh-muted); max-width: 640px; margin-left: auto !important; margin-right: auto !important; margin-bottom: 48px !important; }
.lh-grid { gap: 20px !important; }

/* 服务卡片 */
.lh-card {
	position: relative; height: 100%;
	padding: 28px 26px 24px;
	background: linear-gradient(180deg, rgba(19, 28, 49, .95), rgba(14, 22, 40, .95));
	border: 1px solid var(--lh-border); border-radius: var(--lh-radius);
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.lh-card:hover { transform: translateY(-4px); border-color: rgba(245, 196, 81, .55); box-shadow: 0 18px 40px -20px rgba(245, 196, 81, .35); }
.lh-card > * { margin-top: 0 !important; }
.lh-card h3 { margin-bottom: 10px !important; }
.lh-card p:last-child { color: var(--lh-muted); margin-bottom: 0; font-size: .95rem; line-height: 1.7; }
.lh-card-no { font-family: var(--wp--preset--font-family--mono); color: var(--lh-gold); font-size: .8rem; letter-spacing: .15em; margin-bottom: 14px !important; }

/* 流程 */
.lh-step { padding: 24px; border-left: 2px solid var(--lh-border); transition: border-color .25s; }
.lh-step:hover { border-left-color: var(--lh-gold); }
.lh-step > * { margin-top: 0 !important; }
.lh-step p:last-child { color: var(--lh-muted); margin-bottom: 0; }

/* 联系 */
.lh-cta {
	padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
	border: 1px solid var(--lh-border); border-radius: 24px;
	background:
		radial-gradient(600px 240px at 0% 0%, rgba(245, 196, 81, .12), transparent 70%),
		radial-gradient(600px 240px at 100% 100%, rgba(94, 200, 255, .12), transparent 70%),
		var(--lh-surface);
}
.lh-cta > * { margin-top: 0 !important; }
.lh-cta > .wp-block-buttons { margin-top: 28px !important; }
.lh-cta > .wp-block-buttons + p { margin-top: 28px !important; font-size: .9rem; }
.lh-muted { color: var(--lh-muted); }

/* ---------- 普通页面 / 文章 ---------- */
.lh-page { padding-top: 64px; padding-bottom: 96px; }
.lh-page .wp-block-post-title { margin-bottom: 32px; }

/* ---------- 页脚 ---------- */
.lh-footer { padding-top: 32px; padding-bottom: 32px; border-top: 1px solid var(--lh-border); color: var(--lh-muted); font-size: .875rem; }
.lh-footer p { margin: 0; }
.lh-footer a { color: var(--lh-muted); text-decoration: none; }
.lh-footer a:hover { color: var(--lh-gold); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.lh-hero::before { animation: none; }
	.lh-card, .lh-card:hover { transition: none; transform: none; }
}
