/* ===================================================
   home.css — 首页专属样式
   核力科技（上海）有限公司
   
   包含：Hero、Stats、Services、About、Products、Contact、
         表单、打字机效果、响应式布局
   不含：Header、Nav、Mobile Nav、Footer、Loader、Back-to-Top
         （这些已在 shared.css 中）
   =================================================== */

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(180deg, #0a1628 0%, #0f2847 50%, #1a365d 100%);
    overflow: hidden;
}

/* 科技感背景网格 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

/* 光晕效果 */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.2) 0%, rgba(0, 212, 170, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 102, 255, 0.2);
    color: #00D4AA;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00D4AA;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #00D4AA 50%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid #E2E8F0;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---------- Hero Visual / AI Demo ---------- */
.hero-visual {
    position: relative;
    animation: fadeInUp 1s ease 0.3s backwards;
}

.hero-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.ai-demo {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-demo-header {
    padding: 1rem;
    background: var(--dark);
    display: flex;
    gap: 0.5rem;
}

.ai-demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ai-demo-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 16px;
    font-size: 0.875rem;
    animation: messageIn 0.5s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

.ai-message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message.ai {
    align-self: flex-start;
    background: white;
    border: 1px solid #E2E8F0;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ---------- Typewriter Cursor ---------- */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #00D4AA;
    margin-left: 2px;
    animation: blink-cursor 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- Stats Section ---------- */
.stats {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #1a365d 0%, #0f172a 100%);
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.stats-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00D4AA 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* ---------- Services Section ---------- */
.services {
    padding: 6rem 2rem;
    background: #0f172a;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    background: rgba(0, 212, 170, 0.1);
    color: #00D4AA;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
}

.section-desc {
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.15);
    border-color: rgba(0, 102, 255, 0.3);
}

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

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2) 0%, rgba(0, 212, 170, 0.2) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.service-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-features li::before {
    content: '✓';
    color: #00D4AA;
    font-weight: 700;
}

/* ---------- About Section ---------- */
.about {
    padding: 6rem 2rem;
    background: white;
}

.about-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.about-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about-list-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.about-visual {
    position: relative;
}

.about-card {
    background: var(--gradient-2);
    border-radius: 24px;
    padding: 3rem;
    color: white;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.about-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.about-metric {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.about-metric-value {
    font-size: 2rem;
    font-weight: 900;
}

.about-metric-label {
    opacity: 0.8;
    font-size: 0.875rem;
}

/* ---------- Products Section ---------- */
.products {
    padding: 6rem 2rem;
    background: var(--dark);
    color: white;
}

.products .section-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
}

.products .section-title {
    color: white;
}

.products .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

.products-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.product-card {
    background: var(--dark-light);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
}

.product-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Contact Section ---------- */
.contact {
    padding: 6rem 2rem;
    background: var(--light);
}

.contact-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-item-content h4 {
    font-weight: 600;
    color: var(--dark);
}

.contact-item-content p {
    color: var(--gray);
    margin: 0;
    font-size: 0.9rem;
}

.contact-form {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

/* ---------- Form Styles ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group label.required::after {
    content: ' *';
    color: #EF4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #10B981;
}

.form-group input.valid:focus,
.form-group textarea.valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #EF4444;
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    min-height: 1.2em;
    transition: all 0.2s ease;
}

.form-hint.error {
    color: #EF4444;
}

.form-hint.success {
    color: #10B981;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.captcha-row input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
}

.captcha-img {
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
}

.captcha-img:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* ---------- 表单内联提示 ---------- */
.form-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    transition: opacity 0.3s ease;
    text-align: center;
}

.form-message-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.form-message-success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

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

    .stats-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .contact-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .stats-inner {
        grid-template-columns: 1fr;
    }

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

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

/* ==================== 提交成功卡片 ==================== */
.contact-success {
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeInUp 0.4s ease;
}

.contact-success-icon {
    margin-bottom: 0.5rem;
}

.contact-success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.contact-success-text {
    font-size: 1rem;
    color: #64748B;
    margin: 0;
    line-height: 1.6;
}

.contact-success-btn {
    margin-top: 0.5rem;
    cursor: pointer;
    padding: 0.6rem 2rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: transparent;
    color: #1E293B;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.contact-success-btn:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}
