/* ============================================================
   1. 基础与变量
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --red: #e1251b;
  --red-dark: #c01f16;
  --red-soft: #fff2f1;
  --ink: #16181d;
  --ink-2: #3d4149;
  --gray: #767b84;
  --gray-light: #9a9ea6;
  --line: #e8e9eb;
  --bg-soft: #f7f8fa;
  --dark: #0f1114;
  --content: 1200px;
  --radius: 6px;
  --shadow-md: 0 14px 34px rgba(15, 17, 20, .10);
  --shadow-lg: 0 20px 48px rgba(15, 17, 20, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

.container { width: min(var(--content), 100% - 48px); margin-inline: auto; }

section[id], footer[id] { scroll-margin-top: 84px; }

/* ============================================================
   2. 按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 4px;
  font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 10px 22px rgba(225, 37, 27, .28); }
.btn-ghost { background: #fff; border-color: #dcdee2; color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-inverse { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-inverse:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }

/* ============================================================
   3. 页头（sticky + mega menu）
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: #fff; border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 8px 26px rgba(15, 17, 20, .08); }

.header-inner {
  position: relative;
  width: min(var(--content), 100% - 48px);
  margin-inline: auto;
  display: flex; align-items: center; gap: 30px;
  height: 72px;
  transition: height .3s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 62px; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--red); color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 6px 14px rgba(225, 37, 27, .28);
}
.brand-text strong { display: block; font-size: 17px; letter-spacing: 1.5px; line-height: 1.25; }
.brand-text em { display: block; font-style: normal; font-size: 11px; color: var(--gray-light); letter-spacing: .4px; }

/* 主导航 */
.main-nav { margin-left: auto; align-self: stretch; display: flex; align-items: stretch; }
.nav-list { display: flex; align-items: stretch; }
.nav-item { position: relative; display: flex; align-items: stretch; }
/* 超宽面板改为相对页头容器定位，避免在 1000~1300px 视口下向左溢出 */
.nav-item.is-wide { position: static; }

.nav-link {
  position: relative;
  display: inline-flex; align-items: center;
  height: 100%; padding: 0 14px;
  border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  transition: color .2s;
}
.nav-link:hover { color: var(--red); }
.nav-link.is-active { color: var(--red); font-weight: 600; }
.nav-link.is-active::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--red); border-radius: 2px;
}
.nav-item.has-panel > .nav-link::after {
  content: ""; width: 6px; height: 6px; margin-left: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .5;
  transition: transform .25s;
}
.nav-item.has-panel:hover > .nav-link::after,
.nav-item.has-panel.is-open > .nav-link::after { transform: rotate(-135deg) translateY(-2px); }

