/* =============================================
   Antojitos Mexicanos Karisma — Custom Styles
   ============================================= */

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

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   Hero Animations
   ============================================= */
.hero-eyebrow {
    animation: slideUp 0.8s ease forwards 0.2s;
}

.hero-title {
    animation: slideUp 0.8s ease forwards 0.4s;
}

.hero-subtitle {
    animation: slideUp 0.8s ease forwards 0.6s;
}

.hero-ctas {
    animation: slideUp 0.8s ease forwards 0.8s;
}

.hero-pills {
    animation: slideUp 0.8s ease forwards 1s;
}

.hero-images {
    animation: fadeIn 1s ease forwards 0.5s;
    opacity: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* =============================================
   Section Animations (Scroll-triggered)
   ============================================= */
.section-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.1s;
}

.section-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}

.menu-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.feature-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.about-images-grid {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

/* Scroll-triggered classes */
.animate-on-scroll.visible .section-eyebrow,
.animate-on-scroll.visible .section-title,
.animate-on-scroll.visible .section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

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

.animate-on-scroll.visible .feature-card {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.visible .about-images-grid {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays for menu cards */
.menu-card:nth-child(1) { transition-delay: 0.05s; }
.menu-card:nth-child(2) { transition-delay: 0.1s; }
.menu-card:nth-child(3) { transition-delay: 0.15s; }
.menu-card:nth-child(4) { transition-delay: 0.2s; }
.menu-card:nth-child(5) { transition-delay: 0.25s; }
.menu-card:nth-child(6) { transition-delay: 0.3s; }

/* Stagger delays for feature cards */
.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.15s; }
.feature-card:nth-child(3) { transition-delay: 0.25s; }
.feature-card:nth-child(4) { transition-delay: 0.35s; }

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

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

/* Mobile menu lines animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile menu open state */
#mobileMenu.open {
    transform: translateX(0);
}

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

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2D5A3D;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* =============================================
   Menu Cards
   ============================================= */
.tag-chip {
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: #2D5A3D;
    color: white;
}

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

/* =============================================
   Back to Top Button
   ============================================= */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    translate-y: 0;
    pointer-events: all;
}

/* =============================================
   Form Styles
   ============================================= */
input:focus,
textarea:focus {
    border-color: #5e8f5e !important;
    box-shadow: 0 0 0 3px rgba(94, 143, 94, 0.15) !important;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    #hero {
        padding-top: 100px;
    }

    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        display: inline-flex;
    }

    .about-images-grid {
        transform: none !important;
    }

    .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas a {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    #navbar,
    #backToTop,
    .floating-card {
        display: none;
    }

    body {
        background: white;
    }
}
