/* ============ 公开官网首页 ============ */
.home-body {
    background: #f5f7fb; margin: 0;
    /* site.css 全局设置 html,body{height:100%} 会把 body 高度钉死在视口高度，
       sticky 导航滚动超过一屏后会被 body 边界推走。这里放开为内容自适应，
       保证顶部导航在整个页面滚动过程中始终吸顶悬浮。 */
    height: auto; min-height: 100vh;
}

/* 顶部导航 */
.home-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid #e8ecf3; box-shadow: 0 1px 6px rgba(30,41,59,.04);
}
.home-nav-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 64px;
    display: flex; align-items: center; gap: 32px;
}
.home-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.home-logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(59,130,246,.35);
}
.home-logo-text { font-size: 18px; font-weight: 700; color: #1e293b; }
.home-logo-text small { font-size: 12px; font-weight: 400; color: #64748b; margin-left: 6px; }
.home-menu { display: flex; gap: 4px; flex: 1; }
.home-menu a {
    padding: 8px 14px; border-radius: 8px; color: #475569;
    text-decoration: none; font-size: 15px; transition: all .15s;
}
.home-menu a:hover { color: #1d4ed8; background: #eff6ff; }
.home-menu a.active { color: #1d4ed8; font-weight: 600; background: #eff6ff; }
.home-user { display: flex; align-items: center; gap: 10px; }
.home-user-name { font-size: 13px; color: #64748b; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-btn {
    padding: 8px 18px; border-radius: 8px; border: 1px solid #cbd5e1;
    color: #475569; background: #fff; font-size: 14px; text-decoration: none;
    transition: all .15s; cursor: pointer;
}
.home-btn:hover { border-color: #3b82f6; color: #1d4ed8; }
.home-btn-primary {
    background: linear-gradient(135deg,#3b82f6,#2563eb); border-color: transparent;
    color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,.3);
}
.home-btn-primary:hover { color: #fff; background: linear-gradient(135deg,#2563eb,#1d4ed8); }

/* Hero */
.home-hero {
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(59,130,246,.14), transparent 60%),
        radial-gradient(700px 380px at 8% 10%, rgba(14,165,233,.1), transparent 55%),
        linear-gradient(180deg,#f8faff,#f5f7fb);
    border-bottom: 1px solid #e8ecf3;
}
.home-hero-inner { max-width: 1160px; margin: 0 auto; padding: 84px 24px 72px; text-align: center; }
.home-hero-tag {
    display: inline-block; padding: 6px 16px; border-radius: 999px;
    background: #eff6ff; color: #1d4ed8; font-size: 13px; margin-bottom: 20px;
    border: 1px solid #dbeafe;
}
.home-hero h1 { font-size: 42px; line-height: 1.25; color: #0f172a; margin: 0 0 18px; letter-spacing: 1px; }
.home-hero h1 em { font-style: normal; color: #2563eb; }
.home-hero p { font-size: 17px; color: #64748b; max-width: 720px; margin: 0 auto 32px; line-height: 1.8; }
.home-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.home-hero-cta .home-btn { padding: 12px 30px; font-size: 15px; }
.home-hero-stats {
    display: flex; gap: 12px; justify-content: center; margin-top: 44px; flex-wrap: wrap;
}
.home-stat {
    background: #fff; border: 1px solid #e8ecf3; border-radius: 12px;
    padding: 14px 26px; box-shadow: 0 2px 8px rgba(30,41,59,.05);
}
.home-stat b { display: block; font-size: 22px; color: #1e293b; }
.home-stat span { font-size: 13px; color: #64748b; }

/* 区块通用 */
.home-section {
    max-width: 1160px; margin: 0 auto; padding: 64px 24px 20px;
    /* 锚点定位（/#features、/#scenarios）时避免标题被吸顶导航遮挡 */
    scroll-margin-top: 76px;
}
.home-section-head { text-align: center; margin-bottom: 40px; }
.home-section-head h2 { font-size: 30px; color: #0f172a; margin: 0 0 10px; }
.home-section-head p { font-size: 15px; color: #64748b; margin: 0; }

/* 产品特色 */
.home-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home-feature {
    background: #fff; border: 1px solid #e8ecf3; border-radius: 16px;
    padding: 28px 24px; transition: all .2s;
}
.home-feature:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(30,41,59,.1); }
.home-feature-ico {
    width: 52px; height: 52px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px;
}
.home-feature h3 { font-size: 17px; color: #0f172a; margin: 0 0 8px; }
.home-feature p { font-size: 14px; color: #64748b; line-height: 1.7; margin: 0; }

/* 适应场景 */
.home-scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home-scenario {
    background: #fff; border: 1px solid #e8ecf3; border-radius: 16px;
    padding: 26px 24px; transition: all .2s;
}
.home-scenario:hover { box-shadow: 0 12px 28px rgba(30,41,59,.1); }
.home-scenario h3 { font-size: 16px; color: #0f172a; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.home-scenario p { font-size: 14px; color: #64748b; line-height: 1.7; margin: 0; }
.home-scenario ul { margin: 10px 0 0; padding-left: 18px; color: #64748b; font-size: 13px; line-height: 2; }

/* 教程文档入口 */
.home-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home-doc {
    display: block; background: linear-gradient(160deg,#fff,#f8faff);
    border: 1px solid #e8ecf3; border-radius: 16px; padding: 28px 24px;
    text-decoration: none; transition: all .2s; position: relative;
}
.home-doc:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(59,130,246,.15); border-color: #bfdbfe; }
.home-doc h3 { font-size: 17px; color: #0f172a; margin: 0 0 8px; }
.home-doc p { font-size: 14px; color: #64748b; line-height: 1.7; margin: 0 0 12px; }
.home-doc-more { font-size: 13px; color: #2563eb; font-weight: 600; }
.home-doc-ico {
    width: 46px; height: 46px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px;
}

/* 页脚 */
.home-footer { margin-top: 72px; background: #0f172a; color: #94a3b8; }
.home-footer-inner {
    max-width: 1160px; margin: 0 auto; padding: 48px 24px 28px;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.home-footer-title { font-size: 15px; font-weight: 600; color: #e2e8f0; margin-bottom: 14px; }
.home-footer p { font-size: 13px; line-height: 1.9; margin: 0 0 8px; }
.home-footer a { color: #94a3b8; text-decoration: none; }
.home-footer a:hover { color: #60a5fa; }
.home-footer-bar { border-top: 1px solid #1e293b; text-align: center; padding: 16px; }
.home-footer-bar p { margin: 0; font-size: 12px; color: #64748b; }

/* ============ 教程文档 ============ */
.docs-wrap { max-width: 1080px; margin: 0 auto; padding: 40px 24px 40px; display: flex; gap: 32px; }
.docs-side { width: 220px; flex-shrink: 0; position: sticky; top: 84px; align-self: flex-start; }
.docs-side h4 { font-size: 13px; color: #94a3b8; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.docs-side a {
    display: block; padding: 9px 14px; border-radius: 8px; color: #475569;
    text-decoration: none; font-size: 14px; margin-bottom: 2px;
}
.docs-side a:hover { background: #eff6ff; color: #1d4ed8; }
.docs-side a.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.docs-main { flex: 1; min-width: 0; background: #fff; border: 1px solid #e8ecf3; border-radius: 16px; padding: 36px 40px; }
.docs-crumb { font-size: 13px; color: #94a3b8; margin-bottom: 18px; }
.docs-crumb a { color: #64748b; text-decoration: none; }
.docs-crumb a:hover { color: #2563eb; }
.docs-main h1 { font-size: 26px; color: #0f172a; margin: 0 0 6px; }
.docs-main .docs-desc { font-size: 14px; color: #64748b; margin: 0 0 24px; }
.docs-main h2 { font-size: 20px; color: #0f172a; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.docs-main h3 { font-size: 16px; color: #1e293b; margin: 22px 0 8px; }
.docs-main p { font-size: 14px; color: #475569; line-height: 1.9; margin: 0 0 12px; }
.docs-main ul, .docs-main ol { font-size: 14px; color: #475569; line-height: 2; padding-left: 22px; margin: 0 0 14px; }
.docs-main li { margin-bottom: 2px; }
.docs-main table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 13px; }
.docs-main th, .docs-main td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; color: #334155; }
.docs-main th { background: #f8fafc; font-weight: 600; color: #1e293b; }
.docs-main code { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px 6px; font-size: 12.5px; color: #be185d; }
.docs-main pre { background: #0f172a; border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 0 0 16px; }
.docs-main pre code { background: none; border: none; padding: 0; color: #e2e8f0; font-size: 13px; line-height: 1.7; }
.docs-main blockquote {
    margin: 14px 0; padding: 10px 16px; border-left: 4px solid #3b82f6;
    background: #eff6ff; border-radius: 0 8px 8px 0; font-size: 14px; color: #1e40af;
}
.docs-main .docs-callout {
    margin: 14px 0; padding: 12px 16px; border-radius: 10px;
    background: #fffbeb; border: 1px solid #fde68a; font-size: 13.5px; color: #92400e;
}
.docs-main .docs-callout-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.docs-main .docs-steps { counter-reset: step; }
.docs-main .docs-steps li { list-style: none; position: relative; padding-left: 40px; margin-bottom: 14px; }
.docs-main .docs-steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 3px;
    width: 26px; height: 26px; border-radius: 50%;
    background: #3b82f6; color: #fff; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* 文档中心卡片 */
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.docs-card {
    display: block; border: 1px solid #e8ecf3; border-radius: 12px; padding: 20px;
    text-decoration: none; background: #fff; transition: all .15s;
}
.docs-card:hover { border-color: #bfdbfe; box-shadow: 0 8px 20px rgba(59,130,246,.12); }
.docs-card h3 { font-size: 15px; color: #0f172a; margin: 0 0 6px; }
.docs-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.7; }

@media (max-width: 900px) {
    .home-features, .home-scenarios, .home-docs { grid-template-columns: 1fr 1fr; }
    .docs-wrap { flex-direction: column; }
    .docs-side { width: 100%; position: static; }
    .docs-side a { display: inline-block; margin-right: 4px; }
}
@media (max-width: 640px) {
    .home-hero h1 { font-size: 30px; }
    .home-features, .home-scenarios, .home-docs, .docs-grid { grid-template-columns: 1fr; }
    .home-nav-inner { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
    .home-menu { order: 3; width: 100%; overflow-x: auto; }
}
