/* ==========================================================
   一卡通信官网 样式系统
   设计见 /root/yika/官网/官网设计文档.md
   无构建步骤：手写 CSS + 自定义属性，public/ 原样进镜像
   ========================================================== */

:root {
  /* 品牌色：行业惯用蓝，但压低饱和度求沉稳；青绿做点缀（信号/连接意象） */
  --brand-900: #071a33;
  --brand-800: #0c2950;
  --brand-700: #123a6e;
  --brand-600: #17529b;
  --brand-500: #1e6fd9;
  --brand-400: #4d94ef;
  --brand-100: #e5eefb;
  --accent: #00b3a8;
  --accent-600: #009489;

  /* 中性色：带一点蓝偏，和品牌色同源 */
  --ink: #16202e;
  --ink-2: #3f4c60;
  --muted: #76829a;
  --line: #e3e8f0;
  --line-2: #eef1f6;
  --surface: #ffffff;
  --ground: #f5f7fa;
  --ground-2: #eef2f7;

  --ok: #17845f;
  --danger: #c0392b;

  /* 尺度 */
  --wrap: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(22, 32, 46, 0.06);
  --shadow: 0 4px 16px rgba(22, 32, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(22, 32, 46, 0.12);

  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* 内容不足一屏时（如错误页）把页脚压到视口底部，不留悬空白块 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-500);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-600);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-outline:hover {
  border-color: var(--brand-500);
  color: var(--brand-500);
}

.btn-sm {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------------- 页头 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}

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

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-item {
  position: relative;
}

/* APP 下载入口：宽屏走 .header-cta 里那个，窄屏 .header-cta 被隐藏，
   改由导航展开菜单承载，避免手机访客只能从页脚进 */
.nav-item-app {
  display: none;
}

.nav-link {
  display: block;
  padding: 0 16px;
  line-height: 70px;
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.18s ease;
}

.nav-link:hover,
.nav-item.is-active > .nav-link {
  color: var(--brand-500);
}

.nav-item.is-active > .nav-link::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: var(--brand-500);
}

.nav-sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-sub a {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

.nav-sub a:hover {
  background: var(--brand-100);
  color: var(--brand-600);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
}

.header-phone svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}

.header-app {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.header-app:hover {
  color: var(--brand-500);
}

.header-app svg {
  width: 16px;
  height: 16px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* ---------------- 首屏 ---------------- */

.hero {
  position: relative;
  background:
    radial-gradient(
      1100px 520px at 78% 18%,
      rgba(0, 179, 168, 0.22),
      transparent 62%
    ),
    radial-gradient(
      900px 480px at 12% 78%,
      rgba(30, 111, 217, 0.3),
      transparent 60%
    ),
    linear-gradient(152deg, var(--brand-900) 0%, var(--brand-700) 58%, #10457f 100%);
  color: #fff;
  overflow: hidden;
}

/* 细网格：给深色底一点“连接/网络”质感，纯 CSS，不依赖外部图 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 35%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  /* 只设上下：.hero-inner 与 .wrap 在同一元素上，
     用 padding 简写会把 .wrap 的左右 24px 重置成 0，窄视口下内容直接贴边 */
  padding-top: 92px;
  padding-bottom: 84px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 22px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 179, 168, 0.25);
}

.hero h1 {
  font-size: 46px;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  max-width: 18em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.8);
  max-width: 44em;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* 首屏底部数据条 */
.hero-stats {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 26, 51, 0.32);
}

