/* ============================================
   StylePilot Landing Page
   设计系统：静谧与质感
   摒弃高饱和度，采用低对比度的大地色系与莫兰迪色
   与 APP 端 app_colors.dart 保持完全一致
   ============================================ */

/* ── 色彩系统（与 APP app_colors.dart 同源） ── */
:root {
    /* 主色调 - 大地色系 */
    --warm-rock: #F5F3F0;          /* lightBackground */
    --deep-charcoal: #3D3D3D;      /* lightTextPrimary */

    /* 辅助色 - 莫兰迪色 */
    --sage: #9CAF88;               /* sage 鼠尾草绿 */
    --matte-gold: #C9B896;         /* matteGold 哑光金 (primary/accent) */

    /* 功能色 - 柔和版 */
    --success: #8FA882;
    --warning: #C9A87C;
    --danger: #C67B6B;

    /* 浅色主题 */
    --light-background: #F5F3F0;
    --light-surface: #FAFAF8;
    --light-card: #FFFFFF;
    --light-text-primary: #3D3D3D;
    --light-text-secondary: #7A7A7A;
    --light-text-hint: #B5B5B5;
    --light-border: #EBE8E5;
    --light-divider: #F0EBE8;

    /* 深色主题（用于 download 区块） */
    --dark-background: #1A1A2E;
    --dark-surface: #16213E;

    /* 衍生色 */
    --primary-light: #D4C8A8;
    --primary-dark: #B8A87C;
    --accent-light: #E8DCC8;
    --sage-light: #E8EFE3;
    --sage-mid: #D4E0CC;
    --gold-light: #F5EFE3;
    --gold-mid: #E8DCC8;
    --cream: #FAF8F5;

    /* 字体 */
    --font-serif: 'Noto Serif SC', serif;
    --font-sans: 'Noto Sans SC', sans-serif;

    /* 间距 */
    --sp: 8px;

    /* 阴影 - 极淡弥散阴影（与 APP cardShadow 一致） */
    --shadow-card: 0 4px 20px rgba(61, 61, 61, 0.05);
    --shadow-hover: 0 8px 30px rgba(61, 61, 61, 0.08);

    /* 过渡 */
    --ease: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--light-text-primary);
    background-color: var(--light-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 calc(var(--sp) * 3);
}

/* ============================================
   Hero Section
   ── 暖石色背景 + 哑光金点缀 ──
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--sp) * 10) calc(var(--sp) * 3);
    overflow: hidden;
    /* 与 APP warmGradient 一致 */
    background: linear-gradient(135deg, #FAF8F5 0%, #F5F0EB 100%);
}

/* 装饰性渐变光晕 - 柔和的鼠尾草绿 */
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(156, 175, 136, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* 装饰性渐变光晕 - 柔和的哑光金 */
.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(201, 184, 150, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 560px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */
.logo {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--sp) * 1.5);
    margin-bottom: calc(var(--sp) * 5);
}

.logo-icon {
    width: 44px;
    height: 44px;
    color: var(--matte-gold);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--deep-charcoal);
    letter-spacing: 3px;
}

/* ── Hero Text ── */
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 7vw, 52px);
    font-weight: 600;
    color: var(--deep-charcoal);
    line-height: 1.3;
    margin-bottom: calc(var(--sp) * 3);
    letter-spacing: 4px;
}

.hero-subtitle {
    font-size: 17px;
    font-weight: 300;
    color: var(--light-text-secondary);
    margin-bottom: calc(var(--sp) * 6);
    letter-spacing: 1px;
}

/* ── CTA Button ── */
.hero-cta {
    margin-bottom: calc(var(--sp) * 6);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--sp) * 1.5);
    padding: calc(var(--sp) * 2) calc(var(--sp) * 5);
    /* 与 APP primaryGradient (sageGradient) 一致 */
    background: linear-gradient(135deg, var(--sage-light) 0%, var(--sage-mid) 100%);
    color: var(--deep-charcoal);
    font-weight: 500;
    font-size: 17px;
    border-radius: 50px;
    box-shadow: var(--shadow-card);
    transition: var(--ease);
    letter-spacing: 1px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-download i {
    font-size: 22px;
    color: var(--sage);
}

/* ── QR Code ── */
.qrcode-container {
    text-align: center;
}

#qrcode, #qrcode-bottom {
    display: inline-block;
    padding: 14px;
    background: var(--light-card);
    border-radius: 12px;
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-card);
}

#qrcode canvas, #qrcode-bottom canvas {
    display: block;
}

.qrcode-hint {
    margin-top: calc(var(--sp) * 2);
    font-size: 13px;
    color: var(--light-text-hint);
    letter-spacing: 1px;
}

