/* ══════════════════════════════════════════════
   BPV NAVBAR — assets/bpv-navbar.css
   Design tokens extracted from BPV Developers Widget
══════════════════════════════════════════════ */

.bpv-nav {
    /* ── Colors ── */
    --bpv-nav-cream:    #FAF6F0;
    --bpv-nav-ink:      #2A1D14;
    --bpv-nav-brown:    #5C3D28;
    --bpv-nav-ink-dim:  rgba(42, 29, 20, 0.55);
    --bpv-nav-divider:  rgba(42, 29, 20, 0.12);
    --bpv-nav-shadow:   0 1px 0 rgba(42, 29, 20, 0.06),
                        0 4px 20px rgba(42, 29, 20, 0.05);

    /* ── Typography ── */
    --bpv-nav-font-serif: 'Swarsh Daisy', serif;
    --bpv-nav-font-sans:  'Inclusive Sans', sans-serif;
 
    /* ── Layout ── */
    --bpv-nav-h:   96px;
    --bpv-nav-pad: 20px;   /* fixed 20px desktop */

    /* ── Easing — matches BPV widget ── */
    --bpv-nav-ease:     cubic-bezier(0.16, 1, 0.3, 1);
    --bpv-nav-ease-alt: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Overlay is moved to <body> by JS so it loses the nav's CSS vars.
   Redefine everything it needs on its own selector. */
.bpv-nav__overlay {
    --bpv-nav-h:        76px;
    --bpv-nav-ease:     cubic-bezier(0.16, 1, 0.3, 1);
    --bpv-nav-ink:      #2A1D14;
    --bpv-nav-divider:  rgba(42, 29, 20, 0.12);
    --bpv-nav-font-serif: 'Swarsh Daisy', serif;
    --bpv-nav-font-sans:  'Inclusive Sans', sans-serif;
    --bpv-overlay-pad:  16px;   /* mobile side padding */
}

/* ── Reset ── */
.bpv-nav *,
.bpv-nav *::before,
.bpv-nav *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Root ── */
.bpv-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    background: transparent;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.45s var(--bpv-nav-ease-alt),
                opacity   0.45s var(--bpv-nav-ease-alt);
}

.bpv-nav.is-fixed {
    position: fixed;
}

/* Solid cream bg + shadow after hero */
.bpv-nav.is-solid .bpv-nav__desktop,
.bpv-nav.is-solid .bpv-nav__mobile {
    background-color: var(--bpv-nav-cream);
/*     box-shadow: var(--bpv-nav-shadow); */
    border-bottom: 1px solid var(--bpv-nav-divider);
    transition: background-color 0.4s var(--bpv-nav-ease-alt),
                box-shadow       0.4s var(--bpv-nav-ease-alt),
                border-color     0.4s var(--bpv-nav-ease-alt);
}

.bpv-nav.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.bpv-nav:not(.is-solid) .bpv-nav__link {
    font-weight: 700 !important;
	font-size: 1.2em !important;
}


/* ══════════════════════════════════════════════
   INNER CONTAINER
══════════════════════════════════════════════ */
.bpv-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--bpv-nav-pad);
}


/* ══════════════════════════════════════════════
   DESKTOP BAR
══════════════════════════════════════════════ */
.bpv-nav__desktop {
    display: flex;
    align-items: center;
    height: var(--bpv-nav-h);
    background: transparent;
    position: relative;
    transition: background-color 0.4s var(--bpv-nav-ease-alt),
                box-shadow       0.4s var(--bpv-nav-ease-alt);
}

/* ── Nav list ── */
.bpv-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.bpv-nav__list--left {
    justify-content: flex-start;
}

/* ── Links — Swarsh Daisy serif, underline on hover ── */
.bpv-nav__link {
    font-family: 'Swarsh Daisy', serif !important;
    font-size: clamp(1rem, 2.6vw, 18px) !important;
    font-weight: 400;
    line-height: 130% !important;
    letter-spacing: 0.01em !important;
    color: var(--bpv-nav-cream) !important;   /* white on transparent hero */
    text-decoration: none !important;
    position: relative;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.bpv-nav.is-solid .bpv-nav__link {
    color: var(--bpv-nav-ink) !important;     /* dark on solid bg */
}

/* Underline slide — same as bpv-project-link */
.bpv-nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 1px;
    background: currentColor;
    transition: width 0.3s var(--bpv-nav-ease);
}
.bpv-nav__link:hover        { opacity: 0.6; }
.bpv-nav__link:hover::after { width: 100%; }


