/*
设计：国内企业官网常规版式
配色：白底为主；主色取自 logo 的深蓝 #14508c，logo 的金 #ecb818 只用在版块标题上方短横
字体：中文系统字体栈；英文小标题用字距；数字用等宽表格数字
结构：顶条 → 白底吸顶导航 → 深蓝 Banner（右侧实拍图）→ 报告查询卡片 → 检测领域 → 关于我们 → 服务优势 → 深色页脚
*/

:root {
	--brand: #14508c;
	--brand-dark: #0f3d6b;
	--brand-light: #eaf2fa;
	--brand-line: #d5e2f0;
	--gold: #ecb818;
	--ink: #222222;
	--ink-soft: #666666;
	--ink-mute: #8c959f;
	--line: #e8eef6;
	--bg-soft: #f5f7fa;
	--white: #ffffff;
	--ok: #1a7f4b;
	--ok-bg: #eaf6ef;
	--danger: #c0392b;
	--danger-bg: #fdecea;
	--font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--ease: cubic-bezier(0.23, 1, 0.32, 1);
	--shadow: 0 4px 16px rgba(15, 59, 115, 0.08);
	--shadow-lg: 0 16px 40px rgba(15, 59, 115, 0.14);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	background: var(--white);
	font-family: var(--font-ui);
	font-size: 1rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
	/* 不写这句，HTML 上的 width/height 属性会当既存高度用，aspect-ratio 失效（领域图会变成 440 高） */
	height: auto;
}

h1,
h2,
h3,
p,
ul,
figure {
	margin: 0;
}

ul {
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

.icon {
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
	display: block;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 60;
	padding: 0.55rem 1rem;
	background: var(--brand);
	color: var(--white);
	font-size: 0.9rem;
}

.skip:focus {
	top: 0.75rem;
	outline: 2px solid var(--white);
	outline-offset: 2px;
}

/* 顶条 */
.topbar {
	background: var(--brand);
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.8125rem;
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 38px;
}

.topbar-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.topbar .icon {
	width: 0.95rem;
	height: 0.95rem;
	opacity: 0.85;
}

/* 头部 */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 1px 6px rgba(15, 59, 115, 0.06);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: 88px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex: 0 0 auto;
}

.logo-img {
	height: 52px;
	width: auto;
}

/* 页脚是深底，把 W 标放进白底托上，保留品牌色 */
.logo-chip {
	display: inline-flex;
	padding: 6px 8px;
	background: var(--white);
	border-radius: 4px;
}

.logo-chip img {
	height: 34px;
	width: auto;
}

.logo-text strong {
	display: block;
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	color: var(--brand);
}

.logo-text small {
	display: block;
	font-size: 0.625rem;
	letter-spacing: 0.22em;
	color: var(--ink-mute);
	text-transform: uppercase;
}

.nav {
	margin-inline-start: auto;
}

.nav ul {
	display: flex;
	gap: 0.25rem;
}

.nav a {
	display: block;
	padding: 0.6rem 0.95rem;
	border-radius: 3px;
	font-size: 0.9375rem;
	white-space: nowrap;
	color: #333333;
	transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.nav a.is-active {
	background: var(--brand);
	color: var(--white);
}

@media (hover: hover) and (pointer: fine) {
	.nav a:hover {
		background: var(--brand-light);
		color: var(--brand);
	}

	.nav a.is-active:hover {
		background: var(--brand-dark);
		color: var(--white);
	}
}

.header-tel {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex: 0 0 auto;
	padding-left: 1.25rem;
	border-left: 1px solid var(--line);
	color: var(--brand);
}

.header-tel small {
	display: block;
	font-size: 0.75rem;
	color: var(--ink-mute);
	line-height: 1.3;
}

.header-tel strong {
	display: block;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
}

.header-tel .icon {
	width: 1.6rem;
	height: 1.6rem;
}

/* Banner */
.banner {
	position: relative;
	background: linear-gradient(118deg, #0b2f57 0%, #14508c 42%, #1a6bb5 100%);
	overflow: hidden;
}

.banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 46px),
		radial-gradient(120% 90% at 88% 18%, rgba(255, 255, 255, 0.16), transparent 60%);
	pointer-events: none;
}

