/*
=====================================================================
AMIABLE IMPEX — "OBSIDIAN & COPPER" LUXURY THEME
Site-wide: design tokens, header, footer, language switcher.
Loaded after amiable-global.css + usa-theme.css on every page.
=====================================================================
*/

:root {
    --nx-ink: #0b0c0f;
    --nx-ink-2: #111318;
    --nx-ink-3: #191c22;
    --nx-paper: #f7f7f5;
    --nx-bone: #f1f1ee;
    --nx-sand: #e4e4df;
    --nx-copper: #e5343b;
    --nx-copper-2: #a6cf3f;
    --nx-copper-3: #c41f27;
    --nx-red: #e3262f;
    --nx-text: #1b1d22;
    --nx-muted: #5f6168;
    --nx-muted-d: rgba(243, 238, 230, .64);
    --nx-line: rgba(11, 12, 15, .11);
    --nx-line-d: rgba(243, 238, 230, .12);
    --nx-serif: "Fraunces", Georgia, "Times New Roman", serif;
    --nx-sans: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
    --nx-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --nx-ease: cubic-bezier(.2, .7, .1, 1);
    --nx-wrap: 1440px;
    --nx-copper-grad: linear-gradient(135deg, #f2484f 0%, #e5343b 45%, #b81c23 100%);
    /* Brand palette from the logo: red gear, lime bolt, black wordmark.
       (Token names kept as "copper" for history: copper = logo red, copper-2 = logo green.) */
    --nx-green: #a6cf3f;
    --nx-green-deep: #6f9a1c;
    --amiable-header-h: 80px;
}

html { scroll-padding-top: calc(var(--amiable-header-h) + 12px); }

/* ------------------------------------------------------------------
   HEADER
------------------------------------------------------------------ */

.nx-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--nx-sans);
    color: var(--nx-ink);
    background: rgba(250, 248, 244, .86);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--nx-line);
    transition: background .45s var(--nx-ease), color .45s var(--nx-ease), border-color .45s var(--nx-ease), box-shadow .45s var(--nx-ease);
}

.nx-header.is-scrolled { box-shadow: 0 18px 40px -24px rgba(11, 12, 15, .35); }

.nx-header-inner {
    max-width: var(--nx-wrap);
    margin: 0 auto;
    height: var(--amiable-header-h);
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nx-brand { display: inline-flex; flex: none; }
.nx-brand { position: relative; }
.nx-brand img { width: auto; height: 36px; transition: opacity .45s var(--nx-ease); }
.nx-brand .nx-logo-light { position: absolute; left: 0; top: 0; opacity: 0; }

/* Navigation */
.nx-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nx-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 13px;
    font: 500 13.5px/1 var(--nx-sans);
    letter-spacing: .01em;
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .3s var(--nx-ease), background .3s var(--nx-ease);
}

.nx-link > span { position: relative; }
.nx-link > span::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--nx-copper);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .45s var(--nx-ease);
}
.nx-link:hover > span::after,
.nx-link:focus-visible > span::after,
.nx-link.is-active > span::after { transform: scaleX(1); transform-origin: left; }
.nx-link.is-active { color: var(--nx-copper-3); }
.nx-link:focus-visible { outline: 2px solid var(--nx-copper); outline-offset: 2px; }

.nx-chev { width: 14px; height: 14px; transition: transform .35s var(--nx-ease); }

/* Products dropdown */
.nx-products { position: relative; }
.nx-products::after { /* hover bridge */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: 22px;
}

.nx-products-panel {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    width: 580px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #fff;
    color: var(--nx-ink);
    border: 1px solid var(--nx-line);
    border-radius: 20px;
    box-shadow: 0 40px 80px -30px rgba(11, 12, 15, .35), 0 2px 6px rgba(11, 12, 15, .05);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity .35s var(--nx-ease), transform .45s var(--nx-ease), visibility .35s;
}

.nx-products.is-open .nx-products-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nx-products.is-open .nx-chev { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 1181px) {
    .nx-products:hover .nx-products-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
    .nx-products:hover .nx-chev { transform: rotate(180deg); }
}

.nx-product {
    display: grid;
    grid-template-columns: 44px 1fr 18px;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    color: var(--nx-ink);
    text-decoration: none;
    transition: background .3s var(--nx-ease);
}
.nx-product:hover, .nx-product:focus-visible { background: var(--nx-bone); outline: none; }

