/* ==================== DESIGN TOKENS · 浅蓝主题 ==================== */
:root {
    /* 浅蓝主色板 */
    --bg-base: #F0F9FF;          /* 晨雾蓝（页面底色） */
    --bg-soft: #E0F2FE;          /* 浅天蓝（区块） */
    --bg-card: #FFFFFF;          /* 卡片白 */
    --bg-grid: #DBEAFE;          /* 网格线 */

    --primary-500: #0EA5E9;      /* 信任蓝（主） */
    --primary-600: #0284C7;      /* 深一档 */
    --primary-400: #38BDF8;
    --primary-300: #7DD3FC;
    --primary-100: #E0F2FE;

    --cyan-500: #06B6D4;
    --cyan-400: #22D3EE;

    --token-glow: rgba(14, 165, 233, 0.35);

    /* 文本 */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-dim: #94A3B8;
    --text-inverse: #FFFFFF;

    /* 边框 / 玻璃 */
    --border-soft: rgba(14, 165, 233, 0.18);
    --border-mid:  rgba(14, 165, 233, 0.32);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-strong: rgba(255, 255, 255, 0.9);

    /* 阴影（柔和浅蓝） */
    --shadow-sm: 0 2px 6px rgba(14, 165, 233, 0.08);
    --shadow-md: 0 8px 24px rgba(14, 165, 233, 0.12);
    --shadow-lg: 0 18px 40px rgba(14, 165, 233, 0.18);
    --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.28);

    /* 间距 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    /* 过渡 */
    --tr-fast: 150ms cubic-bezier(.4,0,.2,1);
    --tr-base: 220ms cubic-bezier(.4,0,.2,1);
    --tr-slow: 360ms cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background:
        radial-gradient(1200px 600px at 80% -10%, #BAE6FD 0%, transparent 60%),
        radial-gradient(1000px 500px at -10% 30%, #DBEAFE 0%, transparent 55%),
        linear-gradient(180deg, var(--bg-base) 0%, #FFFFFF 100%);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 249, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}
.logo-section { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: transform var(--tr-fast); }
.logo-section:hover { transform: translateY(-1px); }
.logo-mark { width: 40px; height: 40px; display: grid; place-items: center; filter: drop-shadow(0 2px 6px rgba(14,165,233,.25)); }
.brand-name { font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.3px; }
.brand-tagline { font-size: 12px; color: var(--text-muted); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    transition: all var(--tr-fast);
}
.nav-link:hover { background: var(--primary-100); color: var(--primary-600); }
.nav-highlight {
    background: linear-gradient(135deg, var(--primary-500), var(--cyan-500));
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}
.nav-highlight:hover { color: #fff !important; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ==================== HERO ==================== */
.hero {
    position: relative;
    padding: var(--space-2xl) 0 var(--space-xl);
    overflow: hidden;
}
.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    opacity: 0.6;
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-500); box-shadow: 0 0 0 4px rgba(14,165,233,.18); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.5px;
}
.title-token {
    background: linear-gradient(135deg, var(--primary-500), var(--cyan-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.title-accent { color: var(--primary-600); position: relative; }
.title-accent::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px;
    background: linear-gradient(90deg, rgba(14,165,233,.25), rgba(6,182,212,.05));
    border-radius: 4px; z-index: -1;
}

.hero-subtitle { font-size: 1.05rem; color: var(--primary-600); margin-bottom: var(--space-xs); font-weight: 500; }
.hero-description { font-size: 0.98rem; color: var(--text-secondary); max-width: 520px; margin-bottom: var(--space-lg); }

.hero-cta { display: flex; gap: var(--space-sm); margin-bottom: var(--space-lg); flex-wrap: wrap; }
.cta-button {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: all var(--tr-base);
    cursor: pointer;
}
.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-500), var(--cyan-500));
    color: #fff;
    box-shadow: var(--shadow-md);
}
.cta-button.primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cta-button.secondary {
    background: var(--glass-bg-strong);
    color: var(--primary-600);
    border: 1px solid var(--border-mid);
}
.cta-button.secondary:hover { background: var(--primary-100); }
.arrow { font-size: 10px; }

/* Token 输入 */
.token-input-wrap {
    display: flex; gap: 8px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-pill);
    padding: 6px 6px 6px 18px;
    max-width: 540px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--tr-base), border-color var(--tr-base);
}
.token-input-wrap:focus-within { border-color: var(--primary-500); box-shadow: var(--shadow-glow); }
.token-input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--text-primary); font-family: inherit;
}
.token-input::placeholder { color: var(--text-dim); }
.token-input-btn {
    border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--primary-500), var(--cyan-500));
    color: #fff; padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600; font-size: 13px;
    transition: transform var(--tr-fast);
}
.token-input-btn:hover { transform: translateX(2px); }

