/* ==========================================================================
   WANKAMBO 8K HYPER-PREMIUM DESIGN SYSTEM (V2 SPLIT-SCREEN WORKSPACE)
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    --bg-dark-center: #0D0D0D;
    --bg-dark-edge: #000000;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E5E5;
    --text-muted: #9CA3AF;
    --accent-blue: #3B82F6;
    --accent-blue-glow: rgba(59, 130, 246, 0.25);
    
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-border-hover: rgba(255, 255, 255, 0.18);
    --input-border-focus: rgba(59, 130, 246, 0.4);
    
    --drawer-bg: rgba(13, 13, 13, 0.94);
    --card-bg: rgba(18, 18, 18, 0.85);
    --card-border: rgba(255, 255, 255, 0.09);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tracking-wide: 0.25em;
    --radius-pill: 9999px;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark-edge);
    font-family: var(--font-family);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Background Radial Gradient & Grain Canvas --- */
body {
    background: radial-gradient(circle at 50% 50%, var(--bg-dark-center) 0%, var(--bg-dark-edge) 100%);
    position: relative;
}

#grain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.065;
}

.ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 2;
    filter: blur(40px);
}

/* --- Top Navigation Header --- */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    padding: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
}

.hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    z-index: 101;
    outline: none;
}

.hamburger-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.hamburger-btn:hover .bar {
    background-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

/* --- App Viewport & Mode Switching --- */
.app-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   1. HERO VIEW (CENTERED INITIAL LANDING)
   ========================================================================== */
.hero-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.hero-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* Logo */
.logo-wrapper {
    margin-bottom: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    width: 96px;
    height: auto;
    display: block;
    object-fit: contain;
    filter: brightness(1) contrast(1.05);
    transition: var(--transition-smooth);
    user-select: none;
}

.logo-wrapper:hover .brand-logo {
    transform: scale(1.04);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
}

/* Wordmark */
.brand-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

/* Tagline */
.brand-tagline {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2.75rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.brand-tagline .accent-blue {
    color: var(--accent-blue);
    font-weight: 400;
}

/* Input Wrapper & Forms */
.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 680px;
}

.agentic-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 64px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-pill);
    padding: 0 0.85rem 0 1.25rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.agentic-form:hover {
    border-color: var(--input-border-hover);
    background: rgba(255, 255, 255, 0.045);
}

.agentic-form:focus-within {
    border-color: var(--input-border-focus);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.plus-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.plus-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.agentic-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-secondary);
    caret-color: var(--accent-blue);
}

.agentic-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.85;
}

.submit-arrow-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.agentic-form:focus-within .submit-arrow-btn,
.agentic-input:not(:placeholder-shown) ~ .submit-arrow-btn {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--accent-blue-glow);
}

.submit-arrow-btn:hover {
    transform: scale(1.05);
}

/* Suggestions Popover */
.suggestions-popover {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 50;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInDown 0.3s ease forwards;
}

.popover-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding-left: 8px;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-family);
}

.suggestion-chip:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* ==========================================================================
   2. WORKSPACE VIEW (SPLIT-SCREEN ACTIVE CONVERSATION)
   ========================================================================== */
.workspace-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Left Column: Pinned Brand Anchor Panel --- */
.workspace-left-panel {
    width: 440px;
    min-width: 400px;
    height: 100%;
    background: rgba(11, 11, 11, 0.92);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 32px;
    z-index: 20;
}

.left-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.brand-badge-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2.5rem;
}

.left-panel-logo {
    width: 48px;
    height: auto;
    filter: brightness(1);
}

.badge-title {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    color: var(--text-primary);
    text-transform: uppercase;
}

