/* ── Header bar ─────────────────────────────────────────────── */
.vl-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--vl-header-h);
    background: var(--vl-cream);
    color: var(--vl-ink); /* paints the masked logo ink */
    transition: transform 0.3s ease;
}

.vl-nav--hidden {
    transform: translateY(-100%);
}

/* Development/Plot pages: header in normal flow, scrolls with the page. */
body.vl-header--static .vl-nav {
    position: static;
}

/* Fixed header needs the page pushed down; static mode doesn't. */
body {
    padding-top: var(--vl-header-h);
}

body.vl-header--static {
    padding-top: 0;
}

.vl-nav__inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding-inline: var(--vl-edge);
}

.vl-nav__logo-link {
    display: inline-flex;
    color: var(--vl-ink);
}

/* ── Contact pill (node 34:2: 200×40, radius 100, brick) ── */
.vl-nav__contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 40px;
    margin-left: 48px; /* logo ends x=258, pill starts x=306 */
    border-radius: var(--vl-radius-pill);
    background: var(--vl-brick);
    border: 1px solid var(--vl-brick);
    color: var(--vl-white);
    font-weight: var(--vl-weight-semibold); /* heaviest face the designs use (Omnes Pro Semibold, 700) */
    font-size: var(--vl-text-nav);
    text-decoration: none;
}

/* ── Links (node 2:3: 18px, 400; gaps read from link x-positions) ── */
.vl-nav__links {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: auto;
}

.vl-nav__link {
    font-size: var(--vl-text-nav);
    text-decoration: none;
}

/* Derived states — cornflower, per "different to the body" soft rule. */
.vl-nav__link:hover,
.vl-nav__link[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--vl-cornflower);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* ── Hamburger (hidden on desktop) ── */
.vl-nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.vl-nav__bar {
    width: 26px;
    height: 2px;
    background: var(--vl-ink);
}

/* ── Off-canvas drawer (Bell-Homes-style per Liam, Vivly styling) ──
   Slides in from the right — same edge as the sticky Contact tab —
   over a dimmed page. Full-width only on small phones. */
.vl-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: var(--vl-cream);
    box-shadow: -4px 0 24px rgba(50, 56, 59, 0.18);
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    visibility: hidden;
}

@media (max-width: 480px) {
    .vl-nav-panel {
        width: 100%;
    }
}

.vl-nav-panel.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
}

.vl-nav-panel__header {
    display: flex;
    justify-content: space-between; /* Contact pill left, × right (Liam) */
    align-items: center;
    height: var(--vl-header-h); /* matches the 82px header bar (Liam) */
    padding: 0 var(--vl-edge);
}

.vl-nav-panel__close {
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.vl-nav-panel__close svg {
    width: 100%;
    height: 100%;
    stroke: var(--vl-ink);
    stroke-width: 2;
}

/* Side padding lives on the list items, not the container (Liam):
   each row is 50px tall with --vl-edge padding (40px tablet / 20px
   mobile), so the full drawer-width row is one clean tap target. */
.vl-nav-panel__nav {
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.vl-nav-panel__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.vl-nav-panel__item {
    height: 50px;
    padding: 0 var(--vl-edge);
    display: flex;
    align-items: center;
}

.vl-nav-panel__link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: var(--vl-text-nav); /* same size/style as desktop nav (Liam) */
    text-decoration: none;
}

/* Hover/current mirror the desktop nav's cornflower underline. */
.vl-nav-panel__link:hover,
.vl-nav-panel__link[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--vl-cornflower);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.vl-nav-panel__contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 40px;
    border-radius: var(--vl-radius-pill);
    background: var(--vl-brick);
    color: var(--vl-white);
    font-weight: var(--vl-weight-semibold); /* heaviest face the designs use (Omnes Pro Semibold, 700) */
    font-size: var(--vl-text-nav);
    text-decoration: none;
}

/* Dimmed page behind the drawer — click closes (wired in nav.js). */
.vl-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 55; /* above header (50), below drawer (60) */
    background: rgba(50, 56, 59, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.vl-nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

/* ── Collapse to hamburger below 1024 ── */
@media (max-width: 1023px) {
    .vl-nav__links,
    .vl-nav__contact-pill {
        display: none;
    }

    .vl-nav__hamburger {
        display: flex;
    }
}
