/**
 * LIVZO — header, primary navigation and mobile menu panel.
 */

/* ==========================================================================
   1. Header shell
   ========================================================================== */

.lz-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: var(--lz-header-h);
    background-image: linear-gradient(180deg, rgba(251, 250, 248, 0.72) 0%, rgba(251, 250, 248, 0) 100%);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transition: height 0.45s var(--lz-ease),
        background-color 0.45s var(--lz-ease),
        background-image 0.45s var(--lz-ease),
        border-color 0.45s var(--lz-ease),
        box-shadow 0.45s var(--lz-ease);
}

/* Scrolled: settle into a solid, softly elevated bar. */
.lz-header.is-scrolled,
.lz-header.is-menu-open {
    height: 68px;
    background-color: rgba(251, 250, 248, 0.86);
    background-image: none;
    border-bottom-color: var(--lz-line);
    box-shadow: 0 12px 30px -24px rgba(11, 27, 51, 0.5);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.has-js .lz-header {
    animation: lzHeaderIn 0.7s var(--lz-ease-out) both;
}

@keyframes lzHeaderIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}

.lz-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lz-header__glow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background-image: linear-gradient(90deg, transparent, rgba(109, 74, 255, 0.45), transparent);
    opacity: 0;
    transition: opacity 0.5s var(--lz-ease);
    pointer-events: none;
}

.lz-header.is-scrolled .lz-header__glow { opacity: 1; }

/* ==========================================================================
   2. Brand
   ========================================================================== */

.lz-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    color: var(--lz-navy);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

/* The brand lockup is a wide mark (300×109 in config `brand.logo`), so it is sized by HEIGHT
   and the width follows the ratio — a fixed width would squash the letterforms. `max-width:
   100%` from base.css still applies but never clamps at these heights. */
.lz-brand__logo {
    width: auto;
    height: 44px;
}

/* A phone header is 78px tall with the burger and the account chip beside the logo, so the
   lockup steps down rather than crowding them. */
@media (max-width: 560px) {
    .lz-brand__logo {
        height: 38px;
    }
}

/* ==========================================================================
   3. Desktop navigation
   ========================================================================== */

.lz-nav {
    display: none;
    margin-inline: auto;
}

.lz-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.lz-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--lz-r-pill);
    color: var(--lz-navy-2);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color var(--lz-t) var(--lz-ease), background-color var(--lz-t) var(--lz-ease);
}

.lz-nav__link span { position: relative; display: block; }

/* Animated accent underline */
.lz-nav__link span::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--lz-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.36s var(--lz-ease-out);
}

.lz-nav__link:hover {
    color: var(--lz-navy);
    background-color: rgba(11, 27, 51, 0.045);
}

.lz-nav__link:hover span::after,
.lz-nav__link:focus-visible span::after,
.lz-nav__link.is-current span::after {
    transform: scaleX(1);
}

.lz-nav__link.is-current { color: var(--lz-navy); font-weight: 600; }

/* ==========================================================================
   4. Header actions
   ========================================================================== */

.lz-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: none;
}

.lz-header__login,
.lz-header__signup { display: none; }

/* ==========================================================================
   5. Burger
   ========================================================================== */

.lz-burger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--lz-line);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--lz-navy);
    cursor: pointer;
    transition: background-color var(--lz-t) var(--lz-ease),
        border-color var(--lz-t) var(--lz-ease),
        box-shadow var(--lz-t) var(--lz-ease),
        transform var(--lz-t) var(--lz-ease);
}

.lz-burger:hover {
    background-color: #fff;
    box-shadow: var(--lz-sh-2);
    transform: translateY(-1px);
}

.lz-burger__lines {
    position: relative;
    display: block;
    width: 19px;
    height: 12px;
}

.lz-burger__lines i {
    position: absolute;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    transition: transform 0.4s var(--lz-ease-out),
        width 0.4s var(--lz-ease-out),
        top 0.4s var(--lz-ease-out);
}

.lz-burger__lines i:first-child { top: 0; width: 19px; }
.lz-burger__lines i:last-child { top: 10px; width: 13px; }

