/* ATOMBuild Landing Page - Custom Styles */

/* Custom animations and effects */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Hero gradient background */
.bg-gradient-hero {
    background: linear-gradient(135deg, #8b5cf6 0%, #9333ea 25%, #a855f7 50%, #c084fc 75%, #e879f9 100%);
}

/* Custom gradient text effect */
.gradient-text {
    background: linear-gradient(to right, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

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

/* Stats animation on scroll */
.stat-number {
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* FAQ accordion styles */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.open {
    max-height: 200px;
    transition: max-height 0.3s ease-in;
}

/* Mobile menu styles - hidden by default */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
    z-index: 40;
}

/* Show mobile menu only on mobile devices when open */
@media (max-width: 768px) {
    .mobile-menu.open {
        display: block;
    }
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    text-decoration: none;
}

.mobile-menu a:hover {
    color: #8b5cf6;
}

/* Ensure mobile menu is never shown on desktop */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Loading state for images */
img {
    transition: opacity 0.3s ease;
}

img[loading] {
    opacity: 0.5;
}

img[loading="lazy"] {
    opacity: 1;
}

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

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

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    header,
    footer {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: white;
    }
    
    .text-gray-600 {
        color: #000;
    }
    
    .border-gray-200 {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-pulse-slow {
        animation: none;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    :root {
        --tw-bg-opacity: 1;
        background-color: rgb(17 24 39 / var(--tw-bg-opacity));
        color: rgb(243 244 246);
    }
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Icon styling */
[data-lucide] {
    stroke-width: 2;
}

/* Badge components */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.badge-primary {
    background-color: rgb(139 92 246 / 0.1);
    color: #8b5cf6;
    border: 1px solid rgb(139 92 246 / 0.2);
}

/* CTA section special effects */
.cta-glow {
    position: relative;
}

.cta-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #8b5cf6, #3b82f6, #8b5cf6);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.cta-glow:hover::before {
    opacity: 0.3;
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading spinner for dynamic content */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Slow pan animation for Look-Ahead image */
@keyframes slowPanDown {
    0% {
        object-position: left top;
    }
    100% {
        object-position: right bottom;
    }
}

.slow-pan-animation {
    animation: slowPanDown 20s ease-in-out infinite alternate;
}

/* ==========================================
   LANGUAGE SWITCHER STYLES
   ========================================== */

/* Language dropdown animation */
#lang-dropdown {
    animation: langDropdownFadeIn 0.15s ease-out;
}

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

/* Active language option styling */
.lang-option.active,
.lang-option[aria-selected="true"] {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Language switcher button hover state */
#lang-toggle:hover {
    background-color: #f9fafb;
}

/* Mobile language buttons in mobile menu */
.mobile-menu-lang button[data-lang] {
    transition: all 0.2s ease;
}

.mobile-menu-lang button[data-lang]:hover {
    background-color: #f3f4f6;
    border-color: #9333ea;
}

.mobile-menu-lang button[data-lang].active {
    background-color: #9333ea;
    color: white;
    border-color: #9333ea;
}

/* Hide language switcher on very small screens if needed */
@media (max-width: 360px) {
    #language-switcher {
        display: none;
    }
}