/* Custom styles for Zenous AI - Modern Design */

/* Smooth scrolling and typography optimization */
html {
    scroll-behavior: smooth;
    font-display: swap;
}

/* Body defaults */
body {
    background-color: #F8FAFC;
    color: #1E293B;
    line-height: 1.6;
    font-feature-settings: "kern" 1;
    overflow-x: hidden;
}

/* Skip to main content for 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: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .float {
        animation: none !important;
    }
}

/* Navigation enhancements */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Button hover effects */
.magnetic-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magnetic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Product card animations */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Form styling */
input[type="email"] {
    transition: all 0.3s ease;
}

input[type="email"]:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Loading state for buttons */
.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #1E293B, #334155);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4F46E5;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

/* Section spacing consistency */
section {
    scroll-margin-top: 100px;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Brand colors as CSS variables */
:root {
    --zenous-navy: #1E293B;
    --zenous-blue: #3B82F6;
    --zenous-indigo: #6366F1;
    --zenous-purple: #8B5CF6;
    --zenous-gray: #64748B;
    --zenous-light: #F8FAFC;
    --zenous-white: #FFFFFF;
    --zenous-emerald: #10B981;
}

/* Morphing background elements */
.morphing-shape {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1));
    animation: morphing 20s infinite ease-in-out;
    z-index: -1;
}

.morphing-shape.shape-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.morphing-shape.shape-2 {
    bottom: 20%;
    left: 5%;
    animation-delay: -10s;
    width: 150px;
    height: 150px;
}

/* Wave effect for sections */
.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
    animation: waveAnimation 3s infinite;
}

/* Text typing effect */
.typing-text {
    overflow: hidden;
    border-right: 2px solid #3B82F6;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #3B82F6; }
}

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

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
}

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

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

/* Navigation blur effect - Light theme */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Light theme navigation */
nav.light-nav {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #E2E8F0;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light theme testimonial cards */
.testimonial-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Light theme feature cards */
.feature-card-light {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.feature-card-light:hover {
    border-color: #3B82F6;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

/* Responsive text sizing */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
}

/* Focus states for accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form styles - Light theme */
input[type="email"] {
    transition: all 0.3s ease;
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    color: #0F172A;
}

input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3B82F6;
}

input[type="email"]::placeholder {
    color: #9CA3AF;
}

/* Mobile menu styles (if needed later) */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Intersection observer fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Testimonial quote styling */
blockquote {
    position: relative;
}

blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -1rem;
    left: -1rem;
    color: #3B82F6;
    opacity: 0.3;
    font-family: serif;
}

/* Stats counter animation */
.stat-counter {
    display: inline-block;
}

/* Hover effects for links */
a {
    transition: color 0.3s ease;
}

/* Custom checkbox styles (for forms) */
.custom-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #3B82F6;
    border-radius: 0.25rem;
    background-color: transparent;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background-color: #3B82F6;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
}

/* Light theme specific overrides */
.light-theme {
    background-color: #F8FAFC;
    color: #0F172A;
}

.light-theme .text-white {
    color: #0F172A !important;
}

.light-theme .bg-zenous-navy {
    background-color: #FFFFFF !important;
}

.light-theme .border-gray-800 {
    border-color: #E2E8F0 !important;
}

/* Section backgrounds for light theme */
.section-light-bg {
    background-color: #FFFFFF;
}

.section-light-alt-bg {
    background-color: #F9FAFB;
}

/* ===== ACTIVE CREATIVE EFFECTS ===== */

/* Holographic text effect - Used in hero */
.holographic-text {
    /* Fallback color for accessibility */
    color: #3B82F6;
    background: linear-gradient(
        45deg,
        #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #DDA0DD
    );
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographic 3s ease-in-out infinite;
    font-weight: bold;
}

/* Fallback for browsers that don't support background-clip: text */
.no-webkitbackgroundclip .holographic-text {
    color: #3B82F6 !important;
    background: none !important;
    -webkit-text-fill-color: unset !important;
}

/* Additional readability fixes for light backgrounds */
.holographic-text {
    position: relative;
}

.holographic-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: #3B82F6;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show fallback text if gradient text becomes invisible */
@media (prefers-contrast: high) {
    .holographic-text {
        color: #1E40AF !important;
        -webkit-text-fill-color: #1E40AF !important;
        animation: none !important;
    }
    
    .neon-glow {
        color: #1E40AF !important;
        text-shadow: none !important;
        animation: none !important;
    }
}

@keyframes holographic {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Neon glow text effect - Used in hero */
.neon-glow {
    /* Fallback color for readability */
    color: #3B82F6;
    text-shadow: 
        0 0 5px #3B82F6,
        0 0 10px #3B82F6,
        0 0 15px #3B82F6,
        0 0 20px #3B82F6;
    animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 5px #3B82F6,
            0 0 10px #3B82F6,
            0 0 15px #3B82F6,
            0 0 20px #3B82F6;
    }
    20%, 24%, 55% {
        text-shadow: 
            0 0 3px #3B82F6,
            0 0 6px #3B82F6;
    }
}

/* Magnetic button effect - Used on CTA buttons */
.magnetic-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: all 0.2s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.magnetic-btn:hover::before {
    width: 150px;
    height: 150px;
}

/* Ripple effect on click - Used on CTA buttons */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 200px;
    height: 200px;
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .holographic-text,
    .neon-glow {
        animation: none;
    }
    
    .neon-glow {
        text-shadow: 0 0 10px #3B82F6;
    }
    
    .holographic-text {
        color: #3B82F6 !important;
        -webkit-text-fill-color: #3B82F6 !important;
        background: none !important;
    }
}