/* 下拉面板 */
.panel {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 26px 30px;
  background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--red);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; z-index: 90;
  transition: opacity .22s, transform .22s var(--ease), visibility .22s;
}
.nav-item.has-panel:hover > .panel,
.nav-item.has-panel.is-open > .panel,
.nav-item.has-panel:focus-within > .panel {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.panel-wide { width: 1000px; max-width: 100%; }
.nav-item.is-wide > .panel { left: 0; transform: translateY(-8px); }
.nav-item.is-wide:hover > .panel,
.nav-item.is-wide.is-open > .panel,
.nav-item.is-wide:focus-within > .panel { transform: translateY(0); }
.panel-mid { width: 720px; max-width: calc(100vw - 48px); }
.panel-narrow { width: 280px; }

.panel-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.panel-col + .panel-col { border-left: 1px solid var(--line); padding-left: 40px; }
.panel-col { min-width: 0; }

.panel-heading {
  font-size: 15px; font-weight: 700; color: var(--ink);
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.group-title { font-size: 12px; color: var(--gray-light); letter-spacing: 1px; margin-bottom: 6px; }
.panel-link {
  display: block; padding: 5px 0;
  font-size: 14px; color: #4b5058; text-decoration: none;
  transition: color .2s, transform .2s;
}
.panel-link:hover { color: var(--red); transform: translateX(2px); }

/* 页头右侧操作 */
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.hamburger {
  display: none; width: 42px; height: 42px; padding: 11px 9px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer;
}
.hamburger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .2s; }
.hamburger span + span { margin-top: 5px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   4. 首屏轮播
   ============================================================ */
.hero { position: relative; height: clamp(520px, 74vh, 660px); overflow: hidden; background: var(--dark); }
.slides { position: absolute; inset: 0; }

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .85s var(--ease), visibility .85s;
}
.slide.is-active { opacity: 1; visibility: visible; }

.slide-bg { position: absolute; inset: 0; transform: scale(1.04); transition: transform 6s linear; }
.slide.is-active .slide-bg { transform: scale(1); }
.bg-1 { background: linear-gradient(118deg, #8d120c 0%, #480d09 42%, #101215 100%); }
.bg-2 { background: linear-gradient(118deg, #0d2b4c 0%, #14375e 45%, #070d15 100%); }
.bg-3 { background: linear-gradient(118deg, #2a1310 0%, #3e1411 45%, #0c0d10 100%); }
/* 细网格纹理 + 红色光斑（纯 CSS，无图片） */
.slide-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(120% 100% at 70% 50%, #000 20%, transparent 78%);
}
.slide-bg::after {
  content: ""; position: absolute; right: -12%; top: -30%;
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 37, 27, .55) 0%, rgba(225, 37, 27, 0) 68%);
  filter: blur(6px);
}

.slide-content {
  position: relative; z-index: 2;
  width: min(var(--content), 100% - 48px); margin-inline: auto;
  padding-right: 40px; color: #fff;
  transform: translateY(18px); opacity: 0;
  transition: transform .9s var(--ease) .12s, opacity .9s .12s;
}
.slide.is-active .slide-content { transform: none; opacity: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 2.5px; color: rgba(255, 255, 255, .78);
  padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

.slide h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.2; letter-spacing: .5px; font-weight: 700; }
.slide p {
  max-width: 520px; margin-top: 18px;
  font-size: clamp(14px, 1.25vw, 17px); line-height: 1.85; color: rgba(255, 255, 255, .74);
}
.slide-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-arrow {
  position: absolute; top: 50%; z-index: 3;
  width: 48px; height: 48px; transform: translateY(-50%);
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.hero-arrow:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }
.hero-arrow.prev { left: 26px; }
.hero-arrow.next { right: 26px; }
.hero-arrow svg { width: 18px; height: 18px; }

.hero-dots { position: absolute; left: 50%; bottom: 30px; z-index: 3; display: flex; gap: 10px; transform: translateX(-50%); }
.hero-dot {
  width: 26px; height: 3px; padding: 0; border: 0; border-radius: 3px;
  background: rgba(255, 255, 255, .34); cursor: pointer;
  transition: background-color .3s, width .3s;
}
.hero-dot.is-active { width: 44px; background: var(--red); }

/* ============================================================
   5. 通用板块标题
   ============================================================ */
.section { padding: 86px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: .5px; }
.section-title::before {
  content: ""; display: block; width: 34px; height: 3px; border-radius: 2px;
  background: var(--red); margin-bottom: 14px;
}
.section-sub { margin-top: 10px; font-size: 15px; color: var(--gray); }
.section-more { font-size: 14px; color: var(--gray); text-decoration: none; white-space: nowrap; transition: color .2s; }
.section-more:hover { color: var(--red); }

/* ============================================================
   6. 服务矩阵
   ============================================================ */
.services { background: #fff; }
.service-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px; margin-top: 42px;
}
.service-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 24px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.service-card:hover { transform: translateY(-4px); border-color: rgba(225, 37, 27, .38); box-shadow: var(--shadow-md); }
.service-card:hover .service-arrow { transform: translateX(3px); color: var(--red); }

.service-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--red-soft); color: var(--red);
  margin-bottom: 18px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 17px; font-weight: 700; }
.service-card p { margin-top: 8px; font-size: 13px; line-height: 1.75; color: var(--gray); }
.service-arrow {
  margin-top: 18px; font-size: 13px; color: var(--gray-light);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .3s, color .3s;
}

/* ============================================================
   7. 数据看板
   ============================================================ */
.stats { background: var(--bg-soft); border-block: 1px solid var(--line); padding: 64px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 6px 28px; border-left: 1px solid #e2e4e8; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; line-height: 1.1;
  color: var(--red); letter-spacing: .5px; font-variant-numeric: tabular-nums;
}
.stat-num .suffix { font-size: 18px; margin-left: 2px; }
.stat-label { margin-top: 8px; font-size: 14px; color: var(--gray); }
.stat-note { margin-top: 4px; font-size: 12px; color: var(--gray-light); }

/* ============================================================
   8. 新闻动态（深色块）
   ============================================================ */
.news { background: var(--dark); color: #fff; padding: 82px 0; }
.news .section-title { color: #fff; }
.news .section-sub { color: rgba(255, 255, 255, .55); }
.news .section-more { color: rgba(255, 255, 255, .62); }
.news .section-more:hover { color: #fff; }

.news-grid { display: grid; grid-template-columns: 42% 1fr; gap: 44px; margin-top: 40px; }

.news-feature {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 330px; padding: 26px;
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(150deg, #5c1310 0%, #23100f 55%, #121316 100%);
}
.news-feature::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 80% at 78% 12%, rgba(225, 37, 27, .38), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 18px);
}
.news-feature > * { position: relative; }
.tag {
  align-self: flex-start;
  font-size: 12px; letter-spacing: 1px; color: #fff;
  padding: 3px 10px; border-radius: 3px; background: var(--red);
  margin-bottom: 14px;
}
.news-feature h3 { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.5; font-weight: 600; }
.news-feature time { display: block; margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .5); }

.news-list { display: flex; flex-direction: column; }
.news-item {
  display: flex; align-items: baseline; gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  text-decoration: none;
  transition: border-color .3s, transform .3s;
}
.news-item:first-child { padding-top: 4px; }
.news-item:last-child { border-bottom: 0; }
.news-item time { flex: 0 0 auto; font-size: 13px; color: rgba(255, 255, 255, .42); font-variant-numeric: tabular-nums; }
.news-item h4 {
  font-size: 15px; font-weight: 500; line-height: 1.7; color: rgba(255, 255, 255, .86);
  transition: color .25s;
}
.news-item:hover { transform: translateX(4px); }
.news-item:hover h4 { color: #fff; }
.news-item:hover h4 { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--red); }

/* ============================================================
   9. 页脚
   ============================================================ */
.site-footer { background: #0b0c0e; color: rgba(255, 255, 255, .58); padding: 66px 0 30px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; }
.footer-brand .brand-mark { margin-bottom: 16px; }
.footer-brand p { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .42); max-width: 240px; }
.footer-col h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: 13px; color: rgba(255, 255, 255, .52); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact { font-size: 13px; line-height: 2; }
.footer-contact strong { display: block; font-size: 22px; color: #fff; letter-spacing: .5px; margin-bottom: 4px; }

.footer-bottom {
  margin-top: 46px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(255, 255, 255, .38);
}
.footer-bottom .legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: rgba(255, 255, 255, .75); }
.disclaimer { color: rgba(255, 255, 255, .3); }

/* ============================================================
   10. 移动端抽屉
   ============================================================ */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
  width: min(360px, 86vw);
  display: flex; flex-direction: column;
  background: #fff; box-shadow: -20px 0 50px rgba(15, 17, 20, .22);
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; padding: 0 20px; border-bottom: 1px solid var(--line);
}
.drawer-head span { font-size: 15px; font-weight: 600; }
.drawer-close {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 20px; line-height: 1; color: var(--gray); cursor: pointer;
}
.drawer-nav { flex: 1; overflow-y: auto; padding: 8px 0 30px; }
.drawer-link, .drawer-nav summary {
  display: block; padding: 14px 20px; font-size: 15px; color: var(--ink);
  text-decoration: none; cursor: pointer; list-style: none;
  border-bottom: 1px solid #f2f3f5;
}
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary::after {
  content: "+"; float: right; color: var(--gray-light); font-weight: 400;
}
.drawer-nav details[open] > summary::after { content: "−"; }
.drawer-group { padding: 6px 20px 14px; background: var(--bg-soft); }
.drawer-group .group-title { margin-top: 12px; }
.drawer-group .panel-link { font-size: 14px; }
.drawer-mask {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(10, 12, 15, .48);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.drawer-mask.is-open { opacity: 1; visibility: visible; }

/* ============================================================
   11. 入场动画（JS 可控，无 JS 时不隐藏内容）
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s var(--ease); }

/* ============================================================
   12. 响应式
   ============================================================ */
@media (max-width: 1180px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .news-grid { grid-template-columns: 1fr; gap: 30px; }
  .news-feature { min-height: 260px; }
}

@media (max-width: 1379px) {
  .hero-arrow { display: none; }
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .hamburger { display: block; }
  .header-actions .btn-ghost { display: none; }
  .header-inner { gap: 14px; }
  .hero-arrow { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .section { padding: 64px 0; }
  .panel { display: none; }
}

@media (max-width: 640px) {
  .container, .header-inner, .slide-content { width: calc(100% - 36px); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .service-grid { grid-template-columns: 1fr; gap: 14px; }
  .service-card { padding: 22px 20px; }
  .brand-text em { display: none; }
  .btn-sm { height: 36px; padding: 0 14px; }
  .hero { height: clamp(500px, 82vh, 600px); }
  .slide-content { padding-right: 0; }
  .slide h1 { font-size: clamp(26px, 8vw, 32px); }
  .slide p { font-size: 14px; }
  .stats { padding: 46px 0; }
  .stat { padding: 4px 18px; }
  .news { padding: 62px 0; }
  .news-item { gap: 14px; flex-direction: column; }
  .news-item time { order: -1; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .slide-bg { transform: none !important; }
}
