/* ============================================================
   Replynect — main.css
   System fonts, inline SVG icons, zero external deps.
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f1117;
  --surface:   #161b22;
  --surface2:  #1c2330;
  --border:    #21262d;
  --text:      #f0f0f0;
  --muted:     #8b949e;
  --accent:    #4f8ef7;
  --accent-h:  #3b7de8;
  --success:   #3fb950;
  --warn:      #d29922;
  --danger:    #f85149;
  --radius:    10px;
  --max-w:     1100px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ---------- Layout ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

section { padding: 5rem 0; }
section + section { padding-top: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-logo, .footer-logo { display: inline-flex; align-items: center; }
.logo-mark { flex-shrink: 0; display: block; margin-right: 0.5rem; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  color: var(--muted); font-size: 0.9rem; padding: 0.4rem 0.75rem;
  border-radius: 6px; transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links .btn-nav { margin-left: 0.5rem; }
/* 导航 CTA（方案 B：蓝色描边）。选择器需比 `.nav-links a` 更具体，
   否则文字会被染成灰色（曾导致灰字压蓝底、对比度 1.04） */
.nav-links a.btn-nav {
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid var(--accent);
  color: #8ab4ff;
}
.nav-links a.btn-nav:hover {
  background: rgba(79, 142, 247, 0.22);
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  padding: 0.65rem 1.5rem; border-radius: 8px; border: none;
  cursor: pointer; transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); text-decoration: none; color: #fff; }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface); text-decoration: none; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
}
/* 标题与副标题均匀折行，避免最后一行只剩一个词 */
.hero h1, .hero-sub, .section-title { text-wrap: balance; }
.nw { white-space: nowrap; } /* 中文词组不拆行 */
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
  padding: 0.3rem 0.9rem; border-radius: 20px; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.15;
  max-width: 760px; margin: 0 auto 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 1.15rem; color: var(--muted); max-width: 520px;
  margin: 0 auto 2.5rem; line-height: 1.65;
}
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Channel logos ---------- */
/* 渠道标签：等宽网格，桌面一行 4 个，手机 2×2；不随文字长短变宽 */
.channels {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  max-width: 600px; margin: 3rem auto 0;
}
.channel-pill {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 0.45rem 0.75rem;
  font-size: 0.85rem; color: var(--muted); white-space: nowrap;
}
.channel-pill svg, .channel-pill img { flex-shrink: 0; }

/* ---------- Section headings ---------- */
.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.2;
  margin-bottom: 1rem;
}
.section-sub { font-size: 1.05rem; color: var(--muted); max-width: 540px; line-height: 1.65; }
.section-center { text-align: center; }
.section-center .section-sub { margin: 0 auto; }

