/* ==========================================================
   首页专用样式（介绍性首页）
   设计规范见项目根目录 .design-spec.md
   ========================================================== */

.home-body {
    background: #f8fafc !important;
}

/* 仅调整首页 Hero 与导航的间距（不动 header 自身高度） */
.home-body .site-header {
    margin-bottom: 0;
}

/* ---------- Hero 区域 ---------- */
.home-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 480px at 15% -5%, rgba(6, 182, 212, 0.18) 0%, transparent 60%),
        radial-gradient(800px 420px at 90% 115%, rgba(20, 184, 166, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, #0b1220 0%, #101d33 100%);
    color: #f8fafc;
    padding: 88px 0 76px;
}

/* 点阵网格纹理 */
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.35);
    color: #5eead4;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
}

.home-badge i {
    font-size: 0.8rem;
}

.home-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.home-hero h1 .accent {
    background: linear-gradient(92deg, #2dd4bf 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-hero-sub {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 520px;
}

.home-hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.home-btn i {
    font-size: 0.9rem;
}

.home-btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}

.home-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 184, 166, 0.45);
}

.home-btn-ghost {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

.home-btn-ghost:hover {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.5);
    transform: translateY(-2px);
}

/* ---------- 终端风格引用卡片（签名元素） ---------- */
.home-terminal {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.home-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.home-terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.home-terminal-dot:nth-child(1) { background: #f87171; }
.home-terminal-dot:nth-child(2) { background: #fbbf24; }
.home-terminal-dot:nth-child(3) { background: #34d399; }

.home-terminal-title {
    margin-left: 8px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.75rem;
    color: #64748b;
}

.home-terminal-body {
    padding: 20px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.9;
    color: #cbd5e1;
}

.home-terminal-body .cm { color: #64748b; }
.home-terminal-body .url { color: #5eead4; }
.home-terminal-body .tag { color: #fbbf24; }

.home-cursor {
    display: inline-block;
    width: 9px;
    height: 17px;
    background: #14b8a6;
    vertical-align: -2px;
    animation: home-blink 1.1s steps(1) infinite;
}

@keyframes home-blink {
    50% { opacity: 0; }
}

/* ---------- 数据统计条 ---------- */
.home-stats-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -40px;
    position: relative;
}

.home-stat {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.home-stat-num {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #0d9488;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.home-stat-unit {
    font-size: 1rem;
    color: #94a3b8;
}

.home-stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.home-stat-icon {
    margin: 0 auto 10px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f0fdfa;
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ---------- 服务区标题 ---------- */
.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.home-section-head {
    text-align: center;
    margin-bottom: 40px;
}

.home-section-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #14b8a6;
    margin-bottom: 10px;
}

.home-section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 12px;
}

.home-section-head p {
    color: #64748b;
    font-size: 0.98rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Bento 网格 ---------- */
.home-bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.home-bento-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.28s ease;
    position: relative;
    overflow: hidden;
}

.home-bento-card::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
    transition: transform 0.35s ease;
}

.home-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
    border-color: #99f6e4;
}

.home-bento-card:hover::after {
    transform: scale(1.5);
}

.home-bento-card--lg {
    grid-column: span 4;
}

.home-bento-card--md {
    grid-column: span 2;
}

.home-bento-card--full {
    grid-column: span 6;
}

.home-bento-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin: 0 12px 0 0;
    transition: transform 0.28s ease;
}

.home-bento-card:hover .home-bento-icon {
    transform: scale(1.08) rotate(-4deg);
}

.home-bento-icon--teal   { background: #f0fdfa; color: #0d9488; }
.home-bento-icon--cyan   { background: #ecfeff; color: #0891b2; }
.home-bento-icon--sky    { background: #f0f9ff; color: #0369a1; }
.home-bento-icon--violet { background: #f5f3ff; color: #6d28d9; }
.home-bento-icon--amber  { background: #fffbeb; color: #b45309; }
.home-bento-icon--rose   { background: #fff1f2; color: #be123c; }

.home-bento-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 0;
}

.home-bento-card h3 .go {
    margin-left: auto;
    font-size: 0.85rem;
    color: #14b8a6;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.28s ease;
}

.home-bento-card:hover h3 .go {
    opacity: 1;
    transform: translateX(0);
}

.home-bento-card p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #64748b;
    margin-bottom: 16px;
    flex: 1;
}

.home-bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-bento-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.home-bento-card--full pre {
    background: #0f172a;
    border-radius: 12px;
    padding: 16px 18px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: #cbd5e1;
    overflow-x: auto;
    margin-top: 4px;
}

.home-bento-card--full pre .tag { color: #fbbf24; }
.home-bento-card--full pre .url { color: #5eead4; }
.home-bento-card--full pre .cm  { color: #64748b; }

/* ---------- 通用链接 ---------- */
.home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #14b8a6;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-link i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.home-link:hover {
    color: #0d9488;
}

.home-link:hover i {
    transform: translateX(3px);
}

/* ---------- 热门资源 ---------- */
.home-hot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.home-hot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.22s ease;
}

.home-hot-chip:hover {
    border-color: #14b8a6;
    color: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.home-hot-more {
    text-align: center;
    margin-top: 26px;
}

/* ---------- 三步上手 ---------- */
.home-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.home-step {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 30px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.28s ease;
}

.home-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    border-color: #99f6e4;
}

.home-step-num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1;
}

.home-step-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.home-step-icon--teal   { background: #f0fdfa; color: #0d9488; }
.home-step-icon--cyan   { background: #ecfeff; color: #0891b2; }
.home-step-icon--violet { background: #f5f3ff; color: #6d28d9; }

.home-step h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.home-step p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #64748b;
    margin-bottom: 18px;
}

/* ---------- 常见问题 ---------- */
.home-faq {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.home-faq-item[open] {
    border-color: #99f6e4;
}

.home-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.2s ease;
}

.home-faq-item summary::-webkit-details-marker {
    display: none;
}

.home-faq-item summary i {
    color: #94a3b8;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.home-faq-item[open] summary i {
    transform: rotate(180deg);
}

.home-faq-item summary:hover {
    color: #0d9488;
}

.home-faq-answer {
    padding: 0 22px 20px;
    font-size: 0.9rem;
    line-height: 1.75;
    color: #64748b;
}

/* ---------- 底部 CTA ---------- */
.home-cta {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 80px;
}

.home-cta-box {
    background:
        radial-gradient(600px 300px at 10% 0%, rgba(20, 184, 166, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #0b1220 0%, #101d33 100%);
    border-radius: 24px;
    padding: 56px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.home-cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

.home-cta-box h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    position: relative;
}

.home-cta-box p {
    color: #94a3b8;
    margin-bottom: 26px;
    position: relative;
}

.home-cta-box .home-btn-primary {
    position: relative;
}

/* ---------- 滚动渐显 ---------- */
.home-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .home-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .home-hero h1 {
        font-size: 2.4rem;
    }

    .home-bento-card--lg,
    .home-bento-card--md {
        grid-column: span 3;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-stats {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 0;
        padding-top: 48px;
    }
}

@media (max-width: 640px) {
    .home-hero {
        padding: 64px 0 56px;
    }

    .home-hero h1 {
        font-size: 1.9rem;
    }

    .home-hero-sub {
        font-size: 0.95rem;
    }

    .home-btn {
        width: 100%;
        justify-content: center;
    }

    .home-terminal-body {
        font-size: 0.72rem;
        padding: 16px;
    }

    .home-bento {
        grid-template-columns: 1fr;
    }

    .home-bento-card--lg,
    .home-bento-card--md,
    .home-bento-card--full {
        grid-column: span 1;
    }

    .home-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-section {
        padding-top: 56px;
    }

    .home-cta {
        padding: 48px 16px 56px;
    }
}

/* 尊重减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
    .home-cursor {
        animation: none;
    }

    .home-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
