:root {
    --nav-min: 84px;
    --brand: #1c1c1c;
    --brand-ink: #ffffff;
    --gold: #d4a047;
    --ink: #222;
    --page-bg: #faf9f7;
    --container-max: 1200px;

    --btn-ink: #111;
    --btn-bg: var(--gold);
    --btn-bg-hover: #e1b15b;
}

/* ===== Base header: SOLID, non-overlapping (used on all inner pages) ===== */
header#nav_bar {
    position: sticky; /* occupies layout, no overlap */
    top: 0;
    inset-inline: 0;
    z-index: 1000;
    color: var(--brand-ink);
    min-height: var(--nav-min);
    background: var(--brand); /* solid bar */
    padding: clamp(14px, 2.2vh, 26px) 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ===== Overlay variant for the landing page hero ===== */
header#nav_bar.overlay {
    position: fixed; /* sits above hero */
    left: 0;
    right: 0;
    top: 0;
    box-shadow: none;
    background: linear-gradient(
        to bottom,
        rgba(28, 28, 28, 0.92) 0%,
        rgba(28, 28, 28, 0.55) 55%,
        rgba(28, 28, 28, 0) 100%
    );
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.nav-inner {
    width: min(100%, var(--container-max));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}
#logo {
    height: auto;
    max-height: clamp(44px, 9vh, 100px);
    width: auto;
    object-fit: contain;
    justify-self: start;
}

/* Primary nav */
nav[aria-label="Primary"] {
    justify-self: center;
}
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: clamp(8px, 1vw, 16px);
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}
.nav-links > li {
    position: relative;
}
.nav-links a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: #f4e9cf;
    font-family: "Playfair Display", serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    font-size: clamp(0.95rem, 0.8vw, 1.02rem);
    padding: 8px 2px;
    outline: none;
    transition: color 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--gold);
}
/* underline reveal */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after {
    transform: scaleX(1);
}

.contact-link-mobile {
    display: none;
}

.has-dropdown .dropdown-trigger {
    padding-right: 16px;
}

.has-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.has-dropdown .dropdown-trigger::before {
    content: "▾";
    font-size: 0.72rem;
    line-height: 1;
    position: absolute;
    right: 0;
    top: 52%;
    transform: translateY(-48%);
    color: currentColor;
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 71, 0.34);
    background: rgba(20, 20, 20, 0.97);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 6px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1200;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background: rgba(212, 160, 71, 0.18);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-phone {
    color: #f4e9cf;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.97rem;
    white-space: nowrap;
}

.nav-phone:hover,
.nav-phone:focus-visible {
    color: var(--gold);
}

/* Contact button (desktop) */
.contact-btn {
    background: var(--btn-bg);
    color: var(--btn-ink);
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-family: "Libre Bodoni", serif;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.05s ease;
}
.contact-btn:hover {
    background: var(--btn-bg-hover);
}
.contact-btn:active {
    transform: translateY(1px);
}

/* Hamburger */
.menu-toggle {
    display: none;
    justify-self: end;
    background: transparent;
    border: 0;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
}
.menu-toggle:focus-visible {
    outline: 2px solid var(--gold);
}

@media (max-width: 1280px) {
    .nav-links a {
        font-size: 0.95rem;
    }

    .contact-btn {
        padding: 9px 14px;
    }

    .nav-phone {
        font-size: 0.93rem;
    }
}

/* ===== Mobile ===== */
@media (max-width: 1120px) {
    .nav-actions {
        display: none;
    } /* move CTA into mobile menu */
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }
    .nav-inner {
        grid-template-columns: auto 1fr auto;
    }

    /* collapse nav to panel */
    .nav-links {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: rgba(20, 20, 20, 0.96);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        flex-direction: column;
        gap: 8px;
        padding: 14px 18px 18px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .nav-links > li {
        width: 100%;
    }

    .contact-link-mobile {
        display: inline-block;
    }

    /* On non-overlay pages, use a SOLID panel to match the solid bar */
    header#nav_bar:not(.overlay) .nav-links {
        background: var(--brand);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    header#nav_bar.open .nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 10px 0;
    }

    .has-dropdown .dropdown-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-right: 0;
    }

    .has-dropdown .dropdown-trigger::before {
        position: static;
        transform: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transform: none;
        min-width: 0;
        margin-top: 4px;
        padding: 10px;
        border-radius: 10px;
        border-color: rgba(212, 160, 71, 0.25);
        background: rgba(255, 255, 255, 0.04);
        box-shadow: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px 10px;
    }

    .dropdown-menu a {
        font-size: 0.95rem;
        padding: 7px 0;
    }

    .nav-links a::after {
        display: none;
    } /* simpler mobile states */
}