.banner-inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem);
	align-items: center;
	gap: 3rem;
	padding-top: 3.5rem;
	padding-bottom: 7.5rem;
}

.banner-copy {
	color: var(--white);
}

.banner-kicker {
	margin-bottom: 0.9rem;
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	color: rgba(255, 255, 255, 0.82);
}

.banner h1 {
	font-size: clamp(1.9rem, 3.4vw, 2.9rem);
	font-weight: 600;
	line-height: 1.28;
	letter-spacing: 0.04em;
}

.banner-sub {
	max-width: 34em;
	margin-top: 1rem;
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, 0.86);
}

.banner-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.6rem;
}

.banner-badges li {
	padding: 0.3rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.34);
	border-radius: 2px;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.9);
}

.banner-photo {
	justify-self: end;
	width: 100%;
	max-width: 30rem;
	padding: 0.4rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 3px;
}

.banner-photo img {
	width: 100%;
	height: 19rem;
	object-fit: cover;
	border-radius: 2px;
}

/* 版块 */
.section {
	padding: 4.5rem 0;
}

.section-scope,
.section-advantage {
	background: var(--bg-soft);
}

.section-title {
	position: relative;
	margin-bottom: 2.5rem;
	text-align: center;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--brand);
}

.section-title::before {
	content: "";
	display: block;
	width: 42px;
	height: 3px;
	margin: 0 auto 1.1rem;
	background: var(--gold);
}

.section-title small {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

.section-title.is-left {
	text-align: left;
	margin-bottom: 1.5rem;
}

.section-title.is-left::before {
	margin: 0 0 1.1rem;
}

/* 报告查询 */
.section-query {
	padding: 0 0 4.5rem;
}

.query-card {
	position: relative;
	margin-top: -4.5rem;
	padding: 2.5rem 2.5rem 2.25rem;
	background: var(--white);
	border-radius: 4px;
	box-shadow: var(--shadow-lg);
	text-align: center;
}

.query-tip {
	margin-top: -1.4rem;
	margin-bottom: 2rem;
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.query-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	max-width: 46rem;
	margin: 0 auto;
	text-align: left;
}

.query-label {
	flex: 0 0 auto;
	font-size: 0.9375rem;
	color: var(--ink-soft);
}

.query-input {
	flex: 1 1 18rem;
	min-width: 0;
	min-height: 50px;
	padding: 0.6rem 1rem;
	border: 1px solid #d5dde8;
	border-radius: 3px;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.query-input::placeholder {
	color: #a8b2bd;
}

.query-input:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 1px;
	border-color: var(--brand);
}

.query-input:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.query-input[aria-invalid="true"] {
	border-color: var(--danger);
	box-shadow: inset 0 0 0 1px var(--danger);
}

.btn-query {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	min-height: 50px;
	padding: 0 2.25rem;
	border: 1px solid var(--brand);
	border-radius: 3px;
	background: var(--brand);
	color: var(--white);
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: background-color 160ms var(--ease), transform 140ms var(--ease), box-shadow 160ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
	.btn-query:hover {
		background: var(--brand-dark);
		transform: translateY(-1px);
		box-shadow: 0 10px 22px rgba(15, 59, 115, 0.22);
	}
}

.btn-query:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

.btn-query:active {
	transform: scale(0.97);
}

.btn-query:disabled {
	opacity: 0.75;
	cursor: wait;
	transform: none;
	box-shadow: none;
}

.spinner {
	display: none;
	width: 0.95rem;
	height: 0.95rem;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: var(--white);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

.btn-query.htmx-request .spinner {
	display: inline-block;
}

.query-live {
	flex: 1 0 100%;
	height: 0;
	margin: 0;
	overflow: hidden;
	opacity: 0;
	text-align: center;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

form.htmx-request .query-live {
	height: auto;
	opacity: 1;
}

.query-error {
	max-width: 46rem;
	margin: 0.75rem auto 0;
	color: var(--danger);
	font-size: 0.9rem;
	text-align: left;
}

.query-error:empty {
	display: none;
}

/* 查询结果 */
.result-well {
	max-width: 46rem;
	margin: 1.75rem auto 0;
	text-align: left;
}

/* 没查询时容器是空的，别留出多余的间距 */
.result-well:empty {
	margin-top: 0;
}

.result-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.1rem;
	border-radius: 3px 3px 0 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--white);
}

.result-bar.is-ok {
	background: var(--ok);
}

.result-bar.is-fail {
	background: var(--danger);
}

.result-bar .icon {
	width: 1.25rem;
	height: 1.25rem;
}

.result-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--brand-line);
	border-top: 0;
	background: var(--white);
	table-layout: fixed;
}

