/* ==========================================================================
   惠来电 · 官网样式
   设计令牌与 web/index.html 保持一致（主色 #1677ff + 能量渐变）
   ========================================================================== */

/* ============ 设计令牌 ============ */
:root {
  --color-primary: #1677ff;
  --color-accent: #06b6d4;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-light: #94a3b8;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f8fc;
  --color-hero-bg: #0a1524;
  --color-line: #e6edf5;

  --gradient-energy: linear-gradient(135deg, #1677ff 0%, #06b6d4 100%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);

  --font-stack: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;

  --header-height: 68px;
  --container-max: 1120px;
  --section-pad: 88px;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  font-family: var(--font-stack);
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }

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

section { padding: var(--section-pad) 0; }

/* ============ 通用组件 ============ */
.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(22, 119, 255, 0.08);
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-bottom: 14px;
}

.section-head p { color: var(--color-text-secondary); font-size: 15.5px; }

.gradient-text {
  background: var(--gradient-energy);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.js .reveal.visible { opacity: 1; transform: none; }

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

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-primary {
  color: #fff;
  background: var(--gradient-energy);
  box-shadow: 0 8px 22px rgba(22, 119, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22, 119, 255, 0.34); }

.btn-ghost {
  color: var(--color-text-primary);
  background: #fff;
  border-color: var(--color-line);
}
.btn-ghost:hover { border-color: rgba(22, 119, 255, 0.4); color: var(--color-primary); }

/* 品牌标记 */
.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--gradient-energy);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brand-mark img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.brand-mark.fallback img { display: none; }
.brand-mark .brand-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--color-text-secondary); }

.main-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; }
.main-nav a {
  display: inline-block;
  padding: 8px 15px;
  font-size: 14.5px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav a:hover { color: var(--color-primary); background: rgba(22, 119, 255, 0.07); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 96px) 0 96px;
  background: radial-gradient(1100px 520px at 50% -10%, rgba(22, 119, 255, 0.28), transparent 70%), var(--color-hero-bg);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.86);
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.28;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(15px, 1.6vw, 17px);
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 56px auto 0;
}
.hero-fact {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.hero-fact strong { display: block; font-size: 19px; margin-bottom: 4px; }
.hero-fact span { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }

/* ============ 关于我们 ============ */
.about { background: var(--color-bg); }
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
.about-text h3 { font-size: 1.35rem; line-height: 1.5; margin-bottom: 18px; }
.about-text p { color: var(--color-text-secondary); margin-bottom: 14px; font-size: 15.5px; }
.about-text strong { color: var(--color-text-primary); }

.audience-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
}
.audience-card h4 { font-size: 15px; margin-bottom: 18px; }
.audience-list { list-style: none; display: grid; gap: 14px; }
.audience-list li { display: flex; gap: 12px; align-items: flex-start; }
.audience-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(22, 119, 255, 0.1);
  color: var(--color-primary);
}
.audience-icon svg { width: 17px; height: 17px; }
.audience-list strong { display: block; font-size: 14.5px; }
.audience-list span { font-size: 13px; color: var(--color-text-secondary); }

/* ============ 业务范围 ============ */
.services { background: var(--color-bg-soft); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.service-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(22, 119, 255, 0.28);
}
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: rgba(22, 119, 255, 0.1);
  color: var(--color-primary);
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--color-text-secondary); }

/* ============ 服务流程 ============ */
.process { background: var(--color-bg); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.process-step {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-line);
  background: #fff;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-energy);
}
.process-step h3 { font-size: 15.5px; margin-bottom: 8px; }
.process-step p { font-size: 13.5px; color: var(--color-text-secondary); }

/* ============ App 下载 ============ */
.download-band { background: var(--color-bg-soft); }
.download-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-md);
}
.download-card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.download-card p { color: var(--color-text-secondary); font-size: 15px; margin-bottom: 6px; }
.download-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--color-text-light); }
.download-meta span { display: inline-flex; align-items: center; gap: 6px; }
.download-actions { display: flex; flex-direction: column; gap: 12px; min-width: 190px; }

/* ============ 合规声明 ============ */
.compliance { background: var(--color-bg); }
.compliance-box {
  display: flex;
  gap: 22px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.compliance-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}
.compliance-icon svg { width: 22px; height: 22px; }
.compliance-box h2 { font-size: 1.15rem; margin-bottom: 12px; }
.compliance-box p { font-size: 14.5px; color: var(--color-text-secondary); margin-bottom: 10px; }
.compliance-box p:last-child { margin-bottom: 0; }
.compliance-box strong { color: var(--color-text-primary); }