.nx-product-icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--nx-ink);
    color: var(--nx-copper-2);
    transition: background .3s var(--nx-ease), color .3s var(--nx-ease);
}
.nx-product-icon svg { width: 20px; height: 20px; }
.nx-product:hover .nx-product-icon { background: var(--nx-copper-grad); color: #fff; }
.nx-product-title { font: 500 14px/1.35 var(--nx-sans); }
.nx-product-arrow {
    width: 18px; height: 18px;
    color: var(--nx-copper);
    opacity: 0;
    transform: translate(-6px, 6px);
    transition: opacity .3s var(--nx-ease), transform .4s var(--nx-ease);
}
.nx-product:hover .nx-product-arrow { opacity: 1; transform: none; }

/* Actions */
.nx-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.nx-icon-btn {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid currentColor;
    border-color: color-mix(in srgb, currentColor 22%, transparent);
    color: inherit;
    transition: background .3s var(--nx-ease), border-color .3s var(--nx-ease), color .3s var(--nx-ease);
}
.nx-icon-btn svg { width: 16px; height: 16px; }
.nx-icon-btn:hover { background: var(--nx-copper); border-color: var(--nx-copper); color: #fff; }

.nx-lang { position: relative; }
.nx-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    font: 500 13px/1 var(--nx-sans);
    color: inherit;
    background: transparent;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 999px;
    cursor: pointer;
    transition: background .3s var(--nx-ease), border-color .3s var(--nx-ease);
}
.nx-lang-trigger > svg:first-child { width: 16px; height: 16px; }
.nx-lang-trigger:hover { border-color: var(--nx-copper); }
.nx-lang-trigger[aria-expanded="true"] .nx-chev { transform: rotate(180deg); }

.nx-lang-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 230px;
    max-height: 340px;
    overflow: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: 16px;
    box-shadow: 0 30px 60px -24px rgba(11, 12, 15, .35);
    z-index: 5;
}
.nx-lang-menu[hidden] { display: none; }
.nx-lang-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    font: 500 13.5px/1.2 var(--nx-sans);
    color: var(--nx-ink);
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.nx-lang-menu button:hover { background: var(--nx-bone); color: var(--nx-copper-3); }

