@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
    --bg: #080808;
    --bg-surface: #111111;
    --bg-elevated: #1a1a1a;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text-1: #ffffff;
    --text-2: #888888;
    --text-3: #484848;
    --accent: #7c3aed;
    --accent-dim: rgba(124, 58, 237, 0.08);
    --accent-border: rgba(124, 58, 237, 0.25);
    --green: #22c55e;
    --red: #ef4444;
    --r: 10px;
    --r-lg: 16px;
    --t: 0.18s ease;
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-surface: #ffffff;
    --bg-elevated: #f4f4f5;
    --border: rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.13);
    --text-1: #09090b;
    --text-2: #6b7280;
    --text-3: #9ca3af;
    --accent-dim: rgba(124, 58, 237, 0.05);
    --accent-border: rgba(124, 58, 237, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-1);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--t), color var(--t);
}

/* ─── Background ──────────────────────────────── */

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 64px 64px;
}

[data-theme="light"] .bg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
}

.bg-glow {
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.07) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Layout ──────────────────────────────────── */

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.section-divider {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

/* ─── Nav ─────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 8, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: background var(--t), border-color var(--t);
}

[data-theme="light"] .nav {
    background: rgba(250, 250, 250, 0.8);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-1);
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    transition: opacity var(--t);
}

.nav-logo:hover { opacity: 0.75; }

.nav-logo-img {
    height: 56px;
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-logo-img {
    height: 52px;
    width: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 10px;
}

.nav-links {
    display: flex;
    gap: 28px;
    flex: 1;
}

.nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--t);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ─── Buttons ─────────────────────────────────── */

.btn-primary {
    background: var(--text-1);
    color: var(--bg);
    border: none;
    padding: 8px 16px;
    border-radius: var(--r);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    letter-spacing: -0.01em;
    transition: opacity var(--t), transform var(--t);
    white-space: nowrap;
}

.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    border-radius: var(--r);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    transition: background var(--t), border-color var(--t);
}

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--text-3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: none;
    padding: 8px 12px;
    border-radius: var(--r);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: color var(--t), background var(--t);
}

.btn-ghost:hover {
    color: var(--text-1);
    background: var(--bg-elevated);
}

.btn-lg {
    padding: 11px 22px;
    font-size: 15px;
    border-radius: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Theme toggle — 三态图标 */

.icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    position: relative;
}

.icon-auto,
.icon-sun,
.icon-moon {
    position: absolute;
    transition: opacity var(--t), transform var(--t);
}

/* 默认/auto：显示显示器图标 */
.icon-auto { opacity: 1;  transform: rotate(0deg); }
.icon-sun  { opacity: 0;  transform: rotate(90deg); }
.icon-moon { opacity: 0;  transform: rotate(-90deg); }

[data-theme-pref="auto"] .icon-auto { opacity: 1;  transform: rotate(0deg); }
[data-theme-pref="auto"] .icon-sun  { opacity: 0;  transform: rotate(90deg); }
[data-theme-pref="auto"] .icon-moon { opacity: 0;  transform: rotate(-90deg); }

[data-theme-pref="light"] .icon-auto { opacity: 0;  transform: rotate(-90deg); }
[data-theme-pref="light"] .icon-sun  { opacity: 1;  transform: rotate(0deg); }
[data-theme-pref="light"] .icon-moon { opacity: 0;  transform: rotate(90deg); }

[data-theme-pref="dark"] .icon-auto  { opacity: 0;  transform: rotate(90deg); }
[data-theme-pref="dark"] .icon-sun   { opacity: 0;  transform: rotate(-90deg); }
[data-theme-pref="dark"] .icon-moon  { opacity: 1;  transform: rotate(0deg); }

/* ─── Section shared ──────────────────────────── */

.section-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-1);
    margin-bottom: 14px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 500px;
}

/* ─── Hero ────────────────────────────────────── */

.hero {
    padding: 96px 0 48px;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 64px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-right-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-right-sub {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
}

.hero-right .code-block {
    max-width: none;
    margin-top: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 28px;
    transition: border-color var(--t);
}

.hero-badge:hover { border-color: var(--border-strong); }

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
    flex-shrink: 0;
    animation: pulse 2.5s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(44px, 5.5vw, 72px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--text-1);
    margin-bottom: 20px;
}

.text-accent {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-2);
    max-width: 420px;
    margin-bottom: 36px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 10px;
}

/* ─── 模型展示卡片 ────────────────────────────── */

