/* Custom styles for Donut Box */

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

/* Base transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Navigation transitions */
.nav-text {
    transition: color 0.3s ease;
}

/* Hero image animation */
#hero img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal base state - visible by default for progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    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);
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Mobile nav links */
.mobile-nav-link {
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
    padding-left: 0.75rem;
}

/* Navbar background transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* Button hover effects */
a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2D6A4F;
}

/* Selection color */
::selection {
    background-color: #C8E6C8;
    color: #1B4332;
}

/* Reduce motion preference */
@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;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Tablet and above adjustments */
@media (min-width: 768px) {
    .group:hover .group-hover\:scale-105 {
        transform: scale(1.05);
    }
}

/* Large desktop adjustments */
@media (min-width: 1280px) {
    .font-serif {
        font-size: clamp(1.5rem, 2vw, 2rem);
    }
}
