/* ============================================================
   Top Bar — Horizontal nav · Logo · Center links · Pill CTA
   Side Menu — kept for mobile + as secondary navigation
   Vertical Assessment Rail
   ============================================================ */

/* — Top Bar — */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--s-6);
    padding: 22px clamp(20px, 4vw, 56px);
    background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: padding 320ms var(--ease-soft), background 320ms var(--ease-soft);
}

.topbar.is-scrolled {
    padding-top: 14px;
    padding-bottom: 14px;
    background: rgba(0,0,0,0.94);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* — Brand — */
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    color: var(--c-white);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 280ms var(--ease-soft);
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand:hover .brand-mark { transform: translateY(-1px); }

.brand-text { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    background: var(--grad-chrome-mono);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-sub {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    color: var(--c-grey-light);
    margin-top: 6px;
}

/* — Center primary nav — */
.primary-nav {
    display: none;
}

.primary-nav a {
    position: relative;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-grey-light);
    padding: 8px 2px;
    transition: color 240ms var(--ease-soft);
}

.primary-nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--c-chrome);
    transform: translateX(-50%);
    transition: width 280ms var(--ease-soft);
}

.primary-nav a:hover { color: var(--c-white); }
.primary-nav a:hover::after { width: 18px; }

.primary-nav a.is-active {
    color: #f1e6c9;
}
.primary-nav a.is-active::after { width: 22px; }

/* Gold nav CTA (phone) — site-wide theme */
.topbar .btn-outline {
    color: #e7ce94;
    border-color: rgba(231,206,148,0.5);
}
.topbar .btn-outline:hover {
    color: #f2e2b4;
    border-color: #e7ce94;
    background: rgba(205,173,110,0.08);
}

/* — Right side: CTA + mobile toggle — */
.topbar-right {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
}

/* — Mobile menu toggle — */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: 10px 14px;
    color: var(--c-white);
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.02);
    border-radius: 999px;
    transition: border-color 240ms var(--ease-soft), background 240ms var(--ease-soft);
}
.menu-toggle:hover { border-color: var(--c-chrome); background: rgba(255,255,255,0.05); }

.menu-toggle-icon {
    width: 18px; height: 12px;
    position: relative;
    display: inline-block;
}
.menu-toggle-icon span {
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: currentColor;
    transition: transform 320ms var(--ease-soft);
}
.menu-toggle-icon span:first-child { top: 3px; }
.menu-toggle-icon span:last-child  { bottom: 3px; width: 70%; }

/* — Responsive nav —
   The slide-out is the menu at every width, so there is no breakpoint where
   the layout swaps. Only the right-hand cluster needs pinning. */
.topbar-right { justify-self: end; }

/* The bar now carries only the brand and the right-hand cluster, so the old
   link-crowding steps are gone. Below 1280px the portal link drops to its
   icon-only target; its label stays available through the link's aria-label. */
@media (max-width: 1279px) {
    .topbar { gap: var(--s-4); }
    .topbar-portal { padding: 8px; min-width: 40px; }
    .topbar-portal span {
        position: absolute; width: 1px; height: 1px;
        padding: 0; margin: -1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
}

@media (max-width: 540px) {
    .topbar .btn-outline { display: none; }
}

/* — Backdrop — */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 480ms var(--ease-soft);
}
.menu-backdrop.is-active { opacity: 1; pointer-events: auto; }

/* — Side Menu (glassmorphic, slides in from right) — */
.side-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(460px, 92vw);
    z-index: 100;

    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border-left: 1px solid var(--glass-edge);

    transform: translateX(100%);
    transition: transform 620ms var(--ease-premium);
    overflow-y: auto;
}

.side-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 30%),
        radial-gradient(ellipse at 80% 0%, rgba(216,217,221,0.10), transparent 50%);
}

.side-menu.is-open { transform: translateX(0); }

.side-menu-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    /* min-height, not height: with eight links the content is taller than the
       panel on a laptop, and a fixed height squeezed the list instead of
       letting .side-menu scroll. */
    min-height: 100%;
    padding: 32px 40px 40px;
}