/* ── Desktop logo — centered absolutely, hidden on hero, fades in on solid ── */
.bpv-nav__logo--desktop {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex-shrink: 0;
    line-height: 0;
    display: block;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.35s var(--bpv-nav-ease),
                visibility 0.35s var(--bpv-nav-ease);
}

/* Solid bg — dark logo, fully visible */
.bpv-nav.is-solid .bpv-nav__logo--desktop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Developer page, transparent — white logo via filter */
.bpv-nav.is-developer:not(.is-solid) .bpv-nav__logo--desktop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.bpv-nav.is-developer:not(.is-solid) .bpv-nav__logo--desktop img {
    filter: brightness(0) invert(1);
}

.bpv-nav.is-solid .bpv-nav__logo--desktop:hover { opacity: 0.8 !important; }
.bpv-nav.is-developer:not(.is-solid) .bpv-nav__logo--desktop:hover { opacity: 0.8 !important; }

.bpv-nav__logo--desktop img {
    display: block;
    width: 256px !important;
    height: auto !important;
    max-width: none !important;
}

.bpv-nav.is-solid .bpv-nav__logo--desktop:hover { opacity: 0.8 !important; }


/* ── Phone cluster ── */
.bpv-nav__phones {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.bpv-nav__phone-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Transparent hero → white icon */
.bpv-nav:not(.is-solid) .bpv-nav__phone-icon--light { display: block; }
.bpv-nav:not(.is-solid) .bpv-nav__phone-icon--dark  { display: none;  }

/* Solid bg → dark icon */
.bpv-nav.is-solid .bpv-nav__phone-icon--light { display: none;  }
.bpv-nav.is-solid .bpv-nav__phone-icon--dark  { display: block; }

.bpv-nav__phones-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bpv-nav__phone-number {
    font-family: 'Swarsh Daisy', serif !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 140%;
    letter-spacing: 0.02em;
    color: var(--bpv-nav-cream);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.bpv-nav.is-solid .bpv-nav__phone-number {
    color: var(--bpv-nav-ink);
}

.bpv-nav__phone-number:hover { opacity: 0.6; }


/* ══════════════════════════════════════════════
   MOBILE BAR
══════════════════════════════════════════════ */
.bpv-nav__mobile {
    display: none;
    align-items: center;
    height: var(--bpv-nav-h);
    background: transparent;
    position: relative;
    z-index: 9300;
    transition: background-color 0.4s var(--bpv-nav-ease-alt),
                box-shadow       0.4s var(--bpv-nav-ease-alt);
}

/* Mobile logo always visible */
.bpv-nav__logo--mobile {
    display: block;
    flex-shrink: 0;
    line-height: 0;
    transition: opacity 0.25s ease;
}
.bpv-nav__logo--mobile:hover { opacity: 0.8; }

/* Logo swap: white on transparent hero, dark on solid bg */
.bpv-nav__logo-img {
    display: block;
    width: 160px !important;
    height: auto !important;
    max-width: none !important;
}

.bpv-nav__logo-img--white { display: block; }
.bpv-nav__logo-img--dark  { display: none;  }

.bpv-nav.is-solid .bpv-nav__logo-img--white { display: none;  }
.bpv-nav.is-solid .bpv-nav__logo-img--dark  { display: block; }

/* ── Burger — aggressive theme override ── */
.bpv-nav__burger,
.bpv-nav__burger:hover,
.bpv-nav__burger:focus,
.bpv-nav__burger:active,
.bpv-nav__burger:focus-visible,
.bpv-nav__burger:focus-within {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    color: transparent !important;
    cursor: pointer;
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpv-nav__burger span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--bpv-nav-cream);    /* white on hero */
    transform-origin: center;
    transition: transform 0.4s var(--bpv-nav-ease-alt),
                opacity   0.3s var(--bpv-nav-ease-alt),
                background-color 0.3s ease;
}

.bpv-nav.is-solid .bpv-nav__burger span {
    background: var(--bpv-nav-ink);      /* dark on solid bg */
}

.bpv-nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.bpv-nav__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.bpv-nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ══════════════════════════════════════════════
   MOBILE OVERLAY
   Always fixed to the viewport — never relative
   to the nav parent (which may be absolute/static
   on the transparent hero, causing right-shift).
   Backdrop = BPV lightbox style:
   rgba(250, 246, 240, 0.92) + blur(20px)
══════════════════════════════════════════════ */
.bpv-nav__overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    /* dvh covers the full viewport including safe areas on iOS */
    height: 100vh !important;
    height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    z-index: 9150;
    flex-direction: column;
    transform: none !important;
    margin: 0 !important;
}

