/* ============================================
   Panaderia Cardenas — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Navbar Scroll State */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-logo-text {
    color: #1e2026 !important;
}

.navbar-scrolled .nav-link {
    color: #474b54 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #ff6b30 !important;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal="left"] {
    transform: translateX(-40px);
}

.reveal[data-reveal="right"] {
    transform: translateX(40px);
}

.reveal[data-reveal="scale"] {
    transform: scale(0.95);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: none; }

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9fa3aa;
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal[data-reveal],
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-float {
        animation: none;
    }
    
    .group:hover img,
    img:hover {
        transform: none;
    }
}

/* Mobile Menu Transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Image Loading */
img {
    background-color: #e2e3e5;
}

/* Selection Color */
::selection {
    background-color: #ffd0b4;
    color: #7f270b;
}
