/**
 * Welcome/Landing Page Styles
 * Public-facing landing page specific styles
 */

/* CSS Variables */
:root {
    --accent: #9333ea;
    --accent-light: #a855f7;
    --accent-lighter: #c084fc;
    --accent-soft: #faf5ff;
    --accent-glow: rgba(147, 51, 234, 0.15);
    --surface: #ffffff;
    --surface-raised: #fafafa;
    --border: #e4e4e7;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --gradient-start: #f3e8ff;
    --gradient-end: #faf5ff;
}

.dark {
    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-lighter: #d8b4fe;
    --accent-soft: rgba(147, 51, 234, 0.15);
    --accent-glow: rgba(168, 85, 247, 0.25);
    --surface: #09090b;
    --surface-raised: #18181b;
    --border: #27272a;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --gradient-start: #1a0a2e;
    --gradient-end: #09090b;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background patterns */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-pattern::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
            ellipse at 30% 20%,
            var(--accent-soft) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 70% 80%,
            var(--accent-soft) 0%,
            transparent 50%
        );
    animation: float 20s ease-in-out infinite;
}

.dark .bg-pattern::before {
    background: radial-gradient(
            ellipse at 30% 20%,
            rgba(147, 51, 234, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 70% 80%,
            rgba(147, 51, 234, 0.08) 0%,
            transparent 50%
        );
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(2%, 2%) rotate(1deg);
    }
    66% {
        transform: translate(-1%, 1%) rotate(-1deg);
    }
}

/* Grid overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

.dark .grid-overlay {
    opacity: 0.15;
}

/* Content wrapper */
.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.dark nav.scrolled {
    background: rgba(9, 9, 11, 0.8);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

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

.nav-link {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.nav-link.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px -4px rgba(147, 51, 234, 0.4);
}

.nav-link.primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -4px rgba(147, 51, 234, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 1280px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.hero-badge::before {
    content: "✨";
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent-lighter));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 540px;
}

@media (max-width: 968px) {
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 968px) {
    .hero-actions {
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px -4px rgba(147, 51, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -4px rgba(147, 51, 234, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--surface-raised);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 968px) {
    .hero-visual {
        order: -1;
        margin-bottom: 2rem;
    }
}

.hero-image-wrapper {
    position: relative;
    padding: 2rem;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        var(--accent-glow) 0%,
        transparent 70%
    );
    filter: blur(40px);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero-logo {
    position: relative;
    max-width: 400px;
    width: 100%;
    filter: drop-shadow(0 20px 40px rgba(147, 51, 234, 0.2));
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Floating elements */
.floating-element {
    position: absolute;
    border-radius: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    animation: float-around 8s ease-in-out infinite;
}

.dark .floating-element {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.floating-element.el-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.floating-element.el-2 {
    bottom: 20%;
    right: -5%;
    animation-delay: 2s;
}

.floating-element.el-3 {
    bottom: 5%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes float-around {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(10px) rotate(-2deg);
    }
}

.floating-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.floating-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-lighter));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(147, 51, 234, 0.2);
    border-color: var(--accent);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 2rem;
    position: relative;
}

.steps-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
}

@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(147, 51, 234, 0.15);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases {
    padding: 6rem 2rem;
    background: linear-gradient(
        180deg,
        transparent,
        var(--accent-soft),
        transparent
    );
}

.use-cases-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

@media (max-width: 840px) {
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

.use-case-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.use-case-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(147, 51, 234, 0.2);
    border-color: var(--accent);
}

.use-case-card:hover::before {
    opacity: 1;
}

.use-case-card > * {
    position: relative;
}

.use-case-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.use-case-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.use-case-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.use-case-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.use-case-benefits li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
}

.cta-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    border-radius: 2rem;
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(
        ellipse,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.cta-card * {
    position: relative;
}

.cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary {
    background: white;
    color: var(--accent);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.3);
}

.cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-logo {
    height: 32px;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Dark mode toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent);
}

.theme-toggle .sun {
    display: block;
}
.theme-toggle .moon {
    display: none;
}
.dark .theme-toggle .sun {
    display: none;
}
.dark .theme-toggle .moon {
    display: block;
}

