/* ==========================================================================
   video2text.cn · Design System
   原则：克制的配色、充足的留白、清晰的层级。装饰服从于可读性与转化。
   ========================================================================== */

:root {
  /* 品牌色：单一主色，避免多色竞争 */
  --brand: #4f46e5;
  --brand-strong: #4338ca;
  --brand-soft: #eef2ff;
  --brand-border: #e0e7ff;

  /* 中性色阶 */
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;

  /* 背景 */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-mute: #f1f5f9;

  /* 功能色 */
  --ok: #059669;
  --warn: #d97706;

  /* 尺寸 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --wrap: 1120px;

  /* 阴影：只用两级，且都很轻 */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --sh-2: 0 4px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; font-weight: 700; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.02em; line-height: 1.18; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.01em; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin: 0 0 16px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 600; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 8px; }
::selection { background: var(--brand-soft); color: var(--brand-strong); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 24px; flex: none;
  display: block; object-fit: contain;
}
.logo small { font-weight: 500; color: var(--ink-4); font-size: 12px; letter-spacing: 0; }
.nav-links { display: flex; gap: 24px; margin-left: 8px; }
.nav-links a { color: var(--ink-3); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); text-decoration: none; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer; padding: 4px 8px; }

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-md); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1.4;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-p { background: var(--brand); color: #fff; }
.btn-p:hover { background: var(--brand-strong); }
.btn-g { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-g:hover { border-color: var(--ink-4); }
.btn-l { padding: 14px 28px; font-size: 16px; border-radius: var(--r-md); }
.btn-b { display: flex; width: 100%; }

/* --------------------------------------------------------------------------
   首屏
   -------------------------------------------------------------------------- */
.hero { padding: 84px 0 72px; position: relative; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 78% 6%, rgba(79, 70, 229, .07), transparent 46%);
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--brand-strong);
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  padding: 5px 13px; border-radius: 99px; margin-bottom: 24px;
}
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-3); max-width: 640px; margin-bottom: 32px; }
.hero h1 { max-width: 780px; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }

