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

/* Selection color */
::selection {
    background-color: #dc7070;
    color: white;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(139, 51, 51, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-subtext {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #fff;
}

#navbar:not(.scrolled) .nav-subtext {
    color: rgba(255, 255, 255, 0.7);
}

#navbar.scrolled .nav-logo-text {
    color: #3d1414;
}

#navbar.scrolled .nav-subtext {
    color: #8b3333;
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-left {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-right {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    position: relative;
    transition: padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 8px;
}

#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   Button & Link Focus States
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #8b3333;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    background-color: #f5ebe6;
}

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

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

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

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