.nx-menu-toggle {
    display: none;
    position: relative;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.nx-menu-toggle span {
    position: absolute;
    left: 13px; right: 13px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .45s var(--nx-ease), top .45s var(--nx-ease);
}
.nx-menu-toggle span:nth-child(1) { top: 17px; }
.nx-menu-toggle span:nth-child(2) { top: 25px; }
.nx-header.menu-open .nx-menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nx-header.menu-open .nx-menu-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.nx-nav-backdrop { display: none; }

/* Solid white menu bar on every page (sits under the top bar, sticks on scroll) */
.nx-header,
.nx-header.is-scrolled {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ------------------------------------------------------------------
   TOP BAR (dark strip above the white menu)
------------------------------------------------------------------ */
.nx-topbar {
    position: relative;
    z-index: 1001;
    font-family: var(--nx-sans);
    color: rgba(243, 238, 230, .74);
    background: var(--nx-ink);
    border-bottom: 1px solid rgba(229, 52, 59, .28);
}
.nx-topbar-inner {
    max-width: var(--nx-wrap);
    margin: 0 auto;
    min-height: 42px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nx-topbar-info,
.nx-topbar-side { display: flex; align-items: center; gap: 28px; min-width: 0; }
.nx-topbar-side { gap: 18px; }
.nx-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 12.5px/1 var(--nx-sans);
    letter-spacing: .01em;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: color .3s var(--nx-ease);
}
.nx-topbar-item svg { width: 14px; height: 14px; flex: none; color: var(--nx-copper-2); }
a.nx-topbar-item:hover { color: #fff; }
.nx-topbar-info .nx-topbar-item + .nx-topbar-item { position: relative; }
.nx-topbar-info .nx-topbar-item + .nx-topbar-item::before {
    content: "";
    position: absolute;
    left: -14px; top: 50%;
    width: 1px; height: 14px;
    margin-top: -7px;
    background: rgba(243, 238, 230, .16);
}
.nx-topbar-cat { color: var(--nx-copper-2); }
.nx-topbar-cat:hover { color: #fff; }
.nx-topbar-social {
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    color: rgba(243, 238, 230, .74);
    border: 1px solid rgba(243, 238, 230, .18);
    border-radius: 50%;
    transition: color .3s var(--nx-ease), border-color .3s var(--nx-ease), background .3s var(--nx-ease);
}
.nx-topbar-social svg { width: 12px; height: 12px; }
.nx-topbar-social:hover { color: var(--nx-ink); background: var(--nx-copper-2); border-color: var(--nx-copper-2); }

@media (max-width: 1000px) {
    .nx-topbar-addr { display: none !important; }
}
@media (max-width: 640px) {
    .nx-topbar-inner { padding: 0 18px; min-height: 38px; }
    .nx-topbar-info { gap: 18px; }
    .nx-topbar-info .nx-topbar-item + .nx-topbar-item::before { left: -9px; }
    .nx-topbar-item span { display: none; }
    .nx-topbar-item svg { width: 15px; height: 15px; }
    .nx-topbar-cat { font-size: 12px; }
}
@media (max-width: 380px) {
    .nx-topbar-social { display: none; }
}

/* Mobile / tablet navigation */
@media (max-width: 1180px) {
    .nx-menu-toggle { display: block; }
    .nx-header-inner { gap: 14px; }
    .nx-actions { margin-left: auto; }

    .nx-nav {
        position: fixed;
        top: var(--nx-menu-top, var(--amiable-header-h));
        right: 0;
        bottom: 0;
        width: min(440px, 100%);
        margin: 0;
        padding: 28px 28px 40px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        background: var(--nx-ink);
        color: var(--nx-bone);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .6s var(--nx-ease), visibility .6s;
        z-index: 2;
    }
    .nx-header.menu-open .nx-nav { transform: none; visibility: visible; }

    .nx-link {
        height: auto;
        padding: 16px 0;
        justify-content: space-between;
        font: 400 28px/1.1 var(--nx-serif);
        border-radius: 0;
        border-bottom: 1px solid var(--nx-line-d);
        color: var(--nx-bone) !important;
    }
    .nx-link > span::after { display: none; }
    .nx-link.is-active { color: var(--nx-copper-2) !important; }
    .nx-link .nx-chev { width: 20px; height: 20px; }

    .nx-products::after { display: none; }
    .nx-products-panel {
        position: static;
        width: auto;
        display: none;
        grid-template-columns: 1fr;
        gap: 2px;
        margin: 8px 0 12px;
        padding: 6px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--nx-ink-3);
        border-color: var(--nx-line-d);
        box-shadow: none;
    }
    .nx-products.is-open .nx-products-panel { display: grid; transform: none; }
    .nx-product { color: var(--nx-bone); padding: 12px; }
    .nx-product:hover, .nx-product:focus-visible { background: rgba(255, 255, 255, .05); }
    .nx-product-icon { background: rgba(255, 255, 255, .06); }

    .nx-nav-backdrop {
        display: block;
        position: fixed;
        inset: var(--nx-menu-top, var(--amiable-header-h)) 0 0 0;
        background: rgba(11, 12, 15, .5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .5s var(--nx-ease), visibility .5s;
        z-index: 1;
    }
    .nx-header.menu-open .nx-nav-backdrop { opacity: 1; visibility: visible; }
}

@media (max-width: 640px) {
    :root { --amiable-header-h: 68px; }
    .nx-header-inner { padding: 0 18px; }
    .nx-brand img { height: 30px; }
    .nx-lang-label, .nx-lang-trigger .nx-chev { display: none; }
    .nx-lang-trigger { width: 40px; padding: 0; justify-content: center; }
    .nx-icon-btn { display: none; }
}

/* Shared section kicker (used across pages) */
.nx-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 500 11.5px/1.4 var(--nx-mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--nx-copper-2);
}
.nx-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }

/* CONTACT CTA + FOOTER styles live in css/nx-footer.css */

/* ------------------------------------------------------------------
   FLOATING LANGUAGE SWITCHER (reuses the ux-lang-float script hooks)
------------------------------------------------------------------ */

html body .nx-lang-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: auto;
    top: auto;
    z-index: 990;
    font-family: var(--nx-sans);
}
html body .nx-lang-float .ux-lang-float-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    font: 500 13px/1 var(--nx-sans);
    color: var(--nx-bone);
    background: rgba(11, 12, 15, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(166, 207, 63, .35);
    border-radius: 999px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
    cursor: pointer;
}
html body .nx-lang-float .ux-lang-float-current svg { width: 16px; height: 16px; }
html body .nx-lang-float .ux-lang-float-current:hover { border-color: var(--nx-copper-2); }
html body .nx-lang-float .ux-lang-float-arrow { width: 12px; height: 12px; color: var(--nx-copper-2); }
html body .nx-lang-float .ux-lang-float-menu {
    position: absolute;
    right: 0;
    left: auto;
    bottom: calc(100% + 10px);
    width: 220px;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    background: var(--nx-ink-2);
    border: 1px solid var(--nx-line-d);
    border-radius: 16px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
html body .nx-lang-float .ux-lang-float-menu[hidden] { display: none; }
html body .nx-lang-float .ux-lang-float-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    font: 500 13.5px/1.2 var(--nx-sans);
    color: var(--nx-bone);
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
html body .nx-lang-float .ux-lang-float-menu button:hover { background: rgba(255, 255, 255, .06); color: var(--nx-copper-2); }

@media (prefers-reduced-motion: reduce) {
    .nx-header *, .nx-footer *, .nx-cta * { transition: none !important; }
}

/* LinkedIn now lives in the top bar */
.nx-header .nx-icon-btn { display: none; }
