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

:root {
    --primary: #2B7CEE;
    --primary-dark: #1a5fc0;
    --primary-light: #e8f1fd;
    --bg: #ffffff;
    --bg-alt: #f8f9fc;
    --bg-dark: #0b1120;
    --text: #1a1a2e;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 24px rgba(43,124,238,0.12);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

/* ===== Typography ===== */
h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.4; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    padding: 12px 28px;
    border: 2px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: #fff;
    padding: 8px 20px;
    font-size: 0.875rem;
    border-radius: 8px;
}
.btn-nav:hover { background: var(--primary-dark); }

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 14px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    display: flex;
    align-items: center;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ===== Phone Mockup ===== */
.hero-visual {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    background: #1a1a2e;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1) inset;
    transform: perspective(800px) rotateY(-5deg);
}

.phone-screen {
    background: #0f172a;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 9/16.5;
}

.placeholder-screen {
    padding: 20px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mock-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.mock-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.mock-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 140px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.mock-bar {
    flex: 1;
    background: #334155;
    border-radius: 4px 4px 0 0;
    transition: all 0.5s ease;
}
.mock-bar.highlight { background: var(--primary); }
.mock-bar.sorted { background: #22c55e; }

.mock-code {
    background: #1e293b;
    border-radius: 8px;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #94a3b8;
    line-height: 1.8;
    flex: 1;
}

.code-line.active {
    color: #e2e8f0;
    background: rgba(43,124,238,0.1);
    border-left: 2px solid var(--primary);
    padding-left: 8px;
    margin-left: -8px;
}

/* ===== Features ===== */
.features {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 12px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Topics ===== */
.topics {
    padding: 100px 0;
    background: var(--bg-alt);
}

.topics-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.topic-pill {
    padding: 12px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.2s;
}
.topic-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ===== Download ===== */
.download {
    padding: 100px 0;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: transform 0.2s, opacity 0.2s;
    border-radius: 8px;
    overflow: hidden;
}
.store-badge:hover {
    transform: translateY(-2px);
}

.store-badge.coming-soon {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.badge-label {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* ===== Contact ===== */
.contact {
    padding: 100px 0;
    background: var(--bg-alt);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43,124,238,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== Legal Links ===== */
.legal-links {
    padding: 24px 0;
    text-align: center;
}

.legal-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 16px;
    transition: color 0.2s;
}
.legal-links a:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 56px 0 32px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer .nav-logo {
    color: #fff;
}

.footer-brand {
    text-align: center;
}

.footer-brand .nav-logo {
    justify-content: center;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    h1 { font-size: 2.75rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
    }
    .mobile-menu-btn { display: flex; }

    .hero { padding: 100px 0 60px; }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { order: -1; }
    .phone-mockup {
        width: 220px;
        transform: none;
    }

    .features-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-links { flex-wrap: wrap; justify-content: center; }

    .hero-buttons { flex-wrap: wrap; }
    .hero-stats { flex-wrap: wrap; gap: 16px; }
    .stat-divider { display: none; }
}

@media (max-width: 380px) {
    h1 { font-size: 1.85rem; }
    .container { padding: 0 16px; }
    .btn-lg { padding: 12px 24px; font-size: 0.9rem; }
    .hero-buttons { width: 100%; }
    .hero-buttons .btn { flex: 1; justify-content: center; }
}
