/* ==========================================================================
   XILXIL — SITE CHROME (xil-chrome.css)
   Announcement bar · sticky header · dropdown nav · mobile drawer ·
   footer · legal bar.
   --------------------------------------------------------------------------
   Requires the design tokens from xil-main.css (loaded first).
   Every class is prefixed `xil-`. Colors/spacings come from tokens.
   ========================================================================== */


/* ==========================================================================
   1. DARK CHROME TOKEN SCOPE
   All chrome lives on deep-navy surfaces, so these elements share the
   dark theme token map (same values as .xil-section--dark in xil-main.css).
   ========================================================================== */

.xil-announce,
.xil-header,
.xil-drawer__panel,
.xil-footer,
.xil-legal {
        --xil-text: #F2F6FD;
        --xil-muted: #9AAAC6;
        --xil-border: rgba(154, 170, 198, 0.15);
        --xil-border-strong: rgba(154, 170, 198, 0.32);
        --xil-surface: var(--xil-navy-850);
        --xil-surface-2: var(--xil-navy-800);
        --xil-link: var(--xil-blue-400);
        --xil-accent: var(--xil-cyan-400);
        --xil-primary-tint: rgba(91, 140, 255, 0.10);
        --xil-primary-tint-2: rgba(91, 140, 255, 0.20);
        --xil-grad-1: #5B8CFF;
        --xil-grad-2: #A78BFA;
        --xil-grad-3: #22D3EE;
        --xil-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.40), 0 26px 64px rgba(0, 0, 0, 0.46);
}


/* ==========================================================================
   2. PAGE SCAFFOLDING — sticky footer + header offset
   body is a flex column: short pages keep the footer pinned to the
   viewport bottom; long pages push it down naturally.
   ========================================================================== */

body.xil-site {
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
}

.xil-page {
        flex: 1 0 auto;
}


/* ==========================================================================
   3. ANNOUNCEMENT BAR
   Scrolls away with the page (only the header is sticky). Dismissal is
   handled by xil-main.js: height collapses, node is removed and the
   state is stored in localStorage keyed by message hash.
   ========================================================================== */

.xil-announce {
        background: var(--xil-navy-950);
        border-bottom: 1px solid rgba(154, 170, 198, 0.12);
        overflow: hidden;
}

.xil-announce__inner {
        width: min(100% - 48px, var(--xil-container));
        margin-inline: auto;
        position: relative;
        display: flex;
        justify-content: center;
}

.xil-announce__text {
        margin: 0;
        padding: 8px 52px;
        font-size: 0.82rem;
        line-height: 1.45;
        color: var(--xil-muted);
        text-align: center;
}

.xil-announce__link {
        color: var(--xil-text);
        font-weight: 500;
        transition: color var(--xil-transition);
}

.xil-announce__link:hover {
        color: var(--xil-cyan-400);
}

.xil-announce__close {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 9px;
        color: var(--xil-muted);
        transition: color var(--xil-transition), background-color var(--xil-transition);
}

.xil-announce__close:hover {
        color: var(--xil-text);
        background: rgba(154, 170, 198, 0.08);
}


/* ==========================================================================
   4. HEADER SHELL + BRAND
   ========================================================================== */

.xil-header {
        /* Mobile height; steps up to the full token height at 768px. */
        --xil-header-h: 64px;
        position: sticky;
        top: var(--wp-admin--admin-bar--height, 0px);
        z-index: var(--xil-z-header);
        background: rgba(6, 11, 20, 0.92);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
        backdrop-filter: blur(14px) saturate(140%);
        border-bottom: 1px solid transparent;
        transition: border-color var(--xil-transition), box-shadow var(--xil-transition);
}

@media (min-width: 768px) {
        .xil-header {
                --xil-header-h: 76px;
        }
}

.xil-header.is-scrolled {
        border-bottom-color: rgba(154, 170, 198, 0.14);
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
}

.xil-header__inner {
        width: min(100% - 48px, var(--xil-container));
        margin-inline: auto;
        display: flex;
        align-items: center;
        gap: 20px;
        height: var(--xil-header-h);
}

.xil-brand {
        flex: none;
        display: flex;
        align-items: center;
}

.xil-brand__wordmark {
        display: inline-flex;
        align-items: baseline;
        font-family: var(--xil-font-heading);
        font-size: 1.28rem;
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1;
        color: #FFFFFF;
}

@media (min-width: 768px) {
        .xil-brand__wordmark {
                font-size: 1.4rem;
        }
}

.xil-brand .custom-logo-link {
        display: inline-flex;
        align-items: center;
}

