/* ============================================================
   site.css · 证件扫描官网共用样式（华为官网风设计体系）
   设计基准：huawei.com/cn —— 白色细导航 / 华为红 #c7000b 点缀 /
   全幅大图轮播 hero / 方角红色按钮 / 卡片网格 / 深色多栏页脚。
   首页与全部二级页面共用；工具页 scan.html 保留自身内联样式。
   ============================================================ */

/* ---------- 设计变量：与 huawei.com 对齐的红黑灰色板 ---------- */
:root {
  --red: #c7000b;            /* 华为红：链接 / 按钮 / 强调 */
  --red-dark: #a50008;       /* 按钮悬停深红 */
  --red-soft: rgba(199, 0, 11, .08);
  --ink: #1a1a1a;            /* 主文字（近黑） */
  --ink-2: #666666;          /* 次级文字 */
  --ink-3: #999999;          /* 弱化文字 */
  --bg: #ffffff;             /* 主背景 */
  --bg-gray: #f5f5f5;        /* 分区浅灰底（华为常用） */
  --line: #e5e5e5;           /* 分隔线 */
  --footer-bg: #191919;      /* 页脚深色底 */
  --nav-h: 64px;             /* 导航高度 */
  --radius: 8px;             /* 卡片圆角（华为卡片小圆角） */
  --shadow-card: 0 6px 24px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.25, .1, .25, 1);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }

/* 内容容器：华为官网 1440 宽幅栅格；窄栏用于长文 */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   全局导航：白底吸顶细线，红色悬停下划线（华为主导航同构）
   ============================================================ */
.hw-nav {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
}
.hw-nav .nav-inner {
  max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; gap: 44px;
}
/* 品牌：红色证件图形 + 站名（对位华为红色 logo 区） */
.hw-nav .brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  font-size: 20px; font-weight: 700; letter-spacing: .01em; color: var(--ink);
}
.hw-nav .brand .logo { width: 26px; height: 26px; flex: none; }
/* 主导航链接：黑字，悬停/当前红字 + 底部红条 */
.hw-nav .links { display: flex; align-items: center; gap: 36px; flex: 1; height: 100%; }
.hw-nav .links a {
  position: relative; display: flex; align-items: center; height: 100%;
  font-size: 15px; color: var(--ink); transition: color .2s;
}
.hw-nav .links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--red); transform: scaleX(0); transition: transform .25s var(--ease);
}
.hw-nav .links a:hover { color: var(--red); }
.hw-nav .links a:hover::after, .hw-nav .links a.active::after { transform: scaleX(1); }
.hw-nav .links a.active { color: var(--red); font-weight: 600; }
/* 右侧 CTA：华为式方角红按钮 */
.hw-nav .cta {
  flex: none; background: var(--red); color: #fff; font-size: 14px; font-weight: 500;
  padding: 9px 22px; border-radius: 4px; transition: background .2s;
}
.hw-nav .cta:hover { background: var(--red-dark); }
/* 移动端汉堡按钮（site.js 控制 .open） */
.hw-nav .burger { display: none; width: 40px; height: 40px; flex: none; position: relative; }
.hw-nav .burger span, .hw-nav .burger span::before, .hw-nav .burger span::after {
  content: ""; position: absolute; left: 10px; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: all .25s var(--ease);
}
.hw-nav .burger span { top: 19px; }
.hw-nav .burger span::before { left: 0; top: -6px; }
.hw-nav .burger span::after { left: 0; top: 6px; }
.hw-nav.open .burger span { background: transparent; }
.hw-nav.open .burger span::before { transform: rotate(45deg); top: 0; }
.hw-nav.open .burger span::after { transform: rotate(-45deg); top: 0; }
/* 移动端下拉菜单 */
.hw-nav .m-menu {
  display: none; position: absolute; left: 0; right: 0; top: var(--nav-h);
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .08); padding: 8px 0 16px;
}
.hw-nav.open .m-menu { display: block; }
.hw-nav .m-menu a {
  display: block; padding: 13px 28px; font-size: 15px; color: var(--ink);
  border-bottom: 1px solid #f2f2f2;
}
.hw-nav .m-menu a.active { color: var(--red); font-weight: 600; }
.hw-nav .m-menu .m-cta {
  display: block; margin: 14px 28px 0; text-align: center;
  background: var(--red); color: #fff; border-radius: 4px; padding: 11px 0; font-weight: 500;
}

