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

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

/* Scroll reveal base - content is visible by default (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Navbar glass effect when scrolled */
.navbar-scrolled {
    background: rgba(15, 15, 20, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 87, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a22;
}
::-webkit-scrollbar-thumb {
    background: #3d3d48;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FF6B57;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 87, 0.3);
    color: #f5f5f7;
}

/* Image placeholder fallback */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}
img[data-src] {
    opacity: 0;
}
img.loaded {
    opacity: 1;
}