/* ============ Footer ============ */
.site-footer { padding: 64px 0 28px; background: var(--color-hero-bg); color: rgba(255, 255, 255, 0.72); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr 1.3fr; gap: 36px; }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-name { color: #fff; font-size: 15px; }
.footer-brand .brand-sub { color: rgba(255, 255, 255, 0.55); }
.footer-desc { font-size: 13.5px; line-height: 1.8; color: rgba(255, 255, 255, 0.55); }

.footer-col h4 { font-size: 14px; color: #fff; margin-bottom: 16px; letter-spacing: 0.02em; }
.footer-nav { list-style: none; display: grid; gap: 10px; }
.footer-nav a { font-size: 13.5px; color: rgba(255, 255, 255, 0.62); }
.footer-nav a:hover { color: #fff; }

.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 11px; align-items: flex-start; }
.contact-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--color-accent); }
.contact-label { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.contact-value { font-size: 13.5px; color: rgba(255, 255, 255, 0.86); word-break: break-all; }

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.62); }
.footer-bottom a:hover { color: #fff; }
.footer-legal-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ 法务页（隐私政策 / 用户协议）============ */
.legal-page { padding: calc(var(--header-height) + 56px) 0 80px; }
.legal-wrap { max-width: 860px; margin: 0 auto; }
.legal-head { padding-bottom: 26px; margin-bottom: 32px; border-bottom: 1px solid var(--color-line); }
.legal-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.legal-meta { font-size: 13px; color: var(--color-text-light); }
.legal-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 20px; }

.legal-doc section { padding: 0; margin-bottom: 30px; }
.legal-doc h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  line-height: 1.5;
}
.legal-doc p {
  font-size: 14.5px;
  color: var(--color-text-secondary);
  line-height: 1.95;
  margin-bottom: 10px;
  text-indent: 2em;
}
.legal-doc ul { margin: 0 0 10px; padding-left: 1.4em; }
.legal-doc li {
  font-size: 14.5px;
  color: var(--color-text-secondary);
  line-height: 1.95;
  margin-bottom: 8px;
}
.legal-doc strong { color: var(--color-text-primary); }

.legal-notice {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(22, 119, 255, 0.06);
  border: 1px solid rgba(22, 119, 255, 0.16);
  font-size: 13.5px;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
}

/* ============ 下载页 ============ */
.dl-page { padding: calc(var(--header-height) + 56px) 0 80px; background: var(--color-bg-soft); }
.dl-wrap { max-width: 720px; margin: 0 auto; }
.dl-card {
  padding: 40px 34px;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.dl-app-icon {
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.dl-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-card h1 { font-size: 1.4rem; margin-bottom: 8px; }
.dl-slogan { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 22px; }
.dl-version { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; color: var(--color-text-light); margin-bottom: 24px; }
.dl-version b { color: var(--color-text-primary); font-size: 15px; }
.dl-actions { display: grid; gap: 12px; max-width: 320px; margin: 0 auto; }
.dl-note { margin-top: 22px; font-size: 12.5px; color: var(--color-text-light); line-height: 1.8; }

.dl-section { margin-top: 26px; padding: 26px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--color-line); }
.dl-section h2 { font-size: 15.5px; margin-bottom: 16px; }
.dl-steps { list-style: none; display: grid; gap: 14px; }
.dl-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--color-text-secondary); }
.dl-step-idx {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff;
  background: var(--gradient-energy);
}
.dl-log { font-size: 14px; color: var(--color-text-secondary); line-height: 1.9; white-space: pre-line; }

/* ============ 404 ============ */
.err-page {
  padding: calc(var(--header-height) + 96px) 0 120px;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(22, 119, 255, 0.10), transparent 70%),
    var(--color-bg-soft);
  text-align: center;
}

.err-code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--gradient-energy);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 10px;
}

.err-title { font-size: clamp(1.15rem, 2.4vw, 1.45rem); margin-bottom: 12px; }

.err-desc {
  max-width: 560px;
  margin: 0 auto 30px;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.err-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.err-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--color-line);
  font-size: 13.5px;
  color: var(--color-text-secondary);
}

.err-links a { color: var(--color-primary); }
.err-links span { color: var(--color-line); }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card { grid-template-columns: 1fr; }
  .download-actions { min-width: 0; }
}

@media (max-width: 720px) {
  :root { --section-pad: 62px; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .main-nav.open { max-height: 340px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { padding: 12px 10px; border-radius: var(--radius-sm); }

  .hero { padding: calc(var(--header-height) + 64px) 0 64px; }
  .hero-facts { grid-template-columns: 1fr; gap: 12px; margin-top: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .compliance-box { flex-direction: column; padding: 24px; }
  .dl-card { padding: 30px 20px; }
  .legal-doc p, .legal-doc li { font-size: 14px; }
}
