/* ===== Custom Properties ===== */
:root {
    --bg: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --surface: #1e1e2a;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --text: #e8e8ed;
    --text-secondary: #8b8b9e;
    --text-muted: #5c5c72;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --green: #00d2a0;
    --green-glow: rgba(0, 210, 160, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Canvas Background ===== */
#meshCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-light);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-btn {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: all var(--transition) !important;
}

.nav-btn:hover {
    background: var(--accent-light) !important;
    transform: translateY(-1px);
}

.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: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    z-index: 99;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 1;
    padding: 180px 0 120px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light), var(--green), var(--accent-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

/* ===== Section Common ===== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

/* ===== How It Works ===== */
.how-it-works {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

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

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    opacity: 0;
    transition: opacity var(--transition);
}

.step-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.step-card:hover::before {
    opacity: 1;
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.15;
    font-family: 'JetBrains Mono', monospace;
    position: absolute;
    top: 16px;
    right: 24px;
}

.step-icon {
    color: var(--accent-light);
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

/* ===== Features ===== */
.features {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.feature-large {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* Chat Visual */
.chat-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.chat-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-bubble.incoming {
    background: var(--surface);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.outgoing {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.25);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-light);
}

.chat-text {
    font-size: 0.9rem;
    color: var(--text);
}

.chat-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== Telemetry ===== */
.telemetry {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

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

.telemetry-info h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.telemetry-info > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.telemetry-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.telemetry-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.telemetry-list svg {
    color: var(--green);
    flex-shrink: 0;
}

.telemetry-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.telemetry-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.telemetry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.telemetry-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.telemetry-period {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: var(--surface);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.chart-placeholder {
    margin-bottom: 16px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.telemetry-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-light);
}

.telemetry-mini-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mini-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.mini-bar {
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 2px;
    transition: width 1.5s ease-out;
}

/* ===== Tech Stack ===== */
.tech {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition);
}

.tech-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.tech-icon {
    margin-bottom: 16px;
}

.tech-emoji {
    font-size: 2rem;
}

.tech-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tech-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Partner ===== */
.partner {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 64px 48px;
    overflow: hidden;
}

.partner-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.partner-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.partner-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.partner-title h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.partner-info > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.map-mockup {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.map-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

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

.map-dot.red { background: #ff5f57; }
.map-dot.yellow { background: #febc2e; }
.map-dot.green { background: #28c840; }

.map-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-left: 8px;
}

.map-body {
    padding: 16px;
}

.map-svg {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .partner-layout {
        grid-template-columns: 1fr;
    }

    .partner-card {
        padding: 40px 24px;
    }
}

/* ===== Download ===== */
.download {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.download-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 80px 48px;
    text-align: center;
    overflow: hidden;
}

.download-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.download-card h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}

.download-card > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    position: relative;
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 24px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    transition: all var(--transition);
    min-width: 200px;
}

.download-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.download-btn svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.download-btn:hover svg {
    opacity: 1;
}

.download-btn div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dl-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dl-platform {
    font-size: 1.05rem;
    font-weight: 700;
}

.download-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 64px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

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

/* ===== Animations ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-large {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .telemetry-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .telemetry-mini-cards {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-card {
        padding: 48px 24px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .download-btn {
        width: 100%;
        max-width: 280px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
