/* Custom styles for 49 Nutrition */

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

/* Custom selection color */
::selection {
    background-color: #923349;
    color: #fefcfb;
}

/* Floating card animation */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -3s;
}

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

/* Scroll reveal base state (visible by default for progressive enhancement) */
.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);
}

/* Reduced motion - keep everything visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* On screens with reduced motion preference, apply the animation via JS class only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal.animated {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(97, 37, 52, 0.08);
}

.navbar-scrolled .font-serif {
    color: #380f18 !important;
}

.navbar-scrolled .text-burgundy-800 {
    color: #612534 !important;
}

.navbar-scrolled .menu-line {
    background-color: #380f18 !important;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Subtle hover effects on cards */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #923349;
    outline-offset: 2px;
    border-radius: inherit;
}

/* Input focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(146, 51, 73, 0.1);
}

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

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

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

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #faf0f2 0%, #fce7eb 100%);
}
