/* Custom styles — editorial serif aesthetic, navy & gold palette */

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

/* Selection color */
::selection {
    background-color: #c99010;
    color: #0c1a35;
}

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

#navbar.scrolled {
    background-color: rgba(7, 15, 32, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-logo-sub,
#navbar.scrolled .nav-link,
#navbar.scrolled .nav-menu-btn .menu-line {
    color: #ffffff;
}

#navbar.scrolled .nav-logo-path {
    stroke: #c99010;
}

#navbar.scrolled .nav-link:hover {
    color: #f2c84e;
}

/* Hero nav state (light text on dark hero) */
#navbar .nav-logo-text,
#navbar .nav-logo-sub,
#navbar .nav-link,
#navbar .nav-menu-btn .menu-line {
    color: #ffffff;
}

#navbar .nav-logo-path {
    stroke: #c99010;
}

/* Nav links */
.nav-link {
    position: relative;
    color: #ffffff;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #c99010;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #f2c84e;
}

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

#mobile-menu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#mobile-menu.open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }

/* Scroll reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* For browsers that support prefers-reduced-motion, disable animations */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle image hover zoom */
img {
    transition: transform 0.6s ease;
}

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

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
