/* Voicely.ai Design System & Global Styles */

/* Connect Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Medical/Trustworthy Palette - LIGHT MODE (Default) */

    /* Primary Colors */
    --primary-blue: #0D9488;
    /* Teal */
    --primary-blue-dark: #0f766e;
    --primary-blue-light: #CCFBF1;

    /* Accents */
    --accent-purple: #FB7185;
    /* Soft Coral */
    --accent-yellow: #FCD34D;
    --success-green: #059669;

    /* Backgrounds & Surfaces */
    --bg-body: #FFFBEB;
    /* Cream */
    --bg-surface: #FFFFFF;
    --bg-subtle: #FEF3C7;
    /* Slightly darker cream */

    /* Text */
    --text-main: #1E293B;
    /* Deep Navy */
    --text-muted: #6B7280;
    /* Warm Gray */
    --text-inverted: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0D9488 0%, #0891B2 100%);
    --gradient-subtle: linear-gradient(to bottom, #FFFBEB, #F0FDFA);
    --gradient-cta: linear-gradient(135deg, #0D9488 0%, #0891B2 100%);
    --gradient-accent: linear-gradient(135deg, #0D9488, #FB7185);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(13, 148, 136, 0.1), 0 4px 6px -2px rgba(13, 148, 136, 0.05);
    --shadow-blue: 0 20px 25px -5px rgba(13, 148, 136, 0.15), 0 10px 10px -5px rgba(13, 148, 136, 0.04);

    /* Spacing */
    --container-width: 1280px;
    --section-spacing-desktop: 140px;
    --section-spacing-mobile: 80px;
}

[data-theme="dark"] {
    /* Medical/Trustworthy Palette - DARK MODE */

    /* Primary Colors - Slightly brighter for dark mode contrast */
    --primary-blue: #14B8A6;
    /* Teal 500 */
    --primary-blue-dark: #0D9488;
    --primary-blue-light: #134e4a;
    /* Dark Teal bg */

    /* Backgrounds & Surfaces */
    --bg-body: #0F172A;
    /* Slate 900 */
    --bg-surface: #1E293B;
    /* Slate 800 */
    --bg-subtle: #0f172a;

    --neutral-200: #334155;
    /* Slate 700 for borders */

    /* Text */
    --text-main: #F1F5F9;
    /* Slate 100 */
    --text-muted: #94A3B8;
    /* Slate 400 */
    --text-inverted: #0F172A;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #115e59 0%, #0e7490 100%);
    --gradient-subtle: linear-gradient(to bottom, #0F172A, #134e4a);
    --gradient-cta: linear-gradient(135deg, #14B8A6 0%, #06B6D4 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-blue: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    background-color: var(--bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 80px;
    }
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-cta);
    color: white;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--neutral-50);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 12px 24px;
}

.btn-ghost:hover {
    color: var(--primary-blue);
}

/* Section Classes */
section {
    padding: var(--section-spacing-mobile) 0;
}

@media (min-width: 1024px) {
    section {
        padding: var(--section-spacing-desktop) 0;
    }
}

/* Badges */
.badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.badge-blue {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
}

.badge-yellow {
    background-color: #FEF3C7;
    color: var(--warning-orange);
}

.badge-accent {
    background-color: #ffe4e6;
    /* Very light rose */
    color: var(--accent-purple);
    /* Soft Coral */
}

/* Typography Utilities */
.h1-hero {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.h2-section {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
}

@media (min-width: 1024px) {
    .h1-hero {
        font-size: 56px;
        line-height: 1.1;
    }

    .h2-section {
        font-size: 42px;
    }
}

/* Feature Cards */
.card-feature {
    background: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.3s ease;
}

.card-feature:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Timeline/Steps */
.step-card {
    position: relative;
    background: var(--bg-surface);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--neutral-200);
    z-index: 2;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Demo Card */
.demo-card {
    background: var(--gradient-hero);
    border-radius: 24px;
    padding: 48px 32px;
    color: white;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.4);
}

@media (min-width: 1024px) {
    .demo-card {
        padding: 80px 60px;
    }
}

/* Footer */
footer {
    background: var(--bg-subtle);
    padding: 80px 0 40px;
    color: var(--text-muted);
}

.footer-link {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
}


/* Mobile Menu */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 24px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--neutral-200);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 16px;
        font-weight: 600;
        color: var(--primary-blue);
        cursor: pointer;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s ease;
    margin-right: 16px;
}

.theme-toggle-btn:hover {
    background: var(--bg-subtle);
    transform: scale(1.05);
}

/* Chat Widget */
.chat-widget-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: var(--gradient-cta);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-widget-btn:hover {
    transform: scale(1.1);
}

.chat-widget-window {
    position: fixed;
    bottom: 110px;
    right: 32px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 140px);
    background: var(--bg-surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--neutral-200);
}

.chat-widget-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--gradient-hero);
    padding: 24px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-surface);
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--neutral-200);
    /* Use var for dark mode compat */
    display: flex;
    gap: 12px;
    background: var(--bg-surface);
}

.chat-input {
    flex: 1;
    border: 1px solid var(--neutral-200);
    border-radius: 24px;
    padding: 12px 16px;
    font-family: inherit;
    background: var(--bg-body);
    color: var(--text-main);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.message.user {
    align-self: flex-end;
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background: var(--bg-body);
    /* Dark mode: slate 900 */
    border: 1px solid var(--neutral-200);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}