/* ===================================
   Benito's Bakery — Custom Styles
   =================================== */

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

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

body {
    overflow-x: hidden;
}

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

/* --- Navbar --- */
.nav-brand-text {
    transition: color 0.5s ease;
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #14b8a6 !important;
}

/* Navbar scroll state */
.nav-scrolled .nav-brand-text {
    color: #1e293b;
}

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

/* --- Hero --- */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #ffffff, transparent);
    pointer-events: none;
}

/* --- Feature Cards --- */
.feature-card {
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(20, 184, 166, 0.15);
}

/* --- Menu Cards --- */
.menu-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
}

/* --- Gallery Items --- */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 118, 110, 0);
    transition: background 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(15, 118, 110, 0.1);
}

/* --- Reveal Animations (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

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

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    #hero::after {
        height: 60px;
    }
}

@media (min-width: 768px) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}
