/* ============================================================
   023 - 加拿大2.8预测 SaaS Landing Page
   自定义样式 (Tailwind CSS + 自定义扩展)
   ============================================================ */

/* === 全局变量 === */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --bg-light: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* === 基础重置 === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === 导航栏 === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar .nav-link {
    position: relative;
    font-weight: 500;
    color: #475569;
    transition: color 0.3s ease;
    text-decoration: none;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--primary);
}

.navbar .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* 移动端汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 2.5px 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 5rem 2rem 2rem;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu a:hover {
    background: #eef2ff;
    color: var(--primary);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* === Hero Section === */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 30%, #f0f9ff 70%, #ecfeff 100%);
    overflow: hidden;
    padding-top: 5rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.2);
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 560px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-image-wrapper {
    position: relative;
    animation: fadeInRight 0.8s ease 0.3s both;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.15;
    filter: blur(20px);
}

.hero-image-wrapper img {
    position: relative;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
}

/* Floating stats cards */
.hero-float-card {
    position: absolute;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: floatCard 4s ease-in-out infinite;
}

.hero-float-card.card-1 {
    bottom: 60px;
    left: -50px;
    animation-delay: 0s;
}

.hero-float-card.card-2 {
    top: 40px;
    right: -30px;
    animation-delay: 2s;
    animation-duration: 5s;
}

/* === Features Section === */
.features-section {
    background: white;
    position: relative;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon.indigo {
    background: #eef2ff;
    color: var(--primary);
}

.feature-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.feature-icon.cyan {
    background: #ecfeff;
    color: #0891b2;
}

.feature-icon.green {
    background: #f0fdf4;
    color: #16a34a;
}

.feature-icon.purple {
    background: #faf5ff;
    color: #9333ea;
}

.feature-icon.orange {
    background: #fff7ed;
    color: #ea580c;
}

/* === Stats Section === */
.stats-section {
    background: var(--secondary);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* === Testimonials Section === */
.testimonials-section {
    background: white;
}

.testimonial-card {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-4px);
}

.testimonial-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

/* === FAQ Section === */
.faq-section {
    background: var(--bg-light);
}

.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #c7d2fe;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.cta-btn-primary {
    background: white;
    color: var(--primary);
    padding: 0.9rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-btn-outline {
    background: transparent;
    color: white;
    padding: 0.9rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* === Footer === */
.footer-section {
    background: #0f172a;
    color: #cbd5e1;
}

.footer-heading {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer-link:hover {
    color: white;
    transform: translateX(4px);
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.08);
}

/* === 回到顶部按钮 === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* === 动画关键帧 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* === 滚动动画 === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* === 响应式 === */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-float-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-desc {
        font-size: 1rem;
    }
    .hero-section {
        text-align: center;
    }
    .hero-desc {
        margin: 0 auto;
    }
    .stat-number {
        font-size: 2rem;
    }
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.65rem;
    }
    .cta-btn-primary,
    .cta-btn-outline {
        width: 100%;
        justify-content: center;
    }
}
