/* ========================================
   Mary's Cuisine Catering Services
   Custom Styles — Teal & Slate Grey
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Selection */
::selection {
    background: #14b8a6;
    color: white;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-subtitle,
.hero-title,
.hero-desc,
.hero-cta,
.hero-stats {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-subtitle.active {
    opacity: 1;
    transform: translateY(0);
}
.hero-title.active {
    opacity: 1;
    transform: translateY(0);
}
.hero-desc.active {
    opacity: 1;
    transform: translateY(0);
}
.hero-cta.active {
    opacity: 1;
    transform: translateY(0);
}
.hero-stats.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .reveal-up {
        animation: revealUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .reveal-left {
        animation: revealLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .reveal-right {
        animation: revealRight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    .reveal-up:nth-child(2) { animation-delay: 0.1s; }
    .reveal-up:nth-child(3) { animation-delay: 0.2s; }
    .reveal-up:nth-child(4) { animation-delay: 0.3s; }
    .reveal-up:nth-child(5) { animation-delay: 0.4s; }
    .reveal-up:nth-child(6) { animation-delay: 0.5s; }
}

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

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

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

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Mobile menu button animation */
#menuBtn.active #menuLine1 {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active #menuLine2 {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active #menuLine3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: background-color 0.5s ease;
}

/* ========================================
   Image Hover
   ======================================== */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-img:hover {
    transform: scale(1.03);
}

/* ========================================
   Form Inputs
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* ========================================
   Button Focus States
   ======================================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ========================================
   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;
    }
}
