/* ==========================================================================
   启明科技 门户网站样式表
   变量集中在 :root，改配色只需改这里
   ========================================================================== */

:root {
  --brand: #1b4db1;
  --brand-dark: #143a87;
  --brand-soft: #e9effb;
  --accent: #0f9e83;

  --ink: #0f172a;
  --ink-2: #33415c;
  --muted: #5b6b85;
  --line: #e4e9f2;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-dark: #0d1a33;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 34px rgba(15, 23, 42, 0.1);
  --shadow-brand: 0 10px 24px rgba(27, 77, 177, 0.24);

  --max: 1160px;
  --gutter: 24px;
}

/* ------------------------------ 基础重置 ------------------------------ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.32; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }

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

::selection { background: var(--brand); color: #fff; }

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

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
  z-index: 99; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

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

/* ------------------------------ 通用组件 ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn--ghost { background: #fff; color: var(--brand); border-color: #cfdcf5; }
.btn--ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section { padding: 92px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head h2 { margin-bottom: 14px; }
.section__lead { color: var(--muted); }

/* 滚动进场动画 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------ 顶部信息条 ------------------------------ */
.topbar {
  background: var(--bg-dark);
  color: #c7d3e8;
  font-size: 13px;
}
.topbar__inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.topbar a { color: #fff; }
.topbar a:hover { color: #9db9ee; }
.topbar__sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.22); }
.topbar__spacer { flex: 1; }
.topbar__item--muted { color: #8c9dbb; }

/* ------------------------------ 头部 ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05); }

.header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--brand); }
.logo__mark { width: 36px; height: 36px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text strong { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: 0.02em; }
.logo__text em { font-style: normal; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav ul { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.18s, background 0.18s;
}
.site-nav ul a:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav ul a.is-active { color: var(--brand); font-weight: 700; }
.nav-cta { color: #fff; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  padding: 11px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* ------------------------------ 首屏 ------------------------------ */
.hero {
  position: relative;
  padding: 84px 0 96px;
  background:
    radial-gradient(760px 380px at 88% -6%, rgba(27, 77, 177, 0.13), transparent 68%),
    radial-gradient(620px 320px at 4% 106%, rgba(15, 158, 131, 0.11), transparent 66%),
    linear-gradient(180deg, #fbfcfe 0%, #ffffff 62%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero__text h1 { margin-bottom: 20px; }
.hero__lead { max-width: 540px; color: var(--muted); font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 26px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 12px 22px; color: var(--ink-2); font-size: 14px; }
.hero__points li { position: relative; padding-left: 22px; }
.hero__points li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 13px; height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* 右侧看板插画 */
.hero__visual { position: relative; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}
.panel__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--red { background: #f2a29b; }
.dot--amber { background: #f3cd8c; }
.dot--green { background: #97d4b7; }
.panel__title { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.panel__body { padding: 20px; }

.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.kpi__label { display: block; font-size: 12px; color: var(--muted); }
.kpi__value { display: block; margin-top: 2px; font-size: 22px; font-weight: 800; color: var(--brand); }

.chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 132px;
  margin: 20px 0;
  padding-bottom: 2px;
  border-bottom: 1px dashed var(--line);
}
.chart span {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #3d6fd0, #1b4db1);
  animation: rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.chart span:nth-child(1) { animation-delay: 0.05s; }
.chart span:nth-child(2) { animation-delay: 0.12s; }
.chart span:nth-child(3) { animation-delay: 0.19s; }
.chart span:nth-child(4) { animation-delay: 0.26s; }
.chart span:nth-child(5) { animation-delay: 0.33s; }
.chart span:nth-child(6) { animation-delay: 0.4s; }
.chart span:nth-child(7) { animation-delay: 0.47s; }
.chart span:nth-child(8) { animation-delay: 0.54s; }
@keyframes rise { from { transform: scaleY(0.08); transform-origin: bottom; opacity: 0.2; } }

.panel__list { display: grid; gap: 10px; }
.panel__row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.tag { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tag--ok { background: rgba(15, 158, 131, 0.12); color: #0b7a66; }
.tag--run { background: rgba(27, 77, 177, 0.1); color: var(--brand); }

/* ------------------------------ 数据条 ------------------------------ */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 38px var(--gutter); }
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 14px; }
.stat + .stat { border-left: 1px solid var(--line); }

/* ------------------------------ 服务卡片 ------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  padding: 30px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfdcf5; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ------------------------------ 关于我们 ------------------------------ */
.about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.about__text h2 { margin-bottom: 18px; }
.about__text p { color: var(--muted); margin-bottom: 14px; }
.checklist { margin: 22px 0 30px; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15px; }
.checklist li::before {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.about__media { position: relative; padding-bottom: 26px; }
.about__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 24px;
}
.about__card-head { font-weight: 700; margin-bottom: 18px; }
.about__bars { display: grid; gap: 14px; }
.about__bars li { display: grid; grid-template-columns: 1fr; gap: 6px; position: relative; }
.about__bars span { font-size: 13.5px; color: var(--muted); }
.about__bars i {
  display: block; height: 8px; border-radius: 999px;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.about__bars i::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 50%);
  background: linear-gradient(90deg, #3d6fd0, var(--brand));
  border-radius: 999px;
}
.about__bars b { position: absolute; right: 0; top: 0; font-size: 13px; color: var(--ink-2); }
.about__badge {
  position: absolute; right: -6px; bottom: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 22px;
  background: var(--brand); color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-brand);
}
.about__badge strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.about__badge span { font-size: 12px; opacity: 0.86; }

/* ------------------------------ 合作伙伴 ------------------------------ */
.partners { padding: 54px 0; background: #fff; }
.partners__title { text-align: center; color: var(--muted); font-size: 13.5px; letter-spacing: 0.06em; margin-bottom: 24px; }
.partners__logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.partners__logos span {
  display: flex; align-items: center; justify-content: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #6d7d97;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-soft);
  filter: grayscale(1);
  transition: filter 0.2s, color 0.2s, background 0.2s;
}
.partners__logos span:hover { filter: none; color: var(--brand); background: #fff; }

/* ------------------------------ 新闻 ------------------------------ */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news__item {
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.news__item:hover { border-color: #cfdcf5; box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.news__item time { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.news__item h3 { font-size: 17px; margin-bottom: 10px; }
.news__item h3 a:hover { color: var(--brand); }
.news__item p { color: var(--muted); font-size: 14.5px; }

/* ------------------------------ 联系我们 ------------------------------ */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.contact__info h2 { margin-bottom: 14px; }
.contact__lead { color: var(--muted); margin-bottom: 30px; }
.contact__list { display: grid; gap: 18px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__ico {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 17px;
}
.contact__list b { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.contact__list a, .contact__list div > span { color: var(--ink); font-weight: 600; }
.contact__list a:hover { color: var(--brand); }

.contact__form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px 28px;
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field label i { color: #d64545; font-style: normal; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fcfdff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa8bf; }
.field input:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 77, 177, 0.13);
}
.field.is-error input, .field.is-error textarea { border-color: #d64545; background: #fff7f7; }
.form__status { min-height: 20px; font-size: 14px; color: var(--accent); }
.form__status.is-error { color: #d64545; }

/* ------------------------------ 页脚 ------------------------------ */
.site-footer { background: var(--bg-dark); color: #b9c6dd; font-size: 14.5px; }
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-top: 60px;
  padding-bottom: 44px;
}
.logo--footer { color: #4b7ddd; }
.logo--footer .logo__text strong { color: #fff; }
.logo--footer .logo__text em { color: #7f92b3; }
.footer__desc { margin-top: 16px; color: #8d9cba; max-width: 300px; }
.footer__top h3 { font-size: 15px; color: #fff; margin-bottom: 16px; }
.footer__nav ul { display: grid; gap: 10px; }
.footer__nav a, .footer__contact a { color: #b9c6dd; }
.footer__nav a:hover, .footer__contact a:hover { color: #fff; }
.footer__contact p { margin-bottom: 10px; color: #8d9cba; }

/* 服务能力列关闭时，页脚从 4 列变 3 列 */
.footer__top--no-services { grid-template-columns: 1.7fr 1fr 1.4fr; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  color: #8d9cba;
}
.footer__copy { margin: 0; }

/* 备案号 */
.footer__beian { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.footer__beian a { color: #9fb0cd; transition: color 0.18s; }
.footer__beian a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__slash { color: rgba(255, 255, 255, 0.2); }
.beian-police { display: inline-flex; align-items: center; gap: 5px; }
.police-ico { width: 15px; height: 15px; flex: none; color: #9fb0cd; }
.beian-police:hover .police-ico { color: #fff; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .panel { transform: none; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .partners__logos { grid-template-columns: repeat(3, 1fr); }
  .news { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------ 动态渲染补充 ------------------------------ */
/* 图片 Logo */
.logo__img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; flex: none; }

/* 表单蜜罐字段：对真人隐藏，爬虫会填 */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* 备案号链接 */
.beian-icp { font-weight: 500; }

/* 卡片数量不固定时的自适应 */
.cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* 页面加载前的防抖：避免无 JS 时首屏空白 */
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px var(--gutter) 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 12px; font-size: 16px; }
  .nav-cta { width: 100%; }

  .topbar__inner { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  .topbar__spacer { display: none; }

  .only-desktop { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 68px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; padding: 30px var(--gutter); }
  .stat:nth-child(odd) { border-left: none; }
  .stat + .stat { border-left: 1px solid var(--line); }
  .stat:nth-child(3) { border-left: none; }
  .cards { grid-template-columns: 1fr; }
  .partners__logos { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; }
  .footer__bottom { justify-content: center; text-align: center; }
  .about__badge { right: 0; }
}
