/* 3. COLOR SYSTEM & 4. DESIGN TOKENS */
:root {
    /* Primary Colors */
    --color-primary: #2C8F8B;
    --color-primary-dark: #1E6B68;
    --color-turquoise: #4FA7A3;
    --color-mint: #7FD3C8;
    --color-bg: #F4FAF9;
    --color-bg-soft: #EBF5F4;

    /* Accent */
    --color-accent-blue: #3B82F6;
    --color-accent-red: #E63946;

    /* Text */
    --color-text-primary: #0F172A;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;

    /* UI Tokens */
    --color-card: rgba(255, 255, 255, 0.75);
    --color-border: rgba(255, 255, 255, 0.4);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(44, 143, 139, 0.05);
    --shadow-elevated: 0 10px 30px rgba(44, 143, 139, 0.1);
    --shadow-floating: 0 20px 40px rgba(44, 143, 139, 0.15);

    /* 6. SPACING GRID (8px based) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 64px;
    --space-8: 96px;

    /* Motion */
    --motion-fast: 120ms;
    --motion-normal: 220ms;
    --motion-slow: 420ms;
    --ease-standard: cubic-bezier(.2, .8, .2, 1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 5. TYPOGRAPHY SYSTEM */
h1,
h2,
h3,
h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.display-xl {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.heading-l {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.heading-m {
    font-size: 1.5rem;
}

.heading-s {
    font-size: 1.25rem;
}

.body-large {
    font-size: 1.25rem;
}

.body-text {
    font-size: 1rem;
}

.small {
    font-size: 0.875rem;
}

.muted {
    color: var(--color-text-muted);
}

.secondary {
    color: var(--color-text-secondary);
}

/* Layout & Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-8) 0;
}

.bg-soft {
    background-color: var(--color-bg-soft);
}

.bg-medical {
    background-color: #E2F0EF;
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.center {
    text-align: center;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.align-center {
    align-items: center;
}

/* 7. GLASS MEDICAL UI */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border);
}

.glass-card {
    background: var(--color-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-soft);
    transition: transform var(--motion-normal) var(--ease-standard), box-shadow var(--motion-normal) var(--ease-standard);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

/* Elements */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-turquoise));
    border-radius: var(--radius-sm);
    display: inline-block;
}

.logo-icon.small {
    width: 20px;
    height: 20px;
}

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: rgba(44, 143, 139, 0.1);
    color: var(--color-primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--motion-normal) var(--ease-standard);
    border: none;
    text-decoration: none;
}