.model-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.model-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 14px;
    transition: border-color var(--t), background var(--t), box-shadow var(--t), transform var(--t);
    cursor: default;
    user-select: none;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.model-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
}

.model-item:hover {
    border-color: var(--border-strong);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.model-item:hover::before {
    opacity: 1;
}

[data-theme="light"] .model-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.model-item-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.model-item-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.model-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.model-item-name {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-1);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-item-brand {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.model-item-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 4px;
}

.model-item-desc {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 400;
    white-space: nowrap;
}

.model-item-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--green);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 100px;
    padding: 3px 10px 3px 7px;
}

.status-dot {
    width: 5px;
    height: 5px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2.5s ease-in-out infinite;
}

/* ─── Code block ──────────────────────────────── */

.code-block {
    margin-top: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    max-width: 660px;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-lang {
    font-size: 11.5px;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

.code-content {
    padding: 26px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #cdd6f4;
    overflow-x: auto;
    white-space: pre;
}

[data-theme="light"] .code-content { color: #374151; }

.ck { color: #cba6f7; }   /* keyword  */
.cs { color: #a6e3a1; }   /* string   */
.cc { color: #585b70; }   /* comment  */

[data-theme="light"] .ck { color: #7c3aed; }
[data-theme="light"] .cs { color: #16a34a; }
[data-theme="light"] .cc { color: #9ca3af; }

/* ─── Features grid ───────────────────────────── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-top: 56px;
}

.feature-card {
    background: var(--bg);
    padding: 34px 28px;
    transition: background var(--t);
}

[data-theme="light"] .feature-card { background: var(--bg-surface); }
.feature-card:hover { background: var(--bg-surface); }
[data-theme="light"] .feature-card:hover { background: var(--bg-elevated); }

.feature-card-wide { grid-column: span 2; }

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 9px;
    color: var(--text-1);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.65;
}

/* ─── Compare ─────────────────────────────────── */

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 56px;
}

.compare-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
}

.compare-card-after {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.compare-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.compare-tag-before {
    background: rgba(239, 68, 68, 0.08);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.compare-tag-after {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.compare-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.compare-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
}

.icon-x    { color: var(--red);   font-weight: 700; flex-shrink: 0; }
.icon-check { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ─── Pricing ─────────────────────────────────── */

.pricing-container {
    text-align: center;
}

.pricing-container .section-desc {
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 56px;
    text-align: left;
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
}

.pricing-card-featured {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 14px;
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text-1);
    margin-bottom: 7px;
}

.pricing-price span {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-2);
    letter-spacing: 0;
}

.pricing-header p {
    font-size: 13px;
    color: var(--text-2);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    color: var(--text-2);
}

/* ─── CTA ─────────────────────────────────────── */

.cta-inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.cta-inner h2 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text-1);
    margin-bottom: 14px;
}

.cta-inner > p {
    font-size: 16px;
    color: var(--text-2);
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.cta-note {
    font-size: 13px;
    color: var(--text-3);
}

/* ─── Footer ──────────────────────────────────── */

.footer {
    padding: 56px 0 36px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 44px;
}

.footer-brand .nav-logo {
    display: block;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.8;
    margin-top: 4px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col ul a {
    font-size: 13px;
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--t);
}

.footer-col ul a:hover { color: var(--text-1); }

.footer-bottom {
    padding-top: 28px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-3);
}

/* ─── Reveal animation ────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Scrollbar ───────────────────────────────── */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ─── Text selection ──────────────────────────── */

::selection {
    background: rgba(124, 58, 237, 0.25);
    color: inherit;
}

/* ─── Responsive ──────────────────────────────── */

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-card-wide {
        grid-column: span 2;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

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

    .footer-brand { grid-column: span 2; }
}

@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-left { align-items: center; text-align: center; }

    .hero-desc { max-width: 100%; }

    .hero-actions { justify-content: center; }
}

@media (max-width: 720px) {
    .nav-links { display: none; }

    .hero { padding: 72px 0 56px; }

    .hero-title { font-size: 42px; }

    .hero-desc { font-size: 15px; }

    .section-divider { padding: 72px 0; }

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

    .feature-card-wide { grid-column: span 1; }

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

    .section-title { font-size: 30px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 40px; }

    .hero-actions { flex-direction: column; align-items: center; }

    .cta-actions { flex-direction: column; align-items: center; }

    .model-showcase .model-item {
        flex: 0 0 calc(50% - 6px);
    }

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

    .footer-brand { grid-column: span 1; }
}