/* ── Scroll Indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: calc(var(--sp) * 4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp);
    color: var(--light-text-hint);
    font-size: 12px;
    letter-spacing: 1px;
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.scroll-indicator i {
    font-size: 20px;
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(24px, 4.5vw, 36px);
    font-weight: 500;
    text-align: center;
    color: var(--deep-charcoal);
    margin-bottom: calc(var(--sp) * 6);
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--matte-gold);
    margin: calc(var(--sp) * 2) auto 0;
    border-radius: 1px;
}

/* ============================================
   Features Section
   ── 暖白底 + 极淡弥散阴影 ──
   ============================================ */
.features {
    padding: calc(var(--sp) * 14) 0;
    background: var(--light-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--sp) * 3);
}

.feature-card {
    padding: calc(var(--sp) * 4);
    background: var(--light-card);
    border-radius: 16px;
    border: 1px solid var(--light-border);
    text-align: center;
    transition: var(--ease);
    opacity: 0;
    transform: translateY(16px);
    /* 与 APP cardShadow 一致 */
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.05);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(61, 61, 61, 0.08);
}

/* Feature Icon - 两种配色交替 */
.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto calc(var(--sp) * 3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feature-icon.icon-sage {
    /* 与 APP sageGradient 一致 */
    background: linear-gradient(135deg, #E8EFE3 0%, #D4E0CC 100%);
    color: var(--sage);
}

.feature-icon.icon-gold {
    /* 与 APP goldGradient 一致 */
    background: linear-gradient(135deg, #F5EFE3 0%, #E8DCC8 100%);
    color: var(--primary-dark);
}

.feature-icon i {
    font-size: 28px;
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--deep-charcoal);
    margin-bottom: calc(var(--sp) * 1.5);
    letter-spacing: 1px;
}

.feature-card p {
    font-size: 14px;
    color: var(--light-text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* ============================================
   Screenshots Section
   ============================================ */
.screenshots {
    padding: calc(var(--sp) * 14) 0;
    background: var(--light-background);
}

.screenshots-carousel {
    display: flex;
    gap: calc(var(--sp) * 4);
    justify-content: center;
    flex-wrap: wrap;
    padding: calc(var(--sp) * 2);
}

.screenshot-item {
    animation: fadeInUp 0.8s ease-out backwards;
}

.screenshot-item:nth-child(2) { animation-delay: 0.15s; }
.screenshot-item:nth-child(3) { animation-delay: 0.3s; }

.phone-mockup {
    text-align: center;
}

.phone-frame {
    width: 260px;
    height: 520px;
    border-radius: 36px;
    overflow: hidden;
    /* 与 APP 极淡弥散阴影一致 */
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.05);
    border: 1px solid var(--light-border);
    background: var(--light-surface);
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-mockup p {
    margin-top: calc(var(--sp) * 2);
    font-size: 13px;
    color: var(--light-text-secondary);
    letter-spacing: 1px;
}

/* ============================================
   Download Section
   ── 深色区块，与 APP 深色主题一致 ──
   ============================================ */
.download {
    padding: calc(var(--sp) * 16) 0;
    /* 与 APP darkBackground 一致 */
    background: var(--dark-background);
    position: relative;
    overflow: hidden;
}

/* 装饰光晕 */
.download::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 180%;
    background: radial-gradient(ellipse, rgba(201, 184, 150, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.download::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 50%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(156, 175, 136, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.download-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.download h2 {
    font-family: var(--font-serif);
    font-size: clamp(24px, 4.5vw, 36px);
    font-weight: 500;
    color: #F5F3F0;
    margin-bottom: calc(var(--sp) * 2);
    letter-spacing: 2px;
}

.download > .container > .download-content > p {
    font-size: 17px;
    font-weight: 300;
    color: rgba(245, 243, 240, 0.7);
    margin-bottom: calc(var(--sp) * 6);
    letter-spacing: 1px;
}

.download-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--sp) * 8);
    flex-wrap: wrap;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: calc(var(--sp) * 2);
    padding: calc(var(--sp) * 2.5) calc(var(--sp) * 4);
    /* 与 APP sageGradient 一致 */
    background: linear-gradient(135deg, var(--sage-light) 0%, var(--sage-mid) 100%);
    color: var(--deep-charcoal);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(156, 175, 136, 0.2);
    transition: var(--ease);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(156, 175, 136, 0.3);
}

.btn-primary i {
    font-size: 28px;
    color: var(--sage);
}

.btn-primary div {
    text-align: left;
}

.btn-label {
    display: block;
    font-weight: 500;
    font-size: 17px;
    letter-spacing: 1px;
}

.btn-sublabel {
    display: block;
    font-size: 12px;
    color: var(--light-text-secondary);
}

.download-qrcode {
    text-align: center;
}

.download-qrcode p {
    margin-top: calc(var(--sp) * 2);
    font-size: 13px;
    color: rgba(245, 243, 240, 0.5);
    letter-spacing: 1px;
}

/* ============================================
   Footer
   ── 深炭色底 ──
   ============================================ */
.footer {
    padding: calc(var(--sp) * 6) 0;
    background: var(--deep-charcoal);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: calc(var(--sp) * 4);
    border-bottom: 1px solid rgba(245, 243, 240, 0.1);
    margin-bottom: calc(var(--sp) * 3);
}

.footer-brand {
    color: #F5F3F0;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
}

.footer-brand p {
    font-size: 13px;
    color: rgba(245, 243, 240, 0.5);
    margin-top: calc(var(--sp) * 0.5);
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    gap: calc(var(--sp) * 4);
}

.footer-links a {
    color: rgba(245, 243, 240, 0.6);
    font-size: 14px;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--matte-gold);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(245, 243, 240, 0.3);
    letter-spacing: 1px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: calc(var(--sp) * 8) calc(var(--sp) * 2);
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .btn-download {
        padding: calc(var(--sp) * 1.5) calc(var(--sp) * 3.5);
        font-size: 15px;
    }

    #qrcode, #qrcode-bottom {
        padding: 10px;
    }

    .features {
        padding: calc(var(--sp) * 10) 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .phone-frame {
        width: 220px;
        height: 440px;
        border-radius: 28px;
    }

    .download-actions {
        flex-direction: column;
        gap: calc(var(--sp) * 4);
    }

    .footer-content {
        flex-direction: column;
        gap: calc(var(--sp) * 3);
        text-align: center;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .phone-frame {
        width: 180px;
        height: 360px;
        border-radius: 24px;
    }

    .feature-card {
        padding: calc(var(--sp) * 3);
    }
}

/* ============================================
   Legal Page（隐私政策等）
   ── 与落地页同源设计系统：静谧与质感 ──
   ============================================ */
.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #FAF8F5 0%, #F5F0EB 100%);
}

.legal-header {
    padding: calc(var(--sp) * 4) calc(var(--sp) * 3);
    border-bottom: 1px solid var(--light-border);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
}

.legal-header-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.legal-logo {
    display: flex;
    align-items: center;
    gap: calc(var(--sp) * 1.5);
}

.legal-logo .logo-icon {
    width: 30px;
    height: 30px;
    color: var(--matte-gold);
}

.legal-logo .logo-text {
    font-family: var(--font-serif);
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--deep-charcoal);
}

.legal-back {
    font-size: 14px;
    color: var(--light-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 1px;
}

.legal-back:hover {
    color: var(--matte-gold);
}

.legal-main {
    flex: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: calc(var(--sp) * 8) calc(var(--sp) * 3) calc(var(--sp) * 10);
}

.legal-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    color: var(--deep-charcoal);
    letter-spacing: 2px;
    margin-bottom: calc(var(--sp) * 1.5);
}

.legal-meta {
    font-size: 13px;
    color: var(--light-text-hint);
    letter-spacing: 1px;
    margin-bottom: calc(var(--sp) * 6);
    padding-bottom: calc(var(--sp) * 3);
    border-bottom: 1px solid var(--light-border);
}

.legal-section {
    margin-bottom: calc(var(--sp) * 6);
}

.legal-section h2 {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--deep-charcoal);
    letter-spacing: 1px;
    margin-bottom: calc(var(--sp) * 2.5);
    display: flex;
    align-items: baseline;
    gap: calc(var(--sp) * 1);
}

.legal-section h2 .section-no {
    color: var(--matte-gold);
    font-size: 16px;
    font-weight: 500;
    min-width: 34px;
}

.legal-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--deep-charcoal);
    margin: calc(var(--sp) * 3) 0 calc(var(--sp) * 1.5);
    letter-spacing: 0.5px;
}

.legal-section p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--light-text-secondary);
    margin-bottom: calc(var(--sp) * 1.5);
}

.legal-section ul {
    list-style: none;
    padding: 0;
}

.legal-section ul li {
    position: relative;
    padding-left: calc(var(--sp) * 3);
    font-size: 14px;
    line-height: 1.9;
    color: var(--light-text-secondary);
    margin-bottom: calc(var(--sp) * 1);
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--matte-gold);
    opacity: 0.7;
}

.legal-section .legal-tip {
    font-size: 13px;
    color: var(--light-text-hint);
    background: var(--gold-light);
    border-radius: 10px;
    padding: calc(var(--sp) * 2) calc(var(--sp) * 3);
    margin-top: calc(var(--sp) * 2);
}

.legal-footer {
    background: var(--deep-charcoal);
    padding: calc(var(--sp) * 4) 0;
    text-align: center;
}

.legal-footer p {
    font-size: 12px;
    color: rgba(245, 243, 240, 0.35);
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .legal-main {
        padding: calc(var(--sp) * 6) calc(var(--sp) * 2.5) calc(var(--sp) * 8);
    }

    .legal-title {
        font-size: 24px;
    }

    .legal-section h2 {
        font-size: 18px;
    }
}
