/* ============================================================
   通太问卷（TLSUN）—— 科技感网站样式（含动态效果）
   深色 Hero + 浅色正文 + 深色统计带 + 深色页脚
   ============================================================ */
:root {
  --bg: #f6f8fc;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e5eaf2;

  --dark: #070b16;
  --dark-2: #0c1530;
  --surface: rgba(255, 255, 255, 0.04);

  --primary: #2563eb;
  --primary-2: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-hover: 0 16px 40px rgba(37, 99, 235, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #fff; padding: 12px 26px; border-radius: 10px; font-weight: 600; border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35); transition: transform .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37, 99, 235, .5); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); box-shadow: none; }
.btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 22, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08); transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(7, 11, 22, .96); box-shadow: 0 4px 24px rgba(0,0,0,.35); }
.nav { display: flex; align-items: center; height: 68px; gap: 26px; position: relative; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 9px; }
.brand .mark {
  background: linear-gradient(135deg, var(--primary-2), var(--cyan)); color: #fff;
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 17px; box-shadow: 0 4px 14px rgba(34,211,238,.4);
}
.nav > a { color: #cbd5e1; font-size: 15px; transition: color .2s; }
.nav > a:hover { color: #fff; }
.nav .right { margin-left: auto; }

/* 汉堡按钮（JS 自动注入） */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.hamburger span { width: 24px; height: 2px; background: #e2e8f0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero / 产品 Hero ---------- */
.hero, .p-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 20% 0%, #0a1a3f 0%, var(--dark) 55%);
  padding: 84px 0 72px;
}
.hero .wrap, .p-hero .wrap { position: relative; z-index: 2; }
.hero::before, .hero::after, .p-hero::before, .p-hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; pointer-events: none;
}
.hero::before, .p-hero::before { width: 440px; height: 440px; background: radial-gradient(circle, #2563eb, transparent 70%); top: -140px; left: -80px; }
.hero::after, .p-hero::after { width: 380px; height: 380px; background: radial-gradient(circle, #0891b2, transparent 70%); bottom: -140px; right: -60px; }

canvas.particles { position: absolute; inset: 0; z-index: 1; opacity: .8; }

.badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 13px; letter-spacing: 1px;
  background: rgba(34, 211, 238, .12); color: #7dd3fc; border: 1px solid rgba(34, 211, 238, .3); margin-bottom: 18px;
}
.hero h1 { font-size: 42px; line-height: 1.28; margin: 0 0 20px; font-weight: 800; }
.hero .sub { font-size: 19px; color: #cbd5e1; max-width: 760px; margin: 18px 0 8px; }
.hero .tagline { font-size: 15px; letter-spacing: 1px; color: #93a4bd; margin-top: 16px; }
.hero .cta { margin-top: 30px; }

.grad-text {
  background: linear-gradient(90deg, #60a5fa, #22d3ee, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.type { color: #7dd3fc; font-weight: 600; min-height: 1.6em; }
.type::after { content: '|'; color: var(--cyan); animation: blink 1s step-end infinite; margin-left: 2px; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* 产品 Hero */
.p-hero .kicker { font-size: 13px; letter-spacing: 3px; color: #7dd3fc; text-transform: uppercase; }
.p-hero h1 { font-size: 34px; margin: 10px 0 18px; font-weight: 800; }
.p-hero .def { font-size: 20px; line-height: 1.7; color: #dbe4f0; max-width: 860px; }

/* ---------- 区块 ---------- */
.section { padding: 80px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 30px; margin: 0 0 8px; color: #0f172a; }
.section h2 .en { font-size: 14px; color: #94a3b8; letter-spacing: 2px; font-weight: 600; display: block; text-transform: uppercase; }
.section .lead { color: var(--muted); max-width: 780px; margin: 0 0 40px; }

.grid { display: grid; gap: 22px; }
.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: 860px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: #cfe0f7; }
.card h3 { margin: 0 0 10px; font-size: 19px; color: #0f172a; }
.card p { margin: 0; color: var(--muted); }
.card ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.card .more { display: inline-block; margin-top: 16px; font-weight: 600; }

/* 功能块 */
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(37, 99, 235, .12); border-color: #cfe0f7; }
.feature h3 { margin: 0 0 8px; font-size: 17px; color: #1d4ed8; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* 统计数字带 */
.stats { background: linear-gradient(135deg, #070b16 0%, #0c1530 100%); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.stats::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, rgba(37,99,235,.25), transparent 70%); }
.stats .wrap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 760px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }
.stat .num { font-size: 46px; font-weight: 800; line-height: 1.1; background: linear-gradient(90deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: #93a4bd; margin-top: 8px; font-size: 15px; }

/* 对比表 */
table.cmp { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.cmp th, table.cmp td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
table.cmp th { background: #eef4fc; color: #0f172a; }
table.cmp tr:last-child td { border-bottom: none; }

/* 引用块 */
.quote-block { background: #fff; border-left: 4px solid var(--cyan); padding: 22px 26px; border-radius: 0 12px 12px 0; box-shadow: var(--shadow); font-size: 17px; color: #334155; }

/* FAQ 手风琴 */
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; padding: 0; transition: box-shadow .3s, border-color .3s; }
.faq-item:hover { border-color: #cfe0f7; }
.faq-q { margin: 0; padding: 18px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 17px; color: #0f172a; outline: none; }
.faq-q::after { content: '+'; font-size: 24px; line-height: 1; color: var(--primary); transition: transform .3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { margin: 0; padding: 0 22px; max-height: 0; overflow: hidden; color: var(--muted); transition: max-height .35s ease, padding .35s ease; }
.faq-item.open .faq-a { max-height: 320px; padding-bottom: 20px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #050810; color: #b9c6d8; padding: 56px 0 24px; font-size: 14px; }
.site-footer a { color: #b9c6d8; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; color: #8091a8; }

/* ---------- 滚动渐入动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* 移动端导航 */
@media (max-width: 920px) {
  .nav { height: 64px; }
  .nav > a:not(.brand), .nav .right { display: none; }
  .hamburger { display: flex; }
  .nav.open { flex-direction: column; align-items: flex-start; height: auto; padding: 14px 0; }
  .nav.open > a:not(.brand) { display: block; width: 100%; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
  .nav.open .right { display: block; width: 100%; padding-top: 12px; }
  .nav.open .hamburger { position: absolute; top: 12px; right: 0; }
  .hero h1 { font-size: 30px; }
  .p-hero h1 { font-size: 28px; }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .type::after, .card, .feature { transition: none; }
}

/* ---------- 文章 / 新闻 ---------- */
.crumbs { font-size: 13px; color: #94a3b8; margin-bottom: 20px; }
.crumbs a { color: #94a3b8; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { margin: 0 6px; color: #cbd5e1; }

.p-hero .pdate { margin-top: 16px; font-size: 14px; color: #93a4bd; letter-spacing: 1px; }

.article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, .06);
}
@media (max-width: 880px) {
  .article-wrap { margin: 0 16px; padding: 28px 22px; border-radius: 14px; }
}

.article { font-size: 16px; line-height: 1.9; color: #3a4a5f; overflow-wrap: break-word; }
.article > p { margin: 0 0 18px; }
.article h2 { font-size: 21px; color: #0f172a; margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); line-height: 1.4; font-weight: 700; }
.article h3 { font-size: 17px; color: #0f172a; margin: 26px 0 10px; font-weight: 700; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: #0f172a; }
.article a { border-bottom: 1px solid rgba(37, 99, 235, .3); }
.article a:hover { border-bottom-color: var(--primary); }
.article blockquote { margin: 20px 0; padding: 16px 20px; background: #f6f8fc; border-left: 4px solid var(--primary-2); border-radius: 0 10px 10px 0; color: #475569; font-size: 15.5px; }
.article blockquote p { margin: 0 0 10px; }
.article blockquote p:last-child { margin-bottom: 0; }
.article figure { margin: 24px 0; text-align: center; }
.article figure img { border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .12); max-width: 100%; }
.article figcaption { font-size: 13px; color: #94a3b8; margin-top: 10px; }
.article table.cmp { margin: 20px 0; font-size: 14.5px; }

/* 错误 / 正确示范块（克制配色） */
.article .tip, .article .warn { margin: 18px 0; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 4px; background: #fff; font-size: 15px; }
.article .tip { border-left-color: #16a34a; }
.article .warn { border-left-color: #dc2626; }
.article .tip b { color: #15803d; }
.article .warn b { color: #b91c1c; }
.article .tip p, .article .warn p { margin: 6px 0 0; }
.article .tip p:first-child, .article .warn p:first-child { margin-top: 0; }
.article .tip ul, .article .warn ul { margin: 6px 0 0; }

/* 问卷 / 模板预览框 */
.article .tpl { margin: 18px 0; padding: 18px 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; line-height: 1.85; color: #334155; }
.article .tpl p { margin: 0 0 12px; }
.article .tpl p:last-child { margin-bottom: 0; }
.article .tpl .q { color: #0f172a; font-weight: 600; margin-bottom: 6px; }

.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.article-nav a { color: #475569; }
.article-nav a:hover { color: var(--primary); }
.article-nav .spacer { flex: 1; }

.news-card { display: flex; flex-direction: column; height: 100%; padding: 24px; }
.news-card .date { font-size: 13px; color: #94a3b8; letter-spacing: 1px; }
.news-card h3 { font-size: 17px; line-height: 1.55; margin: 10px 0; }
.news-card p { font-size: 14px; flex: 1; }
.news-card .more { margin-top: 14px; font-weight: 600; }
