:root {
    --bg-root: #0a0c10;
    --bg-surface: #12151c;
    --bg-elevated: #181c25;
    --bg-hover: #1e2330;

    --border-subtle: #1e2330;
    --border-default: #262d3a;
    --border-focus: #2dd4bf;

    --text-primary: #e8ecf0;
    --text-secondary: #8892a4;
    --text-muted: #5c6578;

    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --accent-glow: #58a6ff15;

    --green: #34d399;
    --red: #f87171;
    --teal: #2dd4bf;
    --purple: #a78bfa;
    --orange: #fb923c;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px #58a6ff15;

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-root);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo:hover {
    color: var(--accent-hover);
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.github-link {
    color: var(--text-secondary);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
}

.github-link:hover {
    color: var(--text-primary);
    filter: drop-shadow(0 0 8px rgba(232, 236, 240, 0.3));
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
}

.hero-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.demo-before,
.demo-after {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.demo-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: left;
}

.demo-before .demo-label {
    color: var(--red);
}

.demo-after .demo-label {
    color: var(--green);
}

.demo-code {
    background: var(--bg-root);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.demo-code code {
    color: var(--text-primary);
}

.sensitive {
    color: var(--red);
    background: rgba(248, 113, 113, 0.1);
    padding: 2px 4px;
    border-radius: var(--radius-sm);
}

.masked {
    color: var(--teal);
    background: rgba(45, 212, 191, 0.1);
    padding: 2px 4px;
    border-radius: var(--radius-sm);
}

.demo-arrow {
    font-size: 32px;
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--teal);
    color: var(--bg-root);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.3);
}

.btn-primary:hover {
    background: #14b8a6;
    box-shadow: 0 0 32px rgba(45, 212, 191, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 56px;
}

/* Scenarios */
.scenarios {
    background: var(--bg-surface);
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.scenario-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
}

.scenario-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.scenario-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.scenario-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.scenario-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.scenario-card code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--bg-root);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--teal);
}

/* How It Works */
.flow-diagram {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.flow-node {
    background: var(--bg-elevated);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
    transition: all var(--transition-base);
}

.flow-node.agent {
    border-color: var(--purple);
    color: var(--purple);
}

.flow-node.maskit {
    border-color: var(--accent);
    color: var(--accent);
}

.flow-node.maskit.highlight {
    border-color: var(--teal);
    color: var(--teal);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.2);
}

.flow-node.server {
    border-color: var(--green);
    color: var(--green);
}

.flow-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.flow-label.highlight {
    color: var(--teal);
    font-weight: 600;
}

.flow-arrow {
    font-size: 24px;
    color: var(--text-muted);
}

.flow-arrow.return {
    color: var(--teal);
}

.flow-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
}

/* Features */
.features {
    background: var(--bg-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Getting Started */
.install-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.install-code {
    background: var(--bg-root);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 24px;
    overflow-x: auto;
}

.install-code code {
    color: var(--text-primary);
}

.install-code .comment {
    color: var(--text-muted);
}

.install-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

.install-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.install-note a:hover {
    color: var(--accent-hover);
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0;
    text-align: center;
}

.footer-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-hover);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }

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

    .hero-subtitle {
        font-size: 18px;
    }

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

    .demo-arrow {
        transform: rotate(90deg);
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }

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

    .flow-diagram {
        padding: 32px 24px;
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .flow-arrow.return {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .hero-subtitle {
        font-size: 16px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
    }

    .scenario-card,
    .feature-card {
        padding: 24px;
    }

    .install-card {
        padding: 24px;
    }
}
