/* Custom styles for AI Assistant LP v2 */

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

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Video styling */
video {
    object-fit: cover;
}

/* Hero video: always fill width and avoid left/right gap by cropping top/bottom */
.hero-video {
    object-fit: cover;
    background-color: #000;
}

/* Enhanced button hover effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Challenge cards with enhanced styling */
.challenge-card {
    transition: all 0.3s ease;
    position: relative;
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Flow step cards */
.flow-step {
    position: relative;
    overflow: hidden;
}

.flow-step::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(14, 165, 233, 0.05), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
    opacity: 0;
}

.flow-step:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
    opacity: 1;
}

/* FAQ collapse animation */
[x-cloak] {
    display: none !important;
}

/* Enhanced form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    transform: translateY(-1px);
}

/* Responsive video container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Number animation */
.big-number {
    background: linear-gradient(135deg, currentColor, rgba(0, 0, 0, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-container {
        max-width: 300px;
    }
    
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .challenge-card {
        padding: 1.5rem;
    }
    
    .flow-step {
        padding: 1.5rem;
    }
}

/* Light mode specific styles */
@media (prefers-color-scheme: light) {
    body {
        background-color: white !important;
        color: #111827 !important;
    }
    
    .bg-gray-50 {
        background-color: #f9fafb !important;
    }
    
    .bg-white {
        background-color: white !important;
    }
    
    .text-gray-900 {
        color: #111827 !important;
    }
    
    .text-gray-600 {
        color: #4b5563 !important;
    }
    
    .text-gray-500 {
        color: #6b7280 !important;
    }
}

/* Plyr customization */
.plyr {
    border-radius: 1rem;
}

.plyr--video {
    background: #000;
}

.plyr__control--overlaid {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.plyr__control--overlaid:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Intersection Observer animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for cards */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }

/* Loading states */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse animation for CTA buttons */
.pulse-on-hover:hover {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(14, 165, 233, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus indicators */
a:focus,
button:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-50,
    .bg-green-50,
    .bg-purple-50,
    .bg-red-50,
    .bg-orange-50 {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .challenge-card,
    .flow-step {
        page-break-inside: avoid;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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