/* Viewport Animation Styles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.slide-up {
    transform: translateY(50px);
}

.animate-on-scroll.slide-up.is-visible {
    transform: translateY(0);
}

.animate-on-scroll.fade-in {
    transform: translateY(15px);
}

.animate-on-scroll.fade-in.is-visible {
    transform: translateY(0);
}

.animate-on-scroll.scale-in {
    transform: scale(0.8);
    opacity: 0;
}

.animate-on-scroll.scale-in.is-visible {
    transform: scale(1);
    opacity: 1;
}

/* Prevent layout shift during animation */
#features .flex.flex-col.gap-4.items-center.text-center {
    min-height: 200px;
}

/* Map dot styles */
.map-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2b4bee;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(43, 75, 238, 0.8);
    animation: pulse-dot 2s ease-in-out infinite;
}

.map-dot::before {
    content: '';
    position: absolute;  
    inset: -8px;
    border: 2px solid rgba(43, 75, 238, 0.4);
    border-radius: 50%;
    animation: ripple 2s ease-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Card hover effects */
.glass-card, .bg-obsidian {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
}

.glass-card:hover, .bg-obsidian:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(43, 75, 238, 0.15);
}

/* Glow effect for cards */
.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(43, 75, 238, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-glow:hover::before {
    opacity: 1;
}

/* Smooth fade in for hero - NOT using animate-on-scroll class */
.flex.flex-col.gap-4.text-center.z-10 > * {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.flex.flex-col.gap-4.text-center.z-10 > *:nth-child(1) {
    animation-delay: 0.2s;
}

.flex.flex-col.gap-4.text-center.z-10 > *:nth-child(2) {
    animation-delay: 0.4s;
}

.flex.flex-col.gap-4.text-center.z-10 > *:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
a.flex.min-w-\[160px\], button.flex.min-w-\[160px\] {
    position: relative;
    overflow: hidden;
}

a.flex.min-w-\[160px\]::before, button.flex.min-w-\[160px\]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

a.flex.min-w-\[160px\]:hover::before, button.flex.min-w-\[160px\]:hover::before {
    width: 300px;
    height: 300px;
}

/* Ensure sections don't collapse */
section, .flex.flex-col {
    position: relative;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}