/* ==========================================
   友一家科技 - 企业展示网站样式表
   ========================================== */

/* CSS Variables */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --accent-light: #67e8f9;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-hero: linear-gradient(135deg, #0c0a2e 0%, #1a1450 50%, #0d2137 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-700);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.logo-text {
    font-size: 22px;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 10px;
    color: var(--accent-light);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: 1px;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(79, 70, 229, 0.4);
    border-radius: 50px;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: clamp(16px, 2vw, 19px);
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

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

.btn-white {
    background: var(--white);
    color: var(--primary);
}

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

.btn-sm {
    padding: 10px 24px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelScroll 1.5s infinite;
}

@keyframes wheelScroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 22px; }
}

/* ==========================================
   Section Common Styles
   ========================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    padding: 6px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.section-subtitle {
    font-size: 17px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   About Section
   ========================================== */
.about-section {
    background: var(--gray-100);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.about-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.about-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.about-icon svg {
    width: 28px;
    height: 28px;
    color: var(--white);
}

.about-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.about-card p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
}

/* ==========================================
   Services Section
   ========================================== */
.services-section {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

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

.service-card.featured {
    background: var(--gradient-dark);
    border-color: transparent;
    color: var(--white);
}

.service-card.featured h3 {
    color: var(--white);
}

.service-card.featured p,
.service-card.featured .service-list li {
    color: rgba(255,255,255,0.7);
}

.service-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.service-card.featured .service-number {
    color: var(--accent);
}

.service-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-card.featured .service-icon-wrap {
    background: rgba(6, 182, 212, 0.2);
}

.service-icon-wrap svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.service-card.featured .service-icon-wrap svg {
    color: var(--accent);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.service-list li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.service-card.featured .service-list li::before {
    color: var(--accent);
}

/* ==========================================
   Products Section
   ========================================== */
.products-section {
    background: var(--gray-100);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-icon {
    font-size: 56px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.product-info {
    padding: 24px;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-info p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 12px;
}

.product-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.product-features span {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}

/* ==========================================
   Cases Section
   ========================================== */
.cases-section {
    background: var(--white);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.case-card {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.case-content {
    padding: 32px;
}

.case-industry {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.case-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.case-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.case-metrics {
    display: flex;
    gap: 24px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 28px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 12px;
    color: var(--gray-500);
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    background: var(--gradient-primary);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    background: var(--gray-100);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-wrap svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contact-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 14px;
    color: var(--gray-600);
}

.contact-form-wrap {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark);
    transition: var(--transition);
    background: var(--gray-100);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

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

.form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--dark);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    line-height: 1.8;
}

.footer-links h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a, .footer-links li {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

.footer-bottom a {
    color: var(--accent-light);
}

/* ==========================================
   Animations
   ========================================== */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .services-grid,
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .about-grid,
    .services-grid,
    .cases-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .section {
        padding: 64px 0;
    }
}
