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

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

/* Base transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

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

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

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

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

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

.mobile-link {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ===== Hero Content ===== */
.hero-content {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Scroll Reveal ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: translateY(0) translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ===== Gold Gradient Text (for span elements) ===== */
.text-gold-gradient {
    background: linear-gradient(135deg, #F0D78C 0%, #C9A84C 50%, #9E7D2B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* ===== Selection ===== */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #F0D78C;
}

/* ===== Image Loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Button Hover Glow ===== */
button:hover,
a:hover {
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}

/* ===== Card Hover Effects ===== */
.group:hover .group-hover\|scale-105 {
    transform: scale(1.05);
}

/* ===== Subtle Gold Accent Lines ===== */
.border-gold-500\/30 {
    border-color: rgba(201, 168, 76, 0.3);
}

/* ===== Menu Item Card ===== */
.group:hover .group-hover\:border-gold-500\/30 {
    border-color: rgba(201, 168, 76, 0.3);
}

.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Parallax-like subtle movement ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        will-change: transform, opacity;
    }
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.2;
    }
    
    /* Ensure touch targets are large enough */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== Loading State for Images ===== */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}
