/* ===== CSS Variables & Reset ===== */
:root {
    --bg: #0e0e10;
    --surface: #18181c;
    --surface-hover: #1e1e22;
    --text-main: #d8d6d2;
    --text-muted: #847f7a;
    --text-dim: #5c5854;
    --accent: #c4a06a;
    --accent-dim: #9a7e54;
    --accent-soft: rgba(196, 160, 106, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(196, 160, 106, 0.22);
    --radius: 10px;
    --transition: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* ===== Typography & Utilities ===== */
.text-gradient {
    color: var(--accent);
    font-weight: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Solid panel — no glass, no blur */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(196, 160, 106, 0.15);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.badge-accent {
    background: rgba(196, 160, 106, 0.06);
    color: var(--accent);
    border-color: rgba(196, 160, 106, 0.12);
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #0e0e10;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

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

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 5%;
    background: rgba(14, 14, 16, 0.92);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--text-main);
}

.logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

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

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--accent);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 1px;
    background: var(--accent);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: transparent;
    border: 0;
    color: inherit;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    background: var(--bg);
}

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

.footer-logo {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.copyright {
    color: var(--text-dim);
    font-size: 0.83rem;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
.fade-up,
.fade-in {
    opacity: 1;
    transform: none;
}

.js .fade-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.js .fade-up.visible,
.js .fade-in.visible {
    opacity: 1;
    transform: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .js .fade-up,
    .js .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .ecosystem-content {
        grid-template-columns: 1fr;
    }
    .project-top-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .project-header {
        text-align: center;
        margin-bottom: 1rem;
    }
    .project-header .section-subtitle {
        margin: 0 auto !important;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-box {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--surface);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease;
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-cta {
        flex-direction: column;
    }
    .section-title {
        font-size: 1.7rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .contact-box {
        padding: 2rem;
    }
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ===== SVG Icon Utility ===== */
.ico {
    width: 32px;
    height: 32px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ico-sm {
    width: 22px;
    height: 22px;
}

.ico-lg {
    width: 40px;
    height: 40px;
}
