/* =========================================================
   Oneport — Bento Workspace Design System
   Light canvas · rounded surfaces · blue→violet accents
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Canvas & surfaces */
    --canvas: #f8fafc;
    --canvas-deep: #eef2f7;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --surface-tint: #eef4ff;
    --surface-deep: #0f172a;

    /* Ink */
    --ink: #0f172a;
    --body: #475569;
    --muted: #94a3b8;
    --muted-strong: #64748b;
    --on-dark: #e2e8f0;
    --on-dark-muted: #94a3b8;

    /* Brand */
    --blue: #2563eb;
    --blue-deep: #1d4ed8;
    --violet: #7c3aed;
    --amber: #f59e0b;
    --emerald: #10b981;
    --rose: #ef4444;
    --gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);

    /* Lines */
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --line-strong: #cbd5e1;

    /* Type */
    --font-display: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
    --font-body: "Manrope", "Noto Sans SC", "PingFang SC", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    /* Layout */
    --container: 1180px;
    --container-wide: 1240px;
    --nav-height: 66px;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 46px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.12);
    --shadow-blue: 0 12px 30px rgba(37, 99, 235, 0.22);

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 0.18s var(--ease);
    --normal: 0.28s var(--ease);

    /* Back-compat aliases used by a few legacy components */
    --primary: var(--blue);
    --primary-hover: var(--blue-deep);
    --accent-color: var(--blue);
    --accent-light: rgba(37, 99, 235, 0.08);
    --text-primary: var(--ink);
    --text-secondary: var(--body);
    --text-tertiary: var(--muted);
    --bg-primary: var(--canvas);
    --bg-secondary: var(--surface);
    --bg-white: var(--surface);
    --border-color: var(--line);
}

/* ---------- 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.65;
    color: var(--body);
    background-color: var(--canvas);
    background-image:
        radial-gradient(ellipse 70% 48% at 12% -8%, rgba(37, 99, 235, 0.09), transparent 70%),
        radial-gradient(ellipse 55% 44% at 100% 0%, rgba(124, 58, 237, 0.08), transparent 68%),
        radial-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 26px 26px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.docs-theme {
    background-color: var(--canvas);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.012em;
}

p {
    color: var(--body);
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

main {
    padding-top: 104px;
}

::selection {
    background: rgba(37, 99, 235, 0.18);
    color: var(--ink);
}

html[lang="zh"] .hero-title,
html[lang="zh"] .display-title {
    font-size: clamp(2rem, 3.9vw, 3.45rem);
    letter-spacing: -0.03em;
}

/* ---------- Shared layout ---------- */
.container {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

.container-wide {
    width: min(var(--container-wide), calc(100% - 48px));
    margin: 0 auto;
}

.section-block {
    padding: 92px 0;
}

.section-head {
    max-width: 760px;
    margin-bottom: 38px;
}

.section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 9px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: var(--radius-pill);
    background: rgba(37, 99, 235, 0.06);
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.display-title {
    font-size: clamp(2.1rem, 4.4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.display-title .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: clamp(1.65rem, 2.9vw, 2.35rem);
    letter-spacing: -0.03em;
}

.section-lead {
    margin-top: 14px;
    max-width: 64ch;
    color: var(--body);
    font-size: 1rem;
    line-height: 1.75;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform var(--fast), box-shadow var(--fast), background var(--fast), border-color var(--fast), color var(--fast);
}

.btn i {
    font-size: 12px;
    transition: transform var(--fast);
}

.btn:hover i.fa-arrow-right {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Pills & icon bubbles ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.icon-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gradient-soft);
    color: var(--blue);
    font-size: 17px;
    flex-shrink: 0;
}

/* ---------- Header / navigation ---------- */
.site-header {
    position: relative;
    z-index: 1000;
}

.main-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    padding: 12px 20px;
    pointer-events: none;
    transition: padding var(--normal);
}

.nav-container {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    width: min(var(--container), 100%);
    height: var(--nav-height);
    margin: 0 auto;
    padding: 0 14px 0 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background var(--normal), box-shadow var(--normal), border-color var(--normal);
}

.main-nav.scrolled {
    padding-top: 8px;
}

.main-nav.scrolled .nav-container {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--line);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-image {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: auto;
    height: 32px;
}

.logo-brand {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-pill);
    background: rgba(16, 185, 129, 0.07);
    color: #059669;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.nav-links a {
    padding: 8px 13px;
    border-radius: var(--radius-pill);
    color: var(--body);
    font-size: 13.5px;
    font-weight: 650;
    white-space: nowrap;
    transition: color var(--fast), background var(--fast);
}

