/* ── Navbar ─────────────────────────────────────────────── */
:root {
    --nav-height: 64px;
    --nav-bg: rgba(245, 245, 245, 0.94);
    --nav-text: #111;
    --nav-btn-bg: #e2e2e2;
    --nav-btn-hover-bg: #111;
    --nav-btn-hover-text: #fff;
    --nav-font: 'Oswald', sans-serif;
}

/* ── Base ── */
.bd-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-sizing: border-box;
    background: transparent;
    transition: background 0.45s ease, backdrop-filter 0.45s ease,
                box-shadow 0.45s ease, height 0.45s ease;
}

/* Taller navbar + bigger logo when at top of page (hero zone) */
.bd-nav.transparent {
    height: 88px;
}

/* Solid state */
.bd-nav.scrolled,
.bd-nav.solid {
    background: var(--nav-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* ── Sections ── */
.bd-nav__left,
.bd-nav__right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.bd-nav__right {
    justify-content: flex-end;
}

/* ── Logo ── */
.bd-nav__center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-nav__center a {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.bd-logo {
    height: 44px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease, height 0.45s ease;
}

/* Bigger logo in transparent/hero state */
.bd-nav.transparent .bd-logo {
    height: 60px;
}

/* Dark logo for solid navbar */
.bd-logo--dark  { display: block; }
.bd-logo--light { display: none; }

/* Transparent navbar: flip to white logo */
.bd-nav.transparent .bd-logo--dark  { display: none; }
.bd-nav.transparent .bd-logo--light { display: block; }

/* ── Buttons ── */
.bd-btn {
    background: var(--nav-btn-bg);
    color: var(--nav-text);
    padding: 7px 14px;
    border: none;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
    font-family: var(--nav-font);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Liquid radial fill */
.bd-btn::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: var(--nav-btn-hover-bg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
    z-index: -1;
}

.bd-btn:hover::before {
    width: 260%;
    height: 260%;
}

.bd-btn:hover {
    color: var(--nav-btn-hover-text);
}

/* Transparent-nav buttons: white pill, white hover fills to accent */
.bd-nav.transparent .bd-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.bd-nav.transparent .bd-btn::before {
    background: #fff;
}

.bd-nav.transparent .bd-btn:hover {
    color: #111;
}

/* ── Dropdown ── */
.bd-dropdown {
    position: relative;
    display: inline-block;
}

.bd-dropdown__content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;           /* flush to button — no gap for hover to escape through */
    z-index: 10;
    flex-direction: column;
    gap: 6px;
    padding-top: 10px;   /* visual breathing room without breaking hover */
    min-width: 180px;
}

.bd-dropdown:hover .bd-dropdown__content {
    display: flex;
}

/* Dropdown items always on opaque background for legibility */
.bd-dropdown__content .bd-btn {
    background: rgba(245,245,245,0.97);
    color: #111;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.bd-dropdown__content .bd-btn::before {
    background: #111;
}

.bd-dropdown__content .bd-btn:hover {
    color: #fff;
}

.bd-dropdown:hover > .bd-btn::before {
    width: 260%;
    height: 260%;
}

.bd-dropdown:hover > .bd-btn {
    color: var(--nav-btn-hover-text);
}

/* ── Mobile toggle ── */
.bd-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    z-index: 1002;
    margin-left: auto;
}

.bd-nav__toggle span {
    display: block;
    width: 28px;
    height: 1.5px;
    background: #111;
    transition: background 0.3s ease;
}

.bd-nav.transparent .bd-nav__toggle span {
    background: #fff;
}

.bd-nav__brand-mobile {
    display: none;
    position: absolute;
    left: 20px;
}

.bd-nav__brand-mobile img {
    height: 26px;
    width: auto;
    display: block;
    transition: height 0.45s ease;
}

.bd-nav.transparent .bd-nav__brand-mobile img {
    height: 38px;
}

/* Light logo on transparent mobile nav */
.bd-nav__brand-mobile .bd-logo--dark  { display: block; }
.bd-nav__brand-mobile .bd-logo--light { display: none; }
.bd-nav.transparent .bd-nav__brand-mobile .bd-logo--dark  { display: none; }
.bd-nav.transparent .bd-nav__brand-mobile .bd-logo--light { display: block; }

/* ── Mobile menu ── */
.bd-nav__mobile {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #f5f5f5 0%, #ebebeb 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 90px 40px 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bd-nav.menu-open .bd-nav__mobile {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bd-nav__mobile .bd-mob-link {
    display: block;
    font-family: var(--nav-font);
    font-size: 2.8rem;
    font-weight: 400;
    color: #111;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative;
    transition: color 0.25s ease;
}

.bd-nav__mobile .bd-mob-link:last-child {
    border-bottom: none;
}

.bd-nav__mobile .bd-mob-link::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(0,0,0,0.2);
    transition: right 0.25s ease, color 0.25s ease;
}

.bd-nav__mobile .bd-mob-link:hover {
    color: var(--accent, #7B2FBE);
}

.bd-nav__mobile .bd-mob-link:hover::after {
    right: -4px;
    color: var(--accent, #7B2FBE);
}

.bd-nav__mobile .bd-mob-sub {
    font-size: 1.6rem;
    font-weight: 300;
    padding: 10px 0 10px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    color: #444;
}

.bd-nav__mobile .bd-mob-sub::after {
    font-size: 1.4rem;
}

/* Blur page content behind open menu */
body.menu-active > *:not(#bd-nav-wrap):not(script):not(style) {
    filter: blur(18px);
    transition: filter 0.35s ease;
}

body.menu-active #bd-nav-wrap,
body.menu-active #bd-nav-wrap * {
    filter: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .bd-nav__left,
    .bd-nav__right,
    .bd-nav__center {
        display: none;
    }

    .bd-nav__toggle {
        display: flex;
    }

    .bd-nav__brand-mobile {
        display: block;
    }

    .bd-nav {
        background: rgba(245,245,245,0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 1px 0 rgba(0,0,0,0.08);
        height: var(--nav-height); /* compact by default on mobile */
    }

    .bd-nav.transparent {
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        height: 72px; /* slightly taller in hero zone on mobile */
    }
}

@media (max-width: 480px) {
    .bd-nav__brand-mobile img {
        height: 22px;
    }

    .bd-nav__mobile {
        padding: 80px 28px 28px;
    }

    .bd-nav__mobile .bd-mob-link {
        font-size: 2.1rem;
    }

    .bd-nav__mobile .bd-mob-sub {
        font-size: 1.3rem;
    }
}
