/* Base styles and custom properties */
:root {
    --color-navy-900: #102a43;
    --color-navy-800: #243b53;
    --color-navy-500: #627d98;
    --color-navy-200: #bcccdc;
    --color-navy-100: #d9e2ec;
    --color-navy-50: #f0f4f8;
    --color-gold-500: #d49a2e;
    --color-gold-400: #e9b84a;
    --color-gold-300: #f0ce80;
    --color-gold-200: #f6dfaa;
    --color-gold-100: #fbf0d4;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(212, 154, 46, 0.2);
    color: var(--color-navy-900);
}

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

::-webkit-scrollbar-track {
    background: var(--color-navy-50);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-500);
}

/* Navbar transitions */
.nav-text {
    transition: color 0.5s ease;
}

.nav-subtext {
    transition: color 0.5s ease;
}

/* When navbar is in light mode (top of page) */
.navbar-light .nav-text {
    color: var(--color-navy-900);
}

.navbar-light .nav-subtext {
    color: var(--color-gold-600);
}

/* When navbar is in dark mode (scrolled) */
.navbar-dark .nav-text {
    color: var(--color-navy-900);
}

.navbar-dark .nav-subtext {
    color: var(--color-gold-600);
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu links */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

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

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

/* Service card hover */
.service-card {
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: var(--color-navy-50);
}

/* Form inputs */
.form-input {
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: var(--color-navy-300);
}

.form-input:focus {
    border-color: var(--color-gold-400) !important;
}

/* Gallery items */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print styles */
@media print {
    nav, #menu-btn, #contact-form, .gallery-item img {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
