/* Bento Grid Design System — 智跨云 */

:root {
    --bg-page: #f2f1ed;
    --bg-card: #ffffff;
    --bg-dark: #1a1a1e;
    --bg-dark-card: #28282d;
    --bg-dark-subtle: #222226;
    --bg-frosted: rgba(242, 241, 237, 0.72);

    --coral: #ff6b6b;
    --coral-soft: #fff1f1;
    --mint: #40c057;
    --mint-soft: #ebfbee;
    --ocean: #339af0;
    --ocean-soft: #e7f5ff;
    --violet: #7950f2;
    --violet-soft: #f3f0ff;
    --amber: #fab005;
    --amber-soft: #fff9db;
    --rose: #e64980;
    --rose-soft: #fff0f6;
    --teal: #20c997;
    --teal-soft: #e6fcf5;

    --text-primary: #1a1a1e;
    --text-secondary: #6b6b70;
    --text-tertiary: #9e9ea3;
    --text-on-dark: #f2f1ed;
    --text-on-dark-secondary: #a5a5aa;
    --text-white: #ffffff;

    --border-color: #e5e4e0;
    --border-light: #eeedea;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.12);
    --shadow-bento: 0 1px 1px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-bento-hover: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);

    --font-display: 'Outfit', 'Noto Sans SC', -apple-system, sans-serif;
    --font-body: 'Outfit', 'Noto Sans SC', -apple-system, sans-serif;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-2xl: 96px;
    --space-3xl: 128px;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-normal: 0.35s var(--ease-out);
    --transition-slow: 0.5s var(--ease-out);

    --nav-height: 72px;
    --container-max: 1200px;
    --container-wide: 1400px;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========== NAVIGATION — Frosted Glass ========== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--bg-frosted);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}
.nav-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; }
.logo-image {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--transition-fast);
}
.logo-image:hover { opacity: 0.7; }
.logo img { height: 36px; width: auto; }
.logo-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.04);
}
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-xs);
}

.nav-right { display: flex; align-items: center; }

.language-switch { position: relative; }
.language-switch::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}
.dropdown-trigger:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}
.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 150px;
    overflow: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s var(--ease-out);
}
.language-switch:hover .dropdown-content,
.language-switch.show .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.dropdown-content a:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}
.dropdown-content a.active {
    color: var(--violet);
    background: var(--violet-soft);
}
.lang-text { font-weight: 500; }
.lang-code { font-size: 12px; opacity: 0.6; }

/* ========== FOOTER — Dark Bento ========== */
footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(121,80,242,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.footer-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 80px var(--space-lg) 48px;
    position: relative;
}
.footer-main {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.footer-logo img { height: 32px; width: auto; filter: brightness(1.5); }
.footer-logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-on-dark);
}
.footer-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-on-dark-secondary);
    max-width: 340px;
}
.footer-group { display: flex; flex-direction: column; gap: 14px; }
.footer-group-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-on-dark-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.footer-links-list { display: flex; flex-direction: column; gap: 12px; }
.footer-links-list li a {
    font-size: 14px;
    color: var(--text-on-dark-secondary);
    transition: color var(--transition-fast);
    display: inline-block;
}
.footer-links-list li a:hover { color: var(--text-on-dark); }
.footer-contact-item {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-on-dark-secondary);
}
.footer-contact-item strong {
    color: var(--text-on-dark);
    font-weight: 600;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-copyright { font-size: 13px; color: var(--text-on-dark-secondary); }
.footer-social { display: flex; align-items: center; gap: 12px; }
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06);
    color: var(--text-on-dark-secondary);
    font-size: 16px;
    transition: all var(--transition-fast);
}
.footer-social-link:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-on-dark);
    transform: translateY(-2px);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    height: 48px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1;
}
.btn i { font-size: 13px; transition: transform var(--transition-fast); }
.btn:hover i { transform: translateX(3px); }

.btn-primary {
    background: var(--text-primary);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(26,26,30,0.2);
}
.btn-primary:hover {
    background: #333338;
    box-shadow: 0 6px 20px rgba(26,26,30,0.25);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--text-tertiary);
    background: var(--bg-card);
    transform: translateY(-1px);
}
.btn-large {
    height: 56px;
    padding: 0 36px;
    font-size: 16px;
}

/* ========== BENTO CARD BASE ========== */
.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-bento);
}
.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-bento-hover);
}
.bento-card.card-coral { background: var(--coral-soft); }
.bento-card.card-mint { background: var(--mint-soft); }
.bento-card.card-ocean { background: var(--ocean-soft); }
.bento-card.card-violet { background: var(--violet-soft); }
.bento-card.card-amber { background: var(--amber-soft); }
.bento-card.card-rose { background: var(--rose-soft); }
.bento-card.card-teal { background: var(--teal-soft); }
.bento-card.card-dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

/* ========== SECTION HELPERS ========== */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--violet);
    background: var(--violet-soft);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}
.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    text-wrap: balance;
}
.section-desc {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 560px;
}

/* ========== MARQUEE ========== */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
    gap: var(--space-lg);
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== UTILITIES ========== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

main { padding-top: var(--nav-height); }

/* ========== RESPONSIVE ========== */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
}
.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px auto;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 1024px) {
    :root {
        --nav-height: 64px;
    }
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .nav-container { padding: 0 var(--space-md); }
    .container, .container-wide { padding: 0 var(--space-md); }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
    .mobile-menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-frosted);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: var(--space-sm);
        flex-direction: column;
        gap: 4px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); }
    .nav-right { margin-right: 8px; }

    .footer-container { padding: 56px var(--space-md) 36px; }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-bottom: 36px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .btn { width: 100%; height: 52px; }
    .container, .container-wide { padding: 0 var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
