:root {
    --bg-deep: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --stroke: rgba(15, 23, 42, 0.12);
    --stroke-strong: rgba(15, 23, 42, 0.18);
    --text: #0f172a;
    --text-muted: rgba(15, 23, 42, 0.72);
    --accent: #34d399;
    --accent-dim: rgba(52, 211, 153, 0.15);
    --accent-glow: rgba(52, 211, 153, 0.35);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --nav-h: 72px;
}

html {
    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif;
}

html.font-webfont {
    --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC',
        'Microsoft YaHei', '微软雅黑', sans-serif;
}

html[data-ui-lang="zh"] .i18n-en { display: none !important; }
html[data-ui-lang="en"] .i18n-zh { display: none !important; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(52, 211, 153, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(56, 189, 248, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(167, 139, 250, 0.06), transparent);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.noise {
    position: absolute;
    inset: 0;
    opacity: 0.012;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--stroke);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #22c55e);
    box-shadow: 0 8px 24px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.125rem;
    line-height: 1;
}

.brand-text {
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--stroke);
    background: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-card-hover);
    border-color: var(--stroke-strong);
}

.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lang-toggle {
    display: inline-flex;
    border-radius: var(--radius-pill);
    border: 1px solid var(--stroke-strong);
    overflow: hidden;
    font-family: var(--font);
}

.lang-toggle button {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.lang-toggle button:hover {
    color: var(--text);
    background: var(--bg-card);
}

.lang-toggle button[aria-pressed="true"] {
    background: var(--accent-dim);
    color: var(--accent);
}

.main-content {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--nav-h) + 2.5rem);
    padding-bottom: 5rem;
    padding-left: clamp(1.25rem, 4vw, 2.5rem);
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
    max-width: 1120px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: var(--accent-dim);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text);
}

/* 一行：Beself + 小字号版本号，随区块居中（.hero-section text-align） */
.hero-title-line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35em;
    flex-wrap: nowrap;
}

.hero-version {
    font-size: 0.38em;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    line-height: 1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    color: var(--text-muted);
    font-weight: 450;
    max-width: 28rem;
    margin: 0 auto 1.75rem;
    line-height: 1.65;
}

.download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 0.75rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.35rem;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--stroke-strong);
    background: var(--bg-card);
    color: var(--text);
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    background: var(--bg-card-hover);
    border-color: rgba(52, 211, 153, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.btn-download--primary {
    background: linear-gradient(135deg, #34d399, #22c55e);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-download--primary:hover {
    box-shadow: 0 10px 24px rgba(52, 211, 153, 0.3);
}

.btn-download svg { flex-shrink: 0; opacity: 0.9; }

.download-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 26rem;
    margin: 0 auto;
    line-height: 1.5;
}

.download-hint code {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.8em;
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--stroke);
}

.carousel-container {
    width: 100%;
    margin: clamp(2rem, 4vw, 3rem) 0;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: min(56vw, 420px);
    min-height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

.carousel-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.slide-placeholder h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-shadow: none;
}

.slide-placeholder p {
    font-size: 0.875rem;
    color: rgba(15, 23, 42, 0.82);
    max-width: 20rem;
    line-height: 1.5;
    text-shadow: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--stroke-strong);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    z-index: 20;
    transition: background 0.2s, border-color 0.2s;
}

.carousel-btn:hover {
    background: rgba(52, 211, 153, 0.2);
    border-color: rgba(52, 211, 153, 0.4);
}

.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: width 0.3s, background 0.3s;
    border: none;
    padding: 0;
}

.carousel-indicator.active {
    width: 24px;
    background: var(--accent);
}

/* 新特性：轮播与产品说明之间；四张特性卡片，沿用绿色浅色风格 */
.feature-section {
    width: 100%;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.feature-section h2.section-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2.4vw, 1.5rem);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 640px) {
    .feature-grid { grid-template-columns: 1fr; }
}

/* 产品说明：与轮播同宽，几乎无额外样式，便于只改 HTML 文案 */
.product-section {
    width: 100%;
    margin: 0 auto 2rem;
}

.product-section h2.section-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.product-copy {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.75;
}

.product-copy h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.product-copy h3:first-child { margin-top: 0; }

.product-copy p { margin: 0 0 0.75rem; }

.product-copy ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.product-copy li { margin-bottom: 0.35rem; }

.site-footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

@media (max-width: 640px) {
    .navbar {
        height: 64px;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .nav-actions {
        gap: 0.35rem;
    }
    .lang-toggle button {
        padding: 0.35rem 0.5rem;
    }
    .nav-link {
        font-size: 0.8125rem;
        padding: 0.4rem 0.65rem;
    }
    .carousel-btn { width: 38px; height: 38px; }
    .download-row { flex-direction: column; }
    .btn-download { width: 100%; }
}
