/* CSS Reset & Variables has been kept the same, adding new styles */
:root {
    --primary-color: #0F172A;
    --accent-color: #3B82F6;
    --accent-glow: #60A5FA;
    --bg-light: #F8FAFC;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --white: #ffffff;
    --success: #10B981;
    --warning: #F59E0B;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    margin: 0;
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
}

.text-center {
    text-align: center;
}

.highlight {
    color: var(--accent-color);
}

.section {
    padding: 4rem 0;
}

/* Navbar */
.navbar {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn-primary,
.btn-primary-small,
.btn-primary-large {
    background: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-block;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Hero */
.hero-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.hero-content .subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.badge {
    background: #DBEAFE;
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.tech-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.tech-item {
    background: white;
    padding: 1rem 2rem;
    /* Larger padding */
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    /* Bolder */
    font-size: 1.1rem;
    /* Larger text */
    border: 2px solid #E2E8F0;
    /* Thicker border */
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.highlight-box {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #EFF6FF;
}

/* Grid & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Slightly wider cards */
    gap: 2.5rem;
    /* More breathing room */
}

.feature-card {
    background: white;
    padding: 2.5rem;
    /* More padding */
    border-radius: 16px;
    /* Rounder */
    border: 1px solid #E2E8F0;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.feature-card p {
    font-size: 1.1rem;
    /* Larger body text */
    line-height: 1.7;
    color: #4a5568;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
    /* Highlight color on hover */
}

.highlight-border {
    border: 2px solid var(--accent-color);
    position: relative;
}

.link-arrow {
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 1rem;
    display: block;
}

/* ================= DEMO SECTION STYLES ================= */
.demo-section {
    background: #f8fafc;
    padding-bottom: 6rem;
}

.demo-container {
    background: white;
    color: var(--text-dark);
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    /* Slightly tighter radius */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* Deep shadow */
    min-height: 650px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

/* Screen 1: Search (Dark Tech Theme) */
#screen-1 {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    /* Dark Slate Blue */
    color: white;
}

.search-centered {
    text-align: center;
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
}

.demo-logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    /* White on dark */
    letter-spacing: -0.5px;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    /* Slightly more square like SaaS */
    padding: 8px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    height: 60px;
    /* Taller */
    transition: transform 0.2s;
}

.search-bar-wrapper:focus-within {
    transform: scale(1.02);
}

.search-icon {
    color: #64748b;
    margin-right: 15px;
    font-size: 1.4rem;
}

#mainSearchInput {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1.2rem;
    color: #1e293b;
}

.btn-search-action {
    background: var(--accent-color);
    border: none;
    padding: 0 24px;
    height: 44px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-search-action:hover {
    background: #2563eb;
    /* Slightly darker blue */
}

.search-help-text {
    margin-top: 1.5rem;
    color: #94a3b8;
    /* Light gray */
    font-size: 1rem;
    font-weight: 400;
}

.example-searches {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.example-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.example-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* Screen 2: Results (Clean Notion/Drive Style) */
.results-header {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.mini-search-bar {
    background: #f1f5f9;
    padding: 8px 16px;
    border: none;
    box-shadow: none;
    width: 500px;
}

.mini-search-bar input {
    background: transparent;
}

.results-list {
    background: #f8fafc;
    /* Very light gray bg */
    padding: 30px;
}

.result-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Very subtle shadow */
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.2s;
}

.result-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-main {
    flex: 1;
}

.result-title {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 10px;
    align-items: center;
}

.meta-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.btn-view-doc {
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    /* Push to right */
    align-self: center;
}

.btn-view-doc:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}


/* Screen 3: Viewer + Smart Panel */
.viewer-header {
    background: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.btn-back {
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doc-header-title {
    font-size: 1rem;
    font-weight: 500;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.viewer-body {
    display: flex;
    height: 550px;
    background: #525659;
}

.document-pane {
    flex: 7;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    justify-content: center;
}

.scanned-page {
    background: white;
    width: 100%;
    max-width: 650px;
    min-height: 800px;
    padding: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    font-family: 'Times New Roman', serif;
    position: relative;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
}

.stamp {
    border: 2px solid #d00;
    color: #d00;
    padding: 5px 10px;
    font-weight: 800;
    transform: rotate(-15deg);
    position: absolute;
    top: 30px;
    right: 30px;
    opacity: 0.6;
}

.highlight-yellow {
    background-color: #ffeb3b;
}

.signature-area {
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
}

.sig {
    border-top: 1px solid #000;
    width: 40%;
    text-align: center;
    padding-top: 5px;
    font-style: italic;
}

.smart-panel {
    flex: 3;
    background: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel-section {
    padding: 20px;
    border-bottom: 1px solid #f1f1f1;
}

.panel-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ai-summary {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    background: #F0F9FF;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.location-box {
    background: #fdf2f8;
    padding: 12px;
    border-radius: 6px;
    border: 1px dashed #db2777;
    font-size: 0.85rem;
}

.loc-row {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.code-tag {
    background: #db2777;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.tag-date {
    background: #E0E7FF;
    color: #3730A3;
}

.tag-person {
    background: #F3F4F6;
    color: #1F2937;
    border: 1px solid #E5E7EB;
}

.key-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.data-item {
    background: #ECFDF5;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    color: #065F46;
}

.data-item small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
}

.data-item strong {
    display: block;
    font-size: 1.1rem;
    margin-top: 2px;
}

/* Updates for Footer */
.footer-cta {
    margin-top: 0;
    padding: 5rem 0;
    background: var(--primary-color);
    color: white;
}

/* Helper Classes */
.search-suggestions {
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.suggestion-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.chip {
    background: #f1f3f4;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #dadce0;
    transition: all 0.2s;
    font-weight: 500;
    color: #3c4043;
}

.chip:hover {
    background: #e8f0fe;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.rounded-shadow {
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    height: auto;
    object-fit: cover;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.mobile-mockup {
    max-width: 300px;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 13px rgba(0, 0, 0, 0.03));
}

.centered-vertical {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bg-light {
    background-color: #f8fafc;
}

.lead-text {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* ================= RESPONSIVE STYLES ================= */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    /* Typography adjustments */
    h1 {
        font-size: 2.2rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Layout stacking */
    .nav-links {
        display: none;
    }

    /* Hide menu for now or burger it if needed, simple approach: hide */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        margin-bottom: 2rem;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .image-content {
        order: -1;
    }

    /* Image first on mobile for visual impact */

    .grid-3,
    .grid-2,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Demo Mobile Optimization */
    .demo-container {
        min-height: auto;
        height: auto;
        border-radius: 0;
    }

    .demo-screen {
        position: relative;
        height: auto;
        min-height: 500px;
    }

    .viewer-body {
        flex-direction: column;
        height: auto;
    }

    .document-pane {
        height: 400px;
        padding: 10px;
    }

    .scanned-page {
        padding: 20px;
        min-height: auto;
    }

    .smart-panel {
        height: auto;
        border-left: none;
        border-top: 1px solid #ddd;
    }

    /* Visual Tweaks */
    .feature-card {
        padding: 1.5rem;
    }

    .hero-visual {
        display: none;
    }

    /* Hide complex visual on mobile if it takes too much space */
}