/* Custom styles for Roselis Tortilla Factory */

/* Base typography */
body {
    font-family: 'Lato', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(250, 250, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
    color: #334155;
}

#navbar.scrolled .nav-text {
    color: #1e293b;
}

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

#mobile-menu.open .mobile-link {
    animation: slideUp 0.4s ease forwards;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile menu toggle animation */
#mobile-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Scroll reveal - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Default state for JS-gated reveal is visible */
    .reveal-section[data-reveal] {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Button ripple-like hover effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal-section { display: none; }
    body { color: #000; background: #fff; }
}
