/* ===== Custom Styles for Freeman's Bakery ===== */

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

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 21, 16, 0.08);
}

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
}

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

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

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

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

.mobile-link {
    opacity: 1;
}

/* Hamburger animation */
#menu-toggle.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* ===== Hero underline animation ===== */
@keyframes underline-grow {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== Button hover effects ===== */
a[href="#menu"],
a[href="#story"],
a[href="#craft"],
a[href="#visit"] {
    position: relative;
}

/* ===== Selection color ===== */
::selection {
    background: #C0603A;
    color: #FDF8F0;
}

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

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

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

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

/* ===== Image hover zoom ===== */
.group:hover img {
    transition: transform 0.6s ease;
}

/* ===== Form styles ===== */
input:focus,
textarea:focus {
    outline: none;
    border-color: #C0603A;
    box-shadow: 0 0 0 3px rgba(192, 96, 58, 0.15);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
