/* AgentLink 官网排版修复 — 2026-06-22 */

/* ═══ 1. reveal-on-scroll 安全回退 ═══
   原始 CSS 设 opacity:0，依赖 JS IntersectionObserver 添加 .is-visible。
   如果 JS 延迟或失败，内容永久不可见（"卡片丢失"）。
   方案：3 秒后自动显示所有 reveal-on-scroll 元素。 */
@keyframes al-reveal-fallback {
  to { opacity: 1; filter: none; transform: none; }
}
.reveal-on-scroll:not(.is-visible) {
  animation: al-reveal-fallback 0.6s ease 3s forwards;
}

/* ═══ 2. ch 单位修复 ═══
   ch 基于拉丁字体 "0" 宽度（≈0.5em），对中文字符（≈1em）来说太窄。
   11ch 只能放 ~5 个中文字，导致标题频繁断裂换行。
   改用 em 单位，1em ≈ 1 个中文字宽度。 */

/* 主标题 */
.hero-copy h1 { max-width: 12em !important; }

/* 区块标题 */
.section-heading h2 { max-width: 14em !important; }

/* 卡片标题 */
.content-wrap h3 { max-width: 20em !important; }
.storyboard-copy h3 { max-width: 18em !important; }
.process-card h3 { max-width: 20em !important; }
.cases-cta-card h2 { max-width: 14em !important; }
.case-study-header h2 { max-width: 16em !important; }
.case-portal-lead h3 { max-width: 20em !important; }
.media-caption strong { max-width: 16em !important; }

/* 摘要卡片标题 */
.insight-summary-card strong,
.pain-summary-card strong { max-width: 18em !important; }

/* 移动端标题 */
@media (max-width: 560px) {
  .hero-copy h1 { max-width: 10em !important; }
}

/* ═══ 3. 文字重叠修复 ═══ */

/* hero-card.top-right 使用 right:-24px 可能溢出或重叠 */
.hero-card.top-right {
  right: 0 !important;
}

/* 移动端 CTA dock 不遮挡 footer 内容 */
.contact-section { padding-bottom: 140px; }

/* ═══ 4. 字体加载优化 ═══
   Google Fonts 在中国可能加载缓慢。
   确保 font-display: swap 已生效，添加中文系统字体优先级。 */
:root {
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* ═══ 5. 卡片可见性增强 ═══
   原始面板和边框透明度很低，暗色背景下可能看不清。
   稍微提高对比度，确保卡片边界清晰。 */
.insight-card,
.pain-card,
.solution-card,
.scenario-card {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ═══ 6. 段落最大宽度修复 ═══
   部分段落 max-width 使用 ch 单位，对中文来说偏窄。
   转换为更适合中文阅读的宽度。 */
.hero-lead { max-width: 38em !important; }
.hero-caption-note { max-width: 42em !important; }
.section-heading > p,
.section-heading.split > p { max-width: 38em !important; }
.content-wrap p { max-width: 26em !important; }
.storyboard-copy p { max-width: 26em !important; }
.process-card p { max-width: 38em !important; }
.faq-answer p { max-width: 38em !important; }
.hero-proof-line { max-width: none !important; }

/* ═══ 7. process-card 布局修复 ═══
   移动端 process-card 被强制为 grid 布局但原始是 flex，
   可能导致内容重叠。确保内容正确排列。 */
.process-card-body {
  min-width: 0;
}

/* ═══ 8. 网格溢出修复 ═══
   确保网格内容不溢出容器 */
.insight-grid,
.pain-grid,
.solution-grid,
.scenario-grid,
.trust-grid {
  min-width: 0;
}

.insight-card,
.pain-card,
.solution-card,
.scenario-card,
.trust-item {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ═══ 9. 导航栏换行修复 ═══
   导航链接 white-space:nowrap 在窄屏可能导致溢出 */
@media (max-width: 1024px) {
  .nav a {
    white-space: normal;
    text-align: center;
    font-size: 0.82rem;
    padding: 0 10px;
  }
}
