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

:root {
    --green: #10b981;
    --green-light: #d1fae5;
    --green-bg: #ecfdf5;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;
    --purple-bg: #f5f3ff;
    --red: #ef4444;
    --red-light: #fee2e2;
    --yellow: #f59e0b;
    --yellow-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
    --gradient: linear-gradient(135deg, #10b981, #3b82f6, #8b5cf6);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* === Logo === */
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.logo-mark { flex-shrink: 0; }
.logo-text {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--gray-800);
}
.logo-mio {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Nav === */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: .9rem; font-weight: 500; color: var(--gray-600); transition: color .2s; }
.nav-links a:hover { color: var(--gray-900); }

/* === Language Toggle === */
.lang-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 100px;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    font-size: .82rem; font-weight: 500; color: var(--gray-600);
    cursor: pointer; transition: all .2s;
    font-family: inherit;
}
.lang-toggle:hover { background: var(--gray-100); border-color: var(--gray-300); color: var(--gray-800); }
.lang-icon { display: flex; align-items: center; }
.lang-label { line-height: 1; }

.mobile-menu { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-menu span { display: block; width: 20px; height: 2px; background: var(--gray-700); margin: 4px 0; transition: .3s; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 600; transition: all .2s;
    cursor: pointer; border: none; font-family: inherit;
}
.btn-sm { padding: 6px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-primary {
    background: var(--gradient); color: #fff;
    box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,.4); }
.btn-outline {
    background: #fff; color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); }

/* === Gradient Text === */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Hero === */
.hero {
    padding: 140px 24px 80px;
    text-align: center;
    max-width: 900px; margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px; border-radius: 100px;
    background: var(--green-bg); color: var(--green);
    font-size: .85rem; font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--green-light);
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800; line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 20px;
}
.hero-sub {
    font-size: 1.15rem; color: var(--gray-500);
    max-width: 600px; margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-visual {
    display: flex; gap: 20px; justify-content: center;
    margin-top: 60px;
}
.hero-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 24px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    font-weight: 600; font-size: .95rem;
    transition: transform .3s, box-shadow .3s;
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hero-card code {
    font-size: .8rem; padding: 3px 8px;
    border-radius: 6px; font-weight: 500;
}
.card-green code { background: var(--green-bg); color: var(--green); }
.card-purple code { background: var(--purple-bg); color: var(--purple); }
.card-dot { width: 10px; height: 10px; border-radius: 50%; }
.card-dot.green { background: var(--green); }
.card-dot.purple { background: var(--purple); }

/* === Stats === */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    max-width: 1000px; margin: 0 auto;
    padding: 40px 24px;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
.stat { text-align: center; padding: 20px; }
.stat-num {
    font-size: 2rem; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: .85rem; color: var(--gray-500); margin-top: 4px; }

/* === Sections === */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-badge {
    display: inline-block;
    padding: 4px 14px; border-radius: 100px;
    font-size: .8rem; font-weight: 600;
    margin-bottom: 16px;
    background: var(--gray-100); color: var(--gray-600);
    border: 1px solid var(--gray-200);
}
.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800; line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 16px;
}
.section-header p { font-size: 1.05rem; color: var(--gray-500); line-height: 1.7; }

/* === Product Section === */
.product-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.product-grid.reverse { direction: rtl; }
.product-grid.reverse > * { direction: ltr; }

.product-badge {
    display: inline-block;
    padding: 6px 16px; border-radius: 100px;
    font-size: .85rem; font-weight: 600;
    margin-bottom: 20px;
}
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-light); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-light); }

.product-info h2 {
    font-size: 2rem; font-weight: 800;
    line-height: 1.2; letter-spacing: -.02em;
    margin-bottom: 16px;
}
.product-info > p { color: var(--gray-500); font-size: 1.05rem; line-height: 1.7; margin-bottom: 32px; }