.hero-stats ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero-stats li {
  padding: 26px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stats li:last-child {
  border-right: 0;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-value .unit {
  font-size: 16px;
  margin-left: 2px;
  color: var(--accent);
}

.stat-label {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

/* 轮播（简单淡入切换，无第三方库） */
.hero-slides {
  position: relative;
}

.hero-slide {
  display: none;
}

.hero-slide.is-active {
  display: block;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 30px;
}

.hero-dot {
  width: 26px;
  height: 4px;
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hero-dot.is-active {
  background: var(--accent);
}

/* ---------------- 板块通用 ---------------- */

.section {
  padding: 78px 0;
}

.section-alt {
  background: var(--ground);
}

.section-head {
  margin-bottom: 40px;
  max-width: 46em;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head p {
  margin-top: 12px;
  font-size: 16px;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-500);
}

.section-more:hover {
  gap: 10px;
}

/* ---------------- 优势卡片 ---------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.feature:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 23px;
  height: 23px;
}

.feature h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------------- 文章卡片 ---------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-cover {
  aspect-ratio: 16 / 9;
  background: var(--ground-2);
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-cover img {
  transform: scale(1.04);
}

/* 无封面时的占位：不留空洞，也不拉伸 */
.card-cover-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-100), #f3f7fd);
  color: var(--brand-400);
}

.card-cover-empty svg {
  width: 34px;
  height: 34px;
}

.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 9px;
}

.card-tag {
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 600;
}

.card-date {
  font-variant-numeric: tabular-nums;
}

.card h3 {
  font-size: 16.5px;
  line-height: 1.55;
  margin-bottom: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card:hover h3 {
  color: var(--brand-600);
}

.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- 场景 / 平台能力 ---------------- */

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 恰好 4 项时用 2 列：3 列会留下一个孤零零的第 4 项占半行空白。
   :has() 不支持的旧浏览器降级为 3 列，只是排版不够齐，不影响可读 */
.scene-grid:has(> :first-child:nth-last-child(4)) {
  grid-template-columns: repeat(2, 1fr);
}

.scene {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.scene:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-sm);
}

.scene-no {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-400);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.scene h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.scene p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------------- 合作伙伴 ---------------- */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.partner {
  height: 76px;
  display: grid;
  place-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.partner img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.7;
  transition:
    filter 0.2s ease,
    opacity 0.2s ease;
}

.partner:hover img {
  filter: none;
  opacity: 1;
}

/* ---------------- 留言 CTA ---------------- */

.cta {
  background:
    radial-gradient(
      700px 340px at 85% 20%,
      rgba(0, 179, 168, 0.2),
      transparent 60%
    ),
    linear-gradient(135deg, var(--brand-800), var(--brand-600));
  color: #fff;
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 56px;
  align-items: center;
  /* 同上：不能用简写，否则吃掉 .wrap 的左右内边距 */
  padding-top: 66px;
  padding-bottom: 66px;
}

.cta h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.85;
}

.cta-contact {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
}

.cta-contact strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------------- 表单 ---------------- */

.lead-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.lead-form h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.lead-form .form-hint {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field label .req {
  color: var(--danger);
  margin-left: 2px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.12);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 蜜罐：视觉隐藏但不用 display:none（部分机器人会跳过 none） */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: end;
}

.captcha-img {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--ground);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.captcha-img svg {
  max-width: 100%;
  max-height: 100%;
}

.form-msg {
  margin-top: 12px;
  font-size: 14px;
  min-height: 21px;
}

.form-msg.is-ok {
  color: var(--ok);
}

.form-msg.is-err {
  color: var(--danger);
}

.lead-form .btn {
  width: 100%;
  margin-top: 4px;
}

/* ---------------- 内页 ---------------- */

.page-banner {
  position: relative;
  background:
    radial-gradient(
      800px 320px at 80% 10%,
      rgba(0, 179, 168, 0.18),
      transparent 60%
    ),
    linear-gradient(140deg, var(--brand-900), var(--brand-700));
  color: #fff;
  padding: 54px 0;
}

.page-banner h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 12px;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .sep {
  opacity: 0.5;
}

.article-body {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
}

/* 正文列宽按中文阅读舒适区收窄（约 40 字/行），整体居中 */
.article-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 34px 0 14px;
}

.article-body h3 {
  font-size: 18px;
  color: var(--ink);
  margin: 26px 0 10px;
}

.article-body p {
  margin: 0 0 16px;
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: revert;
}

.article-body li {
  margin-bottom: 7px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

.article-body th {
  background: var(--ground);
  font-weight: 600;
}

/* 富文本里的宽表格不能撑破页面 */
.article-body .table-wrap {
  overflow-x: auto;
}

.article-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.article-head h1 {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: var(--muted);
}

.article-meta span {
  font-variant-numeric: tabular-nums;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.article-tags a {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-2);
}

.article-tags a:hover {
  border-color: var(--brand-400);
  color: var(--brand-500);
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-nav a,
.article-nav span {
  font-size: 14.5px;
  color: var(--ink-2);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav a:hover {
  color: var(--brand-500);
}

.article-nav .label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.article-nav .next {
  text-align: right;
}

/* ---------------- 搜索 ---------------- */

.search-bar {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin-bottom: 26px;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.12);
}

.search-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ---------------- 分页 ---------------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.pagination a:hover {
  border-color: var(--brand-400);
  color: var(--brand-500);
}

.pagination .is-current {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
  font-weight: 600;
}

.pagination .is-disabled {
  color: var(--muted);
  opacity: 0.55;
}

/* ---------------- 空态 ---------------- */

.empty {
  padding: 72px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--ground);
}

.empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  opacity: 0.45;
}

.empty p {
  font-size: 15px;
}

.empty-action {
  margin-top: 18px;
}

.footer-bottom.is-bare {
  border-top: 0;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  margin-top: auto;
  background: var(--brand-900);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 44px;
  padding: 58px 0 44px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-intro {
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.58);
  max-width: 32em;
}

