:root {
    --background: #F9F9F8;
    --text-primary: #1E1E1E;
    --text-secondary: #6B6B6B;
    
    /* UPDATED: Changed accent color to Cornflower Blue */
    --accent: #6495ED; 
    --accent-soft: rgba(100, 149, 237, 0.1); 

    --border-color: #EAEAEA;
    --card-bg: #FFFFFF;

    /* UPDATED: Refined Typographic Scale */
    --fs-900: clamp(3rem, 6vw + 1rem, 5rem);    /* h1 / main headline */
    --fs-800: clamp(2rem, 4vw + 1rem, 3rem);  /* h2 / tagline */
    --fs-700: 1.5rem;  /* h3 */
    --fs-600: 1.125rem; /* subtitle, larger body */
    --fs-500: 1rem;    /* standard body / section-text */
    --fs-400: 0.9375rem; /* Smaller body */
    --fs-300: 0.875rem; /* Smallest text */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TYPOGRAPHY --- */
h1 { font-size: var(--fs-900); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
h2 { font-size: var(--fs-800); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.subtitle { font-size: var(--fs-600); line-height: 1.8; }
.section-text { font-size: var(--fs-500); line-height: 1.9; }
.eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
p, span, a, li, button, input, textarea { font-size: var(--fs-400); }
.feature-text span, .capability-card p, .faq-item p { font-size: var(--fs-400); } /* Ensure consistency */
.label { font-size: var(--fs-300); } /* Smaller labels for animations */

nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(249, 249, 248, 0.8); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.nav-container {
    max-width: 1400px; margin: 0 auto; padding: 1rem 1.5rem; /* Adjusted padding */
    display: flex; justify-content: space-between; align-items: center;
}

/* UPDATED: Logo styles for CANVAS + Text */
.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
#nav-canvas {
    width: 32px;
    height: 32px;
    display: block;
}
.logo-text {
    font-size: 1.25rem; /* Slightly smaller logo */
    font-weight: 800;
    color: var(--text-primary);
}

.nav-links { display: flex; gap: 2rem; align-items: center; } /* Reduced gap */
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.3s; display: flex; align-items: center; gap: 0.25rem; font-size: var(--fs-400); }
.nav-link:hover { color: var(--text-primary); }
.nav-btn {
    background: var(--accent);
    color: white; padding: 0.6rem 1.25rem; /* Smaller button */
    border-radius: 50px; font-weight: 600; font-size: var(--fs-400);
    text-decoration: none; transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.nav-btn:hover { 
    transform: scale(1.05); 
    /* UPDATED: Shadow color */
    box-shadow: 0 10px 20px rgba(100, 149, 237, 0.2); 
}

/* Nav Dropdown */
.nav-dropdown { position: relative; padding: 0.5rem 0; cursor: pointer; } /* Adjusted padding */
.dropdown-arrow { transition: transform 0.3s ease; }
.nav-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
.dropdown-content {
    display: none;
    position: absolute;
    top: 90%;
    left: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s linear; /* Delay visibility */
    transform: translateX(-50%) translateY(10px); z-index: 110;
}
.nav-dropdown:hover .dropdown-content { 
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s linear; /* Show immediately on hover */
}
.dropdown-content a {
    color: var(--text-secondary); padding: 0.75rem 1rem; text-decoration: none;
    display: block; border-radius: 6px; font-weight: 500; font-size: var(--fs-400);
}
.dropdown-content a:hover { background-color: #f5f5f5; color: var(--text-primary); }

/* Mobile Menu Button */
.mobile-menu-btn { 
    display: none; 
    background: none; 
    border: none; 
    color: var(--text-primary); 
    font-size: 1.75rem; 
    cursor: pointer; 
    z-index: 120; /* Ensure button is above mobile menu */
}


.content-layer { position: relative; z-index: 10; padding-top: 60px; } /* Account for fixed nav height */
.section {
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 1.5rem; /* Reduced base padding */
    position: relative;
    overflow: hidden; /* Prevent horizontal scroll */
}
.section-container { width: 100%; max-width: 1200px; margin: 0 auto; }

.hero-section { text-align: center; padding: 8rem 1.5rem 6rem 1.5rem; position: relative; min-height: 80vh; }
#hero-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
}
.main-headline { font-size: var(--fs-900); font-weight: 900; letter-spacing: -0.05em; line-height: 1; margin-bottom: 1rem; }
.tagline { font-size: var(--fs-800); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 2rem; }
.h1-accent { color: var(--accent); }
.subtitle { max-width: 750px; color: var(--text-secondary); margin: 0 auto 2.5rem auto; }

/* UPDATED: Partner Logo Marquee Section */
.partners-section {
    margin-top: 5rem;
    width: 100%;
}
.partners-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.logo-marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* Gradient masks for fading edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-track {
    display: flex;
    width: calc(250px * 8); /* 250px per logo, 4 logos * 2 sets */
    animation: scroll 30s linear infinite;
}
.logo-slide {
    width: 250px; /* Width for each logo container */
    display: flex;
    flex-direction: column; /* Stack logo and tag */
    align-items: center;
    justify-content: center;
    padding: 0 40px; /* Spacing between logos */
    gap: 0.75rem; /* Space between logo and tag */
}
.logo-slide svg {
    height: 40px; /* Adjusted logo size */
    width: auto;
    fill: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.3s;
}
.logo-slide:hover svg {
    opacity: 1;
}
.logo-tag {
    font-size: var(--fs-300);
    font-weight: 500;
    color: var(--text-secondary);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-250px * 4)); /* Scroll by the width of one set of logos */
    }
}


