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

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.75);
    --text-primary: #eaeaea;
    --text-secondary: #b0b0c0;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --glow: rgba(233, 69, 96, 0.4);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --transition: 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

/* 暗色模式（默认） */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f4f4f9;
        --bg-secondary: #ffffff;
        --bg-card: rgba(255, 255, 255, 0.8);
        --text-primary: #1a1a2e;
        --text-secondary: #555;
        --accent: #e94560;
        --accent-hover: #c0392b;
        --glow: rgba(233, 69, 96, 0.2);
        --glass: rgba(0, 0, 0, 0.04);
        --glass-border: rgba(0, 0, 0, 0.1);
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
}

/* 滚动动画基础 */
section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }

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

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: background var(--transition);
}

header:hover {
    background: rgba(15, 15, 26, 0.9);
}

@media (prefers-color-scheme: light) {
    header:hover {
        background: rgba(255, 255, 255, 0.9);
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

nav ul li a:hover {
    color: var(--text-primary);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero 渐变 Banner */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(15, 52, 96, 0.2) 0%, transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5%, 5%) rotate(3deg); }
}

#hero > div {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

#hero h1 {
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #e94560, #f5a623);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 0 40px var(--glow);
}

#hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

#hero div > div {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    border: 2px solid transparent;
}

#hero a[role="button"]:first-child {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--glow);
}

#hero a[role="button"]:first-child:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--glow);
}

#hero a[role="button"]:last-child {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--glass-border);
    backdrop-filter: blur(10px);
}

#hero a[role="button"]:last-child:hover {
    background: var(--glass);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* 通用 Section 样式 */
section:not(#hero) {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

section:not(#hero) h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

section:not(#hero) h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0.8rem auto 0;
    border-radius: 4px;
}

/* 圆角卡片 + 毛玻璃效果 */
#about > div,
#products > div,
#services > div,
#insights > div,
#faq > div,
#contact > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

article, details, address {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

article:hover, details[open] {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow);
}

article h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
}

article p, details p, address p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

time {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* 常见问题 details */
details {
    cursor: pointer;
    transition: all 0.4s ease;
}

details summary {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

/* 联系地址 */
address {
    font-style: normal;
    line-height: 2;
}

address p {
    font-size: 1rem;
}

/* 页脚 */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
}

footer > div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

footer nav ul li a:hover {
    color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.6rem 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        font-size: 0.85rem;
    }

    #hero {
        padding: 5rem 1rem 3rem;
    }

    #hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    section:not(#hero) {
        padding: 3rem 1rem;
    }

    #about > div,
    #products > div,
    #services > div,
    #insights > div,
    #faq > div,
    #contact > div {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    article, details, address {
        padding: 1.5rem;
    }

    footer > div {
        flex-direction: column;
        text-align: center;
    }

    footer nav ul {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 0.6rem;
    }

    nav ul li a {
        font-size: 0.8rem;
    }

    #hero a[role="button"] {
        padding: 0.7rem 1.8rem;
        font-size: 0.9rem;
    }

    article h3 {
        font-size: 1.2rem;
    }
}