.side-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.side-menu-kicker {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    color: var(--c-chrome);
}

.menu-close {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-white);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 50%;
    transition: border-color 240ms var(--ease-soft), color 240ms var(--ease-soft), transform 240ms var(--ease-soft);
}
.menu-close svg { width: 16px; height: 16px; }
.menu-close:hover { border-color: var(--c-white); color: var(--c-white); transform: rotate(90deg); }

.side-menu-list {
    /* Never compress: the list keeps its natural height and the panel scrolls. */
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    margin-top: clamp(20px, 3vh, 36px);
    margin-bottom: auto;
    gap: 2px;
}

.side-menu-list > li > a {
    display: flex;
    align-items: baseline;
    gap: var(--s-4);
    padding: clamp(7px, 1.1vh, 12px) 0;
    font-family: var(--font-display);
    font-weight: 700;
    /* Sized so all eight links, the CTA and the contact block clear a 900px
       viewport without scrolling. */
    font-size: clamp(21px, 2.6vw, 30px);
    line-height: 1;
    color: var(--c-white);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 280ms var(--ease-soft), padding-left 320ms var(--ease-soft);
}
.side-menu-list > li > a:hover { color: var(--c-chrome); padding-left: 10px; }

.link-num {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    color: var(--c-silver-dark);
    min-width: 28px;
}

.side-menu-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 6px 0 16px 44px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.06);
}

.side-menu-sub a {
    display: inline-block;
    padding: 6px 0;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--c-grey-light);
    letter-spacing: 0.02em;
    transition: color 200ms var(--ease-soft), transform 200ms var(--ease-soft);
}
.side-menu-sub a:hover { color: var(--c-white); transform: translateX(4px); }

.side-menu-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-5);
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.foot-block { display: flex; flex-direction: column; gap: 4px; }
.foot-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-silver-dark);
}
.foot-value {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--c-white);
}
a.foot-value { transition: color 200ms var(--ease-soft); }
a.foot-value:hover { color: var(--c-chrome); }

/* — Stagger items on open — */
.side-menu-list > li > a,
.side-menu-sub a,
.side-menu-foot .foot-block {
    opacity: 0;
    transform: translateX(20px);
    transition:
        opacity 540ms var(--ease-premium),
        transform 540ms var(--ease-premium),
        color 280ms var(--ease-soft),
        padding-left 320ms var(--ease-soft);
}
/* Reveal EVERY link, however many there are. This used to be six hardcoded
   nth-child rules that each set opacity and delay together, so when Policies
   and Contact became the seventh and eighth links they kept the initial
   opacity:0 / translateX(20px) state forever and were simply invisible.
   The base rule now owns visibility; the nth-child rules only tune the stagger,
   and a link past the twelfth just shares the last delay instead of vanishing. */
