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

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #c48800;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e8a800;
}

/* Selection color */
::selection {
    background: #f7df80;
    color: #0f2036;
}

/* Reveal animation - progressive enhancement, only when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is always visible if JS is disabled */
.no-js .reveal,
:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

/* Mobile menu open state */
#mobile-menu.open {
    max-height: 500px;
}

/* Hamburger animation */
#mobile-menu-btn.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}
#mobile-menu-btn.active #bar2 {
    opacity: 0;
}
#mobile-menu-btn.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Navbar scrolled state */
#navbar.scrolled {
    background: rgba(15, 32, 54, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Smooth image loading */
img {
    loading: lazy;
}

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

/* Subtle pattern for gallery section */
#gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #f7df80, transparent);
}

/* Counter animation helper */
.counter-value {
    display: inline-block;
}
