/* ============================================
   Dulceria El Castillo Del Dulce — Custom Styles
   ============================================ */

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

/* Selection color */
::selection {
    background-color: #F2846B;
    color: #FFFFFF;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F6F7F8;
}
::-webkit-scrollbar-thumb {
    background: #C5CCD1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #96A3AB;
}

/* Header scroll state */
#site-header.scrolled {
    background-color: rgba(246, 247, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(54, 69, 79, 0.08);
}

/* Nav link underline on hover */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #F2846B;
    transition: width 0.25s ease;
    margin-top: 2px;
}
.nav-link:hover::after {
    width: 100%;
}

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

/* Menu item hover */
#menu .border-b {
    transition: border-color 0.2s ease;
}
#menu .border-b:hover {
    border-color: #F2846B;
}
#menu h4 {
    transition: color 0.2s ease;
}
#menu .border-b:hover h4 {
    color: #D94F30;
}

/* Gallery image hover overlay */
#gallery img {
    cursor: pointer;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #F2846B;
    outline-offset: 2px;
}

/* Form input focus */
input:focus,
textarea:focus {
    border-color: #F2846B !important;
    box-shadow: 0 0 0 3px rgba(242, 132, 107, 0.15) !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    img {
        transition: none !important;
    }
}

/* ============================================
   Scroll Reveal Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #F2846B;
    transition: width 0.25s ease;
}
.mobile-link:hover::after {
    width: 100%;
}
