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

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --border: #1e1e2e;
    --text: #e4e4e7;
    --text-muted: #8b8b9e;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h2 { font-size: 2.25rem; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 600px; margin: 0 auto 48px; font-size: 1.1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.2s; cursor: pointer;
    border: none; text-decoration: none;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* === Nav === */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 0;
    transition: all 0.3s;
    background: transparent;
}
.nav.scrolled { background: rgba(10, 10, 15, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.nav-logo:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: all 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Hero === */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    background: var(--accent-glow); color: var(--accent);
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 24px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.hero h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero-sub { font-size: 1.25rem; color: var(--text-muted); max-width: 640px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-install {
    display: inline-block; padding: 12px 28px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.hero-install code { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; color: var(--text-muted); }

/* === Problem === */
.problem { padding: 80px 0; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.problem-card {
    padding: 32px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
}
.problem-card.highlight { border-color: var(--accent); background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.05)); }
.problem-icon { font-size: 1.8rem; margin-bottom: 16px; }
.problem-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.problem-card p { color: var(--text-muted); font-size: 0.95rem; }

/* === Features === */
.features { padding: 100px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    padding: 28px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.2s;
}
.feature-card:hover { border-color: rgba(99, 102, 241, 0.3); background: var(--bg-card-hover); transform: translateY(-2px); }
.feature-icon { font-size: 1.6rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* === Code Section === */
.code-section {
    padding: 80px 0;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.03), transparent);
}
.code-section h2 { margin-bottom: 32px; }
.code-block {
    max-width: 720px; margin: 0 auto;
    background: #0d0d14; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 32px;
    overflow-x: auto;
}
.code-block pre { margin: 0; }
.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem; line-height: 1.7; color: var(--text);
}
.code-block .kw { color: #c678dd; }
.code-block .str { color: #98c379; }
.code-block .num { color: #d19a66; }
.code-block .val { color: #d19a66; }
.code-block .cmt { color: #5c6370; font-style: italic; }

/* === Enterprise === */
.enterprise { padding: 100px 0; }
.enterprise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.enterprise-card {
    padding: 32px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
}
.enterprise-card h3 { font-size: 1.1rem; margin-bottom: 16px; color: var(--accent); }
.enterprise-card ul { list-style: none; }
.enterprise-card li {
    padding: 6px 0; color: var(--text-muted); font-size: 0.9rem;
    padding-left: 20px; position: relative;
}
.enterprise-card li::before { content: "->"; position: absolute; left: 0; color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.enterprise-cta { text-align: center; }

/* === Demo Form === */
.demo {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.04), transparent);
}
.demo-form {
    max-width: 640px; margin: 0 auto;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group textarea {
    width: 100%; padding: 12px 14px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #4a4a5e; }
.demo-form .btn { width: 100%; justify-content: center; }

/* === Footer === */
.footer { padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.footer-bottom a { color: var(--text-muted); }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: rgba(10, 10, 15, 0.98); flex-direction: column; padding: 24px; gap: 16px; border-bottom: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 2.2rem; }
    .hero-sub { font-size: 1.05rem; }

    .problem-grid,
    .feature-grid,
    .enterprise-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

    h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .footer-grid { grid-template-columns: 1fr; }
}