.xil-brand .custom-logo {
        width: auto;
        max-height: 40px;
        max-width: 180px;
        height: auto;
}


/* ==========================================================================
   5. DESKTOP NAV (visible from 1024px)
   Full-height links; active item carries the gradient underline; parents
   open a floating dropdown panel (click, hover-intent or keyboard).
   ========================================================================== */

.xil-nav {
        display: none;
}

@media (min-width: 1024px) {
        .xil-nav {
                display: block;
                flex: 1 1 auto;
                min-width: 0;
        }
}

.xil-nav__list {
        display: flex;
        align-items: stretch;
        gap: 2px;
        height: var(--xil-header-h);
        margin: 0;
        padding: 0;
        list-style: none;
}

.xil-nav__item {
        position: relative;
        display: flex;
}

.xil-nav__link {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 13px;
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--xil-muted);
        white-space: nowrap;
        transition: color var(--xil-transition);
}

.xil-nav__link:hover {
        color: #FFFFFF;
}

.xil-nav__item--has-sub.is-open > .xil-nav__link {
        color: #FFFFFF;
}

.xil-nav__link--active {
        color: #FFFFFF;
}

.xil-nav__link--active::after {
        content: '';
        position: absolute;
        left: 13px;
        right: 13px;
        bottom: 0;
        height: 2px;
        border-radius: 2px 2px 0 0;
        background: linear-gradient(90deg, var(--xil-grad-1), var(--xil-grad-3));
}

.xil-nav__chevron {
        width: 14px;
        height: 14px;
        flex: none;
        opacity: 0.7;
        transition: transform var(--xil-transition);
}

.xil-nav__item--has-sub.is-open > .xil-nav__link .xil-nav__chevron {
        transform: rotate(180deg);
}

/* Dropdown panel */

.xil-nav__sub {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 10;
        min-width: 252px;
        margin: 0;
        padding: 8px;
        list-style: none;
        background: #0B1526;
        border: 1px solid rgba(154, 170, 198, 0.16);
        border-radius: 14px;
        box-shadow: var(--xil-shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition:
                opacity 180ms var(--xil-ease),
                transform 180ms var(--xil-ease),
                visibility 0s linear 180ms;
}

.xil-nav__item--has-sub.is-open > .xil-nav__sub {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition:
                opacity 180ms var(--xil-ease),
                transform 180ms var(--xil-ease),
                visibility 0s;
}

/* Signature gradient edge on the panel's top-left. */
.xil-nav__sub::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 14px;
        width: 46px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--xil-grad-1), var(--xil-grad-2));
}

.xil-nav__subitem {
        display: block;
}

.xil-nav__sublink {
        display: block;
        padding: 10px 14px;
        border-radius: 9px;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--xil-muted);
        transition: color var(--xil-transition), background-color var(--xil-transition);
}

.xil-nav__sublink:hover {
        color: #FFFFFF;
        background: rgba(91, 140, 255, 0.10);
}


/* ==========================================================================
   6. HEADER ACTIONS — phone · CTA · burger
   ========================================================================== */

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

.xil-header__phone {
        display: none;
        align-items: center;
        gap: 8px;
        height: 44px;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--xil-muted);
        white-space: nowrap;
        transition: color var(--xil-transition), background-color var(--xil-transition);
}

.xil-header__phone:hover {
        color: #FFFFFF;
        background: rgba(154, 170, 198, 0.08);
}

@media (min-width: 1200px) {
        .xil-header__phone {
                display: inline-flex;
        }
}

.xil-header__cta {
        display: none;
}

@media (min-width: 1024px) {
        .xil-header__cta {
                display: inline-flex;
        }
}

.xil-header__burger {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(154, 170, 198, 0.22);
        border-radius: 11px;
        color: var(--xil-text);
        transition: border-color var(--xil-transition), background-color var(--xil-transition);
}

.xil-header__burger:hover {
        border-color: rgba(154, 170, 198, 0.45);
        background: rgba(154, 170, 198, 0.08);
}

.xil-icon--burger {
        width: 20px;
        height: 20px;
}

@media (min-width: 1024px) {
        .xil-header__burger {
                display: none;
        }
}


/* ==========================================================================
   7. MOBILE DRAWER
   Dialog panel sliding from the right. Open/close, focus trap and body
   scroll lock are handled by xil-main.js. Without JavaScript the drawer
   degrades to a static stacked menu (see section 10).
   ========================================================================== */

.xil-drawer {
        position: fixed;
        inset: 0;
        z-index: var(--xil-z-drawer);
        visibility: hidden;
        transition: visibility 0s linear 340ms;
}