/* Animations on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile nav */
@media (max-width: 640px) {
    nav {
        padding: 1rem;
    }

    .nav-link:not(.primary) {
        display: none;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .features,
    .cta {
        padding: 4rem 1rem;
    }

    .cta-card {
        padding: 2rem;
    }

    .floating-element {
        display: none;
    }
}

/* ========================================
   Live Demo Section
   ======================================== */

.demo-section {
    padding: 6rem 2rem;
    background: linear-gradient(
        180deg,
        var(--surface) 0%,
        var(--accent-soft) 50%,
        var(--surface) 100%
    );
    position: relative;
    overflow: hidden;
}

.chat-demo-container {
    max-width: 700px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Demo Tabs */
.demo-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.demo-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.demo-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.demo-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px -2px rgba(147, 51, 234, 0.4);
}

.demo-tab-icon {
    font-size: 1rem;
}

.demo-tab-label {
    display: inline;
}

/* Demo Panels */
.demo-panel {
    display: none;
}

.demo-panel.active {
    display: block;
}

.chat-demo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 50px -12px rgba(147, 51, 234, 0.15);
    transform: rotateX(2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.chat-demo-card:hover {
    transform: rotateX(0deg) translateY(-4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 30px 60px -15px rgba(147, 51, 234, 0.25);
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
}

.chat-header-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}

.chat-header-dot:nth-child(1) {
    background: #ef4444;
}
.chat-header-dot:nth-child(2) {
    background: #f59e0b;
}
.chat-header-dot:nth-child(3) {
    background: #22c55e;
}

.chat-header-title {
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Scenario Badge */
.chat-scenario-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
}

.scenario-icon {
    font-size: 1rem;
}

/* Chat Messages Container */
.chat-messages {
    padding: 1.25rem;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat Message */
.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 90%;
    opacity: 0;
    transform: translateY(20px);
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Message timing - 20 second loop (longer pause at end) */
.chat-message.message-1 {
    animation: message1Loop 20s ease-out infinite;
}

.chat-message.message-2 {
    animation: message2Loop 20s ease-out infinite;
}

.chat-message.message-3 {
    animation: message3Loop 20s ease-out infinite;
}

/* Message Avatar */
.message-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.message-avatar.customer {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.message-avatar.user {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.message-avatar.coach {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
}

/* Message Content */
.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-role {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.chat-message.user .message-role {
    text-align: right;
}

.message-text {
    padding: 0.875rem 1.125rem;
    border-radius: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.chat-message.assistant .message-text {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-top-left-radius: 0.25rem;
}

.chat-message.user .message-text {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
    border-top-right-radius: 0.25rem;
}

.chat-message.feedback .message-text {
    background: linear-gradient(
        135deg,
        rgba(147, 51, 234, 0.08),
        rgba(147, 51, 234, 0.04)
    );
    border: 1px solid var(--accent);
    border-top-left-radius: 0.25rem;
}

.feedback-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.875rem 1.125rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    width: fit-content;
    margin-left: 3.25rem;
    opacity: 0;
}

.typing-indicator.typing-1 {
    animation: typing1Loop 20s ease infinite;
}

.typing-indicator.typing-2 {
    animation: typing2Loop 20s ease infinite;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat Input Mock */
.chat-input-mock {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 1.25rem 1.25rem;
    padding: 0.875rem 1.125rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.chat-input-placeholder {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.chat-send-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Demo Caption */
.demo-caption {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.demo-caption p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Keyframe Animations - 20 second loop (7s pause at end) */

/* Message 1: Appears at 1s (5%), visible until 12s (60%), fades out by 13s (65%) */
@keyframes message1Loop {
    0%,
    3% {
        opacity: 0;
        transform: translateY(20px);
    }
    8%,
    58% {
        opacity: 1;
        transform: translateY(0);
    }
    65%,
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Typing 1: Shows at 2s (10%), hides at 3.5s (17.5%) */
@keyframes typing1Loop {
    0%,
    8% {
        opacity: 0;
    }
    12%,
    15% {
        opacity: 1;
    }
    19%,
    100% {
        opacity: 0;
    }
}

/* Message 2: Appears at 4s (20%), visible until 12s (60%), fades out by 13s (65%) */
@keyframes message2Loop {
    0%,
    18% {
        opacity: 0;
        transform: translateY(20px);
    }
    23%,
    58% {
        opacity: 1;
        transform: translateY(0);
    }
    65%,
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Typing 2: Shows at 5s (25%), hides at 6.5s (32.5%) */
@keyframes typing2Loop {
    0%,
    23% {
        opacity: 0;
    }
    27%,
    30% {
        opacity: 1;
    }
    34%,
    100% {
        opacity: 0;
    }
}

/* Message 3: Appears at 7s (35%), visible until 12s (60%), fades out by 13s (65%) */
@keyframes message3Loop {
    0%,
    33% {
        opacity: 0;
        transform: translateY(20px);
    }
    38%,
    58% {
        opacity: 1;
        transform: translateY(0);
    }
    65%,
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes typingBounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .demo-section {
        padding: 4rem 1rem;
    }

    .demo-tabs {
        gap: 0.375rem;
    }

    .demo-tab {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .demo-tab-icon {
        font-size: 0.875rem;
    }

    .chat-demo-card {
        transform: none;
    }

    .chat-demo-card:hover {
        transform: none;
    }

    .chat-messages {
        min-height: 300px;
        padding: 1rem;
    }

    .chat-message {
        max-width: 95%;
    }

    .message-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .message-text {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .typing-indicator {
        margin-left: 2.75rem;
    }

    .chat-scenario-badge {
        font-size: 0.75rem;
        margin: 0.75rem 1rem;
    }
}
