/* Custom styles for Hawaii Coffee Connection */

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

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* Reveal animation - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback for no-JS or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1);
}

/* Custom button hover effects */
a:hover {
    transition: all 0.3s ease;
}

/* Card hover lift effect */
.rounded-3xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rounded-3xl:hover {
    transform: translateY(-4px);
}

/* Ensure proper contrast for all text */
.text-plum-600,
.text-plum-700,
.text-plum-800 {
    color: #581c87;
}

.text-plum-600 {
    color: #6b21a8;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Hero card floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-10px) rotate(var(--rotate, 0deg));
    }
}

/* Apply float animation to hero cards */
@media (prefers-reduced-motion: no-preference) {
    .absolute.bg-white.rounded-2xl,
    .absolute.bg-gradient-to-br.rounded-2xl {
        animation: float 4s ease-in-out infinite;
    }
    
    .absolute.bg-white.rounded-2xl:nth-child(2) {
        animation-delay: 0.5s;
    }
    
    .absolute.bg-white.rounded-2xl:nth-child(3) {
        animation-delay: 1s;
    }
    
    .absolute.bg-gradient-to-br.rounded-2xl {
        animation-delay: 1.5s;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f3e8ff 25%, #faf5ff 50%, #f3e8ff 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}
