/* 安信航官网 — 全站样式（品牌深海蓝，与原型视觉一致） */

:root {
  --primary: #14497f;
  --primary-dark: #0e3760;
  --primary-soft: #e8f0f8;
  --accent: #1a9e6e;
  --danger: #c92a2a;
  --warning: #b7791f;
  --ink: #17202b;
  --ink-2: #4a5768;
  --ink-3: #7b8794;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 35, 61, .06), 0 8px 24px rgba(16, 35, 61, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.65 "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section.alt { background: var(--bg-soft); }
.section-title { font-size: 28px; }
.section-sub { color: var(--ink-3); margin-top: -6px; margin-bottom: 28px; }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } .section { padding: 40px 0; } }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s ease;
  text-decoration: none !important; line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border-color: #c7d5e4; }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid rgba(20, 73, 127, .4); outline-offset: 1px;
}

/* ---- 页头 ---- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.brand-logo { height: 44px; width: auto; display: block; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  padding: 8px 13px; border-radius: 8px; color: var(--ink-2); font-size: 15px; font-weight: 500;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 12px 20px; }
  .main-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}

/* ---- Hero ---- */
.hero { background: linear-gradient(180deg, var(--primary-soft), #fff 90%); padding: 72px 0 56px; }
.hero h1 { font-size: 42px; max-width: 760px; letter-spacing: -.5px; }
.hero .lead { font-size: 17px; color: var(--ink-2); max-width: 680px; }
.hero-ctas { display: flex; gap: 14px; margin: 28px 0 40px; flex-wrap: wrap; }
@media (max-width: 640px) { .hero h1 { font-size: 30px; } }

/* ---- 数据卡 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.stat-label { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- 卡片 ---- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: box-shadow .15s ease, transform .15s ease;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.card .icon-box {
  width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card .desc { color: var(--ink-2); font-size: 14px; margin: 0; }
.card .more { color: var(--primary); font-weight: 600; font-size: 14px; margin-top: 14px; display: inline-block; }

/* ---- 徽章 ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-secondary { background: #eef1f5; color: var(--ink-2); }
.badge-muted { background: #f1f3f5; color: var(--ink-3); }
.badge-success { background: #e2f6ee; color: #14724f; }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-warning { background: #fdf3e0; color: var(--warning); }
.badge-outline { background: #fff; border-color: var(--line); color: var(--ink-2); }

/* ---- 表单 ---- */
.form-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid #cfd8e3; border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
.form-input:focus { border-color: var(--primary); }
.form-input.invalid, .form-input[aria-invalid="true"] { border-color: var(--danger); }
textarea.form-input { resize: vertical; }
.form-hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.form-errors { background: #fdecec; border: 1px solid #f5c2c2; color: var(--danger);
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check-row input { margin-top: 4px; }
.hp-field { position: absolute !important; left: -9999px !important; height: 0; opacity: 0; }
.char-count { font-size: 12px; color: var(--ink-3); text-align: right; margin-top: 4px; }
.char-count.warn { color: var(--warning); }

/* ---- 表格 ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.data th, table.data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.data th { background: var(--bg-soft); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafcfe; }

/* ---- 时间轴（跟踪结果） ---- */
.timeline { list-style: none; margin: 20px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: -2px; width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line);
}
.timeline li.current .dot { border-color: var(--primary); background: var(--primary); }
.timeline li.exception .dot { border-color: var(--danger); background: var(--danger); }
.timeline li.exception::before { background: #f0b5b5; }
.timeline .event { font-weight: 600; }
.timeline li.exception .event { color: var(--danger); }
.timeline .meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

/* ---- 结果头部卡 ---- */
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.result-dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.result-dl dt { font-size: 12px; color: var(--ink-3); }
.result-dl dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .result-dl { grid-template-columns: repeat(2, 1fr); } }

/* ---- 提示框 ---- */
.alert { padding: 14px 18px; border-radius: 10px; margin: 16px 0; font-size: 14px; border: 1px solid transparent; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border-color: #c7dcf0; }
.alert-success { background: #e2f6ee; color: #14724f; border-color: #b5e5d2; }
.alert-danger { background: #fdecec; color: var(--danger); border-color: #f5c2c2; }
.alert-warning { background: #fdf3e0; color: var(--warning); border-color: #f0dcae; }

/* ---- 页脚 ---- */
.site-footer { background: #0f2033; color: #b9c6d6; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #b9c6d6; }
.site-footer a:hover { color: #fff; }
.footer-meta { font-size: 13px; line-height: 2; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 12px; text-align: center; color: #8fa1b6; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- 悬浮客服 ---- */
.floating-service {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 52px; height: 52px;
  border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer;
  box-shadow: var(--shadow); font-size: 22px; display: flex; align-items: center; justify-content: center;
}
.floating-service:hover { background: var(--primary-dark); }

/* ---- Cookie 横幅（GDPR） ---- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #10233b; color: #dfe8f2;
  padding: 14px 20px; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 14px;
}
.cookie-banner .btn { padding: 7px 18px; }
/* 显隐用 class 切换：display:flex 会覆盖 hidden 属性的 UA 样式，不能依赖 hidden */
.cookie-banner.is-hidden { display: none; }
/* 全局防护：任何元素带 hidden 属性时强制隐藏，避免同类 bug */
[hidden] { display: none !important; }

/* ---- FAQ ---- */
details.faq { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }

/* ---- 面包屑 ---- */
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--primary); }

/* ---- 案例成效 ---- */
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.result-grid .cell { background: var(--bg-soft); border-radius: 10px; padding: 16px; }
.result-grid .cell b { display: block; font-size: 22px; margin-top: 4px; }
.result-grid .cell .pending { color: var(--ink-3); font-size: 14px; font-weight: 400; margin-top: 6px; display: block; }
@media (max-width: 640px) { .result-grid { grid-template-columns: 1fr; } }

/* ---- 认证页 ---- */
.auth-wrap { max-width: 440px; margin: 48px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; }
.auth-sub { color: var(--ink-3); font-size: 14px; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* ---- 工具类 ---- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 12px; } .mt-4 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--ink-3); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- Banner 轮播 ---- */
.banner-section { position: relative; }
.banner-carousel { position: relative; width: 100%; height: 620px; overflow: hidden; background: #0e2a47; }
@media (max-width: 900px) { .banner-carousel { height: 480px; } }
@media (max-width: 640px) { .banner-carousel { height: 420px; } }

.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 压暗渐变，保证叠加文字可读性 */
.banner-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,20,38,.72) 0%, rgba(8,20,38,.38) 45%, rgba(8,20,38,.08) 100%),
              linear-gradient(0deg, rgba(8,20,38,.55) 0%, rgba(8,20,38,0) 40%);
}

/* 品牌主张叠加层 */
.banner-brand { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; max-width: 1140px; margin: 0 auto; padding: 0 20px; color: #fff; }
.banner-brand h1 { color: #fff; font-size: 44px; max-width: 640px; letter-spacing: -.5px; text-shadow: 0 2px 18px rgba(0,0,0,.35); margin: 18px 0 12px; }
.banner-brand .lead { color: rgba(255,255,255,.86); max-width: 560px; font-size: 16px; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
@media (max-width: 900px) { .banner-brand h1 { font-size: 34px; } }
@media (max-width: 640px) { .banner-brand h1 { font-size: 28px; } .banner-brand .lead { font-size: 14px; } }

/* 每张 Banner 的后台配置文案（右下角小字） */
.banner-caption { position: absolute; right: 32px; bottom: 64px; z-index: 4; text-align: right; color: #fff; max-width: 420px; }
.banner-caption-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.banner-caption-sub { font-size: 13px; margin: 0 0 10px; color: rgba(255,255,255,.85); }
@media (max-width: 900px) { .banner-caption { display: none; } }

/* 箭头与圆点 */
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
  backdrop-filter: blur(4px);
}
.banner-arrow:hover { background: rgba(255,255,255,.3); }
.banner-arrow-left { left: 20px; }
.banner-arrow-right { right: 20px; }
.banner-dots { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5; display: flex; gap: 9px; }
.banner-dot { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,.45); padding: 0; transition: all .2s; }
.banner-dot.active { background: #fff; width: 26px; border-radius: 5px; }

/* 叠加层用按钮/徽章变体 */
.badge-light { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #f2f6fb; }

/* 关键数据条带 */
.stats-strip { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 28px 0; }
