/* ==========================================================================
   有道翻译 youdaowyv.com — 站点样式
   纯 CSS，无框架、无构建步骤。为 Core Web Vitals 与可维护性手写。
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --red: #fb4a3e;
  --red-dark: #e63b30;
  --red-soft: #fde8e6;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-soft-2: #f1f3f7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, .18);
  --maxw: 1180px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, "Noto Sans CJK SC", sans-serif;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 布局工具 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.center { text-align: center; }
.grid { display: grid; gap: 28px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 章节标题 ---------- */
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.5px;
}
.section-head .sub {
  display: block;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(251, 74, 62, .3); }
.btn--primary:hover { background: var(--red-dark); }
.btn--dark { background: #111827; color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--sm { padding: 9px 18px; font-size: 15px; }
.btn--lg { padding: 16px 34px; font-size: 18px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, .7);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.brand .logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--red), #ff7a52);
  color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(251, 74, 62, .35);
}
.nav-links { display: none; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-2); font-size: 15.5px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--red); }
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px 20px 22px;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 4px; color: var(--ink-2); font-weight: 500; border-bottom: 1px solid var(--bg-soft-2); }
.mobile-menu .btn { width: 100%; margin-top: 14px; }
@media (min-width: 1024px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 150px 20px 96px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(251, 74, 62, .10), transparent 70%),
    radial-gradient(40% 40% at 85% 30%, rgba(124, 58, 237, .10), transparent 70%),
    radial-gradient(40% 40% at 12% 35%, rgba(37, 99, 235, .08), transparent 70%),
    linear-gradient(180deg, #fff, var(--bg-soft));
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted); font-weight: 600; box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.hero h1 {
  font-size: clamp(34px, 6vw, 68px);
  letter-spacing: -1.5px;
  margin: 0 auto 22px;
  max-width: 16ch;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--red), #ff7a52 60%, var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  font-size: clamp(16px, 2.1vw, 20px);
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-meta { margin-top: 22px; color: var(--muted-2); font-size: 14px; }

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 760px;
  margin: 52px auto 0;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat .num { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--ink); letter-spacing: -1px; }
