/* Custom styles for The Mason Jar */

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

/* Custom selection color */
::selection {
    background-color: #F1705A;
    color: #1A1A1A;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(0px);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

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

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

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    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 */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

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

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

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1A1A1A inset !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

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

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