/* 工具输入框：首屏核心转化位 */
.tool {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px; box-shadow: var(--sh-2); max-width: 660px;
}
.tool-row { display: flex; gap: 10px; }
.tool input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 16px; color: var(--ink); padding: 12px 14px; font-family: inherit;
}
.tool input::placeholder { color: var(--ink-4); }
.tool-note { font-size: 13px; color: var(--ink-4); margin: 10px 4px 0; }
.tool-note a { color: var(--ink-3); }
.tool-err { color: #dc2626; font-size: 13px; margin: 8px 4px 0; display: none; }

.trust { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 26px; font-size: 13px; color: var(--ink-4); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust b { color: var(--ink-3); font-weight: 500; }

/* --------------------------------------------------------------------------
   区块
   -------------------------------------------------------------------------- */
.sec { padding: 76px 0; }
.sec.soft { background: var(--bg-soft); }
.sec-head { max-width: 660px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head p { color: var(--ink-3); font-size: 17px; }
.kicker { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   卡片栅格
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; transition: border-color .16s ease, box-shadow .16s ease;
}
.card:hover { border-color: #cbd5e1; box-shadow: var(--sh-1); }
.card h3 { margin-bottom: 10px; font-size: 17px; }
.card p { font-size: 14.5px; color: var(--ink-3); margin-bottom: 0; }
.card-ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft);
  color: var(--brand-strong); display: grid; place-items: center;
  font-size: 18px; margin-bottom: 18px; font-weight: 600;
}
.card-link { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; margin-top: 14px; }

/* 步骤 */
.steps { counter-reset: s; display: grid; gap: 22px; }
.step { display: flex; gap: 18px; }
.step::before {
  counter-increment: s; content: counter(s);
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  display: grid; place-items: center; margin-top: 3px;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--ink-3); margin: 0; }

/* 数字强调 */
.metric { display: flex; flex-direction: column; gap: 4px; }
.metric b { font-size: 30px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
.metric span { font-size: 13px; color: var(--ink-4); }

/* 表格 */
table.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.cmp thead th { background: var(--bg-soft); color: var(--ink); font-weight: 600; font-size: 13.5px; }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp td:first-child { color: var(--ink); font-weight: 500; }
.yes { color: var(--ok); font-weight: 600; }
.no { color: var(--ink-4); }
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; background: #fff; }

/* 提示块 */
.note {
  border-left: 3px solid var(--brand); background: var(--brand-soft);
  padding: 16px 20px; border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14.5px; color: var(--ink-2); margin: 24px 0;
}
.note b { color: var(--brand-strong); }
.warnbox { border-left-color: var(--warn); background: #fffbeb; }
.warnbox b { color: var(--warn); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 20px 34px 20px 0; position: relative; font-size: 16px; font-weight: 600;
  color: var(--ink); font-family: inherit; line-height: 1.5;
}
.faq-q::after {
  content: '+'; position: absolute; right: 6px; top: 18px;
  font-size: 22px; color: var(--ink-4); font-weight: 400; transition: transform .18s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 0 22px; font-size: 15px; color: var(--ink-3); }
.faq-item.open .faq-a { display: block; }

/* CTA 区 */
.cta {
  background: linear-gradient(160deg, #1e1b4b, #312e81 60%, #4338ca);
  color: #e0e7ff; border-radius: var(--r-xl); padding: 52px 44px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #c7d2fe; max-width: 520px; margin: 0 auto 28px; }
.cta .btn-p { background: #fff; color: var(--brand-strong); }
.cta .btn-p:hover { background: #eef2ff; }
.cta small { display: block; margin-top: 16px; color: #a5b4fc; font-size: 13px; }

/* 页脚 */
.footer { border-top: 1px solid var(--line); padding: 52px 0 32px; margin-top: 40px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 36px; }
.foot-col h4 { font-size: 13px; color: var(--ink); margin-bottom: 14px; font-weight: 600; }
.foot-col a { display: block; font-size: 13.5px; color: var(--ink-3); margin-bottom: 9px; }
.foot-col a:hover { color: var(--brand); text-decoration: none; }
.foot-col p { font-size: 13.5px; color: var(--ink-4); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 22px; font-size: 12.5px; color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 12px 24px; }
.foot-bottom a { color: var(--ink-4); }

/* 面包屑与文章页 */
.crumb { font-size: 13px; color: var(--ink-4); margin-bottom: 22px; }
.crumb a { color: var(--ink-4); }
.crumb a:hover { color: var(--brand); }
.article { max-width: 780px; }
.article h2 { font-size: 24px; margin-top: 44px; }
.article h3 { font-size: 18px; margin-top: 28px; }
.article p, .article li { font-size: 16px; }
.article img { border-radius: var(--r-md); border: 1px solid var(--line); }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.tag { font-size: 12.5px; color: var(--ink-3); background: var(--bg-mute); padding: 4px 11px; border-radius: 99px; }
.page-hero { padding: 52px 0 40px; border-bottom: 1px solid var(--line-soft); }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 40px); max-width: 820px; }
.page-hero p { font-size: 17px; color: var(--ink-3); max-width: 720px; }
.page-hero .tool { margin-top: 26px; }

/* 相关阅读 */
.related { display: grid; gap: 12px; }
.related a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink); font-size: 14.5px; background: #fff;
}
.related a:hover { border-color: var(--brand); text-decoration: none; }
.related a span { color: var(--ink-4); font-size: 13px; flex: none; }
/* 长标题必须允许在 flex 中收缩，否则 390px 下会把整页撑出横向滚动 */
.related a > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

/* 移动端 */
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.show {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 16px 24px; gap: 16px;
  }
  .nav-toggle { display: block; margin-left: auto; }
  .logo small { display: none; }
  .logo { flex: none; }
  .nav-cta { margin-left: 0; }
  .nav-cta .btn { padding: 8px 14px; font-size: 13px; }
  .hero { padding: 48px 0 44px; }
  .sec { padding: 52px 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .tool-row { flex-direction: column; }
  .tool .btn { width: 100%; }
  .cta { padding: 36px 24px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .wrap { padding: 0 18px; }
}
