@charset "utf-8";
/* ------------------------------------------------------------------ *
 * 首页样式（2026-11-24 改版）
 *
 * 只被 src/views/site/index.ejs 引用。public/css/unit.css 仍归 unit.ejs 用，
 * 两边不要互相引用 —— unit.css 里的 #works / .panoCover / footer 规则会和新
 * 版式打架。
 *
 * 版心 1330px：与轮播图原始宽度一致，banner 在 1:1 状态下铺满。
 * ------------------------------------------------------------------ */
:root {
	--page: 1330px;
	--bg: #faf8f5;
	--card: #ffffff;
	--raised: #ffffff;
	--raised-2: #e6dfd5;
	--ink: #1c1917;
	--ink-2: #5b544c;
	--muted: #8a8177;
	--line: rgba(28, 25, 23, .10);
	--line-strong: rgba(28, 25, 23, .20);
	--accent: #b3392b;
	--r-card: 14px;
	--ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	background-color: var(--bg);
	color: var(--ink);
	font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.wrap {
	max-width: calc(var(--page) + 48px);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- 头部 ---------- */
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 0 20px;
}
.logo img { height: 46px; width: auto; }
.contact { display: flex; align-items: center; gap: 24px; }
.contact a,
.contact .qq {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--ink-2);
	font-size: 14px;
}
.contact a { transition: color 140ms var(--ease); }
.contact a:hover { color: var(--ink); }
.contact svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
	opacity: .75;
	flex: 0 0 auto;
}

/* ---------- 轮播：1330 版心，所有 banner 一律填满 1330×400 ---------- */
.hero {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: var(--raised);
	box-shadow: 0 1px 2px rgba(28, 25, 23, .06);
}
.stage { position: relative; background: var(--raised); overflow: hidden; }

.frame { display: none; background: var(--card); }
.frame.on { display: block; }
.frame .shot { height: 400px; background: var(--raised); overflow: hidden; }
.frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}
.frame .cap {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	border-top: 1px solid var(--line);
	background: var(--raised);
}
.frame .cap .t {
	margin: 0;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--ink);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 160ms var(--ease);
}
.frame:hover .cap .t { color: var(--accent); }
.frame .idx { color: var(--muted); font-size: 12px; letter-spacing: .06em; white-space: nowrap; }

.hero .nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: rgba(20, 17, 15, .40);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0;
	transition: opacity .18s var(--ease), background .18s var(--ease);
}
.hero:hover .nav { opacity: 1; }
.hero .nav:hover { background: rgba(20, 17, 15, .62); }
.hero .nav svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.hero .prev { left: 16px; }
.hero .next { right: 16px; }

/* ---------- 分类 ---------- */
.cats {
	display: flex;
	gap: 4px;
	margin-top: 16px;
	padding: 6px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow-x: auto;
	scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
	flex: 0 0 auto;
	padding: 8px 16px;
	border-radius: 8px;
	color: var(--ink-2);
	font-size: 14px;
	white-space: nowrap;
	transition: background 140ms var(--ease), color 140ms var(--ease);
}
.cats a:hover { background: var(--raised); color: var(--ink); }
.cats a.on {
	color: var(--ink);
	font-weight: 500;
	background: var(--raised);
	box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---------- 搜索：整条是一个控件，提交按钮收在里面 ---------- */
.search { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.search .field {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 0 6px 0 16px;
	transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.search .field:focus-within {
	border-color: var(--line-strong);
	box-shadow: 0 0 0 3px rgba(28, 25, 23, .04);
}
.search .field svg.mag {
	width: 16px;
	height: 16px;
	stroke: var(--muted);
	stroke-width: 1.5;
	fill: none;
	flex: 0 0 auto;
}
.search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	color: var(--ink);
	height: 100%;
}
.search input::placeholder { color: var(--muted); }
.search .go {
	height: 36px;
	padding: 0 18px;
	border: 0;
	border-radius: 8px;
	background: var(--ink);
	color: #fff;
	font-size: 13.5px;
	cursor: pointer;
	flex: 0 0 auto;
	transition: background 140ms var(--ease), transform 140ms var(--ease);
}
.search .go:hover { background: #000; }
.search .go:active { transform: scale(.97); }

/* 「全部作品」「全景足迹」：同高的描边小按钮，比搜索轻一档 */
.search .trail,
.search .reset {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--ink-2);
	background: var(--card);
	font-size: 14px;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 140ms var(--ease), color 140ms var(--ease), background 140ms var(--ease);
}
.search .trail:hover,
.search .reset:hover {
	border-color: var(--line-strong);
	color: var(--ink);
	background: var(--raised);
}
.search .trail svg,
.search .reset svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
	opacity: .8;
	flex: 0 0 auto;
}

/* ---------- 列表 ---------- */
.bar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 32px 0 16px;
}
.bar h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .02em; }
.bar span { color: var(--muted); font-size: 12px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	overflow: hidden;
	transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover {
	transform: translateY(-4px);
	border-color: var(--line-strong);
	box-shadow: 0 14px 30px rgba(28, 25, 23, .10);
}

.cover {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	background: var(--raised);
	overflow: hidden;
}
.cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .5s var(--ease);
}
.card:hover .cover img { transform: scale(1.045); }

