/* ==========================================================================
   refine.css — 全站精修层
   --------------------------------------------------------------------------
   定位：最后加载的单一覆盖层。旧样式表历史包袱重（60 处 !important、
   Bootstrap 工具类对冲），本层用「页面类型类」提高特异性，不再往旧表里
   继续叠加权重。今后所有视觉改动优先写在这里，一处生效全站。

   设计语言（主题驱动，不套通用暗色模板）
   · 墨黑三层：#08080a / #0e0e11 / #16161a，比纯黑多一点层次
   · 纸白：#f2f0eb（略暖，呼应包装/印刷作品的纸张），替代刺眼纯白
   · 朱砂红：#d6453a，取自站内大量红盒包装与答谢会主视觉，
     只用于当前项、CTA、状态标签这类「一处用力」的位置
   · 字阶六档、间距五级；正文行宽 ≤ 70ch，标题左对齐为主
   ========================================================================== */

:root {
	--ink-900: #08080a;
	--ink-800: #0e0e11;
	--ink-700: #16161a;
	--paper: #f2f0eb;
	--paper-dim: #a8a6a1;
	--paper-mute: #8d8b86;
	--accent: #d6453a;

	--t-xs: 11px;
	--t-sm: 13px;
	--t-base: 15px;
	--t-md: 19px;
	--t-lg: 28px;
	--t-xl: clamp(34px, 5vw, 64px);

	--sp-1: 8px;
	--sp-2: 16px;
	--sp-3: 24px;
	--sp-4: 40px;
	--sp-5: 72px;

	--radius: 10px;
}

/* ---- A10 / E7：焦点可见 + 跳转主内容 ---- */
.skip-link {
	position: fixed;
	top: -80px;
	left: var(--sp-3);
	z-index: 9999;
	padding: 10px 18px;
	background: var(--paper);
	color: var(--ink-900);
	border-radius: 0 0 var(--radius) var(--radius);
	font-size: var(--t-sm);
	text-decoration: none;
	transition: top .18s ease;
}
.skip-link:focus { top: 0; }
a:focus-visible, button:focus-visible, input:focus-visible,
[tabindex]:focus-visible, summary:focus-visible {
	outline: 2px solid rgba(242, 240, 235, .62) !important;
	outline-offset: 3px;
}

/* ---- A6：页面大标题改实心，黑底上不再靠细描边认字 ---- */
.heading-text-front h1.title,
.heading-text-front .title,
.main-title h1 {
	color: var(--paper) !important;
	-webkit-text-stroke: 0 !important;
	text-shadow: 0 2px 28px rgba(0, 0, 0, .55);
}

/* ---- A3：开场语法分档，不再全站「满屏黑 + 居中标题」 ---- */
.type-list .main-head,
.type-text .main-head,
.type-error .main-head { height: 62vh; min-height: 400px; }
.type-text .main-head,
.type-error .main-head { height: 48vh; min-height: 340px; }

.type-list .heading-text-front,
.type-text .heading-text-front,
.type-error .heading-text-front {
	left: 7vw;
	width: 78%;
	text-align: left;
	transform: translateY(-50%);
}
.type-list .heading-text-front h1,
.type-list .heading-text-back .title,
.type-text .heading-text-front h1,
.type-text .heading-text-back .title {
	text-align: left !important;
}
.type-list .heading-text-back,
.type-text .heading-text-back { display: none; }

/* ---- A1 / D2：案例页首屏出主视觉图 ---- */
.work-detail-page .main-head {
	height: 72vh;
	min-height: 480px;
	z-index: 0;
	overflow: hidden;
	background: var(--ink-900);
}
.bg-detail-work,
.bg-detail-work-2 {
	display: block !important;
	position: absolute;
	inset: -2%;
	background-size: cover;
	background-position: center;
	opacity: .5;
	filter: saturate(.9) contrast(1.04);
	transform: scale(1.03);
}
.work-detail-page .main-head::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(8,8,10,.93) 0%, rgba(8,8,10,.58) 48%, rgba(8,8,10,.2) 100%),
		linear-gradient(0deg, rgba(8,8,10,.92) 0%, transparent 58%);
}
.work-detail-page .heading-text-front {
	left: 7vw;
	top: auto;
	bottom: 11%;
	width: 86%;
	text-align: left;
	transform: none;
	z-index: 3;
}
.work-detail-page .heading-text-front h1,
.work-detail-page .heading-text-front .title { text-align: left !important; }
.work-detail-page .heading-text-back { display: none; }
.work-detail-page .main-head .hero-kicker {
	color: var(--accent);
	font-size: var(--t-sm);
	letter-spacing: .16em;
	margin: 0 0 var(--sp-2);
}
.work-detail-page .main-head .hero-sub {
	color: var(--paper-dim);
	font-size: var(--t-base);
	line-height: 1.7;
	max-width: 52ch;
	margin: var(--sp-2) 0 0;
}

