/* File: /header/header.css */
.microba-site-header {
    position: fixed;
    z-index: 9000;
    inset: 0 0 auto;
    color: var(--microba-ivory);
    font-family: var(--microba-font-interface);
}
.microba-site-header__surface {
    position: relative;
    min-height: var(--microba-header-height);
    border-bottom: 1px solid transparent;
    background: linear-gradient(180deg, rgba(2, 8, 6, .88), rgba(2, 8, 6, .18));
    transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.microba-site-header.is-inner .microba-site-header__surface,
.microba-site-header.is-scrolled .microba-site-header__surface {
    border-color: rgba(209,162,70,.30);
    background-image: linear-gradient(90deg, rgba(2,9,7,.96), rgba(5,19,14,.92), rgba(2,9,7,.96)), var(--microba-header-scroll-image);
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.microba-site-header__inner {
    display: flex;
    align-items: center;
    min-height: var(--microba-header-height);
    width: min(calc(100% - 48px), 1520px);
    margin-inline: auto;
}
.microba-header-brand { display: inline-flex; align-items: center; flex: 0 0 auto; width: 215px; text-decoration: none; }
.microba-header-brand img { display: block; width: 100%; height: auto; max-height: 62px; object-fit: contain; object-position: left center; }
.microba-header-nav { display: flex; align-self: stretch; justify-content: center; gap: clamp(12px, 2.1vw, 34px); margin: 0 auto; }
.microba-header-nav__group { display: flex; align-items: stretch; }
.microba-header-nav__trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--microba-ivory);
    cursor: pointer;
    font-size: .79rem;
    font-weight: 500;
    letter-spacing: .015em;
}
.microba-header-nav__trigger::after {
    content: '';
    position: absolute;
    left: 12%; right: 12%; bottom: 11px;
    height: 1px;
    background: var(--microba-gold-bright);
    transform: scaleX(0);
    transition: transform .22s ease;
    box-shadow: 0 0 12px rgba(239,198,107,.7);
}
.microba-header-nav__trigger:hover::after,
.microba-header-nav__trigger.is-active::after,
.microba-header-nav__trigger[aria-expanded='true']::after { transform: scaleX(1); }
.microba-header-nav__chevron { display: grid; width: 13px; color: var(--microba-gold-bright); }
.microba-header-nav__chevron svg,
.microba-header-actions svg,
.microba-search-overlay svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }
.microba-header-actions { position: relative; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.microba-header-search-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 10px; border: 0; border-radius: 50%; background: transparent; color: var(--microba-gold-bright); cursor: pointer; transition: background .2s ease, color .2s ease; }
.microba-header-search-button:hover,
.microba-header-search-button:focus-visible { background: rgba(209,162,70,.08); color: #fff0c6; }
.microba-header-account { position: relative; }
.microba-header-account-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 46px; height: 46px; padding: 2px 7px 2px 2px;
    border: 1px solid rgba(209,162,70,.64); border-radius: 999px;
    background: rgba(4,16,11,.44); color: var(--microba-gold-bright); cursor: pointer;
    text-decoration: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.microba-header-account-button:hover,
.microba-header-account-button:focus-visible,
.microba-header-account-button[aria-expanded='true'] { border-color: var(--microba-gold-bright); background: rgba(209,162,70,.09); box-shadow: 0 0 24px rgba(209,162,70,.08); }
.microba-header-account-button.is-guest { padding: 2px; }
.microba-header-account-button__avatar { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: rgba(209,162,70,.06); }
.microba-header-account-button__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.microba-header-account-button__avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.45; }
.microba-header-account-button__chevron { display: grid; width: 12px; }
.microba-header-account-button__chevron svg { width: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform .2s ease; }
.microba-header-account-button[aria-expanded='true'] .microba-header-account-button__chevron svg { transform: rotate(180deg); }
.microba-header-account-menu {
    position: absolute; top: calc(100% + 14px); right: 0; width: 270px;
    overflow: hidden; border: 1px solid rgba(209,162,70,.34); border-radius: 14px;
    background: linear-gradient(180deg, rgba(6,22,16,.98), rgba(2,10,7,.99));
    box-shadow: 0 26px 70px rgba(0,0,0,.58); backdrop-filter: blur(18px);
}
.microba-header-account-menu[hidden] { display: none !important; }
.microba-header-account-menu::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 90% 0%, rgba(209,162,70,.12), transparent 34%); }
.microba-header-account-menu__identity { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.microba-header-account-menu__avatar { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; overflow: hidden; border: 1px solid rgba(209,162,70,.55); border-radius: 50%; color: var(--microba-gold-bright); }
.microba-header-account-menu__avatar img { width: 100%; height: 100%; object-fit: cover; }
.microba-header-account-menu__avatar svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.45; }
.microba-header-account-menu__identity strong { display: block; max-width: 165px; overflow: hidden; color: var(--microba-ivory); font-size: .86rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.microba-header-account-menu__identity small { display: block; margin-top: 2px; color: var(--microba-muted); font-size: .72rem; }
.microba-header-account-menu nav { position: relative; display: grid; padding: 8px; }
.microba-header-account-menu nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 10px; border-radius: 8px; color: var(--microba-soft); text-decoration: none; font-size: .82rem; }
.microba-header-account-menu nav a:hover,
.microba-header-account-menu nav a:focus-visible { background: rgba(209,162,70,.08); color: #fff; }
.microba-header-account-menu nav a.is-logout { margin-top: 5px; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0 0 8px 8px; color: #dfcda8; }
.microba-header-account-menu nav svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--microba-gold-bright); stroke-width: 1.4; }
.microba-header-menu-button { display: none; width: 42px; height: 42px; border: 0; background: transparent; padding: 9px; cursor: pointer; }
.microba-header-menu-button > span:first-child { display: grid; gap: 5px; }
.microba-header-menu-button i { display: block; height: 1px; background: var(--microba-gold-bright); }

