:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --accent-purple: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-blue: #3b82f6;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 1.08rem;
    text-align: center;
    overflow-x: hidden;
}

/* Background Ambient Glowing Orbs */
.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-purple {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 60%);
}

.blob-blue {
    bottom: 20%;
    left: -200px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 60%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 50px) scale(1.2); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.nav-links a:not(.btn):hover {
    opacity: 0.8;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #151517;
    min-width: 340px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chevron {
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.6;
}

/* Base Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-outline {
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-glass);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.2);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn-dark {
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.btn-dark:hover {
    background: #111111;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-light {
    background: #ffffff;
    color: #000000;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.btn-light:hover {
    background: #f0f0f0;
}

.social-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.avatars {
    display: flex;
}

.avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-left: -10px;
}

.avatars img:first-child {
    margin-left: 0;
}

.proof-text {
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.2;
    color: var(--text-secondary);
}

.proof-text span {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    margin-top: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 99px;
    color: var(--accent-purple);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.code-copy {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-glass);
    padding: 0.8rem 1.5rem;
    border-radius: 99px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-copy::before {
    content: '$';
    color: var(--accent-purple);
}

/* Code Demo Section */
.demo-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.demo-container h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.demo-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    width: 100%;
    text-align: left;
}

.glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.window-header {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-glass);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ef4444; }
.yellow { background: #eab308; }
.green { background: #22c55e; }

.filename {
    margin-left: 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

pre {
    padding: 2rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.5;
}

.keyword { color: #c678dd; }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.function { color: #61afef; }

/* Features Grid */
.features-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.glass-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.glass-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
.glass-card code {
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #A78BFA;
    font-size: 0.85em;
}

/* Interactive Demo Engine (Split Pane) */
.demo-ui-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-ui-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    background: transparent;
    align-items: stretch;
}

.glass-dark {
    background: rgba(20, 20, 22, 0.6);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    text-align: left;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    position: relative;
    justify-content: space-between;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.message {
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.5;
}

.user-msg {
    align-self: flex-end;
    background: rgba(40, 40, 45, 0.8);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text-primary);
}

.system-msg {
    align-self: flex-start;
    padding: 0.8rem 0;
    color: var(--text-primary);
    font-weight: 500;
}

.chat-controls {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-orange {
    background: #d95b20;
    color: #ffffff;
    font-family: var(--font-sans);
    padding: 0.6rem 1.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(217, 91, 32, 0.4);
}

.btn-orange:hover {
    background: #e96b30;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 91, 32, 0.6);
}

.memories-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.memories-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.memory-card {
    background: rgba(30, 30, 35, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.memory-text {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.memory-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
}

.tag-blue {
    background: #1e3a8a;
    color: #93c5fd;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.date {
    color: var(--text-secondary);
}

/* Animation Classes */
.hidden-msg {
    opacity: 0;
    transform: translateY(10px);
    display: none;
}
.hidden-msg.show {
    display: block;
    animation: slideUpFade 0.5s forwards;
}

.blurred-text p {
    filter: blur(5px);
    opacity: 0.3;
    transition: filter 1s, opacity 1s;
}

.blurred-text.unblur p {
    filter: blur(0px);
    opacity: 1;
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

.btn-green {
    background: #0f766e;
    color: #ffffff;
    font-family: var(--font-sans);
    padding: 0.8rem 2rem;
    border-radius: 99px;
    border: none;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-green:hover {
    background: #115e59;
    transform: translateY(-2px);
}

.highlight-pulse {
    animation: pulseBorder 1.5s infinite;
}

@keyframes pulseBorder {
    0% { border-color: rgba(255,255,255,0.03); box-shadow: 0 0 0 transparent; }
    50% { border-color: rgba(59, 130, 246, 0.8); box-shadow: 0px 0px 20px rgba(59,130,246,0.4); }
    100% { border-color: rgba(255,255,255,0.03); box-shadow: 0 0 0 transparent; }
}

#animPath {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0.8;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* Tabs Styling */
.usecase-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.usecase-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.typing-cursor::after {
    content: '\258E'; /* Block cursor */
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--text-secondary);
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Use Cases List Vertical */
.usecases-section {
    padding: 4rem 2rem 8rem 2rem;
}

.usecases-container {
    max-width: 450px;
    margin: 0 auto;
}

.usecases-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}

.usecase-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.2rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    color: var(--text-primary);
    text-decoration: none;
}

.usecase-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.icon-circle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    flex-shrink: 0;
}

.usecase-text h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
    font-weight: 600;
}

.usecase-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 6rem 2rem 2rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.footer-content h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-bottom {
    margin-top: 6rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.mt-4 { margin-top: 1.5rem; }
.justify-center { justify-content: center; }

/* Scroll Anim Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* --- Tablet: ≤900px --- */
@media (max-width: 900px) {

    /* Nav: hide full dropdown, show only logo + Docs */
    .nav-dropdown {
        display: none;
    }
    .nav-links {
        gap: 1.2rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Code Demo: stack vertically */
    .demo-container {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2rem;
    }
    .text-content {
        text-align: left;
    }

    /* Features grid: 2 columns */
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }

    /* Interactive demo: stack panels */
    .demo-ui-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .memories-panel {
        min-height: unset;
    }

    /* Usecase tabs: wrap */
    .usecase-tabs {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .tab-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    .usecase-title {
        font-size: 1.6rem;
    }

    /* Footer */
    .footer-content h2 {
        font-size: 2rem;
    }
}

/* --- Mobile Landscape: ≤640px --- */
@media (max-width: 640px) {

    body {
        font-size: 1rem;
    }

    /* Nav */
    .navbar {
        padding: 1rem 0;
    }
    .nav-container {
        padding: 0 1.2rem;
    }
    .logo {
        font-size: 1.2rem;
    }

    /* Hero */
    .hero {
        padding: 7rem 1.2rem 3rem;
    }
    .hero-title {
        font-size: 2.1rem;
        letter-spacing: -0.5px;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0;
    }
    .hero-cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Code Demo section */
    .demo-section {
        padding: 4rem 1.2rem;
    }
    .code-window {
        font-size: 0.78rem;
    }

    /* Features */
    .features-section {
        padding: 4rem 1.2rem;
    }
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .glass-card {
        padding: 1.5rem;
    }

    /* Demo UI section */
    .demo-ui-section {
        padding: 3rem 1rem;
    }
    .demo-ui-wrapper {
        max-width: 100% !important;
    }
    /* Stack panels vertically, compact sizes */
    .demo-ui-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .chat-panel {
        min-height: 200px;
        padding: 1rem;
    }
    .memories-panel {
        padding: 1rem;
        gap: 0.8rem;
    }
    .memories-panel h3 {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }
    .memory-card {
        padding: 0.7rem 0.9rem;
    }
    .memory-text {
        font-size: 0.82rem;
        margin-bottom: 0.4rem;
    }
    .memory-meta {
        font-size: 0.7rem;
    }
    /* Hide SVG connector line — doesn't work on stacked layout */
    #connectionLine {
        display: none !important;
    }
    .chat-messages {
        gap: 0.7rem;
        margin-bottom: 1rem;
    }
    .message {
        max-width: 90%;
        font-size: 0.88rem;
        padding: 0.6rem 0.9rem;
    }
    .system-msg {
        padding: 0.4rem 0;
        font-size: 0.88rem;
    }
    .btn-green {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.75rem 1.5rem;
    }

    /* Usecase tabs: full-width pill rows */
    .usecase-tabs {
        gap: 0.5rem;
    }
    .tab-btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.8rem;
    }
    .usecase-title {
        font-size: 1.35rem;
        margin-bottom: 1.2rem !important;
    }

    /* Footer */
    .footer {
        padding: 4rem 1.2rem 2rem;
    }
    .footer-content h2 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }
}

/* --- Mobile Portrait: ≤480px --- */
@media (max-width: 480px) {

    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }

    /* Reduce blob sizes so they don't overflow */
    .blob {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }

    .section-title h2,
    .footer-content h2 {
        font-size: 1.4rem;
    }

    /* Dropdown panel in nav: full width fallback */
    .dropdown-content {
        min-width: 90vw;
        left: -60px;
        transform: none;
    }

    .usecase-title {
        font-size: 1.15rem;
    }

    /* Memory cards tighter */
    .memory-card {
        padding: 0.8rem;
    }
    .memory-text {
        font-size: 0.85rem;
    }
}
