/* ========== 黑白灰主题 ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* 页面 */
    --bg-page: #fff;
    --text: #111;
    --text-secondary: #666;
    --text-muted: #999;

    /* 导航栏 - 黑色 */
    --bg-nav: #000;
    --text-nav: #fff;
    --text-nav-dim: rgba(255,255,255,0.6);
    --border-nav: rgba(255,255,255,0.08);

    /* 横幅 - 深灰遮罩 */
    --bg-hero: #1a1a1a;
    --text-hero: #fff;
    --text-hero-dim: rgba(255,255,255,0.5);

    /* 卡片 - 灰色 */
    --bg-card: #f4f4f4;
    --bg-card-hover: #ebebeb;
    --border-card: #e0e0e0;
    --text-card: #111;
    --text-card-desc: #666;

    /* 按钮 - 黑色 */
    --bg-btn: #000;
    --text-btn: #fff;
    --bg-btn-hover: #1a1a1a;

    /* 区块背景 */
    --bg-section: #fff;
    --bg-footer: #f5f5f5;

    /* 通用 */
    --max-width: 1240px;
    --nav-height: 68px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ========== 导航栏 - 黑色 ========== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-height);
    background: var(--bg-nav);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 30px rgba(0,0,0,0.3);
}

.nav-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px;
    color: var(--text-nav); white-space: nowrap;
    display: flex; align-items: center; gap: 10px;
}

.nav-logo img { height: 32px; width: auto; }

.nav-links {
    display: flex; align-items: center; gap: 36px;
}

.nav-links > li { position: relative; }

.nav-links > li > a {
    display: block; padding: 8px 0; font-size: 0.88rem; font-weight: 500;
    color: var(--text-nav-dim); transition: color 0.2s;
    cursor: pointer; position: relative;
}

.nav-links > li > a::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px; background: var(--text-nav);
    transform: scaleX(0); transition: transform 0.2s ease;
}

.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--text-nav); }
.nav-links > li > a:hover::after,
.nav-links > li > a.active::after { transform: scaleX(1); }

/* 下拉菜单 */
.nav-links .dropdown {
    position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
    background: #111; border: 1px solid #222; border-radius: 12px;
    padding: 8px 0; min-width: 200px;
    opacity: 0; visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.nav-links li:hover .dropdown {
    opacity: 1; visibility: visible;
}

.dropdown a {
    display: block; padding: 11px 20px; font-size: 0.85rem; font-weight: 500;
    color: rgba(255,255,255,0.6); transition: all 0.15s;
    white-space: nowrap;
}

.dropdown a:hover { color: #fff; background: rgba(255,255,255,0.04); }

/* 移动菜单按钮 */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001;
}
.menu-toggle span {
    display: block; width: 24px; height: 2px; background: var(--text-nav);
    transition: all 0.3s; border-radius: 1px;
}

/* ========== 通用区块 ========== */
.section {
    padding: 88px 32px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800;
    text-align: center; margin-bottom: 16px;
    letter-spacing: -1px; color: var(--text);
}

.section-subtitle {
    text-align: center; color: var(--text-secondary);
    margin-bottom: 56px; font-size: 1.05rem; max-width: 560px;
    margin-left: auto; margin-right: auto;
}

/* ========== 英雄横幅 - 深灰遮罩 ========== */
.hero-banner {
    position: relative; width: 100%; min-height: 480px;
    background: var(--bg-hero);
    display: flex; align-items: center; justify-content: center;
    margin-top: var(--nav-height);
    overflow: hidden;
}

.hero-banner::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(255,255,255,0.02) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.5) 100%);
    z-index: 0;
}

.hero-banner img.bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.12; z-index: 0;
}

.hero-content {
    position: relative; z-index: 1; text-align: center;
    padding: 48px 32px; max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 900;
    letter-spacing: -1.5px; margin-bottom: 20px; line-height: 1.15;
    color: var(--text-hero);
}

.hero-content p {
    font-size: 1.15rem; color: var(--text-hero-dim);
    max-width: 560px; margin: 0 auto; line-height: 1.7;
}

/* ========== 数据统计 ========== */
.stats-bar {
    display: flex; justify-content: center; gap: 56px;
    padding: 48px 32px; max-width: var(--max-width); margin: 0 auto;
    flex-wrap: wrap;
    background: var(--bg-section);
}

.stat-item { text-align: center; min-width: 150px; }