/* ============================================================
   Hero 轮播：全幅大图 + 左对齐大标题（华为首页 banner 同构）
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  height: clamp(440px, 46vw, 640px);
  background: #10131a;
}
.hero .slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s;
  display: flex; align-items: center;
}
.hero .slide.on { opacity: 1; visibility: visible; z-index: 1; }
.hero .slide-inner {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px;
  position: relative; z-index: 2;
}
.hero .kicker {
  display: inline-block; font-size: 14px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255, 255, 255, .75); border-left: 3px solid var(--red); padding-left: 12px;
  margin-bottom: 18px;
}
.hero h1, .hero .h1 {
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.2; font-weight: 700;
  color: #fff; letter-spacing: .01em; max-width: 620px;
}
.hero .sub {
  font-size: clamp(14.5px, 1.6vw, 18px); color: rgba(255, 255, 255, .78);
  margin-top: 18px; max-width: 540px; line-height: 1.8;
}
.hero .btn-row { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
/* 浅色 slide 的文字反色 */
.hero .slide.lite h1, .hero .slide.lite .h1 { color: var(--ink); }
.hero .slide.lite .sub { color: var(--ink-2); }
.hero .slide.lite .kicker { color: var(--ink-2); }
/* 轮播圆点 */
.hero .dots {
  position: absolute; left: 0; right: 0; bottom: 26px; z-index: 5;
  display: flex; justify-content: center; gap: 10px;
}
.hero .dots button {
  width: 36px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, .35); transition: background .25s;
}
.hero .dots button.on { background: var(--red); }
/* 左右箭头（桌面端） */
.hero .arr {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .28); transition: background .2s;
}
.hero .arr:hover { background: rgba(199, 0, 11, .85); }
.hero .arr.prev { left: 22px; }
.hero .arr.next { right: 22px; }