.result-table th,
.result-table td {
	padding: 0.9rem 1.1rem;
	border-bottom: 1px solid var(--brand-line);
	text-align: left;
	vertical-align: top;
}

.result-table tr:last-child th,
.result-table tr:last-child td {
	border-bottom: 0;
}

.result-table th {
	width: 8.5rem;
	background: var(--brand-light);
	color: var(--brand);
	font-weight: 500;
	font-size: 0.9375rem;
}

.result-table td {
	color: var(--ink);
	font-size: 1rem;
	overflow-wrap: anywhere;
}

.result-table .num {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.file-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--brand);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.file-link:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.result-fail-body {
	padding: 1.5rem 1.1rem;
	border: 1px solid var(--brand-line);
	border-top: 0;
	border-radius: 0 0 3px 3px;
	background: var(--danger-bg);
	color: var(--ink);
	font-size: 1rem;
}

.result-notes {
	max-width: 46rem;
	margin: 1.75rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	color: var(--ink-soft);
	font-size: 0.9375rem;
	text-align: left;
}

/* 吸顶导航高度，锚点跳转别把自己藏到导航下面 */
#top,
#query,
#scope,
#about,
#advantage,
#contact {
	scroll-margin-top: 6.5rem;
}

.result-notes p {
	margin-bottom: 0.35rem;
}

.notes-title {
	font-weight: 600;
	color: var(--ink);
}

/* 中文序号「1、」，不用默认的「1.」 */
.result-notes ol {
	margin: 0.5rem 0 0;
	padding-left: 0;
	list-style: none;
	counter-reset: noteItem;
}

.result-notes li {
	position: relative;
	margin-bottom: 0.2rem;
	padding-left: 1.6rem;
	counter-increment: noteItem;
}

.result-notes li::before {
	content: counter(noteItem) "、";
	position: absolute;
	left: 0;
}

.result-notes a {
	color: var(--brand);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.result-notes a:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

/* 检测领域 */
.scope-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.scope-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 3px;
	overflow: hidden;
	transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.scope-card img {
	width: 100%;
	aspect-ratio: 16 / 11;
	object-fit: cover;
	transition: transform 400ms var(--ease);
}

.scope-body {
	padding: 1.1rem 1.15rem 1.3rem;
}

.scope-body h3 {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--brand);
}

.scope-body p {
	margin-top: 0.4rem;
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--ink-soft);
}

@media (hover: hover) and (pointer: fine) {
	.scope-card:hover {
		transform: translateY(-4px);
		box-shadow: var(--shadow-lg);
	}

	.scope-card:hover img {
		transform: scale(1.05);
	}
}

/* 关于我们 */
.about-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	align-items: center;
	gap: 3rem;
}

.about-photo {
	border: 1px solid var(--line);
	border-radius: 3px;
	overflow: hidden;
}

.about-photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.about-copy p {
	color: var(--ink-soft);
}

.about-list {
	margin-top: 1.25rem;
}

.about-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.55rem;
	color: var(--ink);
	font-size: 0.9375rem;
}

.about-list .icon {
	margin-top: 0.28rem;
	color: var(--ok);
}

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 46px;
	margin-top: 1.35rem;
	padding: 0 1.6rem;
	border: 1px solid var(--brand);
	border-radius: 3px;
	color: var(--brand);
	font-size: 0.9375rem;
	transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.btn-ghost:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.btn-ghost:hover {
		background: var(--brand);
		color: var(--white);
	}
}

