:root {
    --bg: #06080f;
    --bg-elevated: rgba(14, 18, 32, 0.72);
    --border: rgba(148, 163, 184, 0.14);
    --text: #e8edf7;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #a78bfa;
    --accent-glow: rgba(56, 189, 248, 0.35);
    --radius: 16px;
    --header-h: 72px;
    --max-w: 1120px;
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body.loaded .site-main {
    opacity: 1;
}

/* 隐私等内页无 loading 动画，须直接可见 */
body.legal-page .site-main {
    opacity: 1;
    transition: none;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: #7dd3fc;
}

img {
    max-width: 100%;
    height: auto;
}

.site-main {
    opacity: 0;
    transition: opacity 0.6s ease 0.9s;
    position: relative;
    overflow-x: hidden;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(167, 139, 250, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(34, 211, 238, 0.08), transparent),
        var(--bg);
}

.site-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
    pointer-events: none;
}

.container {
    width: min(100% - 40px, var(--max-w));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(6, 8, 15, 0.82);
    border-bottom-color: var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo img {
    display: block;
    height: 40px;
    width: auto;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 14px;
    border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero {
    padding: calc(var(--header-h) + 72px) 0 80px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
}

.hero-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
    margin: 0 auto 20px;
    max-width: 820px;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 45%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    margin: 0 auto 36px;
    max-width: 640px;
    font-size: 17px;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 56px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    color: #041018;
    background: linear-gradient(135deg, #38bdf8, #22d3ee);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    color: #041018;
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.45);
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 880px;
    margin: 0 auto;
}

.metric {
    padding: 20px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
}

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Sections */
.section {
    padding: 88px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-head h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 0 auto;
    max-width: 560px;
    color: var(--text-muted);
    font-size: 16px;
}

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

.card-grid--pillars {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .card-grid--pillars {
        grid-template-columns: repeat(2, 1fr);
    }
}

.industry-block--spaced {
    margin-top: 56px;
}

.industry-head {
    margin-bottom: 24px;
    text-align: center;
}

.industry-head h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.industry-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

.section-fde {
    background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.04) 40%, transparent);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head--fde h2 {
    margin-top: 0;
}

.fde-service-kicker {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
}

.fde-service-intro {
    max-width: 720px;
    font-size: 15px;
    line-height: 1.75;
}

.card-grid--fde {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .card-grid--fde {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid--fde {
        grid-template-columns: 1fr;
    }
}

.card-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
}

.fde-fit {
    margin: 40px auto 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.card {
    padding: 28px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.card-index {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-2);
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stack-item {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(167, 139, 250, 0.04));
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stack-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 16px var(--accent-glow);
}

.stack-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.stack-item span {
    font-size: 13px;
    color: var(--text-muted);
}

.about-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
}

.about-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.about-lead {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.about-panel p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.about-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text);
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0.85;
}

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

.contact-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.contact-card p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-links a {
    font-size: 17px;
    font-weight: 500;
}

/* Footer */
.site-footer {
    padding: 32px 0 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.9;
}

.site-footer a {
    color: var(--text-muted);
    margin: 0 6px;
}

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

.compliance-note {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
}

.compliance-note p {
    margin: 0 auto;
    max-width: 800px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.legal-page .site-header {
    position: sticky;
}

.legal-nav {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
}

.legal-nav ul {
    justify-content: flex-end;
}

.legal-doc {
    padding-top: calc(var(--header-h) + 48px);
}

.legal-doc .section-head h1 {
    font-size: clamp(26px, 4vw, 34px);
    margin-bottom: 8px;
}

.legal-block {
    margin-bottom: 32px;
    text-align: left;
}

.legal-block h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
}

.legal-block p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

.legal-block p:last-child {
    margin-bottom: 0;
}

/* Mobile */
@media (max-width: 900px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .about-panel {
        grid-template-columns: 1fr;
        padding: 28px 22px;
    }
}

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

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        padding: 16px;
        background: rgba(6, 8, 15, 0.96);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(12px);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav a {
        padding: 12px 16px;
        border-radius: 8px;
    }

    .hero {
        padding-top: calc(var(--header-h) + 48px);
    }
}
