/* ==========================================================================
   WhatsApp 品牌落地站 - 共享样式表 (style.css)
   ========================================================================== */

/* --- 1. 设计变量与主题色 --- */
:root {
    /* 核心色彩体系：冷蓝科技 + 霓虹点缀 */
    --color-brand: #00a884;
    --color-brand-hover: #008f6f;
    --color-neon: #00e5ff;
    --color-bg-dark: #0b1119;
    --color-surface: #131b24;
    --color-surface-hover: #1c2733;
    --color-text-main: #e4eaf1;
    --color-text-muted: #8b97a5;
    --color-border: rgba(255, 255, 255, 0.08);
    
    /* 辅助色彩 */
    --color-success: #2d9f6d;
    --color-warning: #f0ad4e;
    --color-danger: #d9534f;

    /* 间距系统 */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
    --space-section: clamp(4rem, 8vw, 8rem);

    /* 圆角与过渡 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* 字体栈 */
    --font-family-base: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* --- 2. 基础重置与排版 --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- 3. 通用布局容器 --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-md);
}

section {
    padding-block: var(--space-section);
    position: relative;
}

.section-header {
    margin-bottom: var(--space-xl);
    max-width: 800px;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
    margin-bottom: var(--space-md);
    color: #fff;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* --- 4. 导航栏 (Header) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(11, 17, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding-block: 4px;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: #fff;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-neon);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
    width: 100%;
}

/* --- 5. 按钮组件 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-align: center;
    min-height: 48px;
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--color-neon);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-brand) 0%, #00856a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 168, 132, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 132, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    border-color: var(--color-text-muted);
    background-color: var(--color-surface);
}

/* --- 6. 核心功能卡片 --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--color-neon);
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: #fff;
}

.feature-body {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- 7. 场景与流程 --- */
.scenarios-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.scenario-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.scenario-item:nth-child(even) .scenario-content {
    order: 2;
}

.scenario-graphic {
    aspect-ratio: 4 / 3;
    background: radial-gradient(circle at center, var(--color-surface-hover), var(--color-bg-dark));
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.scenario-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: #fff;
}

.scenario-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.step-list {
    counter-reset: step;
    list-style: none;
}

.step-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-main);
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--color-neon);
    color: var(--color-bg-dark);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 8. 表格 (版本与平台) --- */
.platform-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
}

.platform-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.platform-table th,
.platform-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.platform-table thead th {
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-weight: 600;
}

.platform-table tbody tr:last-child td {
    border-bottom: none;
}

.platform-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* --- 9. FAQ (手风琴) --- */
.faq-container {
    max-width: 800px;
    margin-inline: auto;
}

details {
    border-bottom: 1px solid var(--color-border);
    padding-block: var(--space-md);
}

summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    transition: color var(--transition-base);
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    transition: transform var(--transition-base);
    color: var(--color-neon);
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: var(--space-sm);
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* --- 10. 新闻卡片 --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.news-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: #fff;
    line-height: 1.5;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.news-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-neon);
    align-self: flex-start;
}

.news-link:hover {
    text-decoration: underline;
}

/* --- 11. 相关文章 --- */
.related-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.related-link-item a {
    display: block;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.related-link-item a:hover {
    border-color: var(--color-brand);
    background-color: var(--color-surface);
}

.link-title {
    display: block;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.link-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* --- 12. Footer --- */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-xl);
    margin-top: var(--space-section);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    font-size: 0.9rem;
}

.footer-nav h4 {
    color: #fff;
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-nav a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--color-neon);
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* --- 13. SVG 动效关键帧 (Keyframes) --- */
@keyframes pulse-node {
    0%, 100% { opacity: 0.3; fill: var(--color-text-muted); }
    50% { opacity: 1; fill: var(--color-neon); }
}

@keyframes flow-stream {
    0% { stroke-dashoffset: 1; }
    100% { stroke-dashoffset: 0; }
}

@keyframes float-ui {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* SVG 工具类 */
.svg-icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-grid-node {
    animation: pulse-node 4s infinite ease-in-out;
    transform-box: fill-box;
    transform-origin: center;
}

.draw-line {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: flow-stream 3s infinite alternate ease-in-out;
}

.float-element {
    animation: float-ui 6s infinite ease-in-out;
}

/* --- 14. 响应式适配 --- */
@media (max-width: 900px) {
    .scenario-item {
        grid-template-columns: 1fr;
    }
    .scenario-item:nth-child(even) .scenario-content {
        order: initial;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 60px;
    }
    .main-nav ul {
        display: none; /* 移动端暂简隐藏，保持单页简洁性 */
    }
    .section-title {
        font-size: 1.75rem;
    }
}

/* --- 15. 无障碍：减少动态效果 --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-grid-node, .draw-line, .float-element {
        animation: none;
        opacity: 1;
        fill: var(--color-neon); /* 静态下显示亮起状态 */
        stroke-dashoffset: 0;
    }
}
