*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Custom selection color */
::selection {
    background-color: #C9A84C;
    color: #0a1a35;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1a35;
}
::-webkit-scrollbar-thumb {
    background: #1a3f78;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C9A84C;
}

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth anchor offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Image hover effect */
img {
    display: block;
    max-width: 100%;
}

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

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, transparent 0%, rgba(247,245,240,0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

#hero > div {
    position: relative;
    z-index: 1;
}

/* Gold accent line animation on hover */
a[href="#menu"]:hover .transition-transform {
    animation: none;
}

/* Navbar glass effect when scrolled */
#navbar.scrolled {
    background: rgba(247, 245, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 26, 53, 0.08);
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Button ripple effect on press */
button, a {
    -webkit-tap-highlight-color: transparent;
}