.xil-drawer.is-open {
        visibility: visible;
        transition-delay: 0s;
}

.xil-drawer__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(4, 8, 16, 0.66);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
        opacity: 0;
        transition: opacity 300ms var(--xil-ease);
}

.xil-drawer.is-open .xil-drawer__backdrop {
        opacity: 1;
}

.xil-drawer__panel {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(420px, 94vw);
        display: flex;
        flex-direction: column;
        padding: 16px 22px 30px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--xil-navy-950);
        border-left: 1px solid rgba(154, 170, 198, 0.14);
        box-shadow: -24px 0 64px rgba(0, 0, 0, 0.45);
        transform: translateX(102%);
        transition: transform 340ms var(--xil-ease);
}

.xil-drawer.is-open .xil-drawer__panel {
        transform: translateX(0);
}

/* Body scroll lock (class toggled on <html> by JS). */
html.xil-drawer-open,
html.xil-drawer-open body {
        overflow: hidden;
}

html.xil-drawer-open body {
        padding-right: var(--xil-scrollbar, 0px);
}

/* Drawer head */

.xil-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 56px;
        margin-bottom: 8px;
}

.xil-drawer__brand {
        font-family: var(--xil-font-heading);
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1;
        color: #FFFFFF;
}

.xil-drawer__close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(154, 170, 198, 0.22);
        border-radius: 11px;
        color: var(--xil-text);
        transition: border-color var(--xil-transition), background-color var(--xil-transition);
}

.xil-drawer__close:hover {
        border-color: rgba(154, 170, 198, 0.45);
        background: rgba(154, 170, 198, 0.08);
}

/* Drawer menu — accordion submenus */

.xil-drawer__list {
        margin: 0 0 6px;
        padding: 0;
        list-style: none;
}

.xil-drawer__item {
        border-bottom: 1px solid rgba(154, 170, 198, 0.10);
}

.xil-drawer__row {
        display: flex;
        align-items: stretch;
}

.xil-drawer__link {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        min-height: 56px;
        font-size: 1.02rem;
        font-weight: 600;
        color: var(--xil-text);
        transition: color var(--xil-transition);
}

.xil-drawer__link:hover {
        color: #FFFFFF;
}

.xil-drawer__toggle {
        flex: none;
        display: grid;
        place-items: center;
        width: 48px;
        color: var(--xil-muted);
}

.xil-drawer__chevron {
        width: 18px;
        height: 18px;
        transition: transform 240ms var(--xil-ease);
}

.xil-drawer__item--has-sub.is-open > .xil-drawer__row .xil-drawer__chevron {
        transform: rotate(180deg);
        color: var(--xil-cyan-400);
}

.xil-drawer__sub {
        margin: 0 0 10px;
        padding: 0 0 0 6px;
        list-style: none;
        max-height: 0; /* Animated by JS (scrollHeight). */
        overflow: hidden;
        transition: max-height 280ms var(--xil-ease);
}

.xil-drawer__sublink {
        display: block;
        padding: 11px 12px;
        border-radius: 8px;
        font-size: 0.95rem;
        color: var(--xil-muted);
        transition: color var(--xil-transition), background-color var(--xil-transition);
}

.xil-drawer__sublink:hover {
        color: #FFFFFF;
        background: rgba(91, 140, 255, 0.08);
}

/* Drawer CTAs + contact + socials */

.xil-drawer__ctas {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
}

.xil-drawer__contact {
        margin: 20px 0 0;
        padding: 14px 0 0;
        border-top: 1px solid rgba(154, 170, 198, 0.10);
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 2px;
}

.xil-drawer__contact a,
.xil-drawer__contact-plain {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 42px;
        font-size: 0.92rem;
        color: var(--xil-muted);
}

.xil-drawer__contact a:hover {
        color: #FFFFFF;
}

.xil-drawer__contact .xil-icon {
        color: var(--xil-blue-400);
}

.xil-drawer__socials {
        display: flex;
        gap: 10px;
        margin: 20px 0 0;
        padding: 0;
        list-style: none;
}

.xil-drawer__socials a,
.xil-footer__socials a {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(154, 170, 198, 0.18);
        border-radius: 11px;
        color: var(--xil-muted);
        transition: color var(--xil-transition), border-color var(--xil-transition), background-color var(--xil-transition);
}

.xil-drawer__socials a:hover,
.xil-footer__socials a:hover {
        color: #FFFFFF;
        border-color: rgba(154, 170, 198, 0.42);
        background: rgba(154, 170, 198, 0.06);
}


