/* Brand-only header/footer layer. The canonical navigation and mobile drawer remain shared.
   Loaded after the brand-specific styles to prevent cross-release override conflicts. */
body[data-tna-header-surface]:not(.has-open-menu):not(.tna-mobile-menu-open) {
    /* hidden creates an overflow scroll ancestor and breaks position:sticky on desktop. */
    overflow-x: clip;
}
body[data-tna-header-surface] .tna-site-header.is-brand-header {
    position: sticky !important;
    inset-block-start: 0 !important;
    margin-block-start: 0 !important;
    z-index: 1900;
    isolation: isolate;
    padding-block: max(8px, env(safe-area-inset-top)) 8px;
}
body[data-tna-header-surface] .tna-site-header.is-brand-header::before {
    pointer-events: none;
}
body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-nav {
    position: relative;
    overflow: visible;
    border-radius: 21px;
    transition: border-color .24s ease, box-shadow .24s ease, min-height .24s ease;
}
body[data-tna-header-surface] .tna-site-header.is-brand-header.is-scrolled .tna-site-nav {
    border-color: color-mix(in srgb, var(--brand-accent) 36%, transparent);
    box-shadow: 0 12px 42px rgba(1, 7, 22, .32);
}
body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-desktop-nav > a {
    position: relative;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-desktop-nav > a:not([aria-current="page"]):hover {
    transform: translateY(-1px);
}
body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-desktop-nav > a:focus-visible,
body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-menu-button:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 3px;
}
body[data-tna-header-surface]:not([data-tna-academy-shell]) .tna-site-footer.tna-brand-footer {
    position: relative;
    border-block-start: 1px solid color-mix(in srgb, var(--brand-accent) 24%, transparent);
    background-image: linear-gradient(135deg, color-mix(in srgb, var(--brand-accent) 7%, transparent), transparent 48%);
}
body[data-tna-header-surface]:not([data-tna-academy-shell]) .tna-site-footer.tna-brand-footer .tna-site-footer__grid nav a {
    transition: color .18s ease, transform .18s ease;
}
body[data-tna-header-surface]:not([data-tna-academy-shell]) .tna-site-footer.tna-brand-footer .tna-site-footer__grid nav a:hover {
    color: var(--tnx-text);
    transform: translateY(-1px);
}
@media (max-width: 1439px) {
    body[data-tna-header-surface] .tna-site-header.is-brand-header {
        padding-block: max(6px, env(safe-area-inset-top)) 6px;
    }
    body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-nav {
        min-height: 68px;
        border-radius: 17px;
    }
    body[data-tna-header-surface] .tna-site-menu-button {
        min-height: 44px;
        min-width: 44px;
        border-radius: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-nav,
    body[data-tna-header-surface] .tna-site-header.is-brand-header .tna-site-desktop-nav > a,
    body[data-tna-header-surface] .tna-site-footer.tna-brand-footer .tna-site-footer__grid nav a {
        transition: none !important;
        transform: none !important;
    }
}

/* Pro and Moshaver already have their own shells; enhance their footers
   without cloning the academy or replacing their design language. */
/* Pro is an engineering studio, not the academy: machined glass + copper trim. */
body[data-tna-pro-shell] .tna-site-header.is-brand-header {
    padding-block: max(8px, env(safe-area-inset-top)) 8px;
    background: transparent !important;
    border-block-end: 0;
}
body[data-tna-pro-shell] .tna-site-header.is-brand-header .tna-site-nav {
    min-height: 74px;
    gap: clamp(10px, 1.5vw, 22px);
    padding: 10px clamp(14px, 1.5vw, 23px);
    border: 1px solid var(--pro-line) !important;
    border-radius: 18px !important;
    background: linear-gradient(115deg, color-mix(in srgb, var(--pro-accent) 8%, transparent), transparent 55%), color-mix(in srgb, var(--pro-panel) 95%, transparent) !important;
    box-shadow: 0 18px 48px rgba(2, 10, 20, .22), inset 0 1px color-mix(in srgb, var(--pro-ink) 7%, transparent) !important;
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
}
body[data-tna-pro-shell] .tna-site-header.is-brand-header.is-scrolled .tna-site-nav {
    min-height: 68px;
    border-color: color-mix(in srgb, var(--pro-accent) 43%, var(--pro-line)) !important;
    box-shadow: 0 11px 35px rgba(2, 10, 20, .28) !important;
}
body[data-tna-pro-shell] .tna-site-header .tna-site-desktop-nav > a {
    border-radius: 10px !important;
    padding: 0 clamp(10px, .95vw, 15px);
}
body[data-tna-pro-shell] .tna-site-header .tna-site-desktop-nav > a:hover,
body[data-tna-pro-shell] .tna-site-header .tna-site-desktop-nav > a[aria-current="page"] {
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--pro-accent) 11%, transparent) !important;
    box-shadow: inset 0 -2px var(--pro-accent) !important;
}
body[data-tna-header-surface="pro"] .pro-footer__invitation {
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--pro-line);
    border-radius: 17px;
    background: linear-gradient(112deg, color-mix(in srgb, var(--pro-accent) 7%, transparent), transparent 65%);
}
body[data-tna-header-surface="pro"] .pro-footer__invitation > a {
    border-radius: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
}
body[data-tna-header-surface="pro"] .pro-footer__invitation > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}
body[data-tna-header-surface="pro"] .pro-footer__grid nav a,
body[data-tna-header-surface="moshaver"] .msh-footer nav a {
    transition: color .2s ease, opacity .2s ease;
}
body[data-tna-header-surface="pro"] .pro-footer__grid nav a:focus-visible,
body[data-tna-header-surface="moshaver"] .msh-footer nav a:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 4px;
    border-radius: 3px;
}
@media (max-width: 1439px) {
    body[data-tna-pro-shell] .tna-site-header.is-brand-header .tna-site-nav {
        min-height: 68px;
        padding: 8px 12px;
        border-radius: 15px !important;
    }
}
@media (max-width: 720px) {
    body[data-tna-header-surface="pro"] .pro-footer__invitation { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-tna-header-surface="pro"] .pro-footer__invitation > a,
    body[data-tna-header-surface="pro"] .pro-footer__grid nav a,
    body[data-tna-header-surface="moshaver"] .msh-footer nav a {
        transition: none !important;
        transform: none !important;
    }
}
