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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Gradients */
.bg-radial-gradient-1 {
    background: radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.1), transparent 50%);
}

.bg-radial-gradient-2 {
    background: radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.1), transparent 50%);
}

.bg-radial-gradient-3 {
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.15), transparent 60%);
}

.bg-radial-gradient-4 {
    background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.1), transparent 70%);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Header Scroll Effect */
#header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Benefit Cards Animation */
.benefit-card {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.benefit-card:nth-child(1) {
    animation-delay: 0.1s;
}

.benefit-card:nth-child(2) {
    animation-delay: 0.2s;
}

.benefit-card:nth-child(3) {
    animation-delay: 0.3s;
}

.benefit-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Button Hover Effects */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.benefit-card:hover {
    transform: translateY(-5px);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Focus Styles */
button:focus,
a:focus {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    h1,
    h2 {
        font-size: 2rem;
    }

    .text-4xl {
        font-size: 2rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-6xl {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
    }

    button {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    #header {
        backdrop-filter: blur(10px);
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    button {
        border: 2px solid currentColor;
    }
}

/* Selection Color */
::selection {
    background-color: #22d3ee;
    color: #0f172a;
}

::-moz-selection {
    background-color: #22d3ee;
    color: #0f172a;
}

/* Link Styles */
a {
    color: #22d3ee;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #06b6d4;
}

/* Container Max Width */
.container {
    max-width: 1280px;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading State */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #22d3ee;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Error State */
.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* AI Training Visual Animation */
.ai-training-container {
    perspective: 1000px;
}

.ai-training-visual {
    animation: float-slow 6s ease-in-out infinite;
    position: relative;
}

.scanner-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    /* Or a fixed height bar */
    background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, 0.3), transparent);
    animation: scan 3s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Optional: Add a grid overlay effect */
.ai-training-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(34, 211, 238, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 5;
}


/* Phone Float Animation */
.phone-float-container img {
    animation: float-slow 4s ease-in-out infinite;
}

/* Chat Interface Animation Styles */
.chat-interface {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

/* AI Web Data Stream Animation */
.ai-data-stream {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    /* Mask to restrict flow to the "cable/connection" area (center band) */
    mask-image: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);
    -webkit-mask-image: linear-gradient(to right, transparent 20%, black 40%, black 60%, transparent 80%);

    /* The flowing texture */
    background: repeating-linear-gradient(90deg,
            transparent 0%,
            rgba(34, 211, 238, 0.0) 40%,
            rgba(168, 85, 247, 0.6) 50%,
            rgba(34, 211, 238, 0.0) 60%,
            transparent 100%);
    background-size: 200% 100%;
    animation: flow-stream 3s linear infinite;
    mix-blend-mode: screen;
}

@keyframes flow-stream {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.chat-interface:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.chat-header {
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-bubble {
    opacity: 0;
    transform: translateY(20px);
    animation: messageSlideIn 0.5s ease-out forwards;
    position: relative;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-bubble.agent {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 4px;
    margin-right: auto;
    color: #e2e8f0;
}

.chat-bubble.user {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-top-right-radius: 4px;
    margin-left: auto;
    color: white;
}

/* Time info style */
.chat-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Specific delays for conversation flow */
.chat-bubble:nth-child(1) {
    animation-delay: 0.5s;
}

.chat-bubble:nth-child(2) {
    animation-delay: 2.0s;
}

.chat-bubble:nth-child(3) {
    animation-delay: 4.5s;
}

/* Longer delay for user "typing" */
.chat-bubble:nth-child(4) {
    animation-delay: 6.0s;
}

/* Agent reply */

@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Indicator */
.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite both;
    margin: 0 1px;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse ring for Avatar */
.avatar-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid #22d3ee;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.9);
        display: none;
        /* Note: display none isn't animatable, but opacity handles the visual */
    }
}

/* Float Wrapper to avoid transform conflicts */
.float-wrapper {
    animation: float-slow 4s ease-in-out infinite;
}

/* Carousel Keyframes */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-350px * 4));
        /* 350px width * 4 items */
    }
}

/* Carousel Container */
.carousel-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: auto;
    background: transparent;
}

.carousel-slider::before,
.carousel-slider::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 200px;
    z-index: 2;
    pointer-events: none;
}

.carousel-slider::before {
    left: 0;
    top: 0;
    background: linear-gradient(to right, rgb(15 23 42), transparent);
}

.carousel-slider::after {
    right: 0;
    top: 0;
    background: linear-gradient(to left, rgb(15 23 42), transparent);
}

.carousel-track {
    display: flex;
    width: calc(350px * 8);
    /* 4 original + 4 duplicates */
    animation: scroll 25s linear infinite;
    /* Slowed down slightly for larger images */
}

.carousel-slide {
    height: 200px;
    /* Increased container height */
    width: 350px;
    /* Increased slide width */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

/* Client Logo Styling - Original Colors, Large Size */
.client-logo {
    max-height: 140px;
    /* Increased logo height considerably */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* No filters applied - specific requested change */
}

.carousel-slide:hover .client-logo {
    transform: scale(1.05);
}