.stat .num span { color: var(--red); }
.stat .label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--red-soft);
}
.card .icon svg { width: 30px; height: 30px; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.icon--purple { background: var(--purple-soft) !important; }
.icon--blue { background: var(--blue-soft) !important; }

/* ---------- 功能交错区 ---------- */
.feature-row {
  display: grid;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
}
@media (min-width: 900px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature-row.reverse .feature-visual { order: 2; }
}
.feature-row:last-child { margin-bottom: 0; }
.feature-kicker { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.feature-kicker.c-red { color: var(--red); }
.feature-kicker.c-purple { color: var(--purple); }
.feature-kicker.c-blue { color: var(--blue); }
.feature-row > div > .feature-sub { color: var(--muted); margin-bottom: 26px; font-size: 16px; }
.feature-list { display: grid; gap: 22px; }
.feature-list .ttl {
  position: relative; display: inline-block; font-weight: 700; font-size: 17px; color: var(--ink);
}
.feature-list .ttl::after {
  content: ""; position: absolute; left: 0; bottom: 1px; height: 8px; width: 100%;
  background: var(--red-soft); z-index: -1; border-radius: 3px;
}
.feature-row.is-purple .ttl::after { background: var(--purple-soft); }
.feature-row.is-blue .ttl::after { background: var(--blue-soft); }
.feature-list .desc { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- 应用窗口 mockup ---------- */
.mock {
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-lg);
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d1d5db; }
.mock-bar i:nth-child(1) { background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar .url { margin-left: 10px; font-size: 12.5px; color: var(--muted-2); }
.mock-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.mock-pane { background: #fff; padding: 22px; min-height: 190px; }
.mock-pane .tag { font-size: 12px; color: var(--muted-2); font-weight: 600; margin-bottom: 12px; }
.mock-pane .txt { color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.mock-pane.out { background: linear-gradient(180deg, #fff, var(--bg-soft)); }
.mock-pane.out .txt { color: var(--red-dark); }
.mock-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.chip { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.mock--center .mock-body { grid-template-columns: 1fr; }

/* ---------- 能力四卡 ---------- */
.ability { padding: 30px; }
.ability h3 { font-size: 19px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.ability h3 .b { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); }
.ability h3 .b svg { width: 20px; height: 20px; }
.ability ul { margin-top: 6px; display: grid; gap: 8px; }
.ability li { position: relative; padding-left: 24px; color: var(--muted); font-size: 15px; }
.ability li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px;
  background: var(--red-soft); border-radius: 50%;
}
.ability li::after {
  content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px;
  background: var(--red); border-radius: 50%;
}

/* ---------- 资讯卡 ---------- */
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb {
  aspect-ratio: 16 / 9; display: grid; place-items: center; color: #fff;
  font-size: 17px; font-weight: 700; text-align: center; padding: 20px;
  background: linear-gradient(135deg, var(--red), #ff8a5c);
}
.post-thumb.g2 { background: linear-gradient(135deg, var(--purple), #a78bfa); }
.post-thumb.g3 { background: linear-gradient(135deg, var(--blue), #60a5fa); }
.post-thumb.g4 { background: linear-gradient(135deg, #0ea5a5, #5eead4); }
.post-body { padding: 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 17.5px; margin-bottom: 10px; }
.post-card:hover .post-body h3 { color: var(--red); }
.post-body p { color: var(--muted); font-size: 14.5px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-date { color: var(--muted-2); font-size: 13px; margin-top: 16px; }

/* ---------- 证言 ---------- */
.quote { padding: 30px; }
.quote .who { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quote .avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 700; font-size: 20px;
  object-fit: cover; overflow: hidden; box-shadow: 0 2px 6px rgba(16, 24, 40, .12);
}
.quote .who h4 { font-size: 16px; }
.quote .who span { color: var(--muted-2); font-size: 13px; }
.quote .stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: 10px; font-size: 15px; }
.quote p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(251, 74, 62, .14), transparent 70%),
    var(--bg-soft);
  border-radius: 24px; padding: 60px 24px;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 38px); margin-bottom: 14px; letter-spacing: -.5px; }
.cta-band .cta-sub { color: var(--muted); margin: 0 0 32px; font-size: 16px; }
.awards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 1060px; margin: 0 auto 30px; }
.awards figure { margin: 0; }
.awards img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); transition: transform .2s ease; }
.awards img:hover { transform: translateY(-4px); }
@media (min-width: 560px) { .awards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .awards { grid-template-columns: repeat(5, 1fr); gap: 18px; } }
.platforms { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: center; margin-bottom: 34px; color: var(--muted); font-weight: 600; }
.platforms span { display: inline-flex; align-items: center; gap: 8px; }
.platforms svg { width: 22px; height: 22px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: var(--muted-2); margin: 0 8px; }

/* ---------- 文章正文 ---------- */
.article { margin: 0 auto; padding: 40px 20px 80px; }
.article .meta { color: var(--muted-2); font-size: 14px; margin: 14px 0 28px; }
.article h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.5px; margin-bottom: 4px; }
.article-body h2 { font-size: 24px; margin: 40px 0 14px; }
.article-body h3 { font-size: 19px; margin: 28px 0 10px; }
.article-body p { color: var(--ink-2); font-size: 16.5px; margin: 14px 0; }
.article-body ul { margin: 14px 0; display: grid; gap: 10px; }
.article-body li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 16.5px; }
.article-body li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.article-body a { color: var(--red); font-weight: 600; }
.article-body a:hover { text-decoration: underline; }
.callout {
  background: var(--bg-soft); border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 26px 0;
}
.callout p { margin: 0; color: var(--ink-2); }
.related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.related h2 { font-size: 20px; margin-bottom: 18px; }
.related ul { display: grid; gap: 10px; }
.related a { color: var(--ink-2); font-weight: 500; }
.related a:hover { color: var(--red); }

/* ---------- FAQ 折叠 ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary {
  cursor: pointer; list-style: none; padding: 22px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--red); font-size: 24px; font-weight: 400; flex: none; }
.faq-item[open] > summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); font-size: 15.5px; padding: 0 0 22px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 36px; }
.footer-top { display: grid; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr 2.6fr; } }
.footer-about .brand { margin-bottom: 16px; }
.footer-about p { color: var(--muted); font-size: 14.5px; max-width: 34ch; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-cols h4 { font-size: 14px; color: var(--ink); margin-bottom: 16px; }
.footer-cols a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; transition: color .15s; }
.footer-cols a:hover { color: var(--red); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  padding-top: 28px; color: var(--muted-2); font-size: 13.5px; text-align: center;
}
.footer-bottom a { color: var(--muted-2); }
.footer-bottom a:hover { color: var(--ink); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-legal a { margin-left: 18px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 120px 20px; }
.notfound .code { font-size: clamp(72px, 16vw, 150px); font-weight: 800; letter-spacing: -4px;
  background: linear-gradient(120deg, var(--red), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: 26px; margin: 8px 0 14px; }
.notfound p { color: var(--muted); margin-bottom: 28px; }

/* ---------- 杂项 ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid rgba(251, 74, 62, .45); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
