/* ============================================
   久圣美科技 — 官网门户样式系统
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* 主色调 */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, .35);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
    --gradient-text: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);

    /* 中性色 */
    --bg-body: #050a18;
    --bg-section: #0a1128;
    --bg-section-alt: #0d1530;
    --bg-card: rgba(15, 23, 50, .6);
    --bg-glass: rgba(255, 255, 255, .04);
    --border-glass: rgba(255, 255, 255, .08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 间距 */
    --space-xs: .5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* 字体 */
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: .2s ease;
    --transition-base: .35s cubic-bezier(.4,0,.2,1);
    --transition-slow: .6s cubic-bezier(.4,0,.2,1);

    /* 阴影 */
    --shadow-card: 0 4px 24px rgba(0,0,0,.25);
    --shadow-glow: 0 0 40px var(--primary-glow);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul { list-style: none; }

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Section Shared ---------- */
.section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--primary-light);
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 2.2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-glass);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(5, 10, 24, .88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: .6rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.3rem;
    font-weight: 700;
    z-index: 1001;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: #fff;
}

.logo-highlight { color: var(--primary-light); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-link {
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 400;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

/* 汉堡按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gradient-hero);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../assets/images/hero-bg.png') center/cover no-repeat;
    opacity: .3;
}

.hero-particles {
    position: absolute;
    inset: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 40%, rgba(124,58,237,.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.hero-subtitle {
    font-size: .8rem;
    letter-spacing: 6px;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2rem, 5.5vw, 3.75rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: var(--space-md);
}

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.hero-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-plus,
.hero-stat-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.hero-stat-label {
    display: block;
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* 滚动提示 */
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--text-muted);
    font-size: .75rem;
    letter-spacing: 2px;
    animation: floatHint 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes floatHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   服务项目
   ============================================ */
.services {
    background: var(--bg-section);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.service-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: var(--shadow-glow);
    background: rgba(15, 23, 50, .8);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    color: #fff;
}

.service-icon svg { width: 28px; height: 28px; }

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.service-desc {
    font-size: .92rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.service-features {
    margin-bottom: var(--space-md);
}

.service-features li {
    font-size: .85rem;
    color: var(--text-secondary);
    padding: .3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-size: .75rem;
    font-weight: 700;
}

.service-link {
    font-size: .9rem;
    font-weight: 500;
    color: var(--primary-light);
    transition: all var(--transition-fast);
}

.service-link:hover {
    letter-spacing: 1px;
}

/* ============================================
   关于我们
   ============================================ */
.about {
    background: var(--bg-section-alt);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-content .section-tag { text-align: left; }

.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.highlight-item:hover {
    border-color: rgba(37, 99, 235, .2);
    transform: translateX(4px);
}

.highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.highlight-item strong {
    display: block;
    font-size: .95rem;
    margin-bottom: .15rem;
}

.highlight-item p {
    font-size: .85rem;
    color: var(--text-muted);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(37, 99, 235, .25);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    display: block;
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* ============================================
   客户案例
   ============================================ */
.cases {
    background: var(--bg-section);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}

.case-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.case-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: var(--shadow-glow);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.case-industry {
    font-size: .8rem;
    padding: .3rem .8rem;
    background: rgba(37, 99, 235, .15);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.case-badge {
    font-size: .75rem;
    padding: .3rem .8rem;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.case-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.case-desc {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.case-metrics {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-glass);
}

.case-metric { text-align: center; flex: 1; }

.metric-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-light);
}

.metric-label {
    font-size: .75rem;
    color: var(--text-muted);
}

/* ============================================
   合作伙伴
   ============================================ */
.partners {
    background: var(--bg-section-alt);
}

.partners-marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: var(--space-md);
    animation: marquee 30s linear infinite;
    width: max-content;
}

.partner-item {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-base);
}

.partner-item:hover {
    color: var(--primary-light);
    border-color: rgba(37, 99, 235, .25);
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   联系我们
   ============================================ */
.contact {
    background: var(--bg-section);
}

.contact-layout {
    width: 100%;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.info-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.info-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, .2);
}

.info-icon {
    font-size: 1.5rem;
    margin-bottom: .4rem;
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .25rem;
}

.info-card p {
    font-size: .95rem;
    color: var(--primary-light);
    font-weight: 500;
}

.info-card span {
    font-size: .8rem;
    color: var(--text-muted);
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--bg-body);
    border-top: 1px solid var(--border-glass);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-slogan {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.social-link svg { width: 18px; height: 18px; }

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.footer-links li {
    margin-bottom: .5rem;
}

.footer-links a,
.footer-links li {
    font-size: .85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

.footer-bottom p {
    font-size: .8rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-bottom a:hover { color: var(--primary-light); }

/* ============================================
   动画
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   响应式 — 平板
   ============================================ */
@media (max-width: 1024px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-content .section-title { text-align: center; }
    .about-content .section-tag { text-align: center; display: block; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }
}

/* ============================================
   响应式 — 手机
   ============================================ */
@media (max-width: 768px) {
    :root {
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }

    /* 导航 */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(5, 10, 24, .96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-xs);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: .75rem 1.5rem;
    }

    /* Hero */
    .hero-content {
        padding-top: 5rem;
    }

    .hero-stats {
        gap: var(--space-md);
    }

    .hero-stat-num {
        font-size: 2rem;
    }

    .hero-scroll-hint { display: none; }

    /* 服务 */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* 关于 */
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .about-text { text-align: center; }

    /* 案例 */
    .cases-grid {
        grid-template-columns: 1fr;
    }

    /* 联系 */
    .contact-info {
        gap: var(--space-sm);
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .nav-logo { justify-content: center; }

    .footer-brand { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.65rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .case-metrics {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .stat-number {
        font-size: 2rem;
    }
}
