/* ============================================
   Chocolate Emporium — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: width 0.3s ease;
}

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

/* Mobile menu button */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn[aria-expanded="true"] .line-top {
    transform: translateY(7px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .line-mid {
    opacity: 0;
}

#menu-btn[aria-expanded="true"] .line-bot {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: width 0.3s ease;
}

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

/* ============================================
   Scroll Reveal Animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-grid {
        opacity: 1;
        transform: none;
    }

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

    .reveal-grid.revealed,
    .reveal-card.revealed {
        animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
}

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

/* Stagger children */
.reveal-grid.revealed > * {
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.reveal-card.revealed {
    animation-delay: calc(var(--i, 0) * 0.08s);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4a7f5c;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.75rem;
    }

    .floating-card {
        position: relative;
        margin-top: 1rem;
    }
}