.eyebrow { color: var(--accent); margin-bottom: 1rem; display: block; } /* Reduced bottom margin */
.grid-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; } /* Reduced gap */
h2 { margin-bottom: 1.5rem; }
.section-text { color: var(--text-secondary); }

.capabilities-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 3rem; } /* Reduced gap */
.capability-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 2rem; transition: all 0.3s ease; /* Reduced padding */
}
.capability-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.capability-card h3 { font-size: 1.125rem; font-weight: 600; margin: 1rem 0 0.5rem 0; } /* Adjusted size */
.capability-card p { font-size: var(--fs-400); line-height: 1.7; color: var(--text-secondary); }
.capability-icon { color: var(--accent); }

.feature-list { list-style: none; margin-top: 2rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; } /* Reduced gap */
.feature-item { display: flex; align-items: flex-start; gap: 0.75rem; } /* Reduced gap */
.feature-icon { color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.feature-text strong { display: block; font-weight: 600; color: var(--text-primary); font-size: var(--fs-400); }
.feature-text span { font-size: var(--fs-400); color: var(--text-secondary); }

/* --- FAQ SECTION --- */
.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.faq-item summary { font-size: var(--fs-500); font-weight: 600; padding: 1.25rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; } /* Adjusted padding */
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--accent); transition: transform 0.3s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); line-height: 1.8; font-size: var(--fs-400); }

.viz-container {
    position: relative;
    width: 100%;
    height: 400px; /* Reduced height slightly */
}
.viz-canvas {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: #F0F0ED;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease, transform 1s ease;
    position: absolute;
    top: 0;
    left: 0;
}
.viz-canvas.visible {
    opacity: 1;
    transform: scale(1);
}
.label-renderer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.label {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: var(--fs-300);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: none;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

/* REMOVED: .info-icon and .agent-tooltip styles */


#playground-container { display: flex; flex-direction: column; gap: 1rem; align-items: center; background: #F0F0ED; padding: 1rem; border-radius: 16px; width: 100%; height: 500px;}
#playground-canvas-container { width: 100%; flex-grow: 1; border-radius: 8px; overflow: hidden; position: relative;}
#playground-canvas { background: white; cursor: grab; display: block; width: 100%; height: 100%; }

/* UPDATED: Playground Controls layout */
#playground-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}
#agent-palette { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; flex-grow: 1; } /* Reduced gap */
.playground-btn {
    padding: 0.5rem 1rem;
    font-size: var(--fs-400);
    flex-shrink: 0;
}
.agent-item {
    padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--card-bg);
    font-weight: 600; font-size: var(--fs-300); cursor: grab; transition: all 0.2s; /* Adjusted size */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 0.5rem;
    position: relative; /* For tooltip positioning context, though we append to body */
}
.agent-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.agent-color-dot { width: 10px; height: 10px; border-radius: 50%; }
#loading-bar-container { display: none; width: 80%; background: #EAEAEA; border-radius: 5px; overflow: hidden; height: 10px; }
#loading-bar { width: 0%; height: 100%; background: var(--accent); transition: width 1.5s ease-out; }

/* NEW: Styles for Palette Tooltips */
.agent-tooltip-palette {
    position: absolute;
    z-index: 200; /* Above nav */
    background: var(--text-primary);
    color: var(--background);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: var(--fs-300);
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 220px;
    line-height: 1.6;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: normal; /* Allow wrapping */
}

