/* ============================================
   花阳科技 - Hua Yang Technology
   Professional Design System (OLED Dark Mode)
   Inspired by UI UX Pro Max
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700;800&family=Roboto+Mono:wght@300;400;500&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
    /* Colors - OLED Optimized */
    --bg-black: #000000;
    --bg-dark-grey: #121212;
    --bg-midnight: #0A0E1A;
    --bg-card: #0D0D0D;

    --primary: #0EA5E9;
    /* Sky Blue - Trust */
    --primary-glow: rgba(14, 165, 233, 0.4);
    --secondary: #38BDF8;
    --accent: #00FFFF;
    /* Neon Cyan - Tech */
    --cta: #F97316;
    /* Orange - Action */
    --cta-glow: rgba(249, 115, 22, 0.3);

    --text-pure: #FFFFFF;
    --text-primary: #E0E0E0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 255, 255, 0.3);

    /* Typography */
    --font-header: 'Exo', sans-serif;
    --font-data: 'Roboto Mono', monospace;
    --font-base: 'Noto Sans SC', sans-serif;

    /* Spacing / Metrics - Mathematical Ratios */
    --header-height: 80px;
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: var(--bg-black);
    color: var(--text-primary);
    font-family: var(--font-base);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Consistent Cursor Pointer Policy */
a,
button,
.clickable,
.nav-toggle,
.partner-logo,
.service-card {
    cursor: pointer !important;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-header);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.mono {
    font-family: var(--font-data);
}

/* ---------- Layout Utilities ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    /* Responsive Padding: Result 1 */
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* ---------- Header & Nav ---------- */
.header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1200px;
    height: 64px;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    top: 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border-top: none;
    background: rgba(0, 0, 0, 0.95);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 2.5rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent);
}

/* ---------- Hero Section ---------- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 70% 30%, var(--primary-glow) 0%, transparent 60%),
        url('../assets/images/hero_bg.png') center/cover no-repeat;
    opacity: 0.4;
    filter: brightness(0.6) saturate(1.2);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-black) 0%, transparent 50%);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    font-family: var(--font-header);
}

.btn-cta {
    background: var(--cta);
    color: #fff;
    box-shadow: 0 0 20px var(--cta-glow);
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--cta-glow);
}

.btn-outline {
    border: 1px solid var(--border-subtle);
    color: #fff;
    margin-left: 1rem;
}

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

/* ---------- Bento Grid (Features) ---------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
    padding: 5rem 0;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.bento-item:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.1);
}

.bento-1 {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-2 {
    grid-column: span 2;
}

/* ... (remaining bento items) */

.bento-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

/* ---------- Partners Section ---------- */
.partners {
    padding: 5rem 0;
    text-align: center;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.partner-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: var(--transition);
}

.partner-card:hover {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
}

/* ---------- Skeleton Loader Placeholder ---------- */
.skeleton {
    background: linear-gradient(90deg, #121212 25%, #1a1a1a 50%, #121212 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ---------- Reveal Animations ---------- */
.reveal {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

.js-enabled .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;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-1 {
        grid-column: span 2;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    /* Mobile menu logic in main.js */

    .hero {
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .btn-outline {
        margin-left: 0;
    }

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

    .bento-1,
    .bento-2 {
        grid-column: span 1;
    }

    .hero-stats {
        justify-content: center;
        gap: 2rem !important;
    }
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-dark-grey);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ---------- Marquee Animation ---------- */
.marquee-container {
    overflow: hidden;
    padding: 3rem 0;
    position: relative;
    white-space: nowrap;
}

.marquee-content {
    display: inline-flex;
    animation: marquee 30s linear infinite;
    gap: 4rem;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 80px;
    filter: brightness(1);
    transition: var(--transition);
    opacity: 1;
}

.marquee-item:hover {
    transform: scale(1.1);
}

.marquee-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ---------- Utilities ---------- */
.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-family: var(--font-data);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    text-align: center;
    display: block;
}