.stat-value {
    font-size: 2.2rem; font-weight: 800; letter-spacing: -1px;
    color: var(--text);
    font-family: "SF Mono", "Menlo", "Consolas", "JetBrains Mono", monospace;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
    margin-top: 6px;
}

.stat-plus {
    color: #ccc; font-size: 0.72rem; font-weight: 600;
    animation: pulse 2s ease-in-out infinite; margin-top: 2px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.7; }
}

/* ========== 产品卡片 - 灰色背景 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 36px 32px 48px;
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer; position: relative; overflow: hidden;
}

.product-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: #000;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.product-card:hover {
    background: var(--bg-card-hover);
    border-color: #ccc;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.product-card:hover::before { transform: scaleX(1); }

.product-card .card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: #fff; border: 1px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 22px; font-size: 1.1rem; color: #333;
}

.product-card h3 {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
    color: var(--text-card);
}

.product-card p {
    font-size: 0.875rem; color: var(--text-card-desc);
    line-height: 1.7;
}

.product-card .card-arrow {
    position: absolute; bottom: 24px; right: 24px;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid #d0d0d0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; color: #999; font-size: 0.8rem;
}

.product-card:hover .card-arrow {
    background: #000; color: #fff; border-color: #000;
}

/* ========== 案例卡片 - 灰色背景 ========== */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px; overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1); cursor: pointer;
}

.case-card:hover {
    background: var(--bg-card-hover);
    border-color: #ccc;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.case-card .case-thumb {
    width: 100%; height: 200px; background: #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #bbb; border-bottom: 1px solid #ddd;
}

.case-card .case-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

.case-card .case-info { padding: 24px 28px; }

.case-card .case-info h3 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
    color: var(--text-card);
}

.case-card .case-info p {
    font-size: 0.875rem; color: var(--text-card-desc);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.7;
}

/* ========== 通用详情页 ========== */
.detail-page {
    padding-top: calc(var(--nav-height) + 48px);
    max-width: var(--max-width); margin: 0 auto;
    padding-left: 32px; padding-right: 32px;
}

.detail-header { margin-bottom: 48px; }

.detail-header h1 {
    font-size: 2rem; font-weight: 800; margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.detail-header .back-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.875rem; color: var(--text-muted); font-weight: 500;
    margin-bottom: 20px; transition: color 0.2s;
}

.detail-header .back-link:hover { color: var(--text); }

.detail-content {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
    align-items: start;
}

.detail-text p {
    color: var(--text-secondary); font-size: 1.02rem;
    line-height: 1.85; margin-bottom: 18px;
}

/* ========== 产品详情 - 左侧Tab + 右侧iPhone视频框 ========== */
.product-showcase {
    display: flex; gap: 64px; align-items: flex-start;
    min-height: 500px;
}

.product-showcase .showcase-left { flex: 0 0 360px; }

.product-showcase .showcase-tabs {
    display: flex; flex-direction: column; gap: 4px;
}

.product-showcase .showcase-tab {
    padding: 16px 20px; border-radius: 12px; cursor: pointer;
    transition: all 0.25s ease; border: 1.5px solid transparent;
}