.contact-section { background: var(--card-bg); border-radius: 2rem; padding: 4rem; } /* Reduced padding */
.contact-form { margin-top: 2.5rem; } /* Reduced margin */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; } /* Reduced gap */
.form-input {
    width: 100%; background: #F3F3F1; border: 1px solid var(--border-color);
    border-radius: 8px; padding: 1rem; font-size: var(--fs-400); color: var(--text-primary); transition: all 0.3s; /* Adjusted padding/size */
}
.form-input::placeholder { color: #999; }
/* UPDATED: Focus color */
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.form-input { min-height: 120px; resize: vertical; } /* Reduced height */
.form-submit {
    background: var(--accent); color: white; width: 100%; font-size: 1rem; padding: 1rem; /* Adjusted size */
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.form-submit:hover { transform: scale(1.02); }

footer { padding: 3rem 1.5rem; text-align: center; border-top: 1px solid var(--border-color); } /* Adjusted padding */
.footer-logo { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.5rem; } /* Reduced gap */
.footer-link { color: var(--text-secondary); text-decoration: none; font-size: var(--fs-400); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 960px) {
    .nav-links { 
        display: none; /* Hide desktop nav */
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        right: 0;
        background: rgba(249, 249, 248, 0.95); /* Slightly opaque background */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s linear;
    }
    .nav-links.active {
        display: flex; /* Show mobile nav when active */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s linear;
    }
    .nav-link { padding: 0.75rem 0; width: 100%; text-align: center; }
    .nav-dropdown { width: 100%; text-align: center; }
    .dropdown-content { position: static; transform: none; box-shadow: none; border: none; background: none; padding: 0; margin-top: 0.5rem; min-width: auto; opacity: 1; visibility: visible; display: none; /* Hide sub-items initially */ }
    .nav-dropdown:hover .dropdown-content { /* Remove hover effect for sub-menu on mobile */ display: none; }
    .nav-dropdown.active .dropdown-content { display: block; } /* Show sub-items when dropdown is active */
    .dropdown-content a { padding: 0.5rem 0; color: var(--text-secondary); }
    .nav-btn { width: auto; margin-top: 1rem; }
    .mobile-menu-btn { display: block; } /* Show hamburger */
    
    .capabilities-grid, .grid-halves { grid-template-columns: 1fr; }
    .viz-content { grid-row: 1; margin-bottom: 3rem; order: -1; }
    .grid-halves { gap: 3rem; }
}

@media (max-width: 768px) {
    h1.main-headline { font-size: var(--fs-800); } 
    p.tagline { font-size: var(--fs-700); }
    h2 { font-size: 2.25rem; } 
    .subtitle { font-size: 1rem; }
    .section { padding: 4rem 1rem; }
    .hero-section { padding: 6rem 1rem 6rem 1rem; }
    .capabilities-grid { gap: 1rem; }
    .capability-card { padding: 1.5rem; }
    .capability-card h3 { font-size: 1.125rem; margin-top: 1rem; }
    .capability-card p { font-size: 0.9375rem; }
    .grid-halves { gap: 2rem; }
    .section-text { font-size: 1rem; }
    .feature-list { margin-top: 1.5rem; gap: 1rem; }
    .feature-text span { font-size: 0.9375rem; }
    .faq-item summary { font-size: 1rem; padding: 1rem 1.25rem; }
    .faq-item p { padding: 0 1.25rem 1.25rem; font-size: 0.9375rem; }
    .viz-container { height: 350px; }
    .contact-section { padding: 3rem 1.5rem; }
    footer { padding: 2.5rem 1rem; }
    .footer-logo { font-size: 1.75rem; }
    
    .logo-slide svg { height: 36px; }
    .logo-tag { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .nav-container { padding: 1rem; }
    #nav-canvas { width: 28px; height: 28px; }
    .logo-text { font-size: 1.125rem; }
    .nav-btn { padding: 0.5rem 1rem; font-size: 0.875rem;}
    .section { padding: 3rem 1rem; }
    .hero-section { padding: 5rem 1rem 5rem 1rem; }
    .capability-card { padding: 1.25rem; }
    .agent-item { padding: 0.4rem 0.6rem; font-size: 0.8rem;}
    .contact-section { padding: 2.5rem 1rem; }
    .form-input { padding: 0.9rem; font-size: 0.9375rem;}
    .form-submit { padding: 0.9rem; font-size: 1rem;}
    
    .logo-slide svg { height: 28px; }
    .logo-track { animation: scroll 20s linear infinite; }

    #playground-controls { justify-content: center; }
    #reset-playground-btn { width: 100%; text-align: center; }
}
