/* ============================================================
   PeIoT Sense 官网样式
   基于 Bootstrap 3.4，配合 layout/site.html 布局使用
   ============================================================ */

/* --- 全局变量 & 基础 --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--gray-700);
    background: #fff;
    padding-top: 60px;
}
a { color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-dark); text-decoration: none; }
section { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}
.section-title p {
    font-size: 18px;
    color: var(--gray-500);
    max-width: 640px;
    margin: 0 auto;
}
.section-alt { background: var(--gray-50); }

/* --- 导航栏 --- */
.site-navbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border: none;
    border-bottom: 1px solid var(--gray-200);
    min-height: 60px;
    box-shadow: var(--shadow-sm);
}
.site-navbar .navbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 30px;
    padding: 15px;
}
.site-navbar .navbar-brand i { color: var(--primary); margin-right: 4px; }
.site-navbar .brand-accent { color: var(--accent); }
.site-navbar .navbar-nav > li > a {
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 500;
    padding: 20px 16px;
    transition: color .2s;
}
.site-navbar .navbar-nav > li > a:hover,
.site-navbar .navbar-nav > li > a:focus {
    color: var(--primary);
    background: transparent;
}
.btn-nav-login {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

/* --- Hero 区域 --- */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #06b6d4 100%);
    color: #fff;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,.2) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}
.hero .lead {
    font-size: 22px;
    opacity: .9;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}
.hero .btn-group-hero {
    position: relative;
    z-index: 1;
}
.btn-hero-primary {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 14px 36px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all .3s;
    box-shadow: var(--shadow-md);
}
.btn-hero-primary:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.5);
    padding: 12px 32px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--radius);
    margin-left: 12px;
    transition: all .3s;
}
.btn-hero-outline:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
    color: #fff;
}

/* --- 核心卖点 --- */
.highlights {
    padding: 80px 0;
}
.highlight-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius);
    transition: all .3s;
}
.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: #fff;
}
.highlight-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}
.highlight-icon.icon-sense { background: #dbeafe; color: var(--primary); }
.highlight-icon.icon-ai { background: #ccfbf1; color: #0d9488; }
.highlight-icon.icon-control { background: #fef3c7; color: #d97706; }
.highlight-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}
.highlight-card p {
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.7;
}

/* --- 工作原理 --- */
.flow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}
.flow-step {
    text-align: center;
    flex: 0 0 200px;
    padding: 20px;
}
.flow-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    color: #fff;
}
.flow-step-icon.step-device { background: linear-gradient(135deg, #10b981, #059669); }
.flow-step-icon.step-cloud { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.flow-step-icon.step-ai { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.flow-step h4 { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.flow-step p { font-size: 13px; color: var(--gray-500); }
.flow-arrow {
    font-size: 24px;
    color: var(--gray-200);
    flex: 0 0 40px;
    text-align: center;
    line-height: 64px;
}

/* --- 接入方式 --- */
.access-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: all .3s;
    height: 100%;
}
.access-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.access-card .badge-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}
.access-card .badge-api { background: var(--primary-light); color: var(--primary); }
.access-card .badge-mcp { background: #ede9fe; color: #7c3aed; }
.access-card .badge-skill { background: #ccfbf1; color: #0d9488; }
.access-card h3 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.access-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 16px; }
.access-card .compatible {
    font-size: 12px;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-100);
    padding-top: 16px;
    margin-top: 16px;
}

/* --- 代码示例 --- */
.code-demo {
    padding: 80px 0;
}
.code-block {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.code-block-header {
    background: var(--dark);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }
.code-block-title {
    color: var(--gray-500);
    font-size: 13px;
    margin-left: 8px;
}
.code-block pre {
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 24px;
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: auto;
}
.code-block pre .code-comment { color: #64748b; }
.code-block pre .code-key { color: #7dd3fc; }
.code-block pre .code-string { color: #86efac; }
.code-block pre .code-number { color: #fbbf24; }
.code-block pre .code-cmd { color: #c084fc; }

/* --- 使用场景 --- */
.scenario-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    transition: all .3s;
}
.scenario-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.scenario-card .scenario-icon {
    font-size: 36px;
    margin-bottom: 12px;
}
.scenario-card h4 { font-size: 18px; font-weight: 600; color: var(--gray-900); margin-bottom: 8px; }
.scenario-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin: 0; }

/* --- 数据规格 --- */
.spec-table {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.spec-table table { margin: 0; }
.spec-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    padding: 14px 20px;
}
.spec-table td {
    padding: 12px 20px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

/* --- CTA --- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 0;
}
.cta-section h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.cta-section p { font-size: 18px; opacity: .9; margin-bottom: 32px; }

/* --- 页脚 --- */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-500);
    padding: 60px 0 30px;
}
.site-footer h4 { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.site-footer h5 { color: var(--gray-200); font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.site-footer ul li { margin-bottom: 6px; }
.site-footer ul a { color: var(--gray-500); font-size: 14px; }
.site-footer ul a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,.1); margin: 30px 0 20px; }
.site-footer .text-center { font-size: 13px; }
.site-footer .text-center a { color: var(--gray-500); }

/* --- 通用按钮 --- */
.btn-primary-site {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all .3s;
}
.btn-primary-site:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* --- 响应式 --- */
@media (max-width: 991px) {
    .hero h1 { font-size: 36px; }
    .hero .lead { font-size: 18px; }
    section { padding: 60px 0; }
    .flow-arrow { display: none; }
    .flow-step { flex: 0 0 33.33%; }
}
@media (max-width: 767px) {
    .hero { padding: 80px 0 60px; }
    .hero h1 { font-size: 28px; }
    .hero .lead { font-size: 16px; }
    .btn-hero-outline { margin-left: 0; margin-top: 12px; display: block; }
    .btn-hero-primary { display: block; }
    .hero .btn-group-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; }
    .section-title h2 { font-size: 26px; }
    .section-title p { font-size: 15px; }
    .flow-step { flex: 0 0 100%; }
    .highlight-card { padding: 24px 16px; }
}
