/* nav.css - Elegant Transparent Header */

.site-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background-color: var(--color-bg-light);
    /* Changed from dark olive to light background */
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color var(--transition), box-shadow var(--transition);
}

.site-nav .nav-brand,
.site-nav .nav-links a,
.site-nav .nav-actions {
    color: var(--color-olive-dark);
}

.site-nav.scrolled {
    position: sticky;
    background-color: rgba(250, 248, 245, 0.98);
    /* Solid cream */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(192, 160, 123, 0.4);
}

.site-nav.scrolled .nav-brand,
.site-nav.scrolled .nav-links a,
.site-nav.scrolled .nav-actions,
.site-nav.scrolled .hamburger {
    color: var(--color-olive-dark);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-olive-dark);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.nav-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
    clip-path: inset(0 0 32% 0); /* Crops out duplicate bottom text, simplifying it into a monogram */
    margin-bottom: -25px; /* Offsets the cropped transparent space at bottom */
    margin-top: -3px; /* Vertically centers the remaining emblem in the navbar */
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center; /* Ensures links are vertically centered in the navbar */
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
}

.nav-links a {
    font-size: 0.85rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--color-olive-dark);
    letter-spacing: 0.05em;
    opacity: 0.9;
    position: relative;
    padding: var(--space-2) 0;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 30%;
    width: 40%;
    height: 1px;
    background-color: var(--color-olive-dark);
}

.nav-actions {
    display: flex;
    gap: var(--space-6);
    align-items: center;
    color: var(--color-olive-dark);
}

.nav-actions svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition);
}

.nav-actions svg:hover {
    opacity: 1;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--color-olive-dark);
    cursor: pointer;
    padding: 8px;
}

/* Hidden by default on desktop */
.mobile-socials-wrapper {
    display: none;
}

@media (max-width: 1024px) {
    .site-nav {
        height: 76px; /* Dedicated mobile navbar height */
        background-color: var(--color-bg-light); /* Cream background */
        border-bottom: 1px solid rgba(192, 160, 123, 0.35); /* Subtle gold bottom border */
        position: sticky;
        top: 0;
    }

    .nav-inner {
        padding: 0 20px; /* Horizontal padding 20px */
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-brand {
        display: flex;
        align-items: center;
        gap: 10px; /* Reduced gap to conserve horizontal space */
        white-space: nowrap;
        letter-spacing: 0.05em; /* Overrides desktop 0.15em spacing to prevent overflow on mobile */
    }

    .nav-brand span {
        font-size: clamp(16px, 5.5vw, 24px); /* Scales font dynamically down to 16px on 320px viewports */
        line-height: 1;
        white-space: nowrap;
    }

    .nav-logo {
        height: 60px; /* 40.8px visible monogram */
        width: auto;
        object-fit: contain;
        clip-path: inset(0 0 32% 0); /* Crops out duplicate bottom text, simplifying it into a monogram */
        margin-bottom: -19px; /* Offsets the cropped space at bottom */
        margin-top: -2px; /* Vertically centers the remaining emblem */
    }

    .nav-actions {
        display: none !important; /* Hide on mobile navbar */
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 76px; /* Align to mobile navbar bottom */
        left: 0;
        right: 0;
        background-color: var(--color-bg-light);
        padding: var(--space-6) var(--space-4);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        border-top: 1px solid var(--border-subtle);
    }

    .mobile-socials-wrapper {
        display: flex;
        gap: 20px;
        justify-content: center;
        align-items: center;
        margin-top: var(--space-6);
        padding-top: var(--space-6);
        border-top: 1px dashed rgba(201, 168, 93, 0.2);
    }

    .mobile-socials-wrapper a {
        color: var(--color-olive-dark);
        opacity: 0.8;
        font-size: 1.35rem;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    margin: 5px 0;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}