/* 服务优势 */
.adv-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.adv-item {
	padding: 1.75rem 1.4rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 3px;
	text-align: center;
}

.adv-icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--brand-light);
	color: var(--brand);
}

.adv-icon .icon {
	width: 1.7rem;
	height: 1.7rem;
}

.adv-item h3 {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--brand);
}

.adv-item p {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--ink-soft);
}

/* 页脚 */
.site-footer {
	background: var(--brand-dark);
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.875rem;
}

.footer-main {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.3fr) auto;
	gap: 2.5rem;
	padding-top: 3rem;
	padding-bottom: 2.5rem;
}

.footer-brand .logo-text strong {
	color: var(--white);
}

.footer-brand .logo-text small {
	color: rgba(255, 255, 255, 0.66);
}

.footer-desc {
	margin-top: 1.1rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.78);
}

.footer-tel {
	margin-top: 1.1rem;
	color: var(--white);
}

.footer-tel small {
	display: block;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.72);
}

.footer-tel strong {
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

.footer-col h3 {
	margin-bottom: 1.1rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--white);
}

.footer-links li {
	margin-bottom: 0.6rem;
}

.footer-links a {
	color: rgba(255, 255, 255, 0.82);
	transition: color 160ms var(--ease);
}

.footer-links a:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.footer-links a:hover {
		color: var(--white);
	}
}

.footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.7rem;
	color: rgba(255, 255, 255, 0.82);
}

.footer-contact .icon {
	margin-top: 0.28rem;
	opacity: 0.75;
}

.footer-qr {
	text-align: center;
}

.footer-qr img {
	width: 116px;
	height: 116px;
	margin: 0 auto 0.6rem;
	padding: 6px;
	background: var(--white);
	border-radius: 3px;
}

.footer-qr p {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.72);
}

.footer-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 56px;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.72);
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 1080px) {
	.nav a {
		padding: 0.55rem 0.7rem;
		font-size: 0.9rem;
	}

	.header-tel strong {
		font-size: 1.05rem;
	}
}

@media (max-width: 980px) {
	.header-inner {
		flex-wrap: wrap;
		gap: 0.5rem 1rem;
		padding-top: 0.85rem;
		padding-bottom: 0.85rem;
		min-height: 0;
	}

	.nav {
		order: 3;
		flex: 1 0 100%;
		margin-inline-start: 0;
		overflow-x: auto;
		border-top: 1px solid var(--line);
		padding-top: 0.5rem;
	}

	.nav ul {
		gap: 0.15rem;
	}

	.header-tel {
		margin-inline-start: auto;
		padding-left: 0;
		border-left: 0;
	}

	.banner-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
		padding-top: 2.5rem;
		padding-bottom: 6rem;
	}

	.banner-photo {
		justify-self: stretch;
		max-width: none;
	}

	.banner-photo img {
		height: 14rem;
	}

	.scope-grid,
	.adv-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.about-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.footer-main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem;
	}
}

@media (max-width: 620px) {
	.topbar-inner {
		justify-content: center;
	}

	.topbar-item span {
		white-space: nowrap;
	}

	.topbar-item + .topbar-item {
		display: none;
	}

	.query-card {
		margin-top: -3.5rem;
		padding: 1.75rem 1.25rem 1.5rem;
	}

	.section {
		padding: 3rem 0;
	}

	.section-title {
		font-size: 1.5rem;
		margin-bottom: 1.75rem;
	}

	.query-tip {
		margin-top: -1rem;
	}

	.query-form {
		flex-direction: column;
		align-items: stretch;
	}

	.query-input,
	.btn-query {
		width: 100%;
	}

	.query-input {
		flex: 0 0 auto;
	}

	.scope-grid,
	.adv-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.result-table th {
		width: 6.5rem;
		padding: 0.7rem 0.75rem;
		font-size: 0.875rem;
	}

	.result-table td {
		padding: 0.7rem 0.75rem;
		font-size: 0.9375rem;
	}

	.footer-main {
		grid-template-columns: minmax(0, 1fr);
	}

	.banner-badges li {
		font-size: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