.token-hint { margin-top: 12px; font-size: 13px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
    cursor: pointer;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--primary-100);
    color: var(--primary-600);
    font-size: 12px;
    border: 1px solid var(--border-soft);
    transition: all var(--tr-fast);
}
.chip:hover { background: var(--primary-500); color: #fff; transform: translateY(-1px); }

/* ==================== MATRIX STAGE · 母体动画舞台 ==================== */
.matrix-stage {
    position: relative;
    aspect-ratio: 1;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 50% 50%, rgba(186, 230, 253, 0.45) 0%, transparent 60%),
        var(--glass-bg-strong);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
    padding: 8px;
}
.matrix-svg { width: 100%; height: 100%; display: block; }

/* 光环呼吸 */
.ring { transform-origin: 260px 260px; }
.ring-outer { animation: ringPulse 6s ease-in-out infinite; }
.ring-mid   { animation: ringPulse 6s ease-in-out infinite .8s reverse; }
.ring-inner { animation: ringPulse 4s ease-in-out infinite .3s; }
@keyframes ringPulse {
    0%,100% { transform: scale(1); opacity: .55; }
    50%     { transform: scale(1.04); opacity: .9; }
}

/* 通道虚线流动 */
.channels line {
    stroke-dasharray: 4 6;
    animation: dash 1.6s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -40; } }

/* 中心母体呼吸 */
.core { transform-origin: 260px 260px; animation: coreBreath 3.6s ease-in-out infinite; }
@keyframes coreBreath {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.06); }
}
.core-label {
    font-family: var(--font-mono);
    font-size: 18px; font-weight: 700; letter-spacing: 2px; fill: #FFFFFF;
}
.core-sub { font-size: 12px; fill: #FFFFFF; opacity: 0.85; letter-spacing: 6px; }

/* 双手呵护：上托下护的轻微呼吸 */
.guardian-hand {
    transform-origin: 260px 260px;
    filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.25));
}
.hand-top-left  { animation: handHugTop 4s ease-in-out infinite; }
.hand-top-right { animation: handHugTop 4s ease-in-out infinite; }
.hand-bot-left  { animation: handHugBot 4s ease-in-out infinite; }
.hand-bot-right { animation: handHugBot 4s ease-in-out infinite; }
@keyframes handHugTop {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }   /* 上方手下压，更靠近 Token */
}
@keyframes handHugBot {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }  /* 下方手上托，更靠近 Token */
}
.guardian-label { font-size: 12px; fill: var(--primary-600); font-weight: 600; letter-spacing: 1px; }

/* 端点 */
.endpoints text { font-size: 11px; fill: var(--text-secondary); font-weight: 600; }
.endpoints circle { transition: all var(--tr-base); }
.ep-hit circle { fill: var(--primary-500) !important; r: 18; }
.ep-hit text   { fill: var(--primary-600); }

/* 粒子标签 */
.particle-label { font-size: 11px; fill: var(--primary-600); font-weight: 700; }
.particle circle { filter: drop-shadow(0 0 6px var(--token-glow)); }

/* 图例 */
.stage-legend {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    display: flex; gap: 14px; font-size: 12px; color: var(--text-muted);
    background: var(--glass-bg-strong); padding: 6px 14px;
    border-radius: var(--radius-pill); border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-human { background: #38BDF8; }
.dot-ai { background: #06B6D4; }
.dot-token { background: #0EA5E9; box-shadow: 0 0 0 3px rgba(14,165,233,.2); }

/* ==================== SECTION TITLES ==================== */
.section-title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.3px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    font-size: 0.98rem;
}

/* ==================== MATRIX INTRO ==================== */
.matrix-intro { padding: var(--space-2xl) 0; }
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 880px) { .intro-grid { grid-template-columns: 1fr; } }
.intro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--tr-base);
}
.intro-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-mid); }
.intro-icon { font-size: 32px; margin-bottom: 12px; }
.intro-title { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 8px; font-weight: 700; }
.intro-text { font-size: 0.92rem; color: var(--text-secondary); }