.bpv-nav__overlay.is-open {
    display: flex;
}

/* Blurred cream backdrop — covers full screen including safe areas */
.bpv-nav__overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(250, 246, 240, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.bpv-nav__overlay.is-open .bpv-nav__overlay-backdrop {
    opacity: 1;
}

/* Shell above the backdrop */
.bpv-nav__overlay-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    /* Explicit 16px sides — no variable dependency since this lives on <body> */
    padding-top: calc(var(--bpv-nav-h) + 24px);
    padding-right: 16px;
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    padding-left: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity  0.4s var(--bpv-nav-ease),
                transform 0.4s var(--bpv-nav-ease);
}

.bpv-nav__overlay.is-open .bpv-nav__overlay-shell {
    opacity: 1;
    transform: translateY(0);
}

/* ── Close button — matches BPV lightbox close ── */
.bpv-nav__overlay-close,
.bpv-nav__overlay-close:hover,
.bpv-nav__overlay-close:focus,
.bpv-nav__overlay-close:active {
    position: absolute !important;
    top: 20px !important;
    right: 16px !important;
    z-index: 10 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 1px solid #2A1D14 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    color: #2A1D14 !important;
    padding: 8px 10px !important;
    line-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpv-nav__overlay-close { opacity: 0.65; transition: opacity 0.2s ease; }
.bpv-nav__overlay-close:hover { opacity: 1 !important; }
.bpv-nav__overlay-close svg line { stroke: #2A1D14; }


/* ── Overlay nav list ── */
.bpv-nav__overlay-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

.bpv-nav__overlay-item {
    border-bottom: 1px solid var(--bpv-nav-divider);
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity   0.55s var(--bpv-nav-ease) calc(0.08s + var(--oi) * 0.07s),
        transform 0.55s var(--bpv-nav-ease) calc(0.08s + var(--oi) * 0.07s);
}

.bpv-nav__overlay-item:last-child { border-bottom: none; }

.bpv-nav__overlay.is-open .bpv-nav__overlay-item {
    opacity: 1;
    transform: translateY(0);
}

/* ── Overlay links — Swarsh Daisy, large ── */
.bpv-nav__overlay-link {
    display: block;
    padding: 14px 0;
    font-family: var(--bpv-nav-font-serif);
    font-size: clamp(2.4rem, 10vw, 52px);
    font-weight: 400;
    line-height: 115%;
    letter-spacing: -0.01em;
    color: var(--bpv-nav-ink);
    text-decoration: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.bpv-nav__overlay-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 10px;
    width: 0; height: 1px;
    background: var(--bpv-nav-ink);
    transition: width 0.35s var(--bpv-nav-ease);
}

.bpv-nav__overlay-link:hover        { opacity: 0.55; }
.bpv-nav__overlay-link:hover::after { width: 60%; }


/* ── Overlay phone block ── */
.bpv-nav__overlay-phones {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bpv-nav-divider);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity   0.5s var(--bpv-nav-ease) 0.48s,
        transform 0.5s var(--bpv-nav-ease) 0.48s;
}

.bpv-nav__overlay.is-open .bpv-nav__overlay-phones {
    opacity: 1;
    transform: translateY(0);
}

.bpv-nav__overlay-phone-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 3px;
}

.bpv-nav__overlay-phones-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bpv-nav__overlay-phone-number {
    font-family: var(--bpv-nav-font-sans);
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    letter-spacing: 0.03em;
    color: var(--bpv-nav-ink);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.bpv-nav__overlay-phone-number:hover { opacity: 0.6; }


/* ══════════════════════════════════════════════
   BREAKPOINTS
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .bpv-nav__list { gap: 20px; }
    .bpv-nav__link { font-size: clamp(0.9rem, 1.2vw, 16px) !important; }
}

@media (max-width: 768px) {
    .bpv-nav__desktop { display: none !important; }
    .bpv-nav__mobile  { display: flex !important; }

    /* Mobile overlay side padding = 16px */
    .bpv-nav__overlay { --bpv-overlay-pad: 16px; }
}

@media (min-width: 769px) {
    .bpv-nav__mobile               { display: none !important; }
    .bpv-nav__overlay              { display: none !important; }
    .bpv-nav__overlay.is-open      { display: none !important; }
}