/* ==========================================================================
   迅志官网 · 现代化焕新样式（Precision Grid 精密刻度）
   自包含：仅系统字体，无任何 CDN / 外链字体。配色集中在 :root，换色只改变量。
   ========================================================================== */

:root {
  --c-primary: #12B866;
  --c-primary-dark: #0E8F4E;
  --c-primary-soft: #E9F8F0;
  --c-ink: #0E1714;
  --c-muted: #5C6B64;
  --c-bg: #FFFFFF;
  --c-surface: #F6F8F7;
  --c-border: #E4E9E6;
  --c-footer: #0B1411;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;

  --container: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 20, .04);
  --shadow: 0 12px 30px -12px rgba(14, 23, 20, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 72px;
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* 仅供屏幕阅读器/SEO，不占视觉空间 */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--surface { background: var(--c-surface); }

/* 锚点跳转时为固定顶栏留出空间 */
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- 区块标题：竖标线 + 等宽编号 母题 ---------- */
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
}
.kicker--light { color: var(--c-primary); }

.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 54px); }
.sec-head__title {
  position: relative;
  padding-left: 18px;
  font-size: clamp(28px, 4vw, 42px);
  margin: 10px 0 14px;
}
.sec-head__title::before {
  content: "";
  position: absolute;
  left: 0; top: .12em;
  width: 3px; height: 1.05em;
  background: var(--c-primary);
  border-radius: 2px;
}
.sec-head__desc { color: var(--c-muted); font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  background: var(--c-primary); color: #fff;
  border: 1px solid transparent; cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--c-primary-dark); transform: translateY(-2px); }
.btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header__logo img { height: 38px; width: auto; transition: height .3s var(--ease); }
/* 初始透明态（浮在英雄区上，白字） */
.site-header__nav a, .site-header__brand { color: #fff; }
.site-header.scrolled {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--c-border);
  box-shadow: var(--shadow-sm);
}
.site-header.scrolled .site-header__nav a { color: var(--c-ink); }
.site-header.scrolled .site-header__logo img { height: 32px; }

.site-header__nav ul { display: flex; gap: 34px; }
.site-header__nav a {
  position: relative; font-weight: 500; font-size: 15px; padding: 6px 0;
  transition: color .2s var(--ease);
}
.site-header__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--c-primary);
  transition: width .3s var(--ease);
}
.site-header__nav a:hover::after, .site-header__nav a.active::after { width: 100%; }
.site-header.scrolled .site-header__nav a:hover, .site-header.scrolled .site-header__nav a.active { color: var(--c-primary-dark); }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  color: #fff; padding: 0;
}
.site-header.scrolled .nav-toggle { color: var(--c-ink); }
.nav-toggle svg { width: 26px; height: 26px; }

/* 移动端右滑面板 */
.mobile-nav {
  position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); z-index: 60;
  background: #fff; transform: translateX(100%);
  transition: transform .35s var(--ease);
  box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .3);
  padding: 84px 28px 28px; display: flex; flex-direction: column; gap: 6px;
}
.mobile-nav a { padding: 14px 6px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--c-border); }
.mobile-nav a:hover { color: var(--c-primary-dark); }
.mobile-nav__close { position: absolute; top: 22px; right: 22px; border: 0; background: none; cursor: pointer; color: var(--c-ink); }
.mobile-nav__close svg { width: 26px; height: 26px; }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(8, 18, 14, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
body.nav-open .mobile-nav { transform: translateX(0); }
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* ==========================================================================
   英雄区轮播
   ========================================================================== */
.hero { position: relative; height: min(88vh, 760px); min-height: 480px; overflow: hidden; background: var(--c-ink); }
.hero__track { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 18, 14, .82) 0%, rgba(8, 18, 14, .45) 42%, rgba(8, 18, 14, .08) 70%),
    linear-gradient(0deg, rgba(8, 18, 14, .55), transparent 45%);
}
/* 精密坐标纸纹理 */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image:
    repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 48px);
}
.hero__content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 640px; margin-left: clamp(24px, 8vw, 110px); padding: 0 24px;
  color: #fff;
}
.hero__title { font-size: clamp(30px, 5vw, 56px); font-weight: 700; margin: 16px 0 18px; }
.hero__text { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.8; color: rgba(255, 255, 255, .88); max-width: 560px; }
.hero__cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* 进场错峰 */
.hero__slide.is-active .kicker { animation: heroIn .6s var(--ease) both; }
.hero__slide.is-active .hero__title { animation: heroIn .6s .08s var(--ease) both; }
.hero__slide.is-active .hero__text { animation: heroIn .6s .16s var(--ease) both; }
.hero__slide.is-active .hero__cta { animation: heroIn .6s .24s var(--ease) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* 刻度式指示器 */
.hero__dots {
  position: absolute; right: clamp(20px, 6vw, 70px); bottom: 34px; z-index: 3;
  display: flex; align-items: center; gap: 14px;
}
.hero__dot {
  width: 26px; height: 2px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .5); transition: width .3s var(--ease), background .3s var(--ease);
}
.hero__dot.is-active { width: 42px; background: var(--c-primary); }
.hero__page { font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, .8); letter-spacing: .1em; margin-left: 6px; }

/* 左右切换 */
.hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(8, 18, 14, .18);
  color: #fff; cursor: pointer; opacity: 0; transition: opacity .3s var(--ease), border-color .25s, background .25s;
}
.hero:hover .hero__nav { opacity: 1; }
.hero__nav:hover { border-color: var(--c-primary); background: rgba(18, 184, 102, .25); }
.hero__nav svg { width: 20px; height: 20px; }
.hero__nav--prev { left: 18px; }
.hero__nav--next { right: 18px; }

