/* === Custom Styles for Candy Market === */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Hero overlay */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.72) 0%,
        rgba(15, 41, 59, 0.60) 50%,
        rgba(15, 41, 59, 0.72) 100%
    );
}

/* Hero background animation */
.hero-bg {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Hero blobs */
.hero-blob {
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.hero-blob-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.hero-blob-3 {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.95); }
    100% { transform: translate(15px, -10px) scale(1.02); }
}

/* Hero entrance animations */
.hero-badge {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

h1 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero p {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero .flex-col {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

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

/* Scroll reveal animations */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar transitions */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08) !important;
}

.navbar-scrolled .nav-logo-text {
    color: #1e293b !important;
}

.navbar-scrolled .nav-link {
    color: #475569 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #0d9488 !important;
}

.navbar-scrolled #menu-btn {
    color: #1e293b !important;
}

.navbar-scrolled #menu-btn:hover {
    background: rgba(15, 23, 42, 0.06) !important;
}

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: transparent;
    transition: background 0.2s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-bg {
        animation: none;
    }

    .hero-blob {
        animation: none;
    }

    .hero-badge,
    h1,
    .hero p,
    .hero .flex-col {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .reveal-up {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background: #99f6e4;
    color: #134e4a;
}
