/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Writing mode for scroll indicator */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #064E3B;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #022C22;
}

/* Selection color */
::selection {
    background: #A7F3D0;
    color: #022C22;
}

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

/* Image loading placeholder */
img {
    background-color: #D1FAE5;
}

/* Smooth image transitions */
img {
    transition: opacity 0.3s ease;
}

img[lazy] {
    opacity: 0;
}

img[lazy].loaded {
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Nav active state */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Card hover effects */
.menu-card {
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(2, 44, 34, 0.03));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.menu-card:hover::before {
    opacity: 1;
}
