/* 全局重置与基础样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f5c518;
    --primary-dark: #d4a800;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(26, 26, 46, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --text-muted: #7a7a8a;
    --border-glass: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-card: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--primary);
}

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

ul, ol {
    list-style: none;
    padding-left: 0;
}

/* 渐变Banner背景（全局氛围） */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 30%, rgba(245, 197, 24, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(100, 100, 255, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(245, 197, 24, 0.03) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
    animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, -5%) scale(1.1); }
}

/* 通用section样式 */
section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s ease forwards;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* 标题 */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 1.5rem; position: relative; display: inline-block; }
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 4px;
    margin-top: 0.5rem;
}
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* 圆角卡片 + 毛玻璃效果 */
.card, article, section > ul, section > ol, blockquote, details, address, .nav-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.card:hover, article:hover, details:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(245, 197, 24, 0.15);
    border-color: rgba(245, 197, 24, 0.3);
}

/* Header / 导航 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.8rem 1.5rem;
}

nav[aria-label="主导航"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav[aria-label="主导航"] > a {
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: 0.05em;
}
nav[aria-label="主导航"] > a strong {
    font-weight: 800;
}

nav[aria-label="主导航"] ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    justify-content: center;
}

nav[aria-label="主导航"] ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
nav[aria-label="主导航"] ul li a:hover {
    color: var(--primary);
    background: rgba(245, 197, 24, 0.1);
}

/* Hero 区域 */
#hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 6rem 1.5rem 4rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(245, 197, 24, 0.1) 0%, transparent 60%);
}

#hero h1 {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

#hero p {
    max-width: 650px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

#hero a {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1a2e;
    font-weight: 700;
    border-radius: 50px;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.3);
    transition: var(--transition);
}
#hero a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(245, 197, 24, 0.5);
    color: #1a1a2e;
}

/* 产品、服务等卡片网格 */
#products, #solutions, #case-studies, #testimonials, #knowledge {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
#products h2, #solutions h2, #case-studies h2, #testimonials h2, #knowledge h2 {
    grid-column: 1 / -1;
}
#products article, #solutions article, #case-studies article, #testimonials blockquote, #knowledge article {
    margin: 0;
}

/* 列表样式（服务、行业、特点、优势） */
#services ul li, #industries ul li, #features ul li, #benefits ul li {
    padding: 0.6rem 0 0.6rem 1.8rem;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
#services ul li::before, #industries ul li::before, #features ul li::before, #benefits ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* 工作流 / HowTo 有序列表 */
#workflow ol, #howto ol {
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#workflow ol li, #howto ol li {
    counter-increment: step;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    position: relative;
    transition: var(--transition);
}
#workflow ol li:hover, #howto ol li:hover {
    background: rgba(245, 197, 24, 0.08);
    border-color: var(--primary);
}
#workflow ol li::before, #howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #1a1a2e;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* FAQ details */
details {
    margin-bottom: 0.8rem;
    cursor: pointer;
}
details summary {
    font-weight: 600;
    padding: 0.8rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
}
details[open] summary::after {
    content: '−';
}
details p {
    padding: 0.5rem 0 1rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glass);
    margin-top: 0.5rem;
}

/* 引用块 */
blockquote {
    font-style: italic;
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
}
blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
    position: absolute;
    top: -0.2rem;
    left: 0.5rem;
    line-height: 1;
}
blockquote footer {
    margin-top: 1rem;
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.9rem;
}

/* 联系地址卡片 */
address {
    font-style: normal;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}
address p {
    padding: 0.4rem 0;
}

/* 底部 */
footer {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 2rem;
}
footer nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
footer nav ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
footer nav ul li a:hover {
    color: var(--primary);
}
footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 暗色模式 (默认已是暗色，这里做强调) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: #0f0f1a;
        --bg-card: rgba(26, 26, 46, 0.9);
        --bg-glass: rgba(255, 255, 255, 0.06);
        --text-primary: #f0f0f5;
        --text-secondary: #b0b0c0;
    }
    body { background: var(--bg-dark); }
}

/* 响应式 */
@media (max-width: 768px) {
    header {
        padding: 0.6rem 1rem;
    }
    nav[aria-label="主导航"] ul {
        gap: 0.2rem 0.6rem;
    }
    nav[aria-label="主导航"] ul li a {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    section {
        padding: 2.5rem 1rem;
    }
    #hero {
        padding: 5rem 1rem 3rem;
        min-height: 50vh;
    }
    #products, #solutions, #case-studies, #testimonials, #knowledge {
        grid-template-columns: 1fr;
    }
    address {
        grid-template-columns: 1fr;
    }
    .card, article, details, blockquote, address {
        padding: 1rem;
    }
    #workflow ol li, #howto ol li {
        padding-left: 2.5rem;
    }
    #workflow ol li::before, #howto ol li::before {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        left: 0.6rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.3rem; }
    #hero a {
        padding: 0.6rem 1.8rem;
        font-size: 1rem;
    }
}

/* 滚动驱动动画降级支持 (不支持时直接显示) */
@supports not (animation-timeline: view()) {
    section {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* 额外的hover微交互 */
a, button, .card, article, details, summary {
    transition: var(--transition);
}
summary:hover {
    color: var(--primary);
}

/* 选中高亮 */
::selection {
    background: var(--primary);
    color: #1a1a2e;
}

/* 知识中心文章链接 */
#knowledge article a {
    color: var(--primary);
    font-weight: 600;
}
#knowledge article a:hover {
    text-decoration: underline;
}