/* ==================== FEATURES SHOWCASE ==================== */
.features-showcase { padding: var(--space-2xl) 0; background: linear-gradient(180deg, transparent, var(--primary-100) 50%, transparent); }
.demo-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 980px) { .demo-cards-grid { grid-template-columns: 1fr; } }

.demo-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--tr-base);
    overflow: hidden;
}
.demo-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(14,165,233,.08), transparent 60%);
    opacity: 0; transition: opacity var(--tr-base);
}
.demo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-400); }
.demo-card:hover::before { opacity: 1; }
.card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.5px;
}
.card-icon { font-size: 36px; margin-bottom: 12px; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.card-subtitle { font-size: 0.85rem; color: var(--primary-600); margin-bottom: 12px; }
.card-description { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--space-md); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-md); }
.tag {
    padding: 3px 10px;
    background: var(--bg-soft);
    color: var(--primary-600);
    border-radius: var(--radius-pill);
    font-size: 11px;
    border: 1px solid var(--border-soft);
}
.card-cta {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary-600);
    text-decoration: none; font-weight: 600; font-size: 14px;
    transition: gap var(--tr-fast);
}
.card-cta:hover { gap: 10px; }

/* ==================== ARCHITECTURE ==================== */
.architecture { padding: var(--space-2xl) 0; }
.arch-layers { display: flex; flex-direction: column; gap: 10px; max-width: 920px; margin: 0 auto; }
.arch-layer {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--tr-base);
}
.arch-layer:hover { transform: translateX(4px); border-color: var(--primary-400); box-shadow: var(--shadow-md); }
.arch-layer.vision { opacity: 0.85; background: linear-gradient(135deg, #FFFFFF, var(--bg-soft)); border-style: dashed; }
.layer-number {
    width: 56px; height: 56px; border-radius: var(--radius-md);
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-500), var(--cyan-500));
    color: #fff; font-weight: 800; font-size: 18px; letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
}
.layer-title { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 4px; font-weight: 700; }
.layer-desc { font-size: 0.88rem; color: var(--text-muted); }
.layer-action { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.layer-link { color: var(--primary-600); text-decoration: none; font-size: 13px; font-weight: 600; }
.layer-link:hover { text-decoration: underline; }
.layer-note { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.vision-badge {
    padding: 2px 10px; background: var(--bg-soft); color: var(--primary-600);
    border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
    border: 1px dashed var(--border-mid);
}
.note-text { font-size: 12px; color: var(--text-dim); }
.subsystems { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.subsystem-icon {
    width: 32px; height: 32px; display: grid; place-items: center;
    background: var(--bg-soft); border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    transition: transform var(--tr-fast);
    cursor: default;
}
.subsystem-icon:hover { transform: translateY(-2px) scale(1.1); }

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(180deg, transparent, var(--bg-soft));
    padding: var(--space-2xl) 0 var(--space-md);
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-soft);
}
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-bottom: var(--space-lg); }
@media (max-width: 760px) { .footer-content { grid-template-columns: 1fr; } }
.footer-section { display: flex; flex-direction: column; gap: 8px; }
.footer-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.footer-text { font-size: 13px; color: var(--text-muted); }
.footer-link { color: var(--primary-600); text-decoration: none; font-size: 13px; }
.footer-link:hover { text-decoration: underline; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-soft);
    flex-wrap: wrap; gap: 8px;
}
.copyright, .footer-info { font-size: 12px; color: var(--text-dim); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .container { padding: 0 var(--space-md); }
    .hero { padding: var(--space-xl) 0; }
    .nav-links a:not(.nav-highlight) { display: none; }
    .arch-layer { grid-template-columns: 56px 1fr; }
    .layer-action, .layer-note { grid-column: 1 / -1; align-items: flex-start; }
}
