/* BeLazy Homepage Custom Styles */

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

/* Page fade-in to avoid initial flash */
@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preload {
    opacity: 0;
}

.fade-in {
    animation: pageFadeIn 320ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in { animation: none; opacity: 1; }
    .preload { opacity: 1; }
}

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

/* Utility animation classes */
.animate-fadeInUp {
    animation: fadeInUp 700ms ease-out both;
}

.animation-delay-150 {
    animation-delay: 150ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Logo animation */
.logo-float {
    animation: float 6s ease-in-out infinite;
}

/* Button hover effects */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::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-glow:hover::before {
    left: 100%;
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animated {
    background: linear-gradient(-45deg, #f97316, #eab308, #f59e0b, #fb923c);
    background-size: 400% 400%;
    animation: gradient-shift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.15);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.5;
    }
    
    /* Mobile header adjustments */
    header .py-4 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Mobile hero section */
    .min-h-screen {
        min-height: calc(100vh - 80px);
    }
    
    /* Mobile menu animation */
    #mobile-menu {
        animation: slideDown 0.3s ease-out;
    }
    
    #mobile-menu.hidden {
        animation: slideUp 0.3s ease-out;
    }
}

/* Mobile menu animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Touch-friendly button sizing */
@media (max-width: 768px) {
    button, a {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    /* Improve footer spacing on mobile */
    footer .flex-col {
        gap: 1rem;
    }
    
    footer .gap-6 {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Loading animation for buttons */
.btn-loading {
    position: relative;
    color: transparent;
}

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

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

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(12px)) {
    .backdrop-blur-sm {
        background-color: rgba(255, 255, 255, 0.9);
    }
}

/* Focus styles for accessibility */
.focus-ring:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f97316, #eab308);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ea580c, #d97706);
}

/* Video background styles */
.hero-video {
    object-fit: cover;
    object-position: center;
}

/* Fallback for video loading */
/* Removed hero-section fallback gradient to prevent orange flash on initial load */

/* Video performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
}

/* Mobile video optimization */
@media (max-width: 768px) {
    .hero-video {
        object-position: center center;
    }
    
    /* Reduce video quality on mobile for better performance */
    video {
        filter: blur(0.5px); /* Slight blur to hide compression artifacts */
    }
    
    /* Fallback background for slow connections */
    /* Removed mobile fallback gradient overlay to prevent orange flash */
}

/* Very small screens optimization */
@media (max-width: 480px) {
    /* Reduce padding on very small screens */
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-6 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Smaller text on very small screens */
    .text-3xl {
        font-size: 1.875rem;
    }
    
    .text-lg {
        font-size: 1rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .bg-gradient-to-br {
        background: white;
    }
    
    .hero-video {
        display: none;
    }
}
