/* Base & Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.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);
    }

    .hero-elem {
        opacity: 0;
        transform: translateY(20px);
        animation: heroReveal 0.8s ease forwards;
    }

    .hero-elem:nth-child(1) { animation-delay: 0.2s; }
    .hero-elem:nth-child(2) { animation-delay: 0.4s; }
    .hero-elem:nth-child(3) { animation-delay: 0.6s; }
    .hero-elem:nth-child(4) { animation-delay: 0.8s; }
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero elements always visible for accessibility */
@supports not (animation-fill-mode: forwards) {
    .hero-elem {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    color: rgba(255, 255, 255, 0.95) !important;
    transition: color 0.5s ease !important;
}

#navbar.scrolled .nav-logo-text {
    color: #0d1f33 !important;
}

/* Mobile Menu */
#mobile-menu {
    z-index: 50;
}

.menu-line {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
    background-color: #0d1f33 !important;
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
    background-color: #0d1f33 !important;
}

/* Mobile link transitions */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Selection color */
::selection {
    background-color: rgba(228, 177, 76, 0.2);
    color: #0d1f33;
}

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

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

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

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

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