/* ============================================
   Delgadillos Snow Cap — Custom Styles
   ============================================ */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(161, 30, 54, 0.15);
    color: #6f1c30;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6f3;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a11e36;
}

/* --- Animations --- */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 246, 243, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(161, 30, 54, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a11e36, #ff7e55);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}
#navbar:not(.scrolled) .nav-link:hover {
    color: #f9a8b8;
}
#navbar:not(.scrolled) .nav-link::after {
    background: linear-gradient(90deg, #f9a8b8, #ffc9b8);
}
#navbar:not(.scrolled) .nav-text {
    color: #ffffff;
}
#navbar:not(.scrolled) .nav-text span {
    color: #f9a8b8;
}
#navbar:not(.scrolled) #menuBtn {
    border-color: rgba(255, 255, 255, 0.4);
}
#navbar:not(.scrolled) #menuBtn #bar1,
#navbar:not(.scrolled) #menuBtn #bar2,
#navbar:not(.scrolled) #menuBtn #bar3 {
    background: #ffffff;
}

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

.mobile-link {
    position: relative;
}

/* --- Button Hover Effects --- */
a {
    text-decoration: none;
}

/* --- Image aspect-ratio fallbacks --- */
img {
    max-width: 100%;
    height: auto;
}

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

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar,
    .animate-pulse-slow {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
