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

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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #8dbd8c;
    color: #152b15;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6ee;
}
::-webkit-scrollbar-thumb {
    background: #b9d4b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8dbd8c;
}

/* Header */
#site-header {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(20, 60, 25, 0.08);
}

.nav-link {
    position: relative;
}

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

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

/* Hero */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #fdfbf7, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    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[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }
.reveal[data-reveal-delay="6"] { transition-delay: 0.6s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered children */
.grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.grid .reveal:nth-child(3) { transition-delay: 0.25s; }
.grid .reveal:nth-child(4) { transition-delay: 0.35s; }
.grid .reveal:nth-child(5) { transition-delay: 0.45s; }
.grid .reveal:nth-child(6) { transition-delay: 0.55s; }

/* Buttons */
a {
    text-decoration: none;
}

/* Image hover container */
.group:hover .group-hover\ :scale-105 {
    transform: scale(1.05);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #3d7a3e;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Smooth section transitions */
section {
    position: relative;
}

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

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

/* Print */
@media print {
    #site-header, #mobile-menu {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
