/* ============================================
   Huahui Bakery — Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(232, 115, 74, 0.3);
    color: #f5f5f5;
}

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

::-webkit-scrollbar-track {
    background: #0d0d0d;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #d4a574;
}

/* ============================================
   Animations
   ============================================ */

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

.animate-fadeUp {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Hero staggered animations */
.hero-subtitle {
    animation: fadeUp 0.8s ease-out 0.05s forwards;
}

.hero-title {
    animation: fadeUp 0.8s ease-out 0.15s forwards;
}

.hero-desc {
    animation: fadeUp 0.8s ease-out 0.3s forwards;
}

.hero-image {
    animation: fadeUp 1s ease-out 0.3s forwards;
}

/* About section */
.about-label { animation: fadeUp 0.8s ease-out forwards; }
.about-title { animation: fadeUp 0.8s ease-out 0.1s forwards; }
.about-text { animation: fadeUp 0.8s ease-out 0.2s forwards; }
.about-features { animation: fadeUp 0.8s ease-out 0.3s forwards; }

/* Menu section */
.menu-label { animation: fadeUp 0.8s ease-out forwards; }
.menu-title { animation: fadeUp 0.8s ease-out 0.1s forwards; }
.menu-card { animation: fadeUp 0.8s ease-out forwards; }

/* Gallery */
.gallery-label { animation: fadeUp 0.8s ease-out forwards; }
.gallery-title { animation: fadeUp 0.8s ease-out 0.1s forwards; }
.gallery-item { animation: fadeUp 0.8s ease-out forwards; }

/* Visit */
.visit-label { animation: fadeUp 0.8s ease-out forwards; }
.visit-title { animation: fadeUp 0.8s ease-out 0.1s forwards; }

/* Contact */
.contact-label { animation: fadeUp 0.8s ease-out forwards; }
.contact-title { animation: fadeUp 0.8s ease-out 0.1s forwards; }

/* ============================================
   Navigation
   ============================================ */

#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 165, 116, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #d4a574, #e8734a);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #f08960;
}

/* Mobile menu button animation */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

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

.mobile-link {
    position: relative;
}

/* ============================================
   Hero Section
   ============================================ */

#hero {
    position: relative;
}

/* ============================================
   Menu Cards
   ============================================ */

.menu-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

.menu-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(212, 165, 116, 0.05);
}

/* ============================================
   Gallery Items
   ============================================ */

.gallery-item {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s ease;
}

.gallery-item:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Input Focus States
   ============================================ */

input:focus,
textarea:focus {
    background: rgba(36, 36, 36, 0.8);
}

/* ============================================
   Button Hover Effects
   ============================================ */

button, 
a[role="button"] {
    cursor: pointer;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    #hero {
        padding-top: 6rem;
    }
    
    .hero-image {
        aspect-ratio: 3/4;
    }
    
    /* Stack hero on mobile */
    #hero .grid {
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ============================================
   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;
    }
}