.btn-large {
    padding: var(--space-3) var(--space-5);
    font-size: 1.0625rem;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(44, 143, 139, 0.2);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 143, 139, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-text-primary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

/* 11. NAVIGATION BAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: var(--space-4);
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--motion-fast);
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* 12. HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: center;
}

.hero-content h1 {
    margin-bottom: var(--space-4);
}

.hero-content p {
    margin-bottom: var(--space-5);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
}

/* Hero Floating Panels */
.floating-panels {
    position: relative;
    height: 500px;
    perspective: 1000px;
}

.panel {
    position: absolute;
    width: 320px;
}

.p-chat {
    top: 50px;
    left: 20px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.p-booking {
    bottom: 80px;
    right: 20px;
    z-index: 1;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Chat Mock UI */
.chat-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-mint);
}

.avatar.ai {
    background: linear-gradient(135deg, var(--color-primary), var(--color-turquoise));
}

.status.online {
    display: block;
    font-size: 0.75rem;
    color: var(--color-primary);
}

.chat-messages.mock {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.msg {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    max-width: 85%;
}

.msg.user {
    background: var(--color-bg-soft);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg.ai {
    background: rgba(44, 143, 139, 0.1);
    color: var(--color-primary-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Booking Mock UI */
.booking-hdr {
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.b-time {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
}

.b-doctor {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.badge-success {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(79, 167, 163, 0.15);
    color: var(--color-turquoise);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 13. PRODUCT FEATURES */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.f-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

/* 15. WORKFLOW */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--color-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.w-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    min-width: 80px;
    text-align: center;
}

.n-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.n-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.w-node.highlight .n-icon {
    box-shadow: 0 0 0 4px rgba(44, 143, 139, 0.2);
    border-color: var(--color-primary);
}

.w-node.success .n-icon {
    background: rgba(79, 167, 163, 0.1);
}

.w-connector {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-text-muted) 50%, transparent 0);
    background-size: 8px 100%;
    min-width: 30px;
    margin: 0 var(--space-2);
    opacity: 0.3;
}

/* 16. DASHBOARD PREVIEW */
.dashboard-mock {
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    background: white;
    box-shadow: var(--shadow-floating);
}

.db-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
    font-weight: 600;
}

.db-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.span-2 {
    grid-column: span 2;
}

.db-stat {
    padding: var(--space-3);
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
}

.stat-trend.up {
    color: var(--color-primary);
}

.stat-trend.neutral {
    color: var(--color-text-muted);
}

.tbl-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 1fr;
    padding: var(--space-2) 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tbl-row.hdr {
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom-width: 2px;
}

.tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
    text-align: center;
}

.tag-success {
    background: rgba(79, 167, 163, 0.1);
    color: var(--color-primary-dark);
}

.tag-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

.feature-list {
    list-style: none;
    margin-top: var(--space-4);
}

.feature-list li {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.fl-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* 18. INTEGRATIONS */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.int-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.int-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Solid color placeholders for icons, as requested not to use external image links */
.int-icon.tg {
    background: #229ED9;
}

.int-icon.gs {
    background: #0F9D58;
}

.int-icon.ai {
    background: #10A37F;
}

.int-icon.docs {
    background: #4285F4;
}

/* 22. CHAT WIDGET */
.chat-widget {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    z-index: 1000;
}

.cw-toggle {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-elevated);
    cursor: pointer;
    transition: transform var(--motion-normal) var(--ease-standard);
}

.cw-toggle:hover {
    transform: scale(1.05);
}

.cw-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-floating);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all var(--motion-normal) var(--ease-standard);
}

.chat-widget.open .cw-window {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-widget.open .cw-toggle {
    display: none;
}

.cw-header {
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.online {
    background: #10B981;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.btn-icon:hover {
    color: var(--color-text-primary);
}

.cw-body {
    flex-grow: 1;
    padding: var(--space-4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: rgba(244, 250, 249, 0.5);
}

.cw-input {
    padding: var(--space-3);
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: var(--space-2);
}

.cw-input input {
    flex-grow: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    font-family: 'Inter', sans-serif;
    outline: none;
}

.cw-input input:focus {
    border-color: var(--color-primary);
}

.btn-icon.send {
    background: var(--color-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background: white;
    padding: var(--space-7) 0 var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.f-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.f-links strong {
    margin-bottom: var(--space-2);
}

.f-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.f-links a:hover {
    color: var(--color-primary);
}

.f-bottom {
    padding-top: var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* 8. MOTION SYSTEM - Animations */
.reveal {
    opacity: 0;
    transition: all 400ms var(--ease-standard);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.fade-up {
    transform: translateY(40px);
}

.fade-in {
    transform: translateY(0);
}

.slide-up {
    transform: translateY(30px);
}

.slide-right {
    transform: translateX(-40px);
}

.slide-left {
    transform: translateX(40px);
}

.scale-up {
    transform: scale(0.95);
}

.d-delay-1 {
    transition-delay: 100ms;
}

.d-delay-2 {
    transition-delay: 200ms;
}

.d-delay-3 {
    transition-delay: 300ms;
}

.d-delay-4 {
    transition-delay: 400ms;
}

.d-delay-5 {
    transition-delay: 500ms;
}

.d-delay-6 {
    transition-delay: 600ms;
}

.d-delay-7 {
    transition-delay: 700ms;
}

.d-delay-8 {
    transition-delay: 800ms;
}

.d-delay-9 {
    transition-delay: 900ms;
}

.d-delay-10 {
    transition-delay: 1000ms;
}

/* 9. BACKGROUND VISUAL SYSTEM */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(127, 211, 200, 0.1) 0%, rgba(244, 250, 249, 1) 100%);
    opacity: 0.6;
}

/* 23. RESPONSIVE DESIGN */
@media (max-width: 900px) {

    .split-layout,
    .hero-container {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .integration-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        text-align: center;
        padding-top: 120px;
    }

    .hero-content p {
        margin: 0 auto var(--space-5);
    }

    .hero-actions {
        justify-content: center;
    }

    .floating-panels {
        height: 300px;
    }

    .p-chat {
        left: 50%;
        transform: translateX(-50%);
        animation: none;
    }

    .p-booking {
        display: none;
    }

    .w-connector {
        min-width: 15px;
    }

    .desktop-only {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .workflow-diagram {
        flex-direction: column;
        gap: var(--space-2);
        background: transparent;
        box-shadow: none;
    }

    .w-connector {
        width: 2px;
        height: 30px;
        min-width: 2px;
        background: linear-gradient(180deg, var(--color-text-muted) 50%, transparent 0);
        background-size: 100% 8px;
    }

    .cw-window {
        width: 100%;
        height: 100dvh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .integration-grid {
        grid-template-columns: 1fr;
    }
}