.microba-header-flyout {
    position: fixed;
    top: var(--microba-header-height);
    left: 50%;
    width: min(1180px, calc(100vw - 64px));
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(209,162,70,.34);
    border-radius: 0 0 18px 18px;
    background: rgba(2,10,7,.98);
    box-shadow: 0 30px 80px rgba(0,0,0,.52);
}
.microba-header-flyout[hidden] { display: none !important; }
.microba-header-flyout__art { position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(2,9,6,.96), rgba(2,9,6,.65) 58%, rgba(2,9,6,.88)), var(--flyout-art); background-size: cover; background-position: center; }
.microba-header-flyout__body { position: relative; display: grid; grid-template-columns: .9fr 1.4fr 120px; gap: 42px; align-items: center; min-height: 270px; padding: 42px 50px; }
.microba-header-flyout__intro { display: grid; gap: 12px; }
.microba-header-flyout__title { color: var(--microba-ivory); font-family: var(--microba-font-display); font-size: clamp(2rem, 3vw, 3.2rem); text-decoration: none; }
.microba-header-flyout__links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 26px; margin: 0; padding: 0; list-style: none; }
.microba-header-flyout__links li { border-bottom: 1px solid rgba(255,255,255,.09); }
.microba-header-flyout__links a { display: flex; align-items: center; justify-content: space-between; min-height: 57px; color: var(--microba-soft); text-decoration: none; font-size: .93rem; }
.microba-header-flyout__links a:hover { color: #fff; }
.microba-header-flyout__links svg { width: 18px; fill: none; stroke: var(--microba-gold-bright); stroke-width: 1.4; }
.microba-header-flyout__ornament { justify-self: end; width: 82px; opacity: .34; filter: saturate(.9); }

.microba-mobile-menu,
.microba-search-overlay { position: fixed; inset: 0; z-index: 10000; }
.microba-mobile-menu[hidden], .microba-search-overlay[hidden] { display: none !important; }
.microba-mobile-menu { overflow: auto; background-image: linear-gradient(180deg, rgba(2,8,6,.66), rgba(2,8,6,.92)), var(--mobile-art); background-size: cover; background-position: center top; }
.microba-mobile-menu__topbar { display: flex; align-items: center; min-height: 72px; padding: 0 20px; border-bottom: 1px solid rgba(209,162,70,.25); background: rgba(2,8,6,.62); backdrop-filter: blur(12px); }
.microba-mobile-menu__topbar .microba-header-brand { width: 174px; }
.microba-mobile-menu__close { margin-left: auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 10px; border: 0; background: transparent; color: var(--microba-gold-bright); cursor: pointer; }
.microba-mobile-menu__close svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.microba-mobile-menu__nav { position: relative; z-index: 1; padding: 24px 22px 120px; }
.microba-mobile-menu__group { border-bottom: 1px solid rgba(255,255,255,.09); }
.microba-mobile-menu__heading { display: flex; align-items: center; min-height: 66px; }
.microba-mobile-menu__heading a { color: var(--microba-ivory); font-family: var(--microba-font-display); font-size: 1.55rem; text-decoration: none; }
.microba-mobile-menu__heading button { margin-left: auto; width: 42px; height: 42px; border: 0; background: transparent; color: var(--microba-gold-bright); font-size: 1.35rem; cursor: pointer; }
.microba-mobile-menu__group.is-open .microba-mobile-menu__heading button > span:first-child { display: inline-block; transform: rotate(45deg); }
.microba-mobile-menu__group ul { margin: 0; padding: 0 0 18px; list-style: none; }
.microba-mobile-menu__group ul[hidden] { display: none !important; }
.microba-mobile-menu__group li a { display: block; padding: 9px 0; color: var(--microba-soft); text-decoration: none; }
.microba-mobile-menu__account { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; margin-top: 34px; padding: 18px 0; border-top: 1px solid var(--microba-border); color: var(--microba-gold-bright); text-decoration: none; font-weight: 600; }
.microba-mobile-menu__account-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(209,162,70,.52); border-radius: 50%; }
.microba-mobile-menu__account-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.microba-mobile-menu__account-arrow { justify-self: end; }
.microba-mobile-menu__ornament { position: fixed; right: 18px; bottom: -20px; width: 88px; opacity: .20; pointer-events: none; }

