/* ============================================
   style.css — 云安华通官网主样式
   ============================================ */

/* ========= CSS Variables ========= */
:root {
    --bg-primary: #050A15;
    --bg-secondary: #0A1628;
    --bg-tertiary: #111B2E;
    --bg-card: rgba(17, 27, 46, 0.7);
    --color-primary: #00D4FF;
    --color-primary-dim: rgba(0, 212, 255, 0.15);
    --color-accent: #8B5CF6;
    --color-accent-dim: rgba(139, 92, 246, 0.15);
    --color-safe: #00F5A0;
    --color-warning: #F59E0B;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 212, 255, 0.25);
    --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========= Reset & Base ========= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-cn);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ========= Utility ========= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
@media (max-width: 768px) {
    .container { padding: 0 20px; }
}
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========= Animations ========= */
[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}
[data-animate="fade-up"].animated { opacity: 1; transform: translateY(0); }

/* ========= Section Header ========= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--color-primary);
    background: var(--color-primary-dim);
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin-bottom: 20px;
    text-transform: uppercase;
}
.section-title {
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: clamp(14px, 1.8vw, 17px);
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.8;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ========= Buttons ========= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #050A15;
    font-weight: 700;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }

/* ========= Navbar ========= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}
.navbar.scrolled, .navbar.scolled {
    background: rgba(5, 10, 21, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity var(--transition);
}
.nav-logo:hover {
    opacity: 0.85;
}
.logo-img {
    height: 64px;
    width: auto;
    max-height: 68px;
}
.logo-img-sm {
    height: 28px;
    width: auto;
}
.logo-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
    letter-spacing: 2px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    padding: 12px;
    min-width: 48px;
    min-height: 48px;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: var(--transition);
}
.mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.95);
}
.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}
/* 汉堡 → X 变形动画 */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========= Footer ========= */
.footer {
    background: #030609;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 60px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-brand {
    margin-bottom: 16px;
}
.footer-brand img {
    height: 40px;
    width: auto;
}
.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
}
.footer-links h4,
.footer-contact h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.footer-links a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 0;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}
.footer-contact p {
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 0;
}
.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ========= CTA Section ========= */
.cta-section {
    padding: 120px 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.cta-bg-animation {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(0,212,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%);
    animation: ctaPulse 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ctaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.cta-content h2 {
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}
.cta-content p {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 40px;
}
.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========= Responsive ========= */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    :root { --nav-height: 64px; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 75%;
        height: 100vh;
        background: rgba(5, 10, 21, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 4px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }
    .nav-links.active { right: 0; }
    .nav-link { font-size: 16px; padding: 12px 16px; }
    .mobile-menu-btn { display: flex; }
    .nav-actions { position: relative; z-index: 1001; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .btn-lg { padding: 14px 28px; font-size: 15px; }

    /* --- 全局移动端优化 --- */
    h1 { font-size: clamp(28px, 6vw, 42px); }
    h2 { font-size: clamp(22px, 5vw, 32px); }
    h3 { font-size: clamp(18px, 4vw, 24px); }
    p { font-size: 15px; line-height: 1.7; }

    /* 区块间距压缩 */
    section { padding: 60px 0; }

    /* 按钮触控优化 */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 24px;
        font-size: 14px;
    }
    .btn-sm { min-height: 36px; padding: 8px 18px; font-size: 13px; }

    /* Logo 尺寸 */
    .logo-img { height: 40px; max-height: 40px; }

    /* 卡片通用优化 */
    [class*="card"] { border-radius: var(--radius-md); }
    [class*="grid"]:not(.nav-links):not(.footer-grid) {
        grid-template-columns: 1fr !important;
    }

    /* 表单元素 */
    input, textarea, select {
        font-size: 16px !important; /* 防止 iOS 自动缩放 */
        padding: 12px 16px !important;
    }

    /* 页面 Hero 区域 */
    .page-hero { padding: 100px 0 50px; }
}

/* ========= 超小屏幕 (<=480px) ========= */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    h1 { font-size: 26px; }
    h2 { font-size: 20px; }
    .btn-lg { padding: 12px 24px; font-size: 14px; }
    .nav-links { width: 85%; padding: 90px 24px 24px; }

    /* 超小屏：隐藏导航栏CTA按钮，避免与汉堡菜单拥挤 */
    .nav-actions .btn-primary { display: none; }
}
