/* ============================================
   La Princesa Panaderia — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(74, 158, 116, 0.3);
    color: #f0f3f9;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0e1529;
}
::-webkit-scrollbar-thumb {
    background: #1e2f52;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #273c68;
}

/* ============================================
   Reveal Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .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; }
}

/* Ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    background: rgba(9, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 47, 82, 0.5);
}

#navbar.scrolled .font-serif {
    color: #c5e7d7;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Focus States
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #6bbf93;
    outline-offset: 4px;
}

/* ============================================
   Button Hover Lift
   ============================================ */
button, a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Map Overlay (dark filter for map)
   ============================================ */
iframe[src*="google.com/maps"] {
    width: 100%;
    height: 100%;
}

/* ============================================
   Typography refinements
   ============================================ */
.font-serif {
    text-wrap: balance;
}

/* ============================================
   Subtle grain texture overlay (optional)
   ============================================ */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
