/* ==============================================================================
   Huaxi Technologies Official Website Stylesheet
   ============================================================================== */

:root {
    /* Color Palette */
    --bg-dark: 224 28% 6%;          /* #070a11 */
    --bg-deep: 224 35% 4%;          /* #030509 */
    
    --accent-purple: 263 90% 64%;   /* #8b5cf6 */
    --accent-blue: 217 91% 60%;     /* #3b82f6 */
    --accent-cyan: 190 95% 50%;     /* #06b6d4 */
    --accent-emerald: 160 84% 48%;  /* #10b981 */
    
    --text-primary: 210 40% 98%;    /* #f8fafc */
    --text-muted: 215 15% 65%;      /* #94a3b8 */
    --text-dark: 215 15% 45%;       /* #64748b */
    
    /* Glassmorphism System */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.5s var(--ease-out-expo);
}

/* Global Reset */
html {
    scroll-behavior: smooth;
}

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

body {
    background-color: hsl(var(--bg-dark));
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    color: hsl(var(--text-primary));
    font-family: 'Outfit', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==============================================================================
   Components: Buttons & Badges
   ============================================================================== */
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: hsl(var(--accent-purple));
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.05);
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, hsl(var(--accent-purple)) 0%, hsl(var(--accent-blue)) 100%);
    border: none;
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: hsl(var(--text-primary));
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==============================================================================
   Layout: Header
   ============================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background-color: rgba(7, 10, 17, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 8px;
    mix-blend-mode: screen;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(135deg, hsl(var(--accent-purple)) 0%, hsl(var(--accent-cyan)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-weight: 300;
    color: hsl(var(--text-primary));
    -webkit-text-fill-color: hsl(var(--text-primary));
    margin-left: 2px;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    color: hsl(var(--text-muted));
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 6px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, hsl(var(--accent-purple)), hsl(var(--accent-cyan)));
    transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: hsl(var(--text-primary));
}

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

/* ==============================================================================
   Layout: Hero Section
   ============================================================================== */
.hero-section {
    position: relative;
    height: 95vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    overflow: hidden;
}

.hero-glow-1, .hero-glow-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.45;
}

.hero-glow-1 {
    width: 400px;
    height: 400px;
    background: hsl(var(--accent-purple));
    top: 15%;
    left: 10%;
}

.hero-glow-2 {
    width: 450px;
    height: 450px;
    background: hsl(var(--accent-blue));
    bottom: 10%;
    right: 10%;
}

.hero-container {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s var(--ease-out-expo);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, hsl(var(--text-primary)) 40%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: hsl(var(--text-muted));
    margin-bottom: 40px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ==============================================================================
   Layout: Section General Header
   ============================================================================== */
.section-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, hsl(var(--text-primary)) 50%, hsl(var(--text-muted)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: hsl(var(--text-muted));
    font-size: 1.05rem;
    font-weight: 300;
}

/* ==============================================================================
   Layout: Services Section
   ============================================================================== */
.services-section {
    background-color: hsl(var(--bg-deep));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 15px 40px var(--glass-shadow);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 45px rgba(0,0,0,0.7), 0 0 25px rgba(139, 92, 246, 0.15);
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--accent-purple));
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon-wrapper {
    color: white;
    background: linear-gradient(135deg, hsl(var(--accent-purple)) 0%, hsl(var(--accent-blue)) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.service-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.service-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: hsl(var(--text-primary));
}

.service-desc {
    font-size: 0.92rem;
    color: hsl(var(--text-muted));
    line-height: 1.6;
}

/* ==============================================================================
   Layout: About Us Section
   ============================================================================== */
.about-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    background: linear-gradient(135deg, hsl(var(--text-primary)) 50%, hsl(var(--text-muted)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-p {
    color: hsl(var(--text-muted));
    font-size: 1rem;
    margin-bottom: 24px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, hsl(var(--accent-purple)) 0%, hsl(var(--accent-cyan)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.82rem;
    color: hsl(var(--text-dark));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* About Visual block: Code editor simulation */
.about-visual-block {
    display: flex;
    justify-content: center;
}

.visual-card {
    width: 100%;
    max-width: 440px;
    background: rgba(3, 5, 9, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 45px var(--glass-shadow);
}

.visual-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.visual-header .circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.visual-header .circle.red { background-color: #ef4444; }
.visual-header .circle.yellow { background-color: #f59e0b; }
.visual-header .circle.green { background-color: #10b981; }

.visual-code-lines {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.8;
}

.visual-code-lines .keyword { color: #f43f5e; }
.visual-code-lines .string { color: #10b981; }
.visual-code-lines .function { color: #38bdf8; }

/* ==============================================================================
   Layout: Contact & Form Section
   ============================================================================== */
.contact-section {
    background-color: hsl(var(--bg-deep));
}

.contact-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px var(--glass-shadow);
}

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

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: hsl(var(--text-muted));
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 18px;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: hsl(var(--accent-purple));
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.alert-success {
    display: none; /* Hidden by default */
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: hsl(var(--accent-emerald));
    padding: 24px;
    border-radius: 16px;
    margin-top: 30px;
    animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

.alert-success h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.alert-success p {
    font-size: 0.88rem;
    color: hsl(var(--text-muted));
}

/* ==============================================================================
   Layout: Footer
   ============================================================================== */
#main-footer {
    border-top: 1px solid var(--glass-border);
    background-color: hsl(var(--bg-deep));
    padding: 40px 24px;
    text-align: center;
}

.footer-copy {
    font-size: 0.9rem;
    color: hsl(var(--text-muted));
    margin-bottom: 6px;
}

.footer-desc {
    font-size: 0.78rem;
    color: hsl(var(--text-dark));
}

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

/* ==============================================================================
   Responsive Queries
   ============================================================================== */
@media (max-width: 992px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .about-visual-block {
        order: -1; /* Display code visual first on mobile */
    }
}

@media (max-width: 768px) {
    .nav-links, .header-action {
        display: none; /* Simplified header for mobile */
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 24px;
    }
}