/* --- hero 背景美术（纯 CSS，不依赖外链图片） --- */
/* slide 1：深空科技蓝黑 + 红色光束 + 细网格 */
.bg-tech {
  background:
    radial-gradient(1100px 520px at 82% 18%, rgba(199, 0, 11, .38), transparent 60%),
    radial-gradient(900px 600px at 8% 90%, rgba(50, 74, 110, .5), transparent 62%),
    linear-gradient(135deg, #12161f 0%, #1a2130 52%, #0e1118 100%);
}
.bg-tech::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 68% 40%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 90% at 68% 40%, #000 20%, transparent 72%);
}
.bg-tech::after {
  content: ""; position: absolute; right: -6%; top: -30%; width: 55%; height: 160%;
  background: linear-gradient(115deg, transparent 42%, rgba(199, 0, 11, .16) 50%, transparent 58%);
  pointer-events: none;
}
/* slide 2：品牌红黑（安全隐私主题） */
.bg-red {
  background:
    radial-gradient(900px 520px at 78% 30%, rgba(255, 84, 96, .34), transparent 62%),
    linear-gradient(130deg, #3a0206 0%, #7c0209 46%, #c7000b 120%);
}
.bg-red::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent);
  width: 620px; height: 620px; left: 58%; top: -18%;
}
/* slide 3：浅灰纸感（A4 输出主题） */
.bg-paper {
  background:
    radial-gradient(820px 460px at 84% 10%, rgba(199, 0, 11, .07), transparent 60%),
    linear-gradient(160deg, #fbfbfc 0%, #eef0f3 70%, #e6e9ee 100%);
}
/* hero 右侧装饰画（证件卡 + A4），桌面显示 */
.hero-art { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); z-index: 1; }
.hero-art .a4-sheet {
  width: clamp(180px, 21vw, 280px); aspect-ratio: 210 / 297;
  background: #fff; border-radius: 6px; position: relative;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .45);
  transform: rotate(6deg);
}
.hero-art .a4-sheet i {
  position: absolute; left: 18%; right: 18%; border-radius: 6px;
  background: linear-gradient(135deg, #e8eef7, #cdd9ea);
  box-shadow: 0 4px 12px rgba(20, 40, 90, .22);
}
.hero-art .a4-sheet i:nth-child(1) { top: 12%; height: 26%; }
.hero-art .a4-sheet i:nth-child(2) { top: 44%; height: 26%; }
.hero-art .id-card {
  position: absolute; left: -34%; bottom: -6%;
  width: clamp(150px, 16vw, 220px); aspect-ratio: 8560 / 5398;
  background: linear-gradient(135deg, #f2f6fc, #d8e4f2); border-radius: 10px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .5);
  transform: rotate(-9deg);
}
.hero-art .id-card::before {
  content: ""; position: absolute; left: 9%; top: 22%; width: 26%; aspect-ratio: 3/3.6;
  border-radius: 6px; background: rgba(120, 150, 190, .5);
}
.hero-art .id-card::after {
  content: ""; position: absolute; right: 10%; top: 26%; width: 44%; height: 8%;
  border-radius: 99px; background: rgba(90, 120, 160, .55);
  box-shadow: 0 14px 0 rgba(90, 120, 160, .35), 0 28px 0 rgba(90, 120, 160, .25);
}
/* 红色主题下的盾牌装饰 */
.hero-art .shield {
  width: clamp(170px, 19vw, 260px); aspect-ratio: 1/1.12; position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  clip-path: path('M130 0 260 44 260 150 Q260 246 130 291 Q0 246 0 150 L0 44 Z');
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.hero-art .shield::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(60px, 7vw, 96px); color: rgba(255, 255, 255, .9); font-weight: 700;
}

/* ============================================================
   按钮体系：华为式方角按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; line-height: 1;
  padding: 14px 34px; border-radius: 4px; transition: all .2s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-white-ghost { border: 1px solid rgba(255, 255, 255, .75); color: #fff; }
.btn-white-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-ink-ghost { border: 1px solid rgba(26, 26, 26, .45); color: var(--ink); }
.btn-ink-ghost:hover { border-color: var(--ink); background: rgba(0, 0, 0, .04); }
/* "了解更多 →" 红色文字链（华为卡片标配） */
.more-link { color: var(--red); font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.more-link::after { content: "→"; transition: transform .2s; }
.more-link:hover::after { transform: translateX(4px); }

/* ============================================================
   分区与标题体系
   ============================================================ */
.section { padding: 96px 0; }
.section-gray { background: var(--bg-gray); }
.section-dark { background: #14161c; color: #fff; }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: .01em; }
.sec-head .sec-sub { font-size: 16px; color: var(--ink-2); margin-top: 12px; }
.section-dark .sec-head .sec-sub { color: rgba(255, 255, 255, .6); }
/* 标题下的红色短线（华为常用分隔语汇） */
.sec-head .bar { width: 40px; height: 3px; background: var(--red); margin: 18px auto 0; }

/* ============================================================
   能力卡片网格：上图下文，悬停上浮（华为卡片同构）
   ============================================================ */
.hw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hw-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hw-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.hw-card .card-visual {
  aspect-ratio: 16 / 9.4; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, #f2f4f8, #e6eaf1); position: relative;
}
.hw-card .card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.hw-card h3 { font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.hw-card .desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.75; margin: 10px 0 18px; flex: 1; }

/* ============================================================
   数字指标带（华为"以数字说话"版式）
   ============================================================ */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-band .num {
  font-size: clamp(38px, 5vw, 58px); font-weight: 700; line-height: 1.1;
  color: var(--ink); letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.stats-band .num small { font-size: .42em; font-weight: 600; color: var(--red); margin-left: 4px; }
.stats-band .label { font-size: 15px; color: var(--ink-2); margin-top: 10px; }
.section-dark .stats-band .num { color: #fff; }
.section-dark .stats-band .label { color: rgba(255, 255, 255, .6); }

/* ============================================================
   使用流程：横向四步（编号 + 红色连线）
   ============================================================ */
.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flow-steps .fs {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.flow-steps .fs:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.flow-steps .no {
  font-size: 40px; font-weight: 700; color: var(--red); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.flow-steps b { display: block; font-size: 18px; margin-top: 16px; }
.flow-steps p { font-size: 14px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; }

/* ============================================================
   底部 CTA 带：深色全幅
   ============================================================ */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: 88px 24px;
  background:
    radial-gradient(900px 420px at 50% -30%, rgba(199, 0, 11, .5), transparent 65%),
    linear-gradient(135deg, #14161c, #1e222c);
  color: #fff;
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 600; }
.cta-band p { color: rgba(255, 255, 255, .65); margin-top: 14px; font-size: 16px; }
.cta-band .btn-row { display: flex; gap: 16px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* ============================================================
   二级页 banner：全幅渐变 + 面包屑（华为内页 banner 同构）
   ============================================================ */
.page-banner {
  position: relative; overflow: hidden; color: #fff;
  padding: 84px 0 72px;
}
.page-banner .crumb { font-size: 13.5px; color: rgba(255, 255, 255, .65); margin-bottom: 18px; }
.page-banner .crumb a { color: rgba(255, 255, 255, .65); }
.page-banner .crumb a:hover { color: #fff; }
.page-banner h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; letter-spacing: .01em; }
.page-banner .lede { font-size: clamp(15px, 1.7vw, 18px); color: rgba(255, 255, 255, .75); margin-top: 14px; max-width: 640px; line-height: 1.8; }
.page-banner.lite { color: var(--ink); }
.page-banner.lite .crumb, .page-banner.lite .crumb a { color: var(--ink-3); }
.page-banner.lite .lede { color: var(--ink-2); }

/* ============================================================
   长文文章：协议 / 隐私 / 关于
   ============================================================ */
.article { padding: 64px 0 110px; }
.article h2 {
  font-size: 24px; font-weight: 600; margin: 52px 0 14px;
  padding-left: 14px; border-left: 4px solid var(--red); line-height: 1.3;
}
.article h3 { font-size: 18px; font-weight: 600; margin: 30px 0 8px; }
.article p { margin: 12px 0; color: #404040; }
.article ul, .article ol { margin: 12px 0 12px 4px; color: #404040; }
.article li { margin: 8px 0; padding-left: 18px; position: relative; }
.article ul li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red);
}
.article strong { color: var(--ink); }
.article a { color: var(--red); }
.article a:hover { text-decoration: underline; }
.article .updated { font-size: 13.5px; color: var(--ink-3); }
/* 灰底信息卡 */
.article .callout {
  background: var(--bg-gray); border-left: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px; margin: 24px 0;
}
.article .callout p { margin: 6px 0; }
/* 信息表格 */
.info-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: 13px 18px; text-align: left; }
.info-table th { background: var(--bg-gray); width: 32%; font-weight: 600; white-space: nowrap; }

/* ============================================================
   滚动浮现动画（site.js 驱动 .reveal → .in）
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .slide { transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   页脚：深色多栏（华为页脚同构）
   ============================================================ */
.site-footer { background: var(--footer-bg); color: #a6a6a6; font-size: 13.5px; }
.site-footer .foot-main {
  max-width: 1280px; margin: 0 auto; padding: 64px 32px 44px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.6fr; gap: 40px;
}
.site-footer .f-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 19px; font-weight: 700; }
.site-footer .f-brand .logo { width: 24px; height: 24px; }
.site-footer .f-slogan { margin-top: 16px; line-height: 1.9; color: #8c8c8c; max-width: 300px; }
.site-footer h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.site-footer .f-col a { display: block; color: #a6a6a6; padding: 6px 0; transition: color .2s; }
.site-footer .f-col a:hover { color: #fff; }
.site-footer .f-col span { display: block; padding: 6px 0; color: #a6a6a6; }
.site-footer .foot-legal { border-top: 1px solid #2e2e2e; }
.site-footer .legal-inner {
  max-width: 1280px; margin: 0 auto; padding: 22px 32px 30px;
  color: #737373; line-height: 2;
}
.site-footer .legal-inner a { color: #737373; margin-right: 20px; }
.site-footer .legal-inner a:hover { color: #d9d9d9; text-decoration: underline; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .hw-cards { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .hero-art { display: none; }
  .site-footer .foot-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  .container, .container-narrow, .hw-nav .nav-inner { padding-left: 20px; padding-right: 20px; }
  /* 移动端收起主导航，改用汉堡菜单 */
  .hw-nav .links { display: none; }
  .hw-nav .cta { display: none; }
  .hw-nav .nav-inner { justify-content: space-between; }
  .hw-nav .burger { display: block; }
  .hero { height: auto; min-height: 430px; }
  .hero .slide { position: absolute; padding: 72px 0 84px; align-items: flex-start; }
  .hero .arr { display: none; }
  .section { padding: 60px 0; }
  .sec-head { margin-bottom: 34px; }
  .hw-cards { grid-template-columns: 1fr; gap: 16px; }
  .flow-steps { grid-template-columns: 1fr; gap: 14px; }
  .flow-steps .fs { display: flex; gap: 18px; align-items: flex-start; padding: 22px 20px; }
  .flow-steps .no { font-size: 30px; }
  .flow-steps b { margin-top: 0; }
  .page-banner { padding: 52px 0 46px; }
  .article { padding: 40px 0 80px; }
  .article h2 { font-size: 20px; margin-top: 38px; }
  .info-table th { width: 38%; padding: 11px 12px; }
  .info-table td { padding: 11px 12px; }
  .site-footer .foot-main { grid-template-columns: 1fr; gap: 30px; padding: 44px 20px 30px; }
  .site-footer .legal-inner { padding: 18px 20px 26px; }
  .btn { padding: 13px 26px; }
}
