/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-dark: #334155;
    --border: rgba(148, 163, 184, 0.2);
    --gradient: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--light);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Selector */
.lang-selector-wrapper {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--gray-dark);
    border: none;
    border-radius: 8px;
    color: var(--light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.lang-toggle:hover {
    background: var(--gray);
}

.lang-toggle svg {
    color: var(--primary);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--gray-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option:hover {
    background: var(--gray-dark);
    color: var(--light);
}

.lang-option.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-github {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-dark);
    border-radius: 8px;
    transition: background 0.2s !important;
}

.nav-github:hover {
    background: var(--primary) !important;
    color: white !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--light);
    transition: transform 0.3s, opacity 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

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

.hero-desc {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-desc strong {
    color: var(--light);
    font-family: 'JetBrains Mono', monospace;
    background: var(--gray-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(14, 165, 233, 0.5);
}

.btn-secondary {
    background: var(--gray-dark);
    color: var(--light);
}

.btn-secondary:hover {
    background: var(--gray);
}

.btn-white {
    background: white;
    color: var(--dark);
}

.btn-white:hover {
    background: var(--light);
}

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    width: 100%;
    max-width: 480px;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

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

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

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--gray-light);
}

.code-content {
    padding: 20px;
}

.code-content pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.code-content code {
    color: var(--light);
}

.token-comment { color: var(--gray); }
.token-keyword { color: var(--primary); }
.token-text { color: var(--light); }
.token-link { color: var(--secondary); }

/* Background */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
}

/* Section Common */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-light);
    font-size: 1.125rem;
}

/* Problem Section */
.problem {
    background: var(--dark);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.problem-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s;
}

.problem-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.problem-icon {
    width: 56px;
    height: 56px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    margin-bottom: 20px;
}

.problem-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Solution Section */
.solution {
    background: var(--darker);
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.solution-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-subtle);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
}

.solution-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.solution-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
    background: var(--dark);
}

.modes-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.mode-card {
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.mode-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
}

.mode-badge.static {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.mode-badge.dynamic {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.mode-header h3 {
    font-size: 1.5rem;
}

.mode-desc {
    color: var(--gray-light);
    margin-bottom: 24px;
}

.mode-features {
    list-style: none;
    margin-bottom: 24px;
}

.mode-features li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--gray-light);
}

.mode-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

.mode-features code {
    background: var(--gray-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--light);
}

.mode-example {
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.mode-example pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--gray-light);
    line-height: 1.8;
}

/* Quick Start */
.quickstart {
    background: var(--darker);
}

.steps-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.step-card {
    flex: 1;
    max-width: 320px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

.step-card code {
    background: var(--gray-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--primary);
}

.step-arrow {
    color: var(--gray);
    flex-shrink: 0;
}

/* Protocol Section */
.protocol {
    background: var(--dark);
}

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

.protocol-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.protocol-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.protocol-card.primary {
    background: var(--gradient-subtle);
    border-color: var(--primary);
}

.protocol-lang {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gray-dark);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--gray-light);
    margin-bottom: 16px;
    width: fit-content;
}

.protocol-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.protocol-card p {
    color: var(--gray-light);
    margin-bottom: 24px;
    flex-grow: 1;
}

.protocol-link {
    color: var(--primary);
    font-weight: 600;
}

/* Use Cases */
.usecases {
    background: var(--darker);
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.usecase-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s;
}

.usecase-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.usecase-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.usecase-card h3 {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.usecase-card p {
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* Sites Section */
.sites {
    background: var(--dark);
}

.sites-table-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
}

.sites-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.sites-table th,
.sites-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.sites-table th {
    color: var(--gray-light);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sites-table td {
    color: var(--light);
}

.site-name {
    font-weight: 600;
    color: var(--primary);
}

.site-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.2s;
}

.site-link:hover {
    color: var(--primary);
}

.sites-cta {
    text-align: center;
    padding: 40px;
    background: var(--gradient-subtle);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.sites-cta p {
    color: var(--gray-light);
    margin-bottom: 16px;
}

/* CTA Section */
.cta {
    position: relative;
    padding: 120px 0;
    background: var(--darker);
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-content p {
    color: var(--gray-light);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

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

.cta-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.1;
    filter: blur(100px);
}

/* Footer */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 16px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--light);
}

.footer-col a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-visual {
        display: none;
    }

    .problem-grid,
    .solution-grid,
    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modes-wrapper {
        grid-template-columns: 1fr;
    }
}

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

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

    .mobile-menu-btn {
        display: flex;
    }

    .lang-selector-wrapper {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }

    .lang-dropdown {
        position: static;
        margin-top: 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--gray-dark);
        display: none;
    }

    .lang-dropdown.active {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .problem-grid,
    .solution-grid,
    .usecases-grid {
        grid-template-columns: 1fr;
    }

    .steps-wrapper {
        flex-direction: column;
    }

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

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

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 40px;
    }

    .section-header h2,
    .cta-content h2 {
        font-size: 2rem;
    }
}