.product-showcase .showcase-tab:hover { background: #f8f8f8; }

.product-showcase .showcase-tab.active {
    background: #fff; border-color: #e0e0e0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.product-showcase .showcase-tab .tab-num {
    font-size: 0.7rem; font-weight: 700; color: #ccc;
    margin-bottom: 4px; letter-spacing: 0.5px;
}

.product-showcase .showcase-tab.active .tab-num { color: #333; }

.product-showcase .showcase-tab .tab-title {
    font-size: 1rem; font-weight: 700; color: #888;
    margin-bottom: 6px;
}

.product-showcase .showcase-tab.active .tab-title { color: #111; }

.product-showcase .showcase-tab .tab-desc {
    font-size: 0.82rem; color: #aaa; line-height: 1.6;
    display: none;
}

.product-showcase .showcase-tab.active .tab-desc { display: block; }

.product-showcase .showcase-right {
    flex: 1; display: flex; justify-content: center;
    position: sticky; top: calc(var(--nav-height) + 24px);
}

/* ========== iPhone 15/16 样式视频框 ========== */
.iphone-mockup {
    position: relative;
    width: 300px;
    background: #1a1a1c;
    border-radius: 44px;
    padding: 14px;
    box-shadow:
        0 0 0 2px #2d2d2f,
        0 0 0 4px #1a1a1c,
        0 24px 60px rgba(0,0,0,0.25),
        inset 0 0 2px rgba(255,255,255,0.05);
}

/* Dynamic Island */
.iphone-mockup::before {
    content: '';
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    width: 72px; height: 22px;
    background: #000;
    border-radius: 11px;
    z-index: 5;
}

.iphone-screen {
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
}

.iphone-screen img,
.iphone-screen video {
    width: 100%; height: 100%; object-fit: cover;
}

.iphone-screen .iphone-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; color: #333; font-size: 0.85rem; gap: 4px;
}

/* 旧类名兼容 */
.video-display {
    width: 100%; max-width: 100%;
    background: #0a0a0a; border: 1px solid #1a1a1a;
    border-radius: 12px; overflow: hidden; position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.video-display img,
.video-display video {
    width: 100%; height: 100%; object-fit: cover;
}
.video-display .phone-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; color: #333; font-size: 0.9rem; gap: 4px;
}

/* ========== IP 孵化 ========== */
.ip-content {
    max-width: 800px; margin: 0 auto;
}

.ip-content h2 { font-size: 1.5rem; font-weight: 700; margin: 28px 0 14px; }
.ip-content h3 { font-size: 1.2rem; font-weight: 700; margin: 22px 0 10px; }
.ip-content p { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.9; margin-bottom: 16px; }
.ip-content ul, .ip-content ol { padding-left: 24px; margin-bottom: 16px; }
.ip-content li { color: var(--text-secondary); font-size: 1rem; line-height: 1.85; list-style: disc; }
.ip-content strong { color: var(--text); }
.ip-content img { max-width: 100%; border-radius: 12px; margin: 16px 0; }

/* ========== 页脚 ========== */
.site-footer {
    border-top: 1px solid #eee;
    padding: 40px 32px; margin-top: 96px;
    text-align: center;
    color: var(--text-muted); font-size: 0.82rem;
    background: var(--bg-footer);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: 10px; font-size: 0.9rem;
    font-weight: 600; transition: all 0.25s; cursor: pointer;
    border: 1.5px solid transparent; gap: 8px;
}

.btn-primary {
    background: var(--bg-btn); color: var(--text-btn); border-color: var(--bg-btn);
}
.btn-primary:hover {
    background: var(--bg-btn-hover); border-color: var(--bg-btn-hover);
    transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.btn-outline {
    border-color: #d0d0d0; color: #333; background: #fff;
}
.btn-outline:hover { background: #f5f5f5; border-color: #aaa; }

/* 横幅按钮 */
.hero-banner .btn { margin-top: 24px; }
.hero-banner .btn-outline {
    border-color: rgba(255,255,255,0.25); background: transparent; color: #fff;
}
.hero-banner .btn-outline:hover {
    background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .product-showcase { flex-direction: column; gap: 32px; }
    .product-showcase .showcase-left { flex: none; width: 100%; }
    .iphone-mockup { width: 250px; }
    .iphone-mockup { border-radius: 36px; padding: 12px; }
    .iphone-screen { border-radius: 26px; }
    .iphone-mockup::before { width: 60px; height: 18px; border-radius: 9px; }
}

@media (max-width: 768px) {
    :root { --nav-height: 60px; }

    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: #000; flex-direction: column;
        justify-content: center; gap: 36px;
        opacity: 0; visibility: hidden; transition: all 0.3s;
    }

    .nav-links.open { opacity: 1; visibility: visible; }
    .nav-links > li > a { font-size: 1.25rem; }

    .nav-links .dropdown {
        position: static; transform: none;
        background: transparent; border: none;
        opacity: 1; visibility: visible;
        display: none; padding-left: 20px; box-shadow: none;
    }
    .nav-links li:hover .dropdown { display: block; }

    .section { padding: 56px 20px; }
    .hero-banner { min-height: 340px; }
    .stats-bar { gap: 28px; }
    .stat-value { font-size: 1.6rem; }
    .product-grid { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: 1fr; }
    .detail-content { grid-template-columns: 1fr; gap: 36px; }
    .product-showcase { flex-direction: column; }
}

@media (max-width: 480px) {
    .nav-inner { padding: 0 16px; }
    .hero-content { padding: 40px 20px; }
    .hero-content h1 { font-size: 1.6rem; }
    .stats-bar { gap: 16px; }
    .iphone-mockup { width: 220px; border-radius: 32px; padding: 10px; }
    .iphone-screen { border-radius: 22px; }
}