.cover.empty { display: grid; place-items: center; background: var(--raised); }
.ph { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #7a7168; }
.ph svg {
	width: 46px;
	height: 46px;
	stroke: currentColor;
	stroke-width: 1.2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ph em { font-style: normal; font-size: 12.5px; letter-spacing: .1em; color: #857b71; }

.body { padding: 12px 16px 16px; }
.body h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 160ms var(--ease);
}
.card:hover .body h3 { color: var(--accent); }

.meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: var(--muted);
	font-size: 12px;
}
.meta svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
	flex: 0 0 auto;
}
.meta svg + span + svg { margin-left: 6px; }
.meta .cat {
	margin-left: auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50%;
}

#noResult { text-align: center; padding: 40px 0; margin: 0; color: var(--muted); }

/* ---------- 页脚 ---------- */
footer {
	margin-top: 56px;
	border-top: 1px solid var(--line);
	padding: 24px 0 36px;
	color: var(--ink-2);
	font-size: 13px;
}
footer img { display: inline-block; vertical-align: -4px; }
footer a { color: var(--ink-2); transition: color 140ms var(--ease); }
footer a:hover { color: var(--ink); }

.f-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
}
.f-nav .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .3; }
.f-icp { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.f-icp img { margin: 0 2px 0 4px; }
.f-icp a { color: var(--muted); }
.f-icp a:hover { color: var(--ink); }
.f-copy { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
	.grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
	.frame .shot { height: 360px; }
}
@media (max-width: 860px) {
	.grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
	.frame .shot { height: 300px; }
	/* 触屏没有 hover，箭头得一直可见 */
	.hero .nav, .hero:hover .nav { opacity: 1; }
}
@media (max-width: 680px) {
	.wrap { padding: 0 16px; }
	.top { padding: 18px 0 14px; gap: 12px; }
	.logo img { height: 38px; }
	.contact { gap: 14px; }
	.contact .lbl { display: none; }
	.search { flex-wrap: wrap; }
	.search .field { flex: 1 0 100%; }
	.frame .shot { height: 200px; }
	.frame .cap { padding: 10px 12px; gap: 10px; }
	.frame .cap .t { font-size: 14px; }
	.grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.card:hover { transform: none; }
	.body { padding: 8px 12px 12px; }
	.meta .cat { display: none; }
}
@media (max-width: 560px) {
	.grid { grid-template-columns: 1fr; }
	.ph svg { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.card, .cover img, .frame .cap .t, .cats a, .search .go, .search .trail, .search .reset,
	.hero .nav, footer a, .contact a {
		transition: none;
	}
	.card:hover { transform: none; }
	.card:hover .cover img { transform: none; }
}