.footer-col h4 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-contact li {
  display: flex;
  gap: 8px;
  margin-bottom: 11px;
  line-height: 1.7;
}

.footer-contact .phone {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.footer-qr {
  margin-top: 4px;
}

.footer-qr img {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 5px;
}

.footer-qr figcaption {
  font-size: 12.5px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
  padding: 16px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------------- 浮动客服 ---------------- */

.float-contact {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-btn {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--brand-500);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 0;
  position: relative;
  transition: background-color 0.18s ease;
}

.float-btn:hover {
  background: var(--brand-600);
}

.float-btn svg {
  width: 22px;
  height: 22px;
}

/* 回到顶部：首屏不出现，滚动一段后再淡入 */
#back-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

#back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.float-btn .float-label {
  font-size: 11px;
  margin-top: 1px;
}

.float-pop {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  text-align: center;
  color: var(--ink);
}

.float-btn:hover .float-pop,
.float-btn:focus-visible .float-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.float-pop img {
  width: 128px;
  height: 128px;
}

.float-pop figcaption,
.float-pop .pop-text {
  font-size: 13px;
  margin-top: 6px;
  white-space: nowrap;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }
}

@media (max-width: 900px) {
  .card-grid,
  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stats ul {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 奇数项时最后一格跨满整行，不留半格空白 */
  .hero-stats li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
  }
  .hero-stats li:nth-child(2) {
    border-right: 0;
  }
  .hero-stats li:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: grid;
  }

  .nav {
    position: fixed;
    inset: 70px 0 auto;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 16px 16px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-link {
    line-height: 2.8;
    padding: 0;
    border-bottom: 1px solid var(--line-2);
  }

  .nav-item.is-active > .nav-link::after {
    display: none;
  }

  .nav-sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 6px 12px;
  }

  .header-cta {
    display: none;
  }

  .nav-item-app {
    display: block;
  }

  .hero-inner {
    padding-top: 58px;
    padding-bottom: 50px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 140px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .card-grid,
  .scene-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .partner-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .article-head h1 {
    font-size: 23px;
  }

  .article-body {
    font-size: 15.5px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav .next {
    text-align: left;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0 30px;
  }

  .page-banner {
    padding: 38px 0;
  }

  .page-banner h1 {
    font-size: 24px;
  }

  .float-contact {
    right: 10px;
    bottom: 76px;
    gap: 6px;
  }

  .float-btn {
    width: 44px;
    height: 44px;
  }

  .float-btn svg {
    width: 19px;
    height: 19px;
  }
}

/* ---------------- APP 下载页 ---------------- */

.app-hero {
  position: relative;
  background:
    radial-gradient(
      900px 420px at 82% 12%,
      rgba(0, 179, 168, 0.2),
      transparent 60%
    ),
    linear-gradient(145deg, var(--brand-900), var(--brand-700));
  color: #fff;
  overflow: hidden;
}

.app-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: center;
  /* 不能用 padding 简写：会吃掉 .wrap 的左右内边距 */
  padding-top: 56px;
  padding-bottom: 56px;
}

.app-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 22px 0 18px;
}

.app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: #fff;
}

.app-icon-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--accent));
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.app-intro {
  max-width: 44em;
}

.app-intro h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.app-slogan {
  margin-top: 8px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.app-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.app-actions .btn svg {
  width: 18px;
  height: 18px;
}

.app-empty-tip {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* 扫码卡片 */
.app-qr-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.qr-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--ground-2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.qr-tab {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 7px 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.qr-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.qr-panel {
  display: none;
  text-align: center;
}

.qr-panel.is-active {
  display: block;
}

.qr-img {
  display: grid;
  place-items: center;
}

.qr-img svg {
  width: 190px;
  height: 190px;
  display: block;
}

.qr-tip {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* 应用市场 */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.store-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.store-item:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  color: var(--brand-600);
}

.store-item img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: contain;
  flex-shrink: 0;
}

.store-dot {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--brand-100);
}

/* 截图横滚 */
.shot-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.shot {
  flex: 0 0 auto;
  width: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  scroll-snap-align: start;
}

/* 安装提示 */
.install-tips {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.install-tips h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

.install-tips ul {
  list-style: disc;
  padding-left: 20px;
  max-width: 68em;
}

.install-tips li {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.9;
  margin-bottom: 6px;
}

.install-tips strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .app-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .app-qr-card {
    max-width: 300px;
  }
}

@media (max-width: 760px) {
  .app-hero-inner {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .app-intro h1 {
    font-size: 25px;
  }

  .app-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .app-actions .btn {
    flex: 1;
    min-width: 150px;
  }

  .store-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-item {
    padding: 13px 14px;
    font-size: 14px;
  }

  .shot {
    width: 168px;
  }
}
