/* ==========================================
   Keeplove.ai - 主样式表
   文件: style.css
   ========================================== */

/* ---------- 基础重置与变量 ---------- */
:root {
    --logo-pink: #FF85A1;
    --logo-blue: #2DA8F8;
    --deep-pink: rgb(166, 55, 113);
    --text-primary: #1F1F1F;
    --text-secondary: #6B5B4A;
    --bg-cream: #FFFBF7;
    --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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
/* 保险：确保关键内容立即显示，不受动画影响 */
.headline, .subheadline, .button-group, .user-avatars, .feature-card {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Serif SC', serif;
    background: linear-gradient(135deg, #FFFBF7 0%, #FDF8F3 50%, #FFF9F2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- 布局工具类 ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.items-center {
    align-items: center;
}

.items-baseline {
    align-items: baseline;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* ---------- 背景装饰 ---------- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    transition: all 0.8s ease;
    z-index: 0;
}

.glow-1 {
    top: 10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.12) 0%, rgba(45, 168, 248, 0.05) 50%, transparent 70%);
}

.glow-2 {
    bottom: 20%;
    left: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 168, 248, 0.1) 0%, transparent 70%);
}

/* ---------- Canvas 背景 ---------- */
#networkCanvas {
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%);
    width: 800px;
    height: 800px;
    z-index: 0;
    opacity: 0.9;
    pointer-events: none;
    /* 关键修复：防止 Canvas 影响文档流和滚动 */
    overflow: hidden;
    contain: strict; /* 性能优化 + 隔离布局 */
}

/* ---------- 导航栏 ---------- */
.nav-glass {
    background: rgba(255, 251, 247, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 107, 157, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    padding: 0.75rem 0;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 48px;
}

.logo-container:hover {
    transform: scale(1.03);
}

.logo-svg {
    height: 46px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(255, 107, 157, 0.2));
    transition: all 0.3s ease;
}

.logo-container:hover .logo-svg {
    filter: drop-shadow(0 4px 10px rgba(255, 107, 157, 0.3));
}

.logo-text-base {
    font-family: 'Fredoka', 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #2C3E50 0%, #1a1a1a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.logo-text-dot {
    color: rgb(166, 55, 113) !important;
    -webkit-text-fill-color: rgb(166, 55, 113) !important;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-left: 1px;
}

/* 导航链接 */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #ec4899;
}

.nav-link.active {
    color: #ec4899;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #f472b6, #60a5fa);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* 搜索框 */
.search-input {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 9999px;
    padding: 0.6rem 1.2rem;
    padding-left: 2.5rem;
    width: 200px;
    font-size: 0.9rem;
    transition: all 0.3s;
    outline: none;
    color: #374151;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 107, 157, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

/* 按钮 */
.btn-primary {
    background: linear-gradient(135deg, #f472b6 0%, #60a5fa 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(244, 114, 182, 0.3);
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}





/* ---------- Hero 区域 ---------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 60px;
    /* 关键修复：创建新的层叠上下文，防止 Canvas 干扰 */
    isolation: isolate;
    /* 防止水平滚动条 */
    overflow-x: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 85vh;
    padding-top: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 10; /* 确保在 Canvas 之上 */
    /* 关键修复：明确列宽，防止 Canvas 挤压 */
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr; /* 明确两等宽列 */
        gap: 3rem;
    }
    
    /* 确保左侧内容不被挤压 */
    .hero-content {
        min-width: 0; /* 防止内容溢出 */
        max-width: 100%;
    }
}
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.space-y-4 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 文字样式 */
.headline {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #2C2C2C 0%, #4A4A4A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0;
    max-width: 32rem;
    line-height: 1.7;
}

/* 按钮组 */
.button-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B6B 100%);
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 123, 53, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 123, 53, 0.4), 0 0 0 4px rgba(255, 123, 53, 0.1);
}

.cta-button:hover::before {
    left: 100%;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.text-btn {
    color: #4b5563;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
    padding: 0;
}

.text-btn:hover {
    color: #ec4899;
}

.arrow-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s;
}

.text-btn:hover .arrow-icon {
    transform: translateX(0.25rem);
}

/* 用户头像 */
.user-avatars {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
}

.avatar-group {
    display: flex;
    margin-left: -0.5rem;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -0.5rem;
    display: block;
}

.avatar-group .avatar:first-child {
    background: #fdf2f8;
}

.avatar-group .avatar:nth-child(2) {
    background: #eff6ff;
}

.avatar-group .avatar:nth-child(3) {
    background: #fdf2f8;
}

.user-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.user-count strong {
    color: #1f2937;
    font-weight: 600;
}

/* ---------- 特性卡片网格 ---------- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 5rem;
    margin-top: 2.5rem;
}

/* ---------- 特性卡片 ---------- */
.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(255, 107, 157, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.1), 0 0 0 1px rgba(255, 107, 157, 0.15);
}

.card-illustration {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.05) 0%, rgba(45, 168, 248, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-illustration::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,107,157,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.feature-card:hover .card-illustration::before {
    opacity: 1;
}

.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-number {
    position: absolute;
    top: -30px;
    right: 1.5rem;
    font-size: 6rem;
    font-weight: 700;
    color: rgba(255, 107, 157, 0.08);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    z-index: 0;
    transition: all 0.4s ease;
}

.feature-card:hover .card-number {
    color: rgba(255, 107, 157, 0.15);
    transform: scale(1.1);
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 107, 157, 0.08);
    border-radius: 9999px;
    font-size: 0.8rem;
    color: #FF6B9D;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    z-index: 1;
    position: relative;
}

.card-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
    z-index: 1;
    margin-top: 0;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF85A1, #2DA8F8);
    transition: width 0.4s ease;
}

.feature-card:hover .card-title::after {
    width: 100%;
}

.card-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    z-index: 1;
    position: relative;
    margin: 0;
}

/* SVG 动画元素 */
.svg-element {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.feature-card:hover .svg-element {
    transform: scale(1.05);
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

.connecting-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.5s ease;
}

.feature-card:hover .connecting-line {
    stroke-dashoffset: 0;
}

.particle {
    animation: particleFloat 8s linear infinite;
}

.rotate-slow {
    animation: rotate 20s linear infinite;
}

/* 动画关键帧 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; filter: blur(0px); }
    50% { opacity: 1; filter: blur(2px); }
}

@keyframes particleFloat {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(20px, -40px); opacity: 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 卡片2的特殊旋转 */
.card-illustration .svg-element[style*="center"] {
    animation: rotate 15s linear infinite reverse;
}

/* ---------- 滚动提示 ---------- */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

.scroll-arrow {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ---------- 入场动画 ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---------- 响应式断点 ---------- */
@media (min-width: 768px) {
    .hidden.md\:flex {
        display: flex;
    }
    
    .hidden.md\:block {
        display: block;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem;
    }
    
    .hero-content {
        padding-right: 3rem;
    }
    
    .hidden.lg\:block {
        display: block;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1023px) {
    #networkCanvas {
        opacity: 0.4;
        width: 100%;
        right: 0;
    }
    
    .card-illustration {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .logo-svg {
        height: 38px;
    }
    
    .logo-text-base,
    .logo-text-dot {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .logo-container {
        gap: 0.5rem;
    }
    
    .logo-svg {
        height: 32px;
    }
    
    .logo-text-base,
    .logo-text-dot {
        font-size: 1.25rem;
    }
    
    .headline {
        font-size: 2.5rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}