/* TAVUS AI Showcase - CSS Styles */
/* Incorporating design.md specifications where applicable */

:root {
    /* Color Palette from design.md */
    --background: #E5E7EB;
    --canvas-dots: #D1D5DB;
    --node-border-default: #D0D5DD;
    --node-border-active: #fe8933; /* Changed from blue to orange */
    --node-text-primary: #111827;
    --node-text-secondary: #6B7280;
    --toolbar-background: #1F2937;
    --toolbar-hover: #374151;
    --toolbar-icons: #FFFFFF;
    --connection-line: #2970FF;

    /* Extended palette for the application */
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --light-gray-alt: #EAEFF5;
    --dark-gray: #374151;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-node-title: 14px;
    --font-size-labels: 12px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--node-text-primary);
    background-color: #faf7ef; /* Changed from var(--background) */
}

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

/* Top Video Section */
.top-video {
    background: #faf7ef; /* Changed from var(--white) */
    padding: 2rem 2rem 8rem; /* Added bottom padding for video overlap */
}

.top-video h2 {
    font-size: 2.5rem;
    line-height: 1.1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.top-video p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Header Styles */
.header {
    background-color: #faf7ef; /* Changed from var(--white) */
    border-bottom: 1px solid var(--node-border-default);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand .nav-logo {
    height: 24px;
    width: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--node-text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.nav .btn-secondary {
    background-color: #000;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--node-text-primary);
    border: 1px solid var(--node-border-default);
}

.btn-outline:hover {
    background-color: var(--background);
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #fe8933; /* Changed from var(--node-border-active) */
    color: var(--white);
}

.btn-primary:hover {
    background-color: #e57a2e; /* Darker shade of orange */
    border-color: #fe8933;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--node-text-primary);
    border: 1px solid var(--node-border-default);
}

.btn-secondary:hover {
    background-color: var(--background);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
}

#startConversationBtn {
    background-color: #000000;
}

/* Hero Section */
.hero {
    background: #eee8dd; /* Changed from linear-gradient */
    padding: calc(8rem + 20px) 2rem 4rem; /* Adjusted padding for video overlap */
    text-align: center;
    margin-top: calc(-6rem - 50px); /* Negative margin to pull section up */
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--node-text-primary);
}

.hero p {
    font-size: 1.125rem;
    color: var(--node-text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-features-tight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    background: var(--white);
    border-radius: 8px;
    border: 2px solid var(--node-border-default);
    text-align: center;
    transition: border-color 0.2s ease;
    overflow: hidden;
}

.feature-item:hover {
    border-color: #fe8933; /* Changed from var(--node-border-active) */
}

.feature-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

.feature-item-content {
    padding: 1.5rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--node-text-secondary);
    font-size: 0.9rem;
}

/* Demo Section */
.demo-section {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.demo-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.demo-section > .container > p {
    text-align: center;
    color: var(--node-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.demo-unified {
    max-width: 800px;
    margin: 0 auto;
}

.demo-info-connected {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #faf7ef;
    border-radius: 8px;
    border: 2px solid var(--node-border-default);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.demo-info-connected h3 {
    margin-bottom: 1rem;
}

.demo-info-connected ol {
    text-align: left;
    display: inline-block;
}

.demo-info-connected li {
    margin-bottom: 0.5rem;
    color: var(--node-text-secondary);
}

/* Start Conversation Widget */
.start-conversation-widget {
    background: var(--white);
    padding: 1rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.start-conversation-widget h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--node-text-primary);
}

.start-conversation-widget .btn {
    margin-bottom: 1rem;
}

/* Demo Info */
.demo-info {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid var(--node-border-default);
}

.demo-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.demo-info ol {
    margin-bottom: 2rem;
}

.demo-info li {
    margin-bottom: 0.5rem;
    color: var(--node-text-secondary);
}

.meeting-link-container {
    text-align: center;
    padding: 1.5rem;
    background: rgba(254, 137, 51, 0.1);
    border-radius: 8px;
    border: 2px solid var(--node-border-active);
}

.meeting-link-container p {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--node-text-primary);
}

/* Template Section */
.template-section {
    padding: 4rem 2rem;
    background: #faf7ef;
}

.template-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.template-section > .container > p {
    text-align: center;
    color: var(--node-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.template-card {
    background: var(--white);
    border-radius: 8px;
    border: 2px solid var(--node-border-default);
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.template-image {
    width: 50%;
}

.template-content {
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.template-content ul {
    margin-bottom: 2rem;
    color: var(--node-text-secondary);
}

.template-content li {
    margin-bottom: 0.5rem;
}

/* Video Section */
.video-section {
    padding: 4rem 2rem;
    background-color: transparent; /* Changed from var(--white) */
}

.video-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.video-section > .container > p {
    text-align: center;
    color: var(--node-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-container {
    display: flex;
    justify-content: center;
    position: relative; /* Added for z-index */
    z-index: 10; /* Ensure video is above hero section */
}

.video-wrapper {
    max-width: 800px;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* CTA Section */
.cta-section {
    background: #eee8dd;
    padding: 4rem 2rem;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #000;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .top-video {
        padding: 1rem 1rem 6rem; /* Adjusted padding */
    }

    .top-video h2 {
        font-size: 2.2rem;
        max-width: 100%;
    }

    .top-video p {
        max-width: 100%;
    }

    .hero {
        padding: calc(6rem + 20px) 1rem 2rem; /* Adjusted padding */
        margin-top: calc(-5rem - 50px); /* Adjusted margin */
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero-features-tight {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .demo-section h2,
    .template-section h2,
    .video-section h2 {
        font-size: 2.2rem;
    }

    .demo-unified {
        margin: 2rem auto;
    }

    .demo-info-connected {
        padding: 1.5rem;
    }

    .template-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .template-image {
        width: 100%;
    }

    .start-conversation-widget {
        padding: 1.5rem;
    }

}

/* Grid Background Pattern (from design.md inspiration) */
.grid-background {
    background-image:
        radial-gradient(circle, var(--canvas-dots) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Node-like styling for cards */
.node-style {
    border-radius: 8px;
    border: 2px solid var(--node-border-default);
    background: var(--white);
    transition: border-color 0.2s ease;
}

.node-style:hover {
    border-color: #fe8933; /* Changed from var(--node-border-active) */
}