/* ---- A2：关于页，标题让位给图，不再被压住 ---- */
.page-about .bg-about {
	left: auto;
	right: 6vw;
	top: 22vh;
	width: 24vw;
	height: 32vh;
	z-index: 2;
}
.page-about .bg-about-2 {
	left: 8vw;
	top: 34vh;
	width: 22vw;
	height: 40vh;
	z-index: 2;
}
.page-about .heading-text-front {
	left: 50%;
	top: 24%;
	width: 86%;
	transform: translateX(-50%);
	z-index: 5;
}
.page-about .heading-text-back { display: none; }

/* ---- A4：首页标语成为主张，品牌名退为标识 ---- */
.type-home .heading-text-front .brand-slogan,
.type-home .heading-text-back .brand-slogan {
	font-size: clamp(26px, 3.6vw, 46px);
	letter-spacing: .12em;
	font-weight: 600;
	color: var(--paper) !important;
	-webkit-text-stroke: 0 !important;
	margin-bottom: var(--sp-3);
}
.type-home .heading-text-front .brand-name,
.type-home .heading-text-back .brand-name {
	font-size: clamp(20px, 2.4vw, 32px);
	letter-spacing: .28em;
	opacity: .82;
}
.type-home .heading-text-front .description { color: var(--paper-dim); }

/* ---- A5 / B6：项目分类卡片 + 案例三向导航 ---- */
.acc-thumb {
	width: 84px;
	height: 62px;
	border-radius: 6px;
	overflow: hidden;
	flex: 0 0 auto;
	background: var(--ink-700);
}
.acc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.acc-label { flex: 1 1 auto; min-width: 0; }
.acc-count {
	font-size: var(--t-xs);
	color: var(--paper-mute);
	margin-left: var(--sp-2);
	white-space: nowrap;
}
.accordion-header { gap: var(--sp-2); }
.accordion-header h3 { font-size: var(--t-md) !important; }

.case-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--sp-3);
	max-width: 1120px;
	margin: var(--sp-5) auto 0;
	padding: var(--sp-3) var(--sp-4);
	border-top: 1px solid rgba(242,240,235,.14);
	border-bottom: 1px solid rgba(242,240,235,.14);
}
.case-nav a {
	color: var(--paper-dim);
	text-decoration: none;
	font-size: var(--t-sm);
	transition: color .2s ease;
}
.case-nav a:hover { color: var(--paper); }
.case-nav .case-nav-home { color: var(--accent); }

/* ---- A7：设计分享改为卡片式，密度与全站对齐 ---- */
.share-item {
	grid-template-columns: 200px minmax(0, 1fr) 24px;
	padding: var(--sp-3) var(--sp-3) !important;
	margin-bottom: var(--sp-2);
	border-bottom: 0 !important;
	border-radius: var(--radius);
	background: rgba(242, 240, 235, .035);
	transition: background .2s ease, box-shadow .2s ease;
}
.share-item:hover {
	background: rgba(242, 240, 235, .07);
	box-shadow: inset 2px 0 0 var(--accent);
}
.share-desc { line-height: 1.85 !important; color: var(--paper-dim); }

/* ---- A8：文章页开场 ---- */
.type-article .main-head { height: 52vh; min-height: 360px; }
.type-article .detail-title { font-size: var(--t-xl); }
.type-article .article-intro {
	color: var(--paper-dim);
	font-size: var(--t-base);
	line-height: 1.8;
	max-width: 60ch;
	margin-top: var(--sp-3);
}

