/* ==========================================================================
   公文写作助手 · 项目介绍页样式
   令牌来源：docs/design-system/MASTER.md（朱墨 + 藏蓝 + 赭金 公文色谱）
   零外部依赖：不引字体文件、不引 CDN、不引框架
   ========================================================================== */

:root {
  /* 品牌（朱墨） */
  --brand-600: #A8201A;
  --brand-700: #8C1A15;
  --brand-500: #C0392B;
  --brand-100: #F5DEDA;
  --brand-50:  #FDF4F3;
  /* 权威墨蓝 */
  --navy-600: #1E3A5F;
  --navy-700: #152B47;
  /* 赭金（品质/合规语义） */
  --gold-600: #B8860B;
  --gold-50:  #FDF8EC;
  /* 纸墨中性 */
  --bg:        #F2EFE9;
  --panel:     #FFFFFF;
  --surface-2: #F8F6F1;
  --surface-3: #F1EDE5;
  --ink:       #1F2328;
  --ink-strong:#111418;
  --ink-soft:  #4A5560;
  --ink-faint: #5C6670;
  --line:      #E2DCD2;
  --line-strong:#CFC7BA;
  /* 语义 */
  --ok:   #1B7A45;
  --ok-bg:#EAF6EE;
  --warn: #B26A00;
  --warn-bg:#FDF3E3;
  /* 圆角 4 档 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;
  /* 阴影 3 级 */
  --elev-1: 0 1px 2px rgba(28,22,14,.06), 0 1px 3px rgba(28,22,14,.04);
  --elev-2: 0 2px 4px rgba(28,22,14,.05), 0 8px 20px rgba(28,22,14,.06);
  --elev-3: 0 12px 32px rgba(28,22,14,.12), 0 2px 8px rgba(28,22,14,.06);
  /* 字号刻度 */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-16: 16px; --fs-18: 18px; --fs-20: 20px; --fs-24: 24px;
  --fs-30: 30px; --fs-40: 40px; --fs-52: 52px;
  /* 间距刻度 8pt */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-kai: "STKaiti", "KaiTi", "Songti SC", "SimSun", serif;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink-strong); line-height: 1.35; margin: 0; letter-spacing: .02em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  color: var(--navy-700);
}
abbr[title] { text-decoration: underline dotted var(--line-strong); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--brand-100);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--panel); color: var(--brand-700);
  padding: var(--s-3) var(--s-5); border-radius: 0 0 var(--r-md) 0;
  box-shadow: var(--elev-3);
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s-6); }
.muted { color: var(--ink-faint); }
.small { font-size: var(--fs-12); }
.sep { color: var(--line-strong); margin: 0 var(--s-2); }

.eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--brand-600);
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: var(--s-6); height: 64px; }
.brand { display: flex; align-items: center; gap: var(--s-3); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-seal { display: block; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: var(--fs-18); font-weight: 600; color: var(--ink-strong); letter-spacing: .02em; }
.brand-text em {
  font-style: normal; font-size: var(--fs-11); color: var(--ink-faint); letter-spacing: .04em;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-6); }
.nav a {
  color: var(--ink-soft); font-size: var(--fs-14); font-weight: 500;
  padding: var(--s-2) 0; transition: color 180ms ease;
}
.nav a:hover { color: var(--brand-600); text-decoration: none; }
.nav-cta {
  border: 1px solid var(--line-strong); border-radius: var(--r-full);
  padding: var(--s-2) var(--s-5) !important;
  color: var(--ink) !important; background: var(--panel);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.nav-cta:hover { box-shadow: var(--elev-2); border-color: var(--brand-100); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 80px;
  background:
    radial-gradient(900px 420px at 12% -10%, var(--brand-50), transparent 70%),
    radial-gradient(700px 380px at 92% 8%, var(--gold-50), transparent 72%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--s-9); align-items: center;
}
.hero h1 {
  font-size: var(--fs-40); font-weight: 700; letter-spacing: .01em; margin: 0 0 var(--s-5);
}
.hero h1 .accent { color: var(--brand-600); }
.lede { font-size: var(--fs-16); color: var(--ink-soft); max-width: 46ch; }
.lede strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-7) 0 var(--s-6); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 var(--s-6);
  border-radius: var(--r-sm); font-size: var(--fs-14); font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--elev-1); }
