/* ============================================
   Mi Fiesta Tu Fiesta — Custom Styles
   ============================================ */

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

/* Prevent scroll-reveal flashing: content is visible by default */
/* JS adds .revealed class for animation only */

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

#navbar.scrolled {
    background: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(115, 20, 44, 0.08);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-logo-sub {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #ffffff;
}

#navbar:not(.scrolled) .nav-logo-sub {
    color: rgba(253, 202, 232, 0.8);
}

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

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

/* ============================================
   HERO
   ============================================ */
.hero-tag {
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.hero-subheadline {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.8s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.1s;
}

.hero-decoration {
    transition: transform 8s ease-in-out infinite;
}

.hero-dec-1 {
    animation: float-slow 12s ease-in-out infinite;
}

.hero-dec-2 {
    animation: float-slow 15s ease-in-out infinite reverse;
}

.hero-dec-3 {
    animation: float-slow 10s ease-in-out infinite;
}

.hero-dot {
    animation: twinkle 3s ease-in-out infinite;
}

.hero-dot:nth-child(2) { animation-delay: 0.5s; }
.hero-dot:nth-child(3) { animation-delay: 1s; }
.hero-dot:nth-child(4) { animation-delay: 1.5s; }
.hero-dot:nth-child(5) { animation-delay: 2s; }

/* ============================================
   SCROLL REVEAL (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-left,
    .reveal-right,
    .reveal-block,
    .reveal-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal-left.revealed,
    .reveal-right.revealed {
        animation: slideFromSide 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    
    .reveal-block.revealed {
        animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    
    .reveal-card.revealed {
        animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
}

/* Default state — always visible */
.reveal-left,
.reveal-right,
.reveal-block,
.reveal-card {
    opacity: 1;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFromSide {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.open {
    pointer-events: all;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.reveal-card {
    opacity: 1;
}

.reveal-card:nth-child(1) { transition-delay: 0s; }
.reveal-card:nth-child(2) { transition-delay: 0.1s; }
.reveal-card:nth-child(3) { transition-delay: 0.2s; }
.reveal-card:nth-child(4) { transition-delay: 0.3s; }
.reveal-card:nth-child(5) { transition-delay: 0.4s; }
.reveal-card:nth-child(6) { transition-delay: 0.5s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal-card.revealed {
        animation-delay: var(--card-delay, 0s);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #a61838;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: rgba(166, 24, 56, 0.2);
    color: #3f0813;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a61838;
}