/* ---------- Pain points ---------- */
.pain-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 3rem;
}
.pain-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.pain-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.pain-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.pain-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.step { position: relative; padding-left: 1rem; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(79,142,247,0.15); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--accent);
  margin-bottom: 1rem;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* ---------- Cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column;
}
.card-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; flex: 1; }
.card-cta { margin-top: 1.25rem; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 3rem; align-items: start;
}
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.price-badge {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
  background: rgba(79,142,247,0.12); padding: 0.2rem 0.6rem; border-radius: 4px;
  margin-bottom: 1rem;
}
.price-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.price-desc { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.price-setup { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.price-monthly { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 0.25rem; }
.price-monthly span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-note { font-size: 0.78rem; color: var(--muted); margin-bottom: 1.75rem; }
.price-features { margin-bottom: 2rem; }
.price-features li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.875rem; color: var(--muted); padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }
.check { color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ---------- FAQ / Accordion ---------- */
.faq-list { margin-top: 2.5rem; max-width: 740px; }
.faq-list.centered { margin-left: auto; margin-right: auto; }
details {
  border-bottom: 1px solid var(--border);
}
details summary {
  padding: 1.1rem 0; cursor: pointer; font-size: 1rem; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); transition: transform .2s; }
details[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 1.1rem; font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.faq-answer p + p { margin-top: 0.75rem; }

/* ---------- Demo entry ---------- */
.demo-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3rem 2rem; text-align: center;
  max-width: 520px; margin: 2.5rem auto 0;
}
.demo-box p { color: var(--muted); font-size: 0.875rem; margin-top: 0.75rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 3.5rem 2rem; text-align: center;
  margin: 2rem 0;
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.cta-banner p { color: var(--muted); margin-bottom: 2rem; }
.cta-banner-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- About strip ---------- */
.about-strip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; margin-top: 2.5rem;
  display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-start;
}
.about-strip h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.about-strip p { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }
.about-item { flex: 1; min-width: 200px; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
label .req { color: var(--danger); margin-left: 2px; }
input, textarea, select {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.65rem 0.9rem;
  color: var(--text); font-family: var(--font); font-size: 0.9rem;
  outline: none; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; color: var(--muted); margin-bottom: 1.25rem; }
.form-check input[type="checkbox"] { width: auto; margin-top: 3px; flex-shrink: 0; }
.form-msg { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.875rem; margin-bottom: 1rem; display: none; }
.form-msg.success { background: rgba(63,185,80,.12); border: 1px solid var(--success); color: var(--success); }
.form-msg.error { background: rgba(248,81,73,.1); border: 1px solid var(--danger); color: var(--danger); }
.form-error-links { display: block; margin-top: 0.4rem; }
.form-error-links a { color: var(--text); text-decoration: underline; }
.form-error-code { display: block; margin-top: 0.35rem; font-size: 0.72rem; opacity: 0.75; }

/* ---------- Contact page grid ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-info h1, .contact-info h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; }
.contact-info p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.5rem; }
.contact-alt { margin-top: 2rem; }
.contact-alt h3 { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.contact-link {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; color: var(--muted); padding: 0.5rem 0;
  text-decoration: none; transition: color .15s;
}
.contact-link:hover { color: var(--text); }

/* ---------- Language switcher ---------- */
.lang-switch {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); border: 1px solid var(--border);
  border-radius: 5px; padding: 0.25rem 0.55rem;
  text-decoration: none; transition: color .15s, border-color .15s;
  margin-right: 0.1rem;
}
.lang-switch:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 2rem 0;
  margin-top: 5rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-size: 0.95rem; font-weight: 700; color: var(--text); text-decoration: none; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---------- Privacy page ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--muted); }
.prose p { font-size: 0.9rem; color: var(--muted); line-height: 1.75; margin-bottom: 0.75rem; }
.prose ul { margin: 0.5rem 0 0.75rem 1.25rem; }
.prose ul li { font-size: 0.9rem; color: var(--muted); line-height: 1.7; list-style: disc; }
.prose a { color: var(--accent); }
.prose .updated { font-size: 0.8rem; color: var(--muted); margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  /* 隐藏主导航链接，但保留语言切换和 CTA */
  .nav-links a:not(.btn-nav):not(.lang-switch) { display: none; }
  /* 移动端 CTA：沿用桌面的蓝色描边样式，只缩小尺寸 */
  .nav-links a.btn-nav {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }
  .channels { grid-template-columns: repeat(2, 1fr); max-width: 320px; gap: 0.6rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-strip { flex-direction: column; gap: 1.25rem; }
}
/* 小屏导航：按钮文字不折行，Logo 与按钮略收紧 */
.nav-links a.btn-nav, .lang-switch { white-space: nowrap; }
@media (max-width: 380px) {
  .nav-logo { font-size: 1rem; }
  .nav-logo .logo-mark { width: 22px; height: 22px; margin-right: 0.35rem; }
  .nav-links { gap: 0.15rem; }
  .lang-switch { padding: 0.2rem 0.45rem; }
  .nav-links a.btn-nav { padding: 0.3rem 0.55rem; margin-left: 0.25rem; }
}
@media (max-width: 480px) {
  .hero { padding: 4rem 0 3rem; }
  /* 小标语在窄屏保持一行 */
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.04em; padding: 0.3rem 0.75rem; }
  .cta-banner { padding: 2.5rem 1.25rem; }
}

