/* ============================================================
   CoEditor — 官网首页样式
   设计语言：纸墨质感 + 朱砂强调（编辑批注隐喻）
   ============================================================ */

:root {
  --paper: #faf7f1;
  --paper-deep: #f3eee4;
  --ink: #221f1a;
  --ink-soft: #4d463c;
  --muted: #7d7468;
  --line: #e6ddd0;
  --accent: #a63d2f;
  --accent-soft: #c96a55;
  --dark: #1b1915;
  --dark-line: #332f27;
  --card: #fffdf8;
  --serif: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(34, 31, 26, 0.08);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- 顶部导航 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(34, 31, 26, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  height: 30px;
  width: auto;
  opacity: 0.92;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.nav-links a:not(.btn):hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

.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); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(166, 61, 47, 0.28);
}
.btn-primary:hover { background: #93362a; box-shadow: 0 10px 26px rgba(166, 61, 47, 0.34); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--card); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { box-shadow: var(--shadow); }

.btn-outline-light { background: transparent; color: #e8e1d4; border-color: var(--dark-line); }
.btn-outline-light:hover { border-color: #e8e1d4; }

.btn-sm { padding: 9px 20px; font-size: 13.5px; }

/* ---------- Hero ---------- */

.hero {
  padding: 176px 0 96px;
  text-align: center;
  background:
    radial-gradient(1200px 420px at 50% -10%, rgba(166, 61, 47, 0.07), transparent 65%),
    var(--paper);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.28;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}

.hero-title span { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-sub {
  max-width: 620px;
  margin: 0 auto 40px;
  font-size: 17px;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-tags {
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- 通用区块 ---------- */

.section { padding: 104px 0; }
.section-alt { background: var(--paper-deep); }
.section-alt .card { background: var(--paper); }

.section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 18px;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 56px;
}

/* ---------- 卡片 ---------- */

.cards {
  display: grid;
  gap: 22px;
}

.cards.three { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #d8cbb8;
}

.card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 工作流 ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.steps li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px 30px;
}

.step-no {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 18px;
}

.steps h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.steps p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 深色区 / CTA / 页脚 ---------- */

.section.dark {
  background: var(--dark);
  color: #ece5d8;
}

.section.dark .eyebrow { color: var(--accent-soft); }
.section.dark .section-lead { color: #b7ad9c; }
.section.dark .section-lead strong { color: #ece5d8; }

.section.cta { text-align: center; }
.section.cta h2 { margin-bottom: 14px; }
.section.cta p { color: var(--muted); margin-bottom: 36px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { height: 24px; }
.footer-brand .brand-name { font-size: 17px; }

.footer-note { font-size: 13px; color: var(--muted); }

.footer-links { display: flex; gap: 24px; font-size: 13.5px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }

/* ---------- 滚动渐入 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 920px) {
  .cards.three { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 28px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(34, 31, 26, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-links a { padding: 10px 0; font-size: 16px; }
  .nav-links .btn { margin-top: 10px; width: 100%; }
  .hero { padding: 140px 0 72px; }
  .section { padding: 72px 0; }
  .cards.three { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li:last-child { grid-column: auto; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- 无障碍：尊重减少动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
