/* ═══════════════════════════════════════════
   common.css — 如帆科技 全站公共样式
   ═══════════════════════════════════════════ */

/* ── 设计令牌 ── */
:root {
    --primary: #38bdf8;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #818cf8;
    --bg: #07090e;
    --bg-darker: #03050a;
    --bg-scrollbar: #0d1117;
    --bg-card: rgba(13, 18, 28, 0.8);
    --text: #eef2ff;
    --text-muted: #8b9cc7;
    --text-sub: #64748b;
    --text-nav: #c4cfe8;
    --text-heading-muted: #94a3b8;
    --text-footer: #3d4f6b;
    --text-footer-link: #4a6080;
    --text-contact: #9aaec9;
    --text-link-muted: #6b7fa3;
    --border: rgba(56, 189, 248, 0.15);
    --border-hover: rgba(56, 189, 248, 0.5);
    --border-subtle: rgba(30, 41, 59, 0.6);
    --border-section: rgba(30, 41, 59, 0.8);
    --glow: 0 0 20px rgba(56, 189, 248, 0.2);
    --radius-card: 24px;
    --radius-btn: 40px;
}

/* ── 基础重置 ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* 科技感背景：光晕 + 点阵 */
    background-image:
        /* 顶部中央蓝色光晕 */
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.15), transparent),
        /* 右下角紫色光晕 */
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(129, 140, 248, 0.1), transparent),
        /* 点阵图案 */
        radial-gradient(circle at center, rgba(56, 189, 248, 0.15) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 24px 24px;
    background-position: 0 0, 0 0, 0 0;
    background-attachment: fixed;
}

/* ── 自定义滚动条 ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-scrollbar); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary-dark), var(--primary)); border-radius: 10px; }

/* ── 粒子画布 ── */
#particles-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    opacity: 0.6;
}

/* ── 容器 ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ── 导航栏 ── */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.4s ease;
}
.navbar.scrolled {
    background: rgba(7, 9, 14, 0.96);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 36px; max-width: 1400px; margin: 0 auto;
}
.logo {
    font-size: 1.75rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.5px; text-decoration: none; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
}
.logo-img {
    width: 42px; height: 42px; object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(56,189,248,0.3));
}
.logo-sub {
    font-weight: 400; font-size: 0.85rem; color: var(--text-sub); display: block; letter-spacing: 0;
    background: none; -webkit-background-clip: unset; background-clip: unset; color: var(--text-sub);
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--text-nav); font-weight: 500;
    font-size: 0.92rem; transition: 0.2s; padding-bottom: 4px; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    border-radius: 2px; transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-buttons { display: flex; gap: 12px; align-items: center; }

/* ── 通用按钮 ── */
.btn-outline {
    background: transparent; border: 1px solid var(--primary);
    color: var(--primary); padding: 8px 20px; border-radius: var(--radius-btn);
    font-weight: 500; cursor: pointer; transition: 0.25s; font-size: 0.88rem;
    text-decoration: none; display: inline-block; font-family: inherit;
}
.btn-outline:hover {
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 14px rgba(56,189,248,0.35);
}
.btn-primary {
    background: linear-gradient(110deg, var(--primary-dark), var(--primary));
    border: none; padding: 9px 22px; border-radius: var(--radius-btn);
    font-weight: 600; color: white; cursor: pointer; transition: 0.25s;
    font-size: 0.88rem; box-shadow: 0 4px 15px rgba(37,99,235,0.35);
    text-decoration: none; display: inline-block; font-family: inherit;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56,189,248,0.4);
}
.btn-text {
    color: var(--primary); font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem;
    transition: gap 0.2s;
}
.btn-text:hover { gap: 12px; }
.btn-lg { padding: 13px 32px; font-size: 0.95rem; }
.mobile-menu-btn {
    display: none; font-size: 1.5rem;
    background: none; border: none; color: white; cursor: pointer;
}

/* ── 移动端菜单 ── */
.nav-links.mobile-open {
    display: flex; flex-direction: column;
    position: absolute; top: 66px; left: 0; width: 100%;
    background: rgba(7,9,14,0.97); backdrop-filter: blur(20px);
    padding: 20px 28px; gap: 20px; z-index: 999;
    border-bottom: 1px solid var(--border);
}
.nav-links.mobile-open a { font-size: 1.05rem; }

/* ── Section 通用 ── */
section {
    padding: 90px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
    position: relative; z-index: 1;
}
.section-label-wrap { display: flex; justify-content: center; }
.section-label {
    text-align: center; display: inline-block;
    background: rgba(56,189,248,0.08); color: var(--primary);
    border: 1px solid rgba(56,189,248,0.25); padding: 5px 14px;
    border-radius: 40px; font-size: 0.75rem; letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 16px;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-title {
    font-size: 2.4rem; font-weight: 700; margin-bottom: 14px;
    background: linear-gradient(135deg, #fff 0%, var(--text-heading-muted) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: 1.02rem; line-height: 1.7; }

/* ── 通用布局辅助 ── */
.action-group { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.text-muted-sm { color: var(--text-muted); font-size: 0.9rem; }
.text-center { text-align: center; }

/* ── 滚动揭示动画 ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Toast 提示 ── */
.toast { position: fixed; bottom: 32px; right: 32px; z-index: 9999; background: rgba(15,22,36,0.96); border: 1px solid var(--border); border-left: 3px solid var(--primary); padding: 14px 20px; border-radius: 12px; min-width: 260px; backdrop-filter: blur(12px); transform: translateY(80px); opacity: 0; transition: all 0.35s ease; pointer-events: none; font-size: 0.88rem; }
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast .toast-title { font-weight: 700; margin-bottom: 4px; color: var(--primary); }
.toast .toast-msg { color: var(--text-muted); }

/* ── 关键帧 ── */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }

/* ── Footer（统一结构） ── */
footer { padding: 52px 0 28px; background: var(--bg-darker); border-top: 1px solid var(--border-section); position: relative; z-index: 1; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { font-size: 1.5rem; cursor: default; }
.footer-brand p { margin-top: 10px; color: var(--text-muted); font-size: 0.88rem; }
.footer-brand .contact { margin-top: 14px; font-size: 0.85rem; display: flex; flex-direction: column; gap: 6px; }
.footer-brand .contact a { color: var(--text-contact); text-decoration: none; transition: color 0.2s; }
.footer-brand .contact a:hover { color: var(--primary); }
.footer-col h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 14px; color: var(--text-nav); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { color: var(--text-link-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 24px; text-align: center; font-size: 0.78rem; color: var(--text-footer); }
.footer-bottom a { color: var(--text-footer-link); text-decoration: none; }

/* ── 响应式 ── */
@media (max-width: 960px) {
    .nav-links, .nav-buttons { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-container { padding: 12px 20px; }
    .footer-grid { flex-direction: column; gap: 28px; }
}