/* ---- B7 / D1：联系 CTA 与手机菜单 ---- */
.nav-cta {
	margin-left: var(--sp-3);
	padding: 8px 18px;
	border: 1px solid rgba(242, 240, 235, .30);
	border-radius: 999px;
	color: var(--paper) !important;
	font-size: var(--t-sm);
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s ease;
}
.nav-cta:hover { background: rgba(242, 240, 235, .08); }
.m-nav { display: none; }

/* ---- D4：回到顶部 ---- */
.to-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 900;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(242,240,235,.24);
	border-radius: 50%;
	background: rgba(14,14,17,.86);
	color: var(--paper);
	text-decoration: none;
	font-size: 18px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, background .2s ease;
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--accent); }

/* 状态标签（B8） */
.status-tag {
	display: inline-block;
	margin-left: .4em;
	padding: 2px 9px;
	border: 1px solid var(--accent);
	border-radius: 999px;
	color: var(--accent);
	font-size: var(--t-xs);
	vertical-align: middle;
	letter-spacing: .04em;
}

/* ---- 移动端 ---- */
@media (max-width: 767.98px) {
	/* D1：横向挤成一行的导航换成可展开菜单，点击区 ≥ 44px */
	.nav-links { display: none !important; }
	.m-nav {
		display: block;
		margin-left: auto;
		position: relative;
	}
	.m-nav > summary {
		list-style: none;
		padding: 12px 14px;
		min-width: 56px;
		min-height: 44px;
		display: grid;
		place-items: center;
		color: var(--paper);
		font-size: var(--t-sm);
		border: 1px solid rgba(242,240,235,.2);
		border-radius: var(--radius);
		cursor: pointer;
	}
	.m-nav > summary::-webkit-details-marker { display: none; }
	.m-nav-panel {
		position: absolute;
		right: 0;
		top: calc(100% + 8px);
		width: min(78vw, 280px);
		padding: var(--sp-1);
		background: var(--ink-800);
		border: 1px solid rgba(242,240,235,.14);
		border-radius: var(--radius);
		box-shadow: 0 18px 48px rgba(0,0,0,.6);
		z-index: 1000;
	}
	.m-nav-panel a {
		display: block;
		padding: 13px 14px;
		min-height: 44px;
		color: var(--paper-dim);
		text-decoration: none;
		font-size: var(--t-base);
		border-radius: 6px;
	}
	.m-nav-panel a:hover,
	.m-nav-panel a[aria-current="page"] { color: var(--paper); background: rgba(242,240,235,.06); }
	.m-nav-panel .nav-cta {
		display: block;
		text-align: center;
		margin: var(--sp-1) 0 0;
	}
	.nav-cta { display: none; }

	/* 案例 hero 在手机上保住标题可读 */
	.work-detail-page .main-head { height: 62vh; min-height: 420px; }
	.work-detail-page .heading-text-front { left: 24px; width: calc(100% - 48px); bottom: 12%; }
	.work-detail-page .main-head .hero-sub { font-size: var(--t-sm); }
	.bg-detail-work,
	.bg-detail-work-2 { opacity: .42; }

	/* 关于页图片不再压字 */
	.page-about .bg-about { right: 4vw; top: 40vh; width: 42vw; height: 22vh; }
	.page-about .bg-about-2 { left: 4vw; top: 60vh; width: 40vw; height: 26vh; }
	.page-about .heading-text-front { top: 18%; }
	.page-about .heading-text-front h1 { font-size: var(--t-lg); }

	.type-list .main-head, .type-text .main-head, .type-error .main-head { height: 42vh; min-height: 300px; }
	.type-list .heading-text-front, .type-text .heading-text-front, .type-error .heading-text-front {
		left: 24px; width: calc(100% - 48px);
	}
	.acc-thumb { width: 60px; height: 48px; }
	.accordion-header { padding: 14px 12px; }
	.case-nav { flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) var(--sp-2); }
	.share-item { grid-template-columns: minmax(0, 1fr) 20px; gap: var(--sp-1); }
	.share-go { display: none; }
}

/* ---- D5：晕动敏感用户给走廊页一个静态模式 ---- */
@media (prefers-reduced-motion: reduce) {
	body.corridor-page .cw-row,
	body.corridor-page * { animation: none !important; transition: none !important; }
	.skip-link, .to-top { transition: none !important; }
}

