/* ecosystem.css — Reconciled Canonical Helix Street 5-Domain Switcher Bar
   Replaces all 5 diverged copies across .com / .ai / .io / .foundation / .xyz. */

:root { --hx-eco-h: 32px; }

.hx-eco {
    position: fixed; top: 0; left: 0; right: 0; height: var(--hx-eco-h); z-index: 150;
    display: flex; align-items: center;
    background: var(--bg-eco, #020509);
    border-bottom: 1px solid var(--border, rgba(148, 178, 214, 0.16));
    font: 400 0.72rem/1 var(--font-sans, 'Inter', -apple-system, sans-serif);
    color: var(--text-dim, #A4AEB8); -webkit-font-smoothing: antialiased;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hx-eco--static { position: relative; }
body:has(> .hx-eco:not(.hx-eco--static)) { padding-top: var(--hx-eco-h); }

.hx-eco__inner {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; align-items: center; gap: 1.15rem; white-space: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hx-eco__inner::-webkit-scrollbar { display: none; }
.hx-eco__label {
    flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.14em;
    font-size: 0.62rem; font-weight: 600; color: var(--text-muted, #79838E);
}
.hx-eco__links { display: flex; align-items: baseline; gap: 1.15rem; flex-shrink: 0; }
.hx-eco a {
    position: relative; color: var(--text-dim, #A4AEB8); text-decoration: none;
    transition: color 0.2s ease; flex-shrink: 0; padding: 0.45rem 0;
}
.hx-eco a:hover, .hx-eco a[aria-current] { color: var(--text, #ECF0F3); }
.hx-eco a b { font-weight: 600; color: var(--text, #ECF0F3); transition: color 0.2s ease; }
.hx-eco a small { font-size: 0.64rem; color: var(--text-muted, #79838E); margin-left: 0.32em; }

/* Per-Domain 15% Chromatic Wayfinding */
.hx-eco a[href*="helixstreet.com"]        { --_dom: var(--hx-dom-com, #4CA1F7); }
.hx-eco a[href*="helixstreet.ai"]         { --_dom: var(--hx-dom-ai, #3ACAC6); }
.hx-eco a[href*="helixstreet.io"]         { --_dom: var(--hx-dom-io, #7C96F8); }
.hx-eco a[href*="helixstreet.foundation"] { --_dom: var(--hx-dom-foundation, #CBAA6D); }
.hx-eco a[href*="helixstreet.xyz"]        { --_dom: var(--hx-dom-xyz, #52C7F0); }

.hx-eco a:hover b, .hx-eco a[aria-current] b { color: var(--_dom, var(--hx-accent, #4CA1F7)); }
.hx-eco a[aria-current]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
    background: var(--_dom, var(--hx-accent, #4CA1F7));
}

/* Right-hand CTA Always Uses 85% Master Blue Spine */
.hx-eco__cta { margin-left: auto; flex-shrink: 0; color: var(--brand-primary, #4CA1F7) !important; font-weight: 500; }
.hx-eco__cta:hover { color: var(--brand-hover, #82C1FC) !important; }
.hx-eco a:focus-visible { outline: 2px solid var(--brand-primary, #4CA1F7); outline-offset: 2px; border-radius: 4px; }

nav#nav:not(.hx-nav--sticky), header#site-header { top: var(--hx-eco-h); }
nav#nav.scrolled, header#site-header.solid { top: 0; }
nav#nav.scrolled ~ .hx-eco, header#site-header.solid ~ .hx-eco,
body:has(nav#nav.scrolled) > .hx-eco:not(.hx-eco--static) { transform: translateY(-100%); }

@media (max-width: 680px) {
    .hx-eco__label, .hx-eco a small { display: none; }
    .hx-eco__inner {
        padding: 0 2.25rem 0 1rem; gap: 0.85rem;
        -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
        mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
    }
    .hx-eco__links { gap: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .hx-eco { transition: none; } }