/* ---------- Chat channels (D11: Telegram = AI 助手, WhatsApp = 真人) ---------- */
.chat-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
  display: flex; flex-direction: column; gap: 0.6rem; align-items: stretch; /* 三个渠道按钮等宽 */
}
.chat-fab a {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  color: var(--text); font-size: 0.8rem; font-weight: 600;
  text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: border-color .15s, transform .15s;
}
.chat-fab a:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.chat-fab svg { flex-shrink: 0; }
.chat-fab small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--muted); line-height: 1.2; }
.chat-fab span { line-height: 1.25; }
/* 官网聊天窗打开时收起浮动入口，避免和聊天窗挤在一起（聊天窗自带关闭按钮） */
.livechat-open .chat-fab, .livechat-open .livechat-tab { display: none; }
/* 官网聊天入口：右侧中部单独一个，样式和底部渠道按钮一致、等宽，用网站 LOGO */
.livechat-tab {
  position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%); z-index: 50;
  width: 10.5rem; display: flex; align-items: center; gap: 0.55rem;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 999px; padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  color: var(--text); font-size: 0.8rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 0 3px rgba(79,142,247,0.15);
  transition: transform 0.15s;
}
.livechat-tab:hover { transform: translateY(calc(-50% - 1px)); text-decoration: none; }
.livechat-tab svg { flex-shrink: 0; }
.livechat-tab span { line-height: 1.25; }
.livechat-tab small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--muted); line-height: 1.2; }
.chat-fab { width: 10.5rem; }

.footer-chat { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1rem; font-size: 0.8rem; color: var(--muted); }
.footer-chat a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; }
.footer-chat a:hover { color: var(--text); }

.channel-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 640px; margin: 2.5rem auto 0; }
.channel-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem 1.25rem; color: var(--text); text-decoration: none; transition: border-color .15s;
}
.channel-card:hover { border-color: var(--accent); text-decoration: none; }
.channel-card strong { font-size: 1rem; }
.channel-card .tag { font-size: 0.72rem; font-weight: 600; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.6rem; }
.channel-card p { font-size: 0.85rem; color: var(--muted); }
.channel-note { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }

@media (max-width: 768px) {
  /* 手机端浮动入口只留圆形图标，避免遮挡正文 */
  .chat-fab { right: 0.9rem; bottom: 0.9rem; }
  .chat-fab a { padding: 0.4rem; }
  .chat-fab span { display: none; }
  .livechat-tab { right: 0.9rem; width: auto; padding: 0.4rem; }
  .livechat-tab span { display: none; }
  .chat-fab { width: auto; }
  /* 给浮动入口留出位置，避免遮住页脚最后一行 */
  .footer { padding-bottom: 14.5rem; }
  .channel-cards { grid-template-columns: 1fr; }
}

/* ---------- WeChat dialog（个人微信，真人回复） ---------- */
.wx-dialog {
  border: 1px solid var(--border); border-radius: 16px; padding: 0;
  background: var(--surface); color: var(--text);
  width: min(340px, calc(100vw - 2rem)); margin: auto;
}
.wx-dialog::backdrop { background: rgba(0,0,0,.6); }
.wx-inner { padding: 1.5rem 1.5rem 1.25rem; text-align: center; position: relative; }
.wx-close {
  position: absolute; top: 0.6rem; right: 0.6rem; width: 2rem; height: 2rem;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.wx-close:hover { background: var(--surface2); color: var(--text); }
.wx-dialog h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.wx-sub { font-size: 0.8rem; color: var(--muted); }
.wx-qr { background: #fff; border-radius: 12px; padding: 0.5rem; margin: 1rem auto; width: 220px; }
.wx-qr img { width: 100%; height: auto; }
.wx-id {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.5rem 0.5rem 0.5rem 0.85rem; font-size: 0.9rem;
}
.wx-id code { font-family: var(--font); font-weight: 600; letter-spacing: 0.02em; }
.wx-id button {
  border: 0; border-radius: 6px; background: #07C160; color: #fff;
  font: 600 0.8rem var(--font); padding: 0.4rem 0.8rem; cursor: pointer;
}
.wx-tip { font-size: 0.75rem; color: var(--muted); margin-top: 0.85rem; line-height: 1.55; }
.channel-cards.three { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
@media (max-width: 768px) { .channel-cards.three { grid-template-columns: 1fr; } }