/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.xil-footer {
        background: var(--xil-navy-950);
        border-top: 1px solid rgba(154, 170, 198, 0.12);
        color: var(--xil-text);
}

.xil-footer__main {
        padding-block: clamp(3.25rem, 6.5vw, 5.25rem);
}

.xil-footer__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 640px) {
        .xil-footer__grid {
                grid-template-columns: repeat(2, 1fr);
        }
}

@media (min-width: 1024px) {
        .xil-footer__grid {
                grid-template-columns: 2.1fr 1fr 1fr 1.45fr;
                gap: clamp(2rem, 3.5vw, 3.5rem);
        }
}

.xil-footer__wordmark {
        display: inline-block;
        font-family: var(--xil-font-heading);
        font-size: 1.45rem;
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1;
        color: #FFFFFF;
}

.xil-footer__tagline {
        margin: 14px 0 0;
        max-width: 320px;
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--xil-muted);
}

.xil-footer__socials {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 22px 0 0;
        padding: 0;
        list-style: none;
}

.xil-footer__title {
        margin: 0 0 18px;
        font-family: var(--xil-font-heading);
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: var(--xil-tracking-label);
        text-transform: uppercase;
        color: var(--xil-muted);
}

/* Styling targets <a> inside the list so both the fallback markup and
   real WordPress menus render identically. */
.xil-footer__list {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 2px;
}

.xil-footer__list a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
        font-size: 0.93rem;
        color: var(--xil-muted);
        transition: color var(--xil-transition);
}

.xil-footer__list a:hover {
        color: #FFFFFF;
}

.xil-footer__contact {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 4px;
}

.xil-footer__contact a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 40px;
        font-size: 0.93rem;
        color: var(--xil-muted);
        transition: color var(--xil-transition);
}

.xil-footer__contact a:hover {
        color: #FFFFFF;
}

.xil-footer__contact-icon {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        flex: none;
        border-radius: 9px;
        background: rgba(91, 140, 255, 0.10);
        border: 1px solid rgba(91, 140, 255, 0.18);
        color: var(--xil-blue-400);
}

.xil-footer__cta {
        margin-top: 18px;
}


/* ==========================================================================
   9. LEGAL BAR
   ========================================================================== */

.xil-legal {
        background: var(--xil-navy-950);
        border-top: 1px solid rgba(154, 170, 198, 0.10);
        color: var(--xil-text);
}

.xil-legal__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 28px;
        padding-block: 16px;
}

.xil-legal__copy,
.xil-legal__loc {
        margin: 0;
        font-size: 0.82rem;
        color: var(--xil-muted);
}

.xil-legal__list {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 22px;
        margin: 0;
        padding: 0;
        list-style: none;
}

.xil-legal__list a {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
        font-size: 0.82rem;
        color: var(--xil-muted);
        transition: color var(--xil-transition);
}

.xil-legal__list a:hover {
        color: #FFFFFF;
}


/* ==========================================================================
   10. NO-JS DEGRADATION
   Without JavaScript: burger hidden, drawer becomes a static stacked
   menu under the header, all submenus expanded, announcement stays.
   ========================================================================== */

html:not(.xil-js) .xil-header__burger {
        display: none;
}

html:not(.xil-js) .xil-drawer {
        position: static;
        visibility: visible;
        transition: none;
}

html:not(.xil-js) .xil-drawer__backdrop {
        display: none;
}

html:not(.xil-js) .xil-drawer__panel {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        border-left: 0;
        overflow: visible;
}

html:not(.xil-js) .xil-drawer__sub {
        max-height: none;
}

html:not(.xil-js) .xil-announce__close {
        display: none;
}


/* ==========================================================================
   11. REDUCED MOTION — chrome kill switch
   (xil-main.css already covers .xil-section content.)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
        .xil-header,
        .xil-nav__sub,
        .xil-nav__chevron,
        .xil-drawer,
        .xil-drawer__backdrop,
        .xil-drawer__panel,
        .xil-drawer__sub,
        .xil-drawer__chevron,
        .xil-announce {
                transition-duration: 0.01ms !important;
        }
}


/* ==========================================================================
   12. PARENT SHIELD — one trail only
   The XilXil breadcrumbs (.xil-crumbs) are the single source of truth.
   If the Astra parent's Breadcrumbs module is enabled in the Customizer,
   it would print a second, default-styled trail above the page content —
   suppressed here. Astra hooks are also removed in template-guarantee.php.
   ========================================================================== */

.xil-site .ast-breadcrumbs,
.xil-site [class*='ast-breadcrumbs'] {
        display: none !important;
}
