/* Chun Yang Tea — Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefcfb;
}
::-webkit-scrollbar-thumb {
    background: #d14949;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #932424;
}

/* Selection color */
::selection {
    background: #b53232;
    color: #fefcfb;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    box-shadow: 0 1px 20px rgba(100, 26, 26, 0.08);
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Image hover effects */
img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #b53232;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle card hover lift */
.rounded-3xl {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Parallax-like subtle movement for decorative orbs */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

@media (prefers-reduced-motion: no-preference) {
    .absolute.top-1/4 -left-32,
    .absolute.bottom-1/4 -right-32 {
        animation: float 8s ease-in-out infinite;
    }
    .absolute.bottom-0.left-0.w-80 {
        animation: float 10s ease-in-out infinite reverse;
    }
}