.lz-burger:hover .lz-burger__lines i:last-child { width: 19px; }

/* Morph into a close mark while the panel is open */
.lz-burger.is-open .lz-burger__lines i:first-child { top: 5px; transform: rotate(45deg); }
.lz-burger.is-open .lz-burger__lines i:last-child { top: 5px; width: 19px; transform: rotate(-45deg); }

/* ==========================================================================
   6. Mobile menu panel
   ========================================================================== */

.lz-mobile {
    position: fixed;
    inset: 0;
    z-index: 95;
}

.lz-mobile[hidden] { display: none; }

.lz-mobile__scrim {
    position: absolute;
    inset: 0;
    background-color: rgba(11, 27, 51, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.45s var(--lz-ease);
}

.lz-mobile.is-open .lz-mobile__scrim { opacity: 1; }

.lz-mobile__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 90vw);
    display: flex;
    flex-direction: column;
    padding: calc(var(--lz-header-h) + 10px) clamp(20px, 5vw, 30px) 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: rgba(255, 255, 255, 0.97);
    border-left: 1px solid var(--lz-line);
    box-shadow: -30px 0 70px -34px rgba(11, 27, 51, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(103%);
    transition: transform 0.55s var(--lz-ease-out);
}

.lz-mobile.is-open .lz-mobile__panel { transform: none; }

.lz-mobile__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--lz-line);
}

.lz-iconbtn--close { width: 38px; height: 38px; }

.lz-mobile__eyebrow {
    flex: 1;
    color: var(--lz-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.lz-mobile__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.lz-mobile__item {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.45s var(--lz-ease-out), transform 0.5s var(--lz-ease-out);
    transition-delay: var(--lz-stagger, 0ms);
}

.lz-mobile.is-open .lz-mobile__item {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--lz-stagger, 0ms) + 130ms);
}

.lz-mobile__link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 54px;
    padding: 8px 10px;
    border-radius: var(--lz-r-md);
    color: var(--lz-navy);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    transition: background-color var(--lz-t) var(--lz-ease), transform var(--lz-t) var(--lz-ease);
}

.lz-mobile__link:hover,
.lz-mobile__link:focus-visible {
    background-color: var(--lz-accent-soft);
    transform: translateX(3px);
}

.lz-mobile__ico {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border: 1px solid var(--lz-line);
    border-radius: 11px;
    background-color: #fff;
    color: var(--lz-accent);
    transition: border-color var(--lz-t) var(--lz-ease), box-shadow var(--lz-t) var(--lz-ease);
}

.lz-mobile__ico .lz-icon { width: 17px; height: 17px; }

.lz-mobile__link:hover .lz-mobile__ico {
    border-color: rgba(109, 74, 255, 0.28);
    box-shadow: 0 8px 16px -12px rgba(109, 74, 255, 0.7);
}

.lz-mobile__label { flex: 1; }

.lz-mobile__arrow {
    width: 16px;
    height: 16px;
    color: var(--lz-muted);
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity var(--lz-t) var(--lz-ease), transform var(--lz-t) var(--lz-ease);
}

.lz-mobile__link:hover .lz-mobile__arrow,
.lz-mobile__link:focus-visible .lz-mobile__arrow {
    opacity: 1;
    transform: none;
}

.lz-mobile__foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
}

.lz-mobile__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
    color: var(--lz-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.lz-mobile__note .lz-icon {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    color: var(--lz-green);
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */

@media (min-width: 992px) {
    .lz-nav { display: block; }
    .lz-burger { display: none; }
    .lz-header__login,
    .lz-header__signup { display: inline-flex; }
    .lz-mobile { display: none; }
}

@media (max-width: 991px) {
    .lz-header__inner { gap: 12px; }
}

@media (max-width: 420px) {
    .lz-brand { font-size: 1.12rem; }
    .lz-brand__logo { height: 34px; }
    .lz-iconbtn,
    .lz-burger { width: 40px; height: 40px; }
}
