/* ===== CSS Custom Properties ===== */
:root {
    --navy-900: #102a43;
    --navy-800: #243b53;
    --navy-600: #486581;
    --navy-500: #627d98;
    --navy-300: #9fb3c8;
    --navy-200: #bcccdc;
    --navy-100: #d9e2ec;
    --navy-50: #f0f4f8;
    --gold-500: #d4a017;
    --gold-400: #ecce6a;
    --gold-300: #f5e0a0;
    --gold-200: #faf0d0;
    --gold-100: #fdf9ef;
}

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: var(--gold-200);
    color: var(--navy-900);
}

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

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

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

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

/* ===== Navbar Transitions ===== */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: var(--navy-900);
}

#navbar.scrolled .menu-line {
    background: var(--navy-900);
}

/* ===== Service Card ===== */
.service-card {
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-500);
    transition: width 0.4s ease;
}

.service-card:hover::after {
    width: 100%;
}

/* ===== Gallery Items ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(4),
.gallery-item:nth-child(5),
.gallery-item:nth-child(8) {
    aspect-ratio: 4/5;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 42, 67, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* ===== Form Inputs ===== */
select option {
    background: white;
    color: var(--navy-900);
}

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .gallery-item img,
    .service-card img {
        transition: none;
    }
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2rem;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    nav, #contact-form, .gallery-item::after {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