/* ==========================================================================
   解决方案
   ========================================================================== */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; counter-reset: svc; }
.svc-card {
  position: relative; background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 30px 26px; overflow: hidden; counter-increment: svc;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.svc-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: var(--c-primary); transition: width .4s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); border-color: var(--c-primary); box-shadow: var(--shadow); }
.svc-card:hover::before { width: 100%; }
.svc-card__no {
  position: absolute; top: 22px; right: 24px; font-family: var(--font-mono);
  font-size: 13px; color: var(--c-muted); opacity: 0; transform: translateY(-4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.svc-card__no::before { content: counter(svc, decimal-leading-zero); }
.svc-card:hover .svc-card__no { opacity: 1; transform: none; }
.svc-card__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--c-primary-soft);
  display: grid; place-items: center; color: var(--c-primary-dark); margin-bottom: 18px;
}
.svc-card__icon i { font-size: 26px; }
.svc-card h4 { font-size: 19px; margin-bottom: 10px; }
.svc-card p { color: var(--c-muted); font-size: 15px; line-height: 1.7; }

/* ==========================================================================
   产品（筛选 Tab + 卡片 + 灯箱）
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 34px; border-bottom: 1px solid var(--c-border); }
.filter {
  position: relative; background: none; border: 0; cursor: pointer; padding: 12px 2px;
  font-size: 15px; font-weight: 500; color: var(--c-muted); font-family: inherit;
  transition: color .2s var(--ease);
}
.filter::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 0; height: 2px;
  background: var(--c-primary); transition: width .3s var(--ease);
}
.filter:hover { color: var(--c-ink); }
.filter.is-active { color: var(--c-ink); }
.filter.is-active::after { width: 100%; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.prod-card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .35s, scale .35s;
}
.prod-card.is-hidden { display: none; }
.prod-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-surface); display: block; }
.prod-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prod-card:hover .prod-card__media img { transform: scale(1.06); }
.prod-card__zoom {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 18, 14, .28); color: #fff; opacity: 0; transition: opacity .3s var(--ease);
}
.prod-card:hover .prod-card__zoom { opacity: 1; }
.prod-card__zoom svg { width: 34px; height: 34px; }
.prod-card__body { padding: 16px 18px 20px; }
.prod-card__body h4 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.prod-card__body span { font-family: var(--font-mono); font-size: 12.5px; color: var(--c-muted); letter-spacing: .03em; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 5vh 4vw;
  background: rgba(8, 18, 14, .9); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; animation: lbFade .3s ease both; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__img { max-width: 100%; max-height: 80vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__cap { position: absolute; bottom: 4vh; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; }
.lightbox__btn {
  position: absolute; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06);
  color: #fff; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lightbox__btn:hover { border-color: var(--c-primary); background: rgba(18, 184, 102, .2); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 4vh; right: 4vw; }
.lightbox__prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 3vw; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   合作伙伴（CSS marquee）
   ========================================================================== */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; align-items: center; gap: 60px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee img { height: 46px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .55; transition: filter .3s var(--ease), opacity .3s var(--ease); }
.marquee img:hover { filter: none; opacity: 1; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   企业认证
   ========================================================================== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; max-width: 760px; margin: 0 auto; }
.cert-card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 22px; display: grid; place-items: center; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cert-card img { max-height: 230px; width: auto; }

/* ==========================================================================
   联系我们
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 28px; align-items: stretch; }
.contact-card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 32px 30px;
}
.contact-list { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item__ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--c-primary-soft); color: var(--c-primary-dark); display: grid; place-items: center; }
.contact-item__ico svg { width: 18px; height: 18px; }
.contact-item__label { font-size: 13px; color: var(--c-muted); }
.contact-item__value { font-size: 16px; font-weight: 500; }
.contact-item__value.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.contact-item a:hover { color: var(--c-primary-dark); }
/* 明确预留地图高度，避免地图异步渲染造成 CLS */
.contact-map { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; min-height: 420px; box-shadow: var(--shadow-sm); }
.contact-map #dituContent { width: 100%; height: 100%; min-height: 420px; }
.map-placeholder { width: 100%; height: 100%; min-height: 420px; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--c-muted); background: var(--c-surface); font-size: 14px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer { background: var(--c-footer); color: rgba(255, 255, 255, .6); position: relative; padding: 40px 0; text-align: center; }
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image:
    repeating-linear-gradient(0deg, var(--c-primary) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--c-primary) 0 1px, transparent 1px 40px);
}
.site-footer .container { position: relative; z-index: 1; }
.footer-beian { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; font-size: 13px; }
.footer-beian a { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .6); transition: color .2s var(--ease); }
.footer-beian a:hover { color: var(--c-primary); }
.footer-beian img { height: 18px; width: auto; display: inline-block; }

/* ==========================================================================
   返回顶部
   ========================================================================== */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--c-bg); color: var(--c-primary-dark); border: 1px solid var(--c-border);
  border-radius: 12px; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--ease), visibility .3s, transform .3s var(--ease), border-color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--c-primary); }
.to-top svg { width: 22px; height: 22px; }

/* ==========================================================================
   滚动进场
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.svc-grid .reveal.in-view:nth-child(2) { transition-delay: .06s; }
.svc-grid .reveal.in-view:nth-child(3) { transition-delay: .12s; }
.svc-grid .reveal.in-view:nth-child(4) { transition-delay: .18s; }
.svc-grid .reveal.in-view:nth-child(5) { transition-delay: .24s; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .site-header__nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero__content { margin-left: 0; }
  .hero__nav { display: none; }
}

/* ==========================================================================
   可访问性：尊重 prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