/* ---- B4：案例项目说明（左对齐、行宽受控，和图片展示区分开）---- */
.case-intro {
	max-width: 70ch;
	padding: var(--sp-4) 0 var(--sp-2);
	border-bottom: 1px solid rgba(242,240,235,.12);
}
.case-intro h3 {
	font-size: var(--t-md);
	color: var(--accent);
	margin: 0 0 var(--sp-2);
	letter-spacing: .04em;
}
.case-intro p {
	font-size: var(--t-base);
	line-height: 1.95;
	color: var(--paper-dim);
	margin: 0;
}
.acc-label h3 { margin: 0; }
@media (max-width: 767.98px) {
	.case-intro { padding: var(--sp-3) var(--sp-3) var(--sp-2); }
	.case-intro p { font-size: var(--t-sm); line-height: 1.9; }
	.acc-count { display: none; }
}

/* ---- C3：错误页次按钮 ---- */
.error-button + .error-button {
	margin-left: var(--sp-2);
	background: transparent;
	border-color: rgba(242,240,235,.3);
}

/* ==========================================================================
   回归修正（首轮视觉自查后）
   ========================================================================== */

/* 首页标语防呆：任何入场动画/脚本延迟都不许把主张藏起来 */
.type-home .heading-text-front {
	opacity: 1 !important;
	visibility: visible !important;
}
.type-home .heading-text-front .brand-slogan,
.type-home .heading-text-back .brand-slogan {
	opacity: 1 !important;
	visibility: visible !important;
	display: block !important;
}

/* A2：about 带 type-text 类，首屏被压到 48vh 会把两张图裁掉，这里单独给足高度 */
.page-about .main-head { height: 64vh; min-height: 440px; }
.page-about .bg-about { top: 18vh; height: 28vh; width: 22vw; }
.page-about .bg-about-2 { top: 30vh; height: 30vh; width: 22vw; left: 8vw; }

/* A3：列表/文章页标题左对齐（它们的 h1 在 .main-title，不在 heading-text 里） */
.type-list .main-title,
.type-article .main-title { padding-left: 7vw; }
.type-list .main-title h1,
.type-list .main-title span,
.type-article .main-title h1,
.type-article .article-intro { text-align: left !important; }
.type-list .main-title h1,
.type-article .main-title h1 { margin-left: 0 !important; }

/* A7：分享条目卡片感加强（原表选择器更具体，这里提高特异性） */
body.type-text .share-item {
	background: rgba(242, 240, 235, .045) !important;
	border: 1px solid rgba(242, 240, 235, .08) !important;
	border-radius: var(--radius) !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
body.type-text .share-item:hover {
	background: rgba(242, 240, 235, .075) !important;
	border-color: rgba(214, 69, 58, .35) !important;
}

@media (max-width: 767.98px) {
	.page-about .main-head { height: 70vh; min-height: 500px; }
	.page-about .bg-about { top: 42vh; height: 20vh; width: 42vw; }
	.page-about .bg-about-2 { top: 46vh; height: 20vh; width: 40vw; left: 6vw; }
	.type-list .main-title,
	.type-article .main-title { padding-left: 24px; padding-right: 24px; }
}

/* 列表/文章页标题：压过 Bootstrap .text-center 的 !important */
body.type-list .main-title.text-center,
body.type-article .main-title.text-center,
body.type-list .main-title.text-center h1,
body.type-article .main-title.text-center h1,
body.type-list .main-title.text-center span,
body.type-article .main-title.text-center span,
body.type-list .main-title.text-center p,
body.type-article .main-title.text-center p {
	text-align: left !important;
}
body.type-list .main-title.text-center::before,
body.type-article .main-title.text-center::before { left: 0; transform: none; }

/* A1 加固：hero 背景挂在 main-head 本体，视差层只作叠加，JS 不跑也有图 */
.work-detail-page .main-head {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--ink-900);
}
/* 列表标题真正靠页面左边，而不是在居中的 80% 容器里左对齐 */
body.type-list .main-title.text-center,
body.type-article .main-title.text-center {
	max-width: none;
	margin-left: 0;
	padding-left: 0;
}
