/* Custom styles for Old School Ink Society */

:root {
    --color-terracotta-500: #B85446;
    --color-sand-500: #d4a04a;
}

html {
    scroll-behavior: smooth;
}

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

/* Scroll reveal base - always visible */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal animation - only when JS is enabled and preference allows */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(24px);
    }
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(26, 22, 20, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-scrolled #nav-logo-text {
    color: white !important;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

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

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

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

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

/* Selection color */
::selection {
    background: rgba(184, 84, 70, 0.3);
    color: inherit;
}

/* Image loading optimization */
img {
    max-width: 100%;
    height: auto;
}

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

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

img[loading="lazy"] {
    opacity: 0;
}

img.loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* Decorative divider animation */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Subtle hover for service cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Prevent layout shift on images */
.rounded-2xl {
    contain: layout style;
}
