/* Custom styles for SHS Cafeteria */

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

/* Hide scrollbar for clean look but keep functionality */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations */
.hero-title-line {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) { animation-delay: 0.2s; }
.hero-title-line:nth-child(3) { animation-delay: 0.3s; }
.hero-title-line:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.hero-subtitle {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-desc {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

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

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-title-line,
    .hero-subtitle,
    .hero-desc {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(253, 248, 246, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(107, 35, 35, 0.08);
}

.nav-scrolled .nav-link {
    color: #6b2323 !important;
}

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

.mobile-menu-open .nav-link,
.mobile-menu-open .mobile-link {
    animation: fadeIn 0.4s ease forwards;
}

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

/* Hamburger animation */
.menu-active span:nth-child(1) {
    transform: rotate(45deg) translate(0.25rem, 0.25rem);
}

.menu-active span:nth-child(2) {
    opacity: 0;
}

.menu-active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.1rem, -0.1rem);
    width: 1.5rem;
}

/* Image hover zoom */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Product cards - dark section */
.bg-burgundy-900\/50 {
    background-color: rgba(58, 15, 15, 0.5);
}

/* Custom selection color */
::selection {
    background: #b83939;
    color: #fdf8f6;
}

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

/* Loading state for images */
img {
    background: linear-gradient(135deg, #fce7e7 0%, #f5d5c9 100%);
}

/* Subtle pattern overlay for dark sections */
.bg-burgundy-950::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(253, 248, 246, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