.btn-primary:hover { background: var(--brand-700); box-shadow: var(--elev-2); }
.btn-secondary { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand-100); box-shadow: var(--elev-2); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.chips li {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-13); color: var(--ink-soft);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-full); padding: var(--s-1) var(--s-4);
  box-shadow: var(--elev-1);
}
.dot { width: 8px; height: 8px; border-radius: var(--r-full); flex: 0 0 auto; }
.dot-ok { background: var(--ok); }
.dot-gold { background: var(--gold-600); }
.dot-navy { background: var(--navy-600); }

/* 界面示意 */
.hero-mock { perspective: 1200px; }
.mock-window {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-3);
  overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.mock-bar i { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--line-strong); }
.mock-bar span {
  margin-left: var(--s-3); font-size: var(--fs-11); color: var(--ink-faint); letter-spacing: .04em;
}
.mock-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2);
  padding: var(--s-4); background: var(--panel); border-bottom: 1px solid var(--line);
}
.mock-step {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-11); color: var(--ink-faint);
}
.mock-step b {
  display: grid; place-items: center;
  width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: var(--r-full); border: 1px solid var(--line-strong);
  font-size: 10px; font-weight: 700; color: var(--ink-faint); background: var(--panel);
}
.mock-step.is-done { color: var(--ink-soft); }
.mock-step.is-done b { background: var(--gold-600); border-color: var(--gold-600); color: #fff; }
.mock-step.is-now { color: var(--brand-700); font-weight: 600; }
.mock-step.is-now b {
  background: var(--brand-600); border-color: var(--brand-600); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-100);
}
.mock-body { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: var(--s-4); padding: var(--s-5); }
.mock-doc {
  background: #fff; border: 1px solid #E6E1D8; border-radius: var(--r-sm);
  padding: var(--s-5); box-shadow: var(--elev-1);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.mock-line { height: 7px; border-radius: var(--r-full); background: var(--surface-3); }
.mock-line.mock-title { height: 11px; width: 62%; margin: 0 auto var(--s-2); background: #DED7CA; }
.mock-line.mock-short { width: 72%; }
.mock-line.mock-head { width: 46%; background: #E7E2D6; }
.mock-line.mock-mark { background: var(--brand-100); border-left: 3px solid var(--brand-500); border-radius: 2px; }
.mock-side { display: flex; flex-direction: column; gap: var(--s-2); }
.mock-side-h {
  font-size: var(--fs-11); font-weight: 600; letter-spacing: .06em;
  color: var(--navy-600); margin-bottom: var(--s-1);
}
.mock-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  font-size: var(--fs-11); padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-soft);
}
.mock-item b { font-weight: 600; }
.mock-item.ok { background: var(--ok-bg); border-color: #CDE8D7; }
.mock-item.ok b { color: var(--ok); }
.mock-item.warn { background: var(--warn-bg); border-color: #F2DFBE; }
.mock-item.warn b { color: var(--warn); }

/* ---------- 区块 ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: var(--s-9); }
.sec-head h2 { font-size: var(--fs-30); font-weight: 700; margin-bottom: var(--s-3); }
.sec-sub { color: var(--ink-soft); }

/* ---------- 功能卡 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: var(--s-4); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-5);
  box-shadow: var(--elev-2);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover { box-shadow: var(--elev-3); border-color: var(--brand-100); }
.card-ico {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: var(--s-4);
  border-radius: var(--r-sm);
  background: var(--brand-50); color: var(--brand-600);
  border: 1px solid var(--brand-100);
}
.card-ico svg { width: 22px; height: 22px; }
.card h3 { font-size: var(--fs-16); font-weight: 600; color: var(--navy-600); margin-bottom: var(--s-2); }
.card p { font-size: var(--fs-14); color: var(--ink-soft); line-height: 1.8; }

/* ---------- 工作流 ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); position: relative; }
.flow-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-5);
  box-shadow: var(--elev-2); position: relative;
}
.flow-item:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: calc(-1 * var(--s-4) - 1px);
  width: var(--s-4); height: 1px; background: var(--line-strong);
}
.flow-no {
  display: grid; place-items: center;
  width: 28px; height: 28px; margin-bottom: var(--s-4);
  border-radius: var(--r-full);
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
  font-size: var(--fs-13); font-weight: 700;
}
.flow-item h3 { font-size: var(--fs-16); font-weight: 600; margin-bottom: var(--s-2); }
.flow-item p { font-size: var(--fs-13); color: var(--ink-soft); line-height: 1.8; }

/* ---------- 双端 ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s-5); }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-6);
  box-shadow: var(--elev-2);
}
.panel-head { padding-bottom: var(--s-4); margin-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: var(--fs-20); font-weight: 600; }
.panel-note {
  margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px dashed var(--line);
  font-size: var(--fs-13); color: var(--ink-faint);
}

.ticks li {
  position: relative; padding-left: var(--s-6);
  font-size: var(--fs-14); color: var(--ink-soft);
  margin-bottom: var(--s-3); line-height: 1.8;
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 6px; height: 10px;
  border-right: 2px solid var(--gold-600); border-bottom: 2px solid var(--gold-600);
  transform: rotate(40deg);
}
.ticks li:last-child { margin-bottom: 0; }
.ticks-sm li { font-size: var(--fs-13); }

/* ---------- 技术与可信 ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: var(--s-5); }
.trust-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-6); box-shadow: var(--elev-2);
}
.trust-card h3 {
  font-size: var(--fs-16); font-weight: 600; color: var(--navy-600);
  padding-bottom: var(--s-3); margin-bottom: var(--s-4); border-bottom: 1px solid var(--line);
}
.kv { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: var(--s-3) var(--s-4); }
.kv dt { font-size: var(--fs-13); color: var(--ink-faint); font-weight: 500; }
.kv dd { font-size: var(--fs-13); color: var(--ink); line-height: 1.75; }

/* ---------- 联系 ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--s-9);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--elev-2);
}
.contact h2 { font-size: var(--fs-24); font-weight: 700; margin-bottom: var(--s-4); }
.contact p { color: var(--ink-soft); font-size: var(--fs-14); margin-bottom: var(--s-4); }
.contact-side { border-left: 1px solid var(--line); padding-left: var(--s-9); }
.contact-side h3 { font-size: var(--fs-16); font-weight: 600; margin-bottom: var(--s-4); color: var(--navy-600); }

/* ---------- 页脚 ---------- */
.footer { background: var(--navy-700); color: rgba(255,255,255,.82); padding: var(--s-7) 0; }
.footer-in { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: flex-start; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-14); color: #fff; }
.footer-brand img { border-radius: 8px; }
.footer-meta { text-align: right; font-size: var(--fs-13); }
.footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer .muted { color: rgba(255,255,255,.62); }
.footer .small { margin-top: var(--s-2); max-width: 48ch; margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  .hero-mock { max-width: 620px; }
  .hero h1 { font-size: var(--fs-30); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-item:nth-child(2)::after { display: none; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  .contact-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: var(--s-6); }
}

@media (max-width: 760px) {
  .section { padding: 56px 0; }
  .hero { padding: 48px 0 56px; }
  .wrap { padding: 0 var(--s-5); }
  .nav { gap: var(--s-4); }
  .nav a:not(.nav-cta) { display: none; }
  .brand-text em { display: none; }
  .sec-head h2, .hero h1 { font-size: var(--fs-24); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-item::after { display: none; }
  .mock-body { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .kv dd { margin-bottom: var(--s-3); }
  .footer-in { flex-direction: column; }
  .footer-meta { text-align: left; }
  .footer .small { margin-left: 0; }
  .contact { padding: var(--s-6); }
}

/* ---------- 无障碍：动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- 打印 ---------- */
@media print {
  .topbar, .hero-mock, .cta-row { display: none; }
  body { background: #fff; }
  .section, .hero { padding: 16px 0; }
}
