.liquid-header {
    --curtain-height: 120px;
    --glass-border: rgba(255, 255, 255, 0.38);
    --glass-shadow: rgba(14, 30, 26, 0.24);
    position: relative;
    z-index: 1000;
}

.liquid-header__curtain,
.liquid-header__toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow:
        0 24px 64px rgba(14, 30, 26, 0.28),
        0 5px 18px rgba(14, 30, 26, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 1px 0 0 rgba(255, 255, 255, 0.28),
        inset -1px 0 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(28px) saturate(185%) brightness(1.08);
    backdrop-filter: blur(28px) saturate(185%) brightness(1.08);
}

.liquid-header__curtain {
    position: fixed;
    top: 18px;
    right: 10vw;
    left: 10vw;
    height: var(--curtain-height);
    overflow: hidden;
    border-radius: 34px;
    transform: translate3d(0, calc(-100% - 40px), 0);
    transition:
        height 500ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    z-index: 2;
}

.liquid-header__toggle::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.7), transparent 55%, rgba(255,255,255,.45), transparent);
    filter: blur(11px);
    opacity: 0.62;
    animation: menu-standby-glow 8s linear infinite;
    pointer-events: none;
}
.liquid-header__toggle{background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.025));-webkit-backdrop-filter:blur(24px) saturate(185%);backdrop-filter:blur(24px) saturate(185%)}
.liquid-header__nav{position:absolute;z-index:2;inset:0 110px 0 140px;display:flex;align-items:center;justify-content:center;gap:clamp(16px,3vw,46px);opacity:0;transform:translateY(-12px);transition:opacity .3s ease,transform .45s cubic-bezier(.16,1,.3,1)}.liquid-header__nav a{color:#fff;text-decoration:none;font:600 clamp(.72rem,1vw,.88rem)/1 "Sora",Arial,sans-serif;letter-spacing:.08em;text-shadow:0 2px 12px rgba(8,47,39,.45)}.liquid-header.is-open .liquid-header__nav{opacity:1;transform:none;transition-delay:.55s}
:root[data-theme="light"] .liquid-header__curtain{background:linear-gradient(135deg,rgba(246,240,231,.7),rgba(255,255,255,.3));border-color:rgba(255,255,255,.8)}:root[data-theme="light"] .liquid-header__nav a{color:#0f4c3a;text-shadow:0 1px 10px rgba(255,255,255,.75)}:root[data-theme="light"] .liquid-header__toggle{color:#fff;background:linear-gradient(135deg,rgba(15,76,58,.62),rgba(42,157,143,.34));border-color:rgba(255,255,255,.72)}

@keyframes menu-standby-glow {
    0% { transform: rotate(0deg) scale(0.9); opacity: 0.38; }
    45% { opacity: 0.78; }
    55% { transform: rotate(198deg) scale(1.08); opacity: 0.72; }
    100% { transform: rotate(360deg) scale(0.9); opacity: 0.38; }
}

.liquid-header__curtain::after,
.liquid-header__toggle::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 32%),
        linear-gradient(305deg, rgba(212, 160, 23, 0.1), transparent 38%);
    pointer-events: none;
}

.liquid-header__curtain::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 2px;
    right: 34px;
    left: 34px;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
    opacity: 0.8;
    pointer-events: none;
}

.liquid-header__toggle {
    position: fixed;
    top: 46px;
    right: calc(10vw + 24px);
    z-index: 3;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: visible;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transform: rotate(0deg);
    transition:
        top 500ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 720ms cubic-bezier(0.16, 1, 0.3, 1),
        scale 220ms ease;
    -webkit-tap-highlight-color: transparent;
}

.liquid-header__toggle:hover {
    scale: 1.05;
}

.liquid-header__toggle:active {
    scale: 0.96;
}

.liquid-header__toggle:focus-visible {
    outline: 3px solid #d4a017;
    outline-offset: 4px;
}

.liquid-header__icon {
    position: relative;
    z-index: 1;
    width: 25px;
    display: grid;
    gap: 5px;
}

.liquid-header__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 1px 8px rgba(14, 30, 26, 0.25);
}

.liquid-header__home-brand {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: clamp(220px, 28vw, 360px);
    display: block;
    opacity: 1;
    transform: translate3d(var(--brand-x, 50vw), var(--brand-y, 50vh), 0) scale(var(--brand-scale, 1));
    transform-origin: top left;
    transition:
        opacity 320ms ease,
        transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.liquid-header__home-brand img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 9px 18px rgba(15, 76, 58, 0.3));
}

.liquid-header__menu-brand {
    position: absolute;
    left: 28px;
    top: 50%;
    z-index: 2;
    width: 82px;
    opacity: 0;
    transform: translate3d(0, -72%, 0) scale(0.72);
    transition:
        opacity 300ms ease,
        transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
        width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.liquid-header__menu-brand img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 9px 18px rgba(14, 30, 26, 0.2));
}

:root[data-theme="dark"] .liquid-header__curtain,
:root[data-theme="dark"] .liquid-header__toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.025));
}

.liquid-header.is-open .liquid-header__curtain {
    transform: translate3d(0, 0, 0);
}

.liquid-header.is-open .liquid-header__toggle {
    transform: rotate(180deg);
}

.liquid-header.is-open .liquid-header__home-brand {
    opacity: 0;
    transform: translate3d(calc(-100% - 48px), var(--brand-y, 50vh), 0) scale(var(--brand-scale, 1));
}

.liquid-header.is-beyond-hero .liquid-header__home-brand {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(calc(-100% - 48px), var(--brand-y, 30px), 0) scale(var(--brand-scale, 1));
}

.liquid-header.is-open .liquid-header__menu-brand {
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1);
    transition-delay: 610ms;
}