.brand-summary-box {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.summary-greeting {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-statement strong {
    color: var(--text-primary);
    font-weight: 600;
}

.summary-lead {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Checklist Features (Matching Wireframe ✔) */
.checklist-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0.5rem 0;
}

.checklist-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-locations {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Return Home Button */
.left-panel-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.return-home-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-family);
}

.return-home-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* --- Right Column: Interactive Chat Stream Workspace --- */
.workspace-right-panel {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
    overflow: hidden;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 90px 48px 120px 48px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
.chat-messages-container::-webkit-scrollbar {
    width: 6px;
}
.chat-messages-container::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* User Message Speech Bubble (Right Aligned) */
.user-msg-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.user-msg-bubble {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 4px 20px;
    padding: 14px 22px;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 400;
    max-width: 75%;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* AI Agent Response Card (Left Aligned) */
.ai-msg-row {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.ai-msg-card {
    background: rgba(18, 18, 18, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 20px 20px 20px 4px;
    padding: 24px 28px;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 88%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.ai-msg-card p {
    margin-bottom: 1rem;
}

.ai-msg-card p:last-child {
    margin-bottom: 0;
}

.ai-msg-card strong {
    color: var(--text-primary);
}

/* Thinking Indicator with Heartbeat Elephant Logo */
.thinking-indicator-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.thinking-heartbeat-logo {
    width: 24px;
    height: auto;
    object-fit: contain;
    animation: heartbeat 1.35s infinite ease-in-out;
}

.thinking-label {
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

@keyframes heartbeat {
    0% {
        transform: scale(0.92);
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.2));
    }
    14% {
        transform: scale(1.18);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.7));
    }
    28% {
        transform: scale(0.96);
        opacity: 0.75;
        filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3));
    }
    42% {
        transform: scale(1.12);
        opacity: 0.95;
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
    }
    70%, 100% {
        transform: scale(0.92);
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.2));
    }
}

/* Value Items Grid inside AI Card */
.values-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.25rem 0;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 18px;
}

.value-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

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

.value-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.98rem;
}

.value-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Floating Down Arrow Scroll Button */
.scroll-down-btn {
    position: absolute;
    bottom: 100px;
    right: 48px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    z-index: 30;
}

.scroll-down-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: scale(1.1);
}

/* Persistent Fixed Bottom Input Bar */
.workspace-input-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 48px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 60%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 25;
    display: flex;
    justify-content: center;
}

.workspace-input-bar .input-wrapper {
    max-width: 800px;
}

/* --- Slide-over Drawer Menu --- */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: var(--drawer-bg);
    border-left: 1px solid var(--card-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 201;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    transform: translateX(100%);
    transition: var(--transition-smooth);
}

.drawer-menu.active {
    transform: translateX(0);
}

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

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
}

.drawer-logo {
    width: 56px;
    height: auto;
    filter: brightness(1);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.drawer-nav {
    margin: 2rem 0;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.menu-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}

.link-num {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
    font-family: monospace;
}

.menu-link:hover {
    color: var(--text-primary);
    transform: translateX(8px);
}

.drawer-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-location {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Modals for Navigation Links --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 1;
    transition: var(--transition-smooth);
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: scale(1);
    transition: var(--transition-smooth);
}

.wide-card {
    max-width: 720px;
}

.modal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.content-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
}

.content-body {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.content-body h3 {
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.content-body p {
    margin-bottom: 1rem;
}

.content-body ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.content-body li {
    margin-bottom: 0.4rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .workspace-container {
        flex-direction: column;
    }

    .workspace-left-panel {
        width: 100%;
        min-width: 100%;
        height: auto;
        padding: 24px 20px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

    .brand-summary-box {
        display: none; /* Collapsed on mobile to save height */
    }

    .brand-badge-header {
        margin-bottom: 0;
    }

    .left-panel-footer {
        padding-top: 0.75rem;
        border-top: none;
    }

    .chat-messages-container {
        padding: 24px 20px 100px 20px;
    }

    .workspace-input-bar {
        padding: 16px 20px;
    }

    .user-msg-bubble {
        max-width: 90%;
    }

    .ai-msg-card {
        max-width: 98%;
        padding: 18px 20px;
    }
}