.nav-links a:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.nav-links a.active {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.nav-cta {
    min-height: 38px;
    padding: 8px 16px;
    font-size: 13px;
}

/* Language switch */
.language-switch {
    position: relative;
}

.language-switch::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--muted-strong);
    font-size: 12.5px;
    font-weight: 650;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.dropdown-trigger:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.dropdown-trigger .fa-globe {
    color: var(--blue);
}

.dropdown-trigger .fa-chevron-down {
    font-size: 9px;
    color: var(--muted);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 152px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--fast), visibility var(--fast), transform var(--fast);
}

.language-switch:hover .dropdown-content,
.language-switch.show .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--body);
    font-size: 13px;
    font-weight: 600;
}

.dropdown-content a:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.dropdown-content a.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue);
}

.lang-code {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--fast), opacity var(--fast);
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 18px 20px 26px;
    background: transparent;
}

.footer-container {
    position: relative;
    width: min(var(--container-wide), 100%);
    margin: 0 auto;
    padding: 52px 48px 32px;
    border-radius: 30px;
    background:
        radial-gradient(ellipse 50% 90% at 8% 0%, rgba(37, 99, 235, 0.22), transparent 62%),
        radial-gradient(ellipse 40% 80% at 100% 0%, rgba(124, 58, 237, 0.2), transparent 60%),
        #0f172a;
    color: var(--on-dark);
    overflow: hidden;
}

.footer-container::after {
    content: "";
    position: absolute;
    inset: auto -80px -160px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.footer-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.7fr) minmax(220px, 0.85fr);
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    width: 34px;
    height: 34px;
    padding: 3px;
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}

.footer-logo-text {
    font-family: var(--font-display);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.footer-description {
    max-width: 330px;
    color: var(--on-dark-muted);
    font-size: 14px;
    line-height: 1.75;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px;
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: var(--radius-pill);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    font-size: 11px;
    font-weight: 700;
}

.footer-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.footer-group-title {
    margin-bottom: 14px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    color: var(--on-dark-muted);
    font-size: 13.5px;
    transition: color var(--fast);
}

.footer-links-list a:hover {
    color: #fff;
}

.footer-contact-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.footer-contact-card .footer-group-title {
    margin-bottom: 12px;
    color: #bfdbfe;
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 11px;
    color: var(--on-dark-muted);
    font-size: 13px;
    line-height: 1.45;
}

.footer-contact-item:last-child {
    margin-bottom: 0;
}

.footer-contact-item strong {
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 22px;
}

.footer-copyright p {
    color: rgba(148, 163, 184, 0.8);
    font-size: 12px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--on-dark-muted);
    font-size: 13px;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.footer-social-link:hover {
    border-color: rgba(147, 197, 253, 0.5);
    background: rgba(37, 99, 235, 0.25);
    color: #fff;
}

/* ---------- Forms ---------- */
.form-input,
.form-select,
.form-textarea,
input[type="email"],
input[type="text"],
input[type="search"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    transition: border-color var(--fast), box-shadow var(--fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="search"]:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

::placeholder {
    color: var(--muted);
}

/* ---------- Utilities ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nav-status {
        display: none;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 11px 14px;
        border-radius: 10px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-container {
        position: relative;
        display: flex;
        align-items: center;
        grid-template-columns: none;
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-links {
        position: absolute;
        grid-column: auto;
    }

    .logo {
        margin-right: auto;
    }

    .nav-right {
        margin-left: auto;
    }

    .nav-cta {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-nav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-contact-card {
        max-width: 360px;
    }
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }

    .container,
    .container-wide {
        width: calc(100% - 32px);
    }

    main {
        padding-top: 92px;
    }

    .main-nav {
        padding: 8px 12px;
    }

    .nav-container {
        height: 58px;
        padding: 0 10px 0 14px;
        border-radius: 16px;
    }

    .logo img {
        height: 27px;
    }

    .logo-brand {
        font-size: 15px;
    }

    .dropdown-trigger #current-lang {
        display: none;
    }

    .section-block {
        padding: 64px 0;
    }

    .site-footer {
        padding: 10px 10px 14px;
    }

    .footer-container {
        padding: 34px 22px 24px;
        border-radius: 22px;
    }

    .footer-nav-grid {
        grid-template-columns: 1fr 1fr;
        gap: 26px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
    }
}

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

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}