.liquid-header.is-compact {
    --curtain-height: 100px;
}

.liquid-header.is-compact .liquid-header__toggle {
    top: 36px;
}

.liquid-header.is-compact .liquid-header__menu-brand {
    width: 68px;
}

/* MOV-1.2.50-010: inner pages use a persistent upper-left brand instead of the home trajectory. */
.guest-inner .liquid-header__home-brand {
    position:absolute;
    top: 0;
    left: max(18px, 4vw);
    width: min(285px, calc(100vw - 120px));
    height: 90px;
    opacity: 1;
    transform: none;
    transition: width 520ms cubic-bezier(.16,1,.3,1),height 520ms cubic-bezier(.16,1,.3,1),opacity 320ms ease,transform 620ms cubic-bezier(.16,1,.3,1);
}
.guest-inner .liquid-header__home-brand img { width:100%; height:100%; object-fit:contain; object-position:left center; }
.guest-inner .liquid-header.is-compact .liquid-header__home-brand { width:min(285px,calc(100vw - 120px)); height:90px; }
.guest-inner .liquid-header.is-beyond-hero .liquid-header__home-brand { opacity:1; pointer-events:auto; transform:none; }
.guest-inner .liquid-header.is-open .liquid-header__home-brand { opacity:0; transform:translate3d(calc(-100% - max(18px, 4vw) - 48px),0,0); }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .liquid-header__curtain,
    .liquid-header__toggle {
        background: rgba(15, 76, 58, 0.72);
    }
}

@media (max-width: 640px) {
    .liquid-header,
    .liquid-header.is-compact {
        --curtain-height: 340px;
    }

    .liquid-header__curtain {
        top: 12px;
        border-radius: 28px;
    }

    .liquid-header__toggle {
        top: 28px;
        right: calc(10vw + 16px);
        width: 58px;
        height: 58px;
    }

    .liquid-header__menu-brand {
        top: 25px;
        left: 20px;
        width: 66px;
        transform:translate3d(0,-20px,0) scale(.72);
    }

    .liquid-header.is-open .liquid-header__menu-brand{transform:none}

    .liquid-header__home-brand {
        width: clamp(145px, 46vw, 185px);
    }
    .guest-inner .liquid-header__home-brand {
        left:54px;
        width:min(230px,calc(100vw - 144px));
        height:90px;
    }
    .guest-inner .liquid-header.is-compact .liquid-header__home-brand {
        width:min(230px,calc(100vw - 144px));
        height:90px;
    }
    .guest-inner .liquid-header.is-open .liquid-header__home-brand { transform:translate3d(calc(-100% - 64px),0,0); }
    .liquid-header__nav{inset:102px 18px 18px;display:grid;grid-template-columns:1fr;align-content:start;gap:9px;overflow:visible}.liquid-header__nav a{display:flex;align-items:center;min-height:47px;padding:0 17px;border:1px solid rgba(255,255,255,.42);border-radius:15px;font-size:.76rem;white-space:normal;background:rgba(255,255,255,.12)}:root[data-theme="light"] .liquid-header__nav a{background:rgba(246,240,231,.56);border-color:rgba(15,76,58,.14)}
    .liquid-header.is-compact .liquid-header__toggle{top:28px}
}

@media (prefers-reduced-motion: reduce) {
    .liquid-header__curtain,
    .liquid-header__toggle,
    .liquid-header__home-brand,
    .liquid-header__menu-brand {
        transition-duration: 1ms;
        transition-delay: 0ms !important;
    }

    .liquid-header__toggle::before {
        animation: none;
        opacity: 0.48;
    }
}

/* MOV-1.5.6-001: home bell stays upright beside, rather than inside, the rotating control. */
.liquid-header__menu-control{position:fixed;top:46px;right:calc(10vw + 24px);width:64px;height:64px;z-index:4;transition:top 500ms cubic-bezier(.22,1,.36,1)}
.liquid-header.is-compact .liquid-header__menu-control{top:36px}
.liquid-header__menu-control .liquid-header__toggle{position:relative;top:0!important;right:auto!important}
.liquid-header__notification{position:absolute;right:-4px;bottom:-4px;z-index:4;transform:none}
.liquid-header__notification .notification-menu>summary{width:28px;height:28px;background:var(--ch-surface,#fffaf2);box-shadow:0 2px 8px #082f2726,inset 0 1px #ffffff80}
.liquid-header__notification .notification-menu>summary svg{width:17px;height:17px}
.liquid-header__notification .notification-menu i{min-width:15px;height:15px;padding:0 3px;font-size:9px;line-height:15px;right:-6px;top:-5px}
.liquid-header__notification .notification-panel{position:absolute;right:0;top:calc(100% + 12px);max-height:calc(100dvh - 145px);overflow:auto}
:root[data-theme=dark] .liquid-header__notification .notification-menu>summary{background:#103d34}
@media(max-width:640px){.liquid-header__menu-control{top:28px;right:16px;width:58px;height:58px}.liquid-header.is-compact .liquid-header__menu-control{top:28px}.liquid-header__notification .notification-panel{max-height:calc(100dvh - 120px)}}
@media(prefers-reduced-motion:reduce){.liquid-header__menu-control{transition-duration:1ms}}

/* MOV-1.5.7-001: retain the account's existing mobile control size and the inspection ribbon offset. */
@media(max-width:600px){.guest-dashboard .liquid-header .liquid-header__menu-control{top:24px;right:16px;width:48px;height:48px}.guest-dashboard .liquid-header__notification .notification-menu>summary{width:24px;height:24px}}
.is-inspection .liquid-header .liquid-header__menu-control{top:76px}
