:root {
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --color-surface-alt: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-success: #059669;
    --color-success-light: #d1fae5;
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); line-height: 1.6; color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Header */
header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
nav { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--color-text); text-decoration: none; }
.logo-dot { color: var(--color-primary); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--color-text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--color-text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Mobile Menu */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all 0.3s; }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-nav { display: none; position: fixed; top: 72px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--color-border); padding: 24px; box-shadow: var(--shadow-lg); z-index: 999; }
.mobile-nav.active { display: block; }
.mobile-nav a { display: block; padding: 12px 0; color: var(--color-text); text-decoration: none; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--color-border-light); }
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .btn { width: 100%; margin-top: 16px; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; font-family: var(--font-sans); font-size: 14px; font-weight: 500; text-decoration: none; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: white; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-text-light); }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--color-text-muted); padding: 8px 16px; }
.btn-ghost:hover { color: var(--color-text); background: var(--color-surface); }

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--color-success-light); color: var(--color-success); font-size: 13px; font-weight: 600; border-radius: 50px; margin-bottom: 24px; }
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--color-success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 20px; }
.hero h1 .highlight { color: var(--color-primary); }
.hero .tagline { font-size: clamp(16px, 2vw, 20px); color: var(--color-text-muted); max-width: 640px; margin: 0 auto 40px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero-note { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 14px; color: var(--color-text-muted); flex-wrap: wrap; }
.hero-note span { display: flex; align-items: center; gap: 6px; }
.hero-note .icon { color: var(--color-success); }

/* Demo Terminal */
.demo { padding: 40px 0 100px; }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.demo-window { background: #1e293b; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.demo-header { background: #334155; padding: 14px 20px; display: flex; align-items: center; gap: 8px; }
.demo-dot { width: 12px; height: 12px; border-radius: 50%; }
.demo-dot:nth-child(1) { background: #ef4444; }
.demo-dot:nth-child(2) { background: #f59e0b; }
.demo-dot:nth-child(3) { background: #22c55e; }
.demo-title { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 13px; color: #94a3b8; }
.demo-content { padding: 28px 24px; font-family: var(--font-mono); font-size: 14px; line-height: 1.8; }
.demo-line { display: flex; align-items: flex-start; margin-bottom: 4px; }
.demo-prompt { color: #22c55e; margin-right: 12px; user-select: none; }
.demo-command { color: #e2e8f0; }
.demo-output { color: #94a3b8; padding-left: 24px; }
.demo-output.success { color: #22c55e; }
.demo-output.info { color: #38bdf8; }
.demo-cursor { display: inline-block; width: 8px; height: 18px; background: #22c55e; animation: blink 1s infinite; vertical-align: text-bottom; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Stats */
.stats { padding: 60px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-mono); font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--color-primary); line-height: 1; margin-bottom: 8px; }
.stat-value sup { font-size: 0.5em; vertical-align: super; }
.stat-label { font-size: 14px; color: var(--color-text-muted); }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; }
.section-header p { font-size: 18px; color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

/* How It Works */
.how-it-works { padding: 100px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.steps::before { content: ''; position: absolute; top: 40px; left: calc(16.66% + 20px); right: calc(16.66% + 20px); height: 2px; background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-primary)); z-index: 0; }
.step { text-align: center; position: relative; z-index: 1; }
.step-number { width: 80px; height: 80px; background: var(--color-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 32px; font-weight: 700; margin: 0 auto 24px; box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3); }
.step h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.step p { color: var(--color-text-muted); font-size: 15px; text-align: justify;}

/* Features */
.features { padding: 100px 0; background: var(--color-surface); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px; transition: all 0.3s; }
.feature-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon { width: 48px; height: 48px; background: var(--color-primary-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.feature-card p { color: var(--color-text-muted); font-size: 15px; text-align: justify;}

/* Protocols */
.protocols { padding: 100px 0; }
.protocol-category { margin-bottom: 48px; }
.protocol-category:last-child { margin-bottom: 0; }
.protocol-category-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--color-text); }
.protocol-grid-small { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.protocol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.protocol-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; display: flex; align-items: center; gap: 16px; transition: all 0.2s; }
.protocol-card:hover { border-color: var(--color-text-light); box-shadow: var(--shadow); }
.protocol-badge { background: var(--color-surface); padding: 8px 12px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; }
.protocol-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.protocol-info p { font-size: 13px; color: var(--color-text-muted); text-align: justify;}
.protocol-disclaimer { font-size: 13px; color: var(--color-text-light); font-style: italic; margin-top: 16px; text-align: center; }

/* Pricing */
.pricing { padding: 100px 0; background: var(--color-surface); }
.pricing-explainer { display: flex; align-items: flex-start; gap: 16px; background: white; border: 1px solid var(--color-primary); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 48px; max-width: 800px; margin-left: auto; margin-right: auto; }
.pricing-explainer-icon { font-size: 24px; flex-shrink: 0; }
.pricing-explainer-text { font-size: 15px; color: var(--color-text-muted); line-height: 1.6; }
.pricing-explainer-text strong { color: var(--color-text); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start; }
.pricing-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px 28px; position: relative; transition: all 0.3s; display: flex; flex-direction: column; }
.pricing-card:hover { box-shadow: var(--shadow-lg); }
.pricing-card.featured { border: 2px solid var(--color-primary); transform: scale(1.05); }
.pricing-card.featured:hover { transform: scale(1.06); }
.pricing-popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: white; font-size: 12px; font-weight: 600; padding: 4px 16px; border-radius: 50px; white-space: nowrap; }
.pricing-name { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.pricing-amount { font-size: 40px; font-weight: 700; }
.pricing-currency { font-size: 20px; font-weight: 600; color: var(--color-text-muted); }
.pricing-period { font-size: 14px; color: var(--color-text-muted); margin-bottom: 4px; }
.pricing-monthly { font-size: 13px; color: var(--color-success); font-weight: 500; }
.pricing-billing { font-size: 12px; color: var(--color-text-light); margin-bottom: 16px; }
.pricing-credits { background: var(--color-surface); padding: 12px; border-radius: var(--radius); text-align: center; margin-bottom: 24px; }
.pricing-credits strong { font-family: var(--font-mono); color: var(--color-primary); }
.pricing-features { list-style: none; margin-bottom: 24px; min-height: 200px; flex-grow: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--color-text-muted); }
.pricing-features li::before { content: '✓'; color: var(--color-success); font-weight: 600; flex-shrink: 0; }
.pricing-card .btn { width: 100%; margin-top: auto; }
.pricing-description { font-size: 12px; color: var(--color-text-light); margin-top: 12px; min-height: 48px; line-height: 1.4; }
.pricing-note { font-size: 12px; color: var(--color-text-light); font-style: italic; margin-top: 24px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.pricing-disclaimer { font-size: 13px; color: var(--color-text-muted); text-align: center; margin-top: 32px; }

/* FAQ */
.faq { padding: 100px 0; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.faq-item { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; }
.faq-question { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.faq-answer { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; text-align: justify;}

/* CTA */
.cta { padding: 100px 0; background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%); text-align: center; color: white; }
.cta h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; margin-bottom: 16px; }
.cta p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.cta .btn-primary { background: white; color: var(--color-primary); }
.cta .btn-primary:hover { background: var(--color-surface); transform: translateY(-2px); }
.cta-guarantee { margin-top: 24px; font-size: 14px; opacity: 0.8; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Footer */
footer { background: #0f172a; color: white; padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: #94a3b8; font-size: 14px; margin-top: 16px; line-height: 1.6; }
.footer-tagline { color: var(--color-primary) !important; font-weight: 500; margin-top: 12px !important; }
.footer-section h4 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 20px; color: #e2e8f0; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 12px; }
.footer-section a { color: #94a3b8; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-section a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 32px; display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 14px; color: #64748b; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: #64748b; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-legal a:hover { color: white; }

/* Responsive */
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.featured { transform: none; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: span 3; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .nav-actions .btn { display: none; }
    .hero { padding: 60px 0 40px; }
    .demo-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .steps::before { display: none; }
    .features-grid, .protocol-grid, .protocol-grid-small, .pricing-grid, .faq-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .footer-brand { grid-column: span 2; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .hero-note { flex-direction: column; gap: 8px; }
    .stats-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
    .footer-legal { flex-direction: column; gap: 12px; }
}

/* ============================================
   Language Selector - Footer
   ============================================ */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 32px;
    border-top: 1px solid #334155;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.footer-legal {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #fff;
}

/* Language selector */
.footer-lang {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.footer-lang a {
    color: #64748b;
    transition: color 0.2s;
}

.footer-lang a:hover {
    color: #fff;
}

.footer-lang .lang-current {
    color: #fff;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .footer-lang {
        justify-content: center;
    }
}