.side-menu.is-open .side-menu-list > li > a {
    opacity: 1;
    transform: none;
    transition-delay: 790ms, 790ms, 0ms, 0ms;
}
.side-menu.is-open .side-menu-list > li:nth-child(1) > a { transition-delay: 240ms, 240ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(2) > a { transition-delay: 290ms, 290ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(3) > a { transition-delay: 340ms, 340ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(4) > a { transition-delay: 390ms, 390ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(5) > a { transition-delay: 440ms, 440ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(6) > a { transition-delay: 490ms, 490ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(7) > a { transition-delay: 540ms, 540ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(8) > a { transition-delay: 590ms, 590ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(9) > a { transition-delay: 640ms, 640ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(10) > a { transition-delay: 690ms, 690ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(11) > a { transition-delay: 740ms, 740ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-list > li:nth-child(12) > a { transition-delay: 790ms, 790ms, 0ms, 0ms; }
.side-menu.is-open .side-menu-sub a { opacity: 1; transform: none; transition-delay: 540ms; }
.side-menu.is-open .side-menu-foot .foot-block { opacity: 1; transform: none; transition-delay: 620ms; }

/* ============================================================
   Vertical Assessment Rail
   ============================================================ */
.assessment-rail {
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    align-items: stretch;
    gap: 14px;
    pointer-events: auto;
}

.rail-track {
    position: relative;
    width: 1px;
    height: 340px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.rail-fill {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--c-chrome) 0%, var(--c-silver-dark) 100%);
    transition: height 200ms linear;
}

.rail-markers {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0;
}

.rail-marker {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--c-silver-dark);
    transition: color 240ms var(--ease-soft);
}

.rail-marker .marker-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    transition: background 240ms var(--ease-soft), box-shadow 240ms var(--ease-soft), transform 240ms var(--ease-soft);
}

.rail-marker .marker-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 240ms var(--ease-soft), transform 240ms var(--ease-soft);
    pointer-events: none;
}

.rail-marker:hover { color: var(--c-white); }
.rail-marker:hover .marker-label { opacity: 1; transform: none; }

.rail-marker.is-active { color: var(--c-chrome); }
.rail-marker.is-active .marker-dot {
    background: var(--c-chrome);
    transform: scale(1.4);
    box-shadow: 0 0 0 3px rgba(216,217,221,0.12);
}
.rail-marker.is-active .marker-label { opacity: 1; transform: none; }

@media (max-width: 1200px) {
    .assessment-rail { display: none; }
}

/* =========================================================
   Discreet administrator portal link (topbar utility)
   Added for the admin portal — intentionally subdued so it
   never competes with the primary phone / consultation CTA.
   ========================================================= */
.topbar-portal{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:8px 12px;
    min-height:40px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size:11px;
    letter-spacing:.14em;
    text-transform:uppercase;
    color: var(--c-grey-light, #8e9099);
    text-decoration:none;
    border-radius:8px;
    background:transparent;
    transition: color .18s ease, background-color .18s ease;
}
.topbar-portal:hover,
.topbar-portal:focus-visible{
    color: var(--c-gold, #cdad6e);
    background: rgba(205,173,110,.08);
}
.topbar-portal:focus-visible{
    outline:2px solid var(--c-gold, #cdad6e);
    outline-offset:2px;
}
.topbar-portal-icon{ width:15px; height:15px; flex:0 0 auto; }

@media (max-width: 760px){
    /* Compact icon-only target on mobile; label stays for screen readers via aria-label. */
    .topbar-portal{ padding:8px; min-width:40px; }
    .topbar-portal span{
        position:absolute; width:1px; height:1px;
        padding:0; margin:-1px; overflow:hidden;
        clip:rect(0 0 0 0); white-space:nowrap; border:0;
    }
}

/* =========================================================
   Breadcrumbs (sub-pages) — subtle, on the dark canvas.
   Matching BreadcrumbList JSON-LD is emitted per page.
   ========================================================= */
.breadcrumbs{
    position:relative; z-index:5;
    max-width: var(--container-max, 1440px);
    margin:0 auto;
    padding: 14px var(--container-pad, 24px) 0;
}
.breadcrumbs-list{
    display:flex; flex-wrap:wrap; align-items:center; gap:8px;
    list-style:none; margin:0; padding:0;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size:11px; letter-spacing:.12em; text-transform:uppercase;
}
.breadcrumbs-list li{ display:flex; align-items:center; gap:8px; color:var(--c-grey-light,#8e9099); }
.breadcrumbs-list li + li::before{ content:"/"; color:var(--c-grey-mid,#4a4c54); }
.breadcrumbs-list a{ color:var(--c-grey-light,#8e9099); text-decoration:none; transition:color .18s ease; }
.breadcrumbs-list a:hover, .breadcrumbs-list a:focus-visible{ color:var(--c-gold,#cdad6e); }
.breadcrumbs-list a:focus-visible{ outline:2px solid var(--c-gold,#cdad6e); outline-offset:2px; border-radius:3px; }
.breadcrumbs-list [aria-current="page"] span{ color:var(--c-bone,#c8cad0); }
