/* =========================================
   设计系统 - 苹果极简 + 手机端一屏
   ========================================= */
:root {
    --bg: #FFFFFF;
    --bg-soft: #FBFBFD;
    --bg-card: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #86868B;
    --border: #D2D2D7;
    --accent: #0071E3;
    
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-tap-highlight-color: transparent;
}

/* =========================================
   主容器 - 一屏展示
   ========================================= */
.home {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* =========================================
   顶部品牌区 - 两行搞定
   ========================================= */
.brand {
    text-align: center;
    padding-top: 28px;
    padding-bottom: 20px;
    flex-shrink: 0;
}

/* 第1行：品牌名（居中） */
.brand-top {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.brand-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* 抖音图标 - 品牌名前 */
.brand-icon {
    flex-shrink: 0;
    margin-right: 6px;
}

/* 第2行：大标题 slogan */
.brand-slogan {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}

/* =========================================
   三大卡片 - 自适应占满剩余空间
   ========================================= */
.cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 12px;
    min-height: 0;
}

.card {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    cursor: pointer;
}

.card:active {
    transform: scale(0.98);
}

.card:hover {
    background: var(--bg);
    border-color: var(--border);
}

/* 卡片图标 */
.card-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-demand .card-icon {
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent);
}

.card-material .card-icon {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.card-guide .card-icon {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

/* 卡片正文 */
.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: -0.005em;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 箭头 */
.card-arrow {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-tertiary);
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

/* =========================================
   底部
   ========================================= */
.foot {
    text-align: center;
    padding: 8px 0 16px;
    flex-shrink: 0;
}

.foot p {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* =========================================
   入场动画
   ========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand, .card, .foot {
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand { animation-delay: 0.05s; }
.card:nth-child(1) { animation-delay: 0.18s; }
.card:nth-child(2) { animation-delay: 0.25s; }
.card:nth-child(3) { animation-delay: 0.32s; }
.foot { animation-delay: 0.42s; }

/* =========================================
   响应式适配
   ========================================= */

/* 小屏手机 */
@media (max-height: 700px) {
    .brand {
        padding-top: 16px;
        padding-bottom: 14px;
    }
    .brand-top {
        margin-bottom: 10px;
    }
    .brand-name {
        font-size: 13px;
    }
    .brand-slogan {
        font-size: 26px;
    }
    .cards {
        gap: 8px;
    }
    .card {
        padding: 12px 16px;
        gap: 12px;
    }
    .card-icon {
        width: 40px;
        height: 40px;
    }
    .card-title {
        font-size: 15px;
    }
    .card-desc {
        font-size: 11px;
    }
}

/* 极小屏 */
@media (max-height: 580px) {
    .brand {
        padding-top: 12px;
        padding-bottom: 10px;
    }
    .brand-slogan {
        font-size: 22px;
    }
    .foot p {
        font-size: 10px;
    }
}

/* 大屏手机 */
@media (min-height: 800px) {
    .brand-slogan {
        font-size: 36px;
    }
    .card {
        padding: 16px 20px;
        gap: 16px;
    }
    .card-icon {
        width: 48px;
        height: 48px;
    }
    .card-title {
        font-size: 17px;
    }
    .card-desc {
        font-size: 13px;
        white-space: normal;
    }
}

/* 桌面端 - 模拟手机外观 */
@media (min-width: 480px) {
    html, body {
        background: linear-gradient(135deg, #f0f0f3 0%, #e8e8ed 100%);
    }
    
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 20px;
    }
    
    .home {
        max-width: 420px;
        width: 100%;
        height: 90vh;
        max-height: 880px;
        margin: 0;
        background: white;
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
        overflow: hidden;
        position: relative;
    }
}

/* =========================================
   无障碍 - 减弱动效
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}