/* === CSS Variables === */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #10b981;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

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

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--dark-light);
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lang-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray);
    background: transparent;
    color: var(--gray-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 120px 40px 80px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        var(--dark);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 40px;
}

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

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* === Code Block Visual === */
.hero-visual {
    flex: 1;
    max-width: 500px;
}

.code-block {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.code-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: rgba(0,0,0,0.3);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-content {
    padding: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    overflow-x: auto;
}

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

.keyword { color: #c084fc; }
.property { color: #60a5fa; }
.string { color: #4ade80; }
.boolean { color: #fb923c; }

/* === Section Titles === */
.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-intro {
    text-align: center;
    color: var(--gray-light);
    max-width: 700px;
    margin: 0 auto 60px;
    font-size: 1.125rem;
}

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--dark-light);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

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

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--white);
}

.feature-card p {
    color: var(--gray-light);
}

/* === Services List === */
.services-list {
    max-width: 800px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.service-item:last-child {
    border-bottom: none;
}

.service-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--white);
}

.service-content p {
    color: var(--gray-light);
}

/* === Contact === */
.contact-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: var(--dark-light);
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-box p {
    color: var(--gray-light);
}

/* === Footer === */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 4px;
}

.footer-copy p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* === Responsive === */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

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

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

    .hero-visual {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 2rem;
    }

    .service-item {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

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

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}
