/* Enhanced feature list styling (consolidated below) */

/* Chat Example Section Styles */
/* Subtle editorial background and refined chat bubbles with indigo-accented chips */
.chat-section {
    position: relative;
    /* Gentle neutral gradient for an editorial canvas */
    background: var(--bg-body);
}

[data-theme="light"] .chat-section {
    background: linear-gradient(180deg, #fbfdfe 0%, #f6f7fb 100%);
}

/* Optional ultra-faint gridlines to suggest data structure (Bloomberg-esque) */
.chat-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.03) 1px, transparent 1px);
    background-size: 100% 64px, 64px 100%;
    opacity: 0.4;
}

.chat-thread {
    position: relative;
    z-index: 1;
    /* above gridlines */
}

.chat-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.chat-row--user {
    justify-content: flex-end;
}

.chat-avatar {
    width: 2.5rem;
    /* 40px */
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-bubble {
    max-width: min(720px, 88%);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

[data-theme="dark"] .chat-bubble {
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.9);
}

.chat-bubble--user {
    background: var(--bg-card);
    color: var(--text-main);
    /* gray-100 */
    border-bottom-right-radius: 0.5rem;
}

.chat-bubble--devan {
    background: var(--bg-card);
    color: var(--text-main);
    border-bottom-left-radius: 0.5rem;
    /* Slightly more generous padding for better balance */
    padding: 1.25rem 1.5rem;
}

.chat-bubble--devan:hover {
    border-color: rgba(79, 70, 229, 0.22);
    /* indigo hint on hover */
    box-shadow: 0 4px 12px -6px rgba(17, 24, 39, 0.12);
}

/* Emphasis chips for funding rounds/amounts */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.17rem 0.56rem;
    /* slightly plusher, still compact */
    border-radius: 9999px;
    font-size: 0.8125rem;
    /* ~13px */
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    /* align numbers and currency values */
    border: 0;
    /* remove hard border for a softer, premium feel */
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    vertical-align: baseline;
}

.chip--indigo {
    /* Gentle gradient with subtle inset border using box-shadow */
    background: linear-gradient(180deg, #eef2ff 0%, #e7eafb 100%);
    color: #4338ca;
    /* indigo-700 for a calmer, premium look */
    box-shadow:
        0 1px 0 rgba(17, 24, 39, 0.04),
        inset 0 0 0 1px rgba(79, 70, 229, 0.14);
}

[data-theme="dark"] .chip--indigo {
    background: rgba(67, 56, 202, 0.2);
    color: #a5b4fc;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -8px rgba(17, 24, 39, 0.18);
}

/* Variant-specific hover refinement */
.chip--indigo:hover {
    background: linear-gradient(180deg, #e9edff 0%, #e2e7ff 100%);
    box-shadow:
        0 8px 16px -12px rgba(17, 24, 39, 0.25),
        inset 0 0 0 1px rgba(79, 70, 229, 0.20);
}

[data-theme="dark"] .chip--indigo:hover {
    background: rgba(99, 102, 241, 0.25);
    box-shadow:
        0 8px 16px -12px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(129, 140, 248, 0.4);
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {

    .chip,
    .chat-bubble {
        transition: none;
    }

    .how-step {
        transition: none;
    }

    .how-step__number {
        transition: none;
    }

    .chat-reveal.is-visible .how-step__number {
        animation: none !important;
    }

    .pricing-card {
        transition: none;
    }

    .pricing-card:hover {
        transform: none;
        box-shadow: 0 2px 6px rgba(17, 24, 39, 0.06);
    }

    /* Disable bouncing arrow animation for motion-sensitive users */
    .scroll-indicator .animate-bounce {
        animation: none !important;
    }
}

/* Typed cursor refinement within chat section */
.chat-section .typed-cursor {
    display: none !important;
}

/* Subtle footnote aligned under bubble */
.chat-footnote {
    margin-left: calc(2.5rem + 1rem);
    /* avatar width (40px/2.5rem) + gap(1rem) */
    margin-top: 0.9rem !important;
    /* a notch lower */
    width: min(720px, 88%);
    /* match bubble width */
    /* match bubble width */
    color: var(--text-muted);
    /* gray-500 */
    text-align: center;
    /* center under the bubble */
}

/* Mobile layout refinements for chat example */
@media (max-width: 640px) {

    /* Stack avatar above bubble to avoid horizontal crowding */
    .chat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
        /* tighter vertical rhythm on mobile */
    }

    /* Smaller avatars and place above the bubble by reordering */
    .chat-row .chat-avatar {
        width: 2rem;
        /* 32px */
        height: 2rem;
        order: -1;
        /* move before bubble when stacked */
        align-self: flex-start;
        /* default left alignment */
        font-size: 0.875rem;
        /* calm letter size for initial */
    }

    /* Keep alignment semantics: Devan (assistant) left, User right */
    .chat-row--user .chat-bubble,
    .chat-row--user .chat-avatar {
        align-self: flex-end;
        /* right-align user message group */
    }

    /* Allow bubbles to expand on mobile without forcing full-width, so alignment shows */
    .chat-row .chat-bubble {
        max-width: 100%;
        width: auto;
    }

    /* Footnote should not indent on mobile */
    .chat-footnote {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}