/* ========================================
   Esquinita Dulcera — Custom Styles
   ======================================== */

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

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

::selection {
    background-color: #FF7C9A;
    color: #2A0E13;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF7C9A;
    transition: width 0.3s ease;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: #F2C0CC;
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #FF7C9A;
}

#navbar:not(.scrolled) .nav-link::after {
    background: #FF7C9A;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

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

/* --- Hero --- */
.hero-shape {
    opacity: 0;
    animation: heroFloat 1s ease forwards;
}

.hero-shape:nth-child(1) { animation-delay: 0.1s; }
.hero-shape:nth-child(2) { animation-delay: 0.2s; }
.hero-shape:nth-child(3) { animation-delay: 0.3s; }
.hero-shape:nth-child(4) { animation-delay: 0.35s; }
.hero-shape:nth-child(5) { animation-delay: 0.4s; }
.hero-shape:nth-child(6) { animation-delay: 0.45s; }
.hero-shape:nth-child(7) { animation-delay: 0.5s; }
.hero-shape:nth-child(8) { animation-delay: 0.55s; }

@keyframes heroFloat {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.floating-card {
    animation: floatCard 3s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* --- Marquee --- */
.marquee-track {
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* --- Menu Cards --- */
.menu-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.menu-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-card:nth-child(2) { transition-delay: 0.15s; }
.menu-card:nth-child(3) { transition-delay: 0.3s; }
.menu-card:nth-child(4) { transition-delay: 0.45s; }

/* --- Gallery --- */
.gallery-item {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Buttons --- */
button, a[href^="#"] {
    cursor: pointer;
}

/* --- Scroll Reveal (below-the-fold only) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-shape {
        display: none;
    }
    
    .hero-shape.block {
        display: block;
    }
}

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FF7C9A;
    outline-offset: 2px;
    border-radius: 4px;
}

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