.feature-list { display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; gap: 14px; }
.feature-icon {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.feature-icon.green { background: var(--green-bg); color: var(--green); }
.feature-icon.purple { background: var(--purple-bg); color: var(--purple); }
.feature-item strong { font-size: .95rem; display: block; margin-bottom: 2px; }
.feature-item p { font-size: .88rem; color: var(--gray-500); line-height: 1.5; margin: 0; }

/* === Demo Window === */
.demo-window {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    background: #1e1e2e;
}
.demo-titlebar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    background: #181825;
}
.demo-dot { width: 12px; height: 12px; border-radius: 50%; }
.demo-dot.red { background: #f38ba8; }
.demo-dot.yellow { background: #f9e2af; }
.demo-dot.green { background: #a6e3a1; }
.demo-title { margin-left: 8px; font-size: .8rem; color: #6c7086; }
.demo-body { padding: 20px; }
.demo-body pre { margin: 0; }
.demo-body code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .85rem; line-height: 1.7;
    color: #cdd6f4;
}
.demo-body .kw { color: #cba6f7; }
.demo-body .str { color: #a6e3a1; }
.demo-body .cmt { color: #6c7086; }

.demo-result {
    margin-top: 16px; padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--green-bg);
    border: 1px solid var(--green-light);
}
.purple-result {
    background: var(--purple-bg);
    border-color: var(--purple-light);
}
.result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    font-size: .9rem;
}
.result-row + .result-row { border-top: 1px solid rgba(0,0,0,.05); }
.result-label { color: var(--gray-500); font-weight: 500; }
.result-badge {
    padding: 3px 10px; border-radius: 6px;
    font-size: .8rem; font-weight: 600;
}
.badge-red { background: var(--red-light); color: var(--red); }
.badge-purple { background: var(--purple-light); color: var(--purple); }

/* === Benchmark === */
.benchmark-section { background: var(--gray-50); border-radius: var(--radius-lg); margin: 0 24px; padding: 80px 40px; max-width: 1200px; }
@media (min-width: 1248px) { .benchmark-section { margin: 0 auto; } }

.benchmark-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; max-width: 800px; margin: 0 auto;
}
.bench-card {
    text-align: center; padding: 24px 16px;
    border-radius: var(--radius);
    background: #fff; border: 1px solid var(--gray-200);
    transition: transform .2s, box-shadow .2s;
}
.bench-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bench-card.active { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.bench-size { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.bench-bar {
    height: 6px; background: var(--gray-200); border-radius: 3px;
    overflow: hidden; margin-bottom: 12px;
}
.bench-fill { height: 100%; background: var(--gradient); border-radius: 3px; transition: width 1s ease; }
.bench-score { font-size: .85rem; font-weight: 600; color: var(--green); }
.bench-note { text-align: center; color: var(--gray-400); font-size: .9rem; margin-top: 24px; }

/* === Demo Table === */
.demo-table-wrap { overflow-x: auto; }
.demo-table {
    width: 100%; border-collapse: collapse;
    font-size: .9rem;
}
.demo-table th {
    text-align: left; padding: 12px 16px;
    background: var(--gray-50); color: var(--gray-500);
    font-weight: 600; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 2px solid var(--gray-200);
}
.demo-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
}
.demo-table .row-danger { background: #fff5f5; }
.subtle { color: var(--gray-400); font-size: .8rem; }

.tag {
    display: inline-block; padding: 3px 10px;
    border-radius: 6px; font-size: .8rem; font-weight: 600;
    white-space: nowrap;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-yellow { background: var(--yellow-light); color: var(--yellow); }
.tag-red { background: var(--red-light); color: var(--red); }

/* === CTA === */
.cta-section { text-align: center; }
.cta-inner {
    padding: 80px 40px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ecfdf5 0%, #ede9fe 50%, #e0f2fe 100%);
    border: 1px solid var(--gray-200);
}
.cta-inner h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 16px;
}
.cta-inner p { color: var(--gray-500); font-size: 1.1rem; margin-bottom: 32px; }

/* === Footer === */
.footer {
    border-top: 1px solid var(--gray-200);
    padding: 60px 24px 24px;
    max-width: 1200px; margin: 0 auto;
}
.footer-inner { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--gray-400); font-size: .9rem; margin-top: 12px; max-width: 300px; }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: 4px; }
.footer-col a { font-size: .9rem; color: var(--gray-500); transition: color .2s; }
.footer-col a:hover { color: var(--gray-800); }
.footer-bottom { border-top: 1px solid var(--gray-100); padding-top: 20px; }
.footer-bottom p { font-size: .8rem; color: var(--gray-400); }

/* === Animations === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; }
.animate.visible { animation: fadeUp .6s ease forwards; }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: #fff; padding: 20px 24px;
        border-bottom: 1px solid var(--gray-200);
        gap: 16px;
    }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: 1fr; gap: 40px; }
    .product-grid.reverse { direction: ltr; }
    .benchmark-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-visual { flex-direction: column; align-items: center; }
    .footer-inner { flex-direction: column; }
    .footer-links { gap: 40px; }
    .cta-inner { padding: 48px 24px; }
    .benchmark-section { margin: 0 12px; padding: 48px 20px; }
}