.microba-search-overlay { display: grid; place-items: start center; padding: 11vh 24px 24px; background: rgba(0,5,3,.86); backdrop-filter: blur(16px); }
.microba-search-overlay__panel { position: relative; width: min(760px,100%); padding: 44px; border: 1px solid var(--microba-border); border-radius: 18px; background: rgba(4,17,12,.96); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.microba-search-overlay__close { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border: 0; background: transparent; color: var(--microba-gold-bright); cursor: pointer; padding: 10px; }
.microba-search-form { display: flex; gap: 10px; margin-top: 24px; }
.microba-search-form input { flex: 1; min-width: 0; height: 56px; padding: 0 16px; border: 1px solid rgba(209,162,70,.38); border-radius: 8px; outline: none; background: rgba(0,0,0,.24); color: #fff; }
.microba-search-form input:focus { border-color: var(--microba-gold-bright); box-shadow: 0 0 0 3px rgba(209,162,70,.10); }
.microba-search-form button { height: 56px; padding: 0 22px; border: 1px solid var(--microba-gold); border-radius: 8px; background: transparent; color: var(--microba-gold-bright); cursor: pointer; }
body.microba-overlay-open { overflow: hidden; }

@media (max-width: 1080px) {
    .microba-header-nav { gap: 14px; }
    .microba-header-account-menu { width: 250px; }
}
@media (max-width: 899px) {
    :root { --microba-header-height: 70px; }
    .microba-site-header__inner { width: calc(100% - 32px); }
    .microba-header-brand { width: 175px; }
    .microba-header-nav, .microba-header-search-button { display: none; }
    .microba-header-actions { margin-left: auto; }
    .microba-header-menu-button { display: block; }
    .microba-header-account-button { width: 42px; min-width: 42px; height: 42px; padding: 2px; }
    .microba-header-account-button__chevron { display: none; }
    .microba-header-account-button__avatar { width: 36px; height: 36px; }
    .microba-header-account-menu { display: none !important; }
}
@media (max-width: 520px) {
    .microba-header-account-menu { width: 250px; }
    .microba-search-form { flex-direction: column; }
    .microba-search-overlay__panel { padding: 38px 22px 24px; }
}
