/* ============================================================
   码粒Mib浏览器 官网样式
   风格定位：网络运维终端美学 —— 深色底 + 信号青绿高亮 + 点阵网格
   ============================================================ */

:root {
    --bg: #070b10;
    --bg-soft: #0b1119;
    --panel: #101823;
    --panel-2: #0e1520;
    --line: rgba(148, 180, 200, 0.12);
    --text: #e8eef4;
    --muted: #8fa2b2;
    --accent: #2ee6a8;
    --accent-deep: #14b886;
    --cyan: #4cc9f0;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    /* 中文正文用系统黑体保证渲染质量，技术标签用等宽字体营造终端感 */
    --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------- 通用元素 ---------- */

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.15; letter-spacing: 1px; }
h2 { font-size: clamp(24px, 4vw, 38px); line-height: 1.3; margin-bottom: 18px; }
h3 { font-size: 18px; margin-bottom: 8px; }

.hl {
    /* 标题高亮：青绿渐变，呼应网络信号色 */
    background: linear-gradient(100deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-lead { color: var(--muted); max-width: 680px; margin-bottom: 40px; }

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #05221a;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 10px 30px rgba(46, 230, 168, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(46, 230, 168, 0.35); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 8px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }

/* ---------- 导航 ---------- */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(7, 11, 16, 0.85);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--muted); transition: color 0.2s; position: relative; }
.nav-links a:hover { color: var(--accent); }

/* 移动端折叠按钮，默认隐藏 */
.nav-toggle { display: none; }

/* ---------- 首屏 ---------- */

.hero {
    position: relative;
    padding: 150px 24px 90px;
    max-width: 1180px;
    margin: 0 auto;
}

.hero-bg { position: absolute; inset: -60px 0 0; overflow: hidden; z-index: -1; }

/* 点阵网格背景，营造网络拓扑氛围 */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(76, 201, 240, 0.14) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
}

.hero-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 560px;
    background: radial-gradient(closest-side, rgba(46, 230, 168, 0.16), transparent 70%);
}

/* 装饰性 OID 字符串 */
.hero-oid {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(76, 201, 240, 0.35);
    letter-spacing: 1px;
    white-space: nowrap;
}

.oid-deco-1 { top: 120px; left: 4%; }
.oid-deco-2 { top: 320px; right: 5%; }
.oid-deco-3 { top: 520px; left: 8%; color: rgba(46, 230, 168, 0.3); }

.hero-inner { max-width: 760px; }

.hero .lead {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 18px);
    margin: 22px 0 32px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    max-width: 720px;
}

.hero-stats li {
    padding: 16px 18px;
    background: rgba(16, 24, 35, 0.7);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.hero-stats strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 26px;
    color: var(--accent);
    line-height: 1.2;
}

.hero-stats span { font-size: 12.5px; color: var(--muted); }

.hero-shot { margin-top: 70px; }

/* ---------- 截图窗口框 ---------- */

.shot-frame {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.shot-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.shot-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2c3a48;
}

.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span { margin-left: 8px; }

figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- 区块 ---------- */

.section { padding: 90px 24px; }
.section-inner { max-width: 1180px; margin: 0 auto; }

.section-alt {
    background:
        linear-gradient(180deg, rgba(14, 21, 32, 0.6), rgba(11, 17, 25, 0.9)),
        var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* ---------- 功能卡片 ---------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 44px;
}

.card {
    padding: 30px 26px;
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover { transform: translateY(-6px); border-color: rgba(46, 230, 168, 0.4); }

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 18px;
    color: var(--accent);
    background: rgba(46, 230, 168, 0.1);
    border: 1px solid rgba(46, 230, 168, 0.25);
}

.card-icon svg { width: 24px; height: 24px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---------- 算法矩阵 ---------- */

.algo-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 46px;
}

.algo-panel {
    padding: 32px;
    background: rgba(16, 24, 35, 0.6);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.algo-panel h3 { margin: 22px 0 14px; font-family: var(--font-mono); }
.algo-panel h3:first-child { margin-top: 0; }

.algo-tag {
    display: inline-block;
    padding: 2px 10px;
    margin-right: 8px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--accent);
    background: rgba(46, 230, 168, 0.12);
    border: 1px solid rgba(46, 230, 168, 0.3);
}

.algo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.algo-chips li {
    padding: 7px 16px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text);
    background: rgba(76, 201, 240, 0.08);
    border: 1px solid rgba(76, 201, 240, 0.25);
}

.algo-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.proto-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.proto-item {
    padding: 10px 22px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    background: rgba(46, 230, 168, 0.07);
    border: 1px solid rgba(46, 230, 168, 0.22);
}

/* ---------- 界面预览 ---------- */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 44px;
}

/* ---------- 下载区 ---------- */

.section-download { padding-bottom: 110px; }

.download-card {
    text-align: center;
    padding: 64px 32px;
    border-radius: 22px;
    background:
        radial-gradient(ellipse 70% 120% at 50% -20%, rgba(46, 230, 168, 0.14), transparent 60%),
        linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid rgba(46, 230, 168, 0.22);
}

.download-logo {
    width: 84px;
    height: 84px;
    margin: 0 auto 22px;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(46, 230, 168, 0.3);
}

.download-card .section-lead { margin: 0 auto 32px; }

.download-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 36px;
    margin-top: 36px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.download-meta span { color: var(--muted); margin-right: 8px; }

/* ---------- 页脚 ---------- */

.footer {
    border-top: 1px solid var(--line);
    padding: 44px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.footer-inner { max-width: 1180px; margin: 0 auto; }
.footer .brand { justify-content: center; margin-bottom: 12px; color: var(--text); }
.copyright { margin-top: 8px; font-size: 12.5px; opacity: 0.7; }

/* ---------- 滚动入场动画 ---------- */

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

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

/* ---------- 响应式：平板 ---------- */

@media (max-width: 960px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .algo-layout { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 响应式：手机 ---------- */

@media (max-width: 680px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(7, 11, 16, 0.97);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.open { max-height: 320px; }

    .nav-links a {
        padding: 15px 26px;
        border-top: 1px solid var(--line);
    }

    .nav-inner > .btn-sm { display: none; }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        margin-left: auto;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: 8px;
        cursor: pointer;
        padding: 0 9px;
    }

    .nav-toggle span {
        display: block;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .hero { padding: 120px 18px 60px; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hero-stats li { padding: 12px 14px; }
    .hero-stats strong { font-size: 21px; }
    .hero-oid { display: none; }

    .section { padding: 64px 18px; }
    .feature-grid { grid-template-columns: 1fr; }
    .algo-panel { padding: 22px; }

    .download-card { padding: 44px 20px; }
    .download-meta { flex-direction: column; gap: 8px; }
    .download-card .btn { width: 100%; justify-content: center; }
}

/* 用户偏好减少动画时关闭入场动画 */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}
