/* ==========================================
   TACKLE-D BRAND THEME — BLACK / #FFC400 / WHITE
========================================== */

:root {
    --tackle-yellow: #FFC400;
    --tackle-black: #000000;
    --tackle-white: #FFFFFF;
    --tackle-grey: #B3B3B3;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 10000;
    padding: .8rem 1rem;
    border-radius: .5rem;
    background: var(--tackle-yellow);
    color: var(--tackle-black);
}

.skip-link:focus { top: 1rem; }

.modern-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1050;
    padding: .75rem 1rem;
    pointer-events: none;
}

/* ---------- HEADER BAR — SOLID BLACK ---------- */
.modern-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 1600px);
    min-height: 68px;
    margin: auto;
    padding: .55rem .65rem .55rem 1rem;
    border: 1px solid rgba(255, 196, 0, .20);
    border-bottom-color: rgba(255, 196, 0, .30);
    border-radius: 1rem;
    background: var(--tackle-black);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    pointer-events: auto;
    transition: background-color .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.modern-header__brand {
    display: flex;
    align-items: center;
    min-width: 132px;
    min-height: 44px;
    flex: 0 0 auto;
}

.modern-header__brand img {
    display: block;
    width: clamp(132px, 13vw, 168px);
    height: auto;
    filter: none;
}

.modern-header__toggle {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    border: 1px solid var(--tackle-yellow);
    border-radius: .75rem;
    background: var(--tackle-yellow);
    color: var(--tackle-black);
}

.modern-header__toggle span:not(.sr-only) {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform .25s ease, opacity .25s ease;
}

.modern-header__toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.modern-header__toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
.modern-header__toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- MOBILE NAV PANEL ---------- */
.modern-nav {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(255, 196, 0, .20);
    border-radius: 1rem;
    background: #000000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .60);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.modern-nav.is-open { display: block; }
.modern-nav ul { padding: 0; margin: 0; list-style: none; }
.modern-nav__list > li { border-bottom: 1px solid rgba(255, 255, 255, .10); }
.modern-nav a { color: var(--tackle-white); text-decoration: none; }
.modern-nav a:hover,
.modern-nav a:focus-visible,
.modern-nav a[aria-current="page"] { color: var(--tackle-yellow); }

.modern-nav__list > li > a,
.modern-nav__group-label > a {
    display: flex;
    align-items: center;
    min-height: 52px;
    font-size: .95rem;
    font-weight: 600;
}

.modern-nav__group-label { display: flex; align-items: center; }
.modern-nav__group-label > a { flex: 1; }

.modern-nav__submenu-toggle {
    display: grid;
    place-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: .6rem;
    background: rgba(255, 196, 0, .12);
    color: var(--tackle-white);
}

.modern-nav__submenu-toggle:hover {
    background: rgba(255, 196, 0, .22);
    color: var(--tackle-yellow);
}

.modern-nav__submenu-toggle i { transition: transform .25s ease; }
.modern-nav__submenu-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

/* ---------- MEGA MENU ---------- */
.modern-mega {
    display: none;
    padding: .45rem 0 1rem;
}

.modern-mega.is-open { display: block; }

.modern-mega__intro {
    padding: 1rem;
    border: 1px solid rgba(255, 196, 0, .28);
    border-radius: 1rem;
    background: #0A0A0A;
}

.modern-mega__intro > span {
    display: block;
    margin-bottom: .5rem;
    color: var(--tackle-yellow);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.modern-mega__intro strong {
    display: block;
    color: var(--tackle-white);
    font-size: 1.15rem;
    line-height: 1.2;
}

.modern-mega__intro p {
    margin: .6rem 0;
    color: var(--tackle-grey);
    font-size: .84rem;
    line-height: 1.55;
}

.modern-mega__intro a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: .4rem;
    color: var(--tackle-yellow);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.modern-mega__links {
    display: grid;
    margin-top: .5rem;
}

.modern-mega__links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: .5rem;
    border-radius: .6rem;
    color: #E6E6E6;
    font-size: .86rem;
}

.modern-mega__links a:hover,
.modern-mega__links a:focus-visible,
.modern-mega__links a[aria-current="page"] {
    background: rgba(255, 196, 0, .14);
    color: var(--tackle-yellow);
}

.modern-mega__links span {
    width: 2rem;
    flex: 0 0 auto;
    color: rgba(255, 196, 0, .8);
    font-size: .66rem;
}

/* ---------- CTA ---------- */
.modern-header__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    margin-top: 1rem;
    padding: .7rem 1rem;
    border: 1px solid var(--tackle-yellow);
    border-radius: 50px;
    background: var(--tackle-yellow);
    color: var(--tackle-black) !important;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    box-shadow: 0 5px 18px rgba(255, 196, 0, .20);
    transition: all .3s ease;
}

.modern-header__cta i { color: var(--tackle-black) !important; }

.modern-header__cta:hover {
    background: var(--tackle-white);
    color: var(--tackle-black) !important;
    border-color: var(--tackle-white);
    box-shadow: 0 8px 22px rgba(255, 255, 255, .22);
    transform: translateY(-2px);
}

.modern-header__cta:hover i { color: var(--tackle-black) !important; }

.modern-header a:focus-visible,
.modern-header button:focus-visible {
    outline: 3px solid var(--tackle-yellow);
    outline-offset: 3px;
}

body.nav-open { overflow: hidden; }

/* ---------- DESKTOP ---------- */
@media (min-width: 1181px) {
    .modern-header { padding: 1rem clamp(1rem, 2vw, 2rem); }
    .modern-header__inner { gap: clamp(.5rem, 1vw, 1rem); padding-left: clamp(.8rem, 1.4vw, 1.25rem); min-height: 70px; }
    .modern-header__toggle { display: none; }

    .modern-nav {
        position: static;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: clamp(.55rem, .8vw, .9rem);
        min-width: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .modern-nav__list {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: clamp(.15rem, .45vw, .5rem);
        min-width: 0;
        white-space: normal;
    }

    .modern-nav__list > li { position: relative; border: 0; }

    .modern-nav__list > li > a,
    .modern-nav__group-label > a {
        min-height: 46px;
        padding-inline: clamp(.25rem, .45vw, .5rem);
        font-size: clamp(.8rem, .76vw, .92rem);
        letter-spacing: .005em;
        white-space: nowrap;
    }

    .modern-nav__submenu-toggle {
        width: 24px;
        height: 42px;
        margin-left: -.35rem;
        background: transparent;
        color: var(--tackle-white);
    }

    .modern-header__cta {
        min-height: 48px;
        margin: 0;
        padding-inline: clamp(.85rem, 1.1vw, 1.2rem);
        border-radius: .7rem;
        font-size: clamp(.72rem, .68vw, .8rem);
        white-space: nowrap;
    }

    .modern-mega,
    .modern-mega--services,
    .modern-mega--software,
    .modern-mega--industries {
        position: fixed;
        top: 96px;
        left: 50%;
        display: grid;
        grid-template-columns: minmax(230px, .85fr) minmax(480px, 1.8fr) minmax(220px, .72fr);
        gap: clamp(1.25rem, 2.2vw, 2.25rem);
        width: min(1520px, calc(100vw - 64px));
        padding: clamp(1.5rem, 2.3vw, 2.25rem);
        visibility: hidden;
        opacity: 0;
        transform: translate(-50%, -8px);
        border: 1px solid rgba(255, 196, 0, .20);
        border-radius: 1.1rem;
        background: #000000;
        box-shadow: 0 25px 70px rgba(0, 0, 0, .70);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }

    .modern-mega--services { width: min(1520px, calc(100vw - 64px)); }
    .modern-mega--industries { width: min(1520px, calc(100vw - 64px)); }

    .modern-nav__group:hover .modern-mega,
    .modern-nav__group:focus-within .modern-mega,
    .modern-mega.is-open {
        visibility: visible;
        opacity: 1;
        transform: translate(-50%, 0);
    }

    .modern-mega__intro {
        align-self: stretch;
        padding: .25rem clamp(.5rem, 1vw, 1rem) .25rem .15rem;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .modern-mega__intro > span { margin-bottom: 1rem; }

    .modern-mega__intro strong {
        max-width: 12ch;
        color: var(--tackle-white);
        font-size: clamp(1.35rem, 1.6vw, 1.8rem);
        letter-spacing: -.035em;
        line-height: 1.08;
    }

    .modern-mega__intro p {
        max-width: 31ch;
        margin: 1rem 0 1.25rem;
        color: var(--tackle-grey);
        font-size: .9rem;
        line-height: 1.65;
    }

    .modern-mega__intro a { color: var(--tackle-yellow); font-weight: 800; }

    .modern-mega__links {
        align-content: start;
        gap: 0 clamp(1rem, 1.8vw, 1.9rem);
        min-width: 0;
        margin: 0;
    }

    .modern-mega__links--two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .modern-mega__links a {
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr);
        gap: .65rem;
        min-width: 0;
        min-height: 58px;
        padding: .55rem .4rem;
        border-bottom: 1px solid rgba(255, 255, 255, .09);
        border-radius: 0;
        color: #EDEDED;
        font-size: clamp(.84rem, .84vw, 1rem);
        font-weight: 600;
        line-height: 1.3;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .modern-mega__links a > * { min-width: 0; }

    .modern-mega__links a:hover,
    .modern-mega__links a:focus-visible {
        padding-left: .7rem;
        background: rgba(255, 196, 0, .10);
        color: var(--tackle-yellow);
    }

    .modern-mega__links span {
        width: auto;
        color: rgba(255, 196, 0, .8);
        font-size: .7rem;
    }

    .modern-mega__visual {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 250px;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.35rem;
        overflow: hidden;
        border: 1px solid rgba(255, 196, 0, .22);
        border-radius: .9rem;
        background: linear-gradient(145deg, #0A0A0A, #1C1C1C);
        color: var(--tackle-white);
        isolation: isolate;
    }

    .modern-mega__visual::before,
    .modern-mega__visual::after {
        content: "";
        position: absolute;
        z-index: -1;
        border: 1px solid rgba(255, 196, 0, .35);
        border-radius: 50%;
    }

    .modern-mega__visual::before { right: -54px; bottom: -58px; width: 180px; height: 180px; }
    .modern-mega__visual::after { right: 22px; bottom: 18px; width: 70px; height: 70px; }

    .modern-mega__visual--software { background: linear-gradient(145deg, #0A0A0A, #141414); }
    .modern-mega__visual--industries { background: linear-gradient(145deg, #0A0A0A, #181818); }

    .modern-mega__visual span {
        color: var(--tackle-yellow);
        font-size: .66rem;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
    }

    .modern-mega__visual strong {
        max-width: 12ch;
        color: var(--tackle-white);
        font-size: clamp(1.35rem, 1.7vw, 1.9rem);
        letter-spacing: -.04em;
        line-height: 1.06;
    }

    .modern-mega__visual i { align-self: flex-end; font-size: 1.4rem; color: var(--tackle-yellow); }
}

@media (min-width: 1181px) and (max-width: 1365px) {
    .modern-header__brand img { width: 136px; }
    .modern-header__inner { gap: .35rem; }
    .modern-nav { gap: .35rem; }
    .modern-nav__list > li > a,
    .modern-nav__group-label > a { font-size: .72rem; padding-inline: .22rem; }
    .modern-header__cta { padding-inline: .7rem; font-size: .7rem; }
}

@media (min-width: 1181px) and (max-width: 1320px) {
    .modern-header { padding-inline: .75rem; }
    .modern-header__brand img { width: 132px; }
    .modern-nav { gap: .35rem; }
    .modern-nav__list { gap: .08rem; }
    .modern-nav__list > li > a,
    .modern-nav__group-label > a { padding-inline: .2rem; font-size: .8rem; }
    .modern-header__cta { padding-inline: .7rem; font-size: .7rem; }
    .modern-mega,
    .modern-mega--services,
    .modern-mega--software,
    .modern-mega--industries {
        grid-template-columns: minmax(210px, .78fr) minmax(460px, 1.8fr) minmax(190px, .65fr);
        width: calc(100vw - 32px);
        gap: 1rem;
        padding: 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-header * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ---------- SCROLLED HEADER — STAYS BLACK ---------- */
.modern-header.scrolled .modern-header__inner {
    background: #000000;
    border-color: rgba(255, 196, 0, .35);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .60);
}

.modern-mega__visual { display: none; }

body.cursor-in-header .cursor-label { opacity: 0 !important; }
body.cursor-in-header .cursor-ring {
    width: 18px;
    height: 18px;
    border-color: rgba(255, 196, 0, .8);
    background: rgba(255, 196, 0, .12);
}

/* ---------- MOBILE ---------- */
@media (max-width: 1180px) {
    .modern-mega__intro {
        padding: .9rem 0 1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .modern-mega__links a {
        min-width: 0;
        min-height: 52px;
        border-bottom: 1px solid rgba(255, 255, 255, .09);
        border-radius: 0;
        overflow-wrap: break-word;
    }

    .modern-nav {
        background: #000000 !important;
        border-color: rgba(255, 196, 0, .20) !important;
    }

    .modern-nav__list > li {
        border-bottom-color: rgba(255, 255, 255, .10) !important;
    }

    .modern-nav__submenu-toggle {
        background: rgba(255, 196, 0, .15) !important;
        color: var(--tackle-yellow) !important;
    }

    .modern-mega__intro {
        background: #0A0A0A !important;
        border: 1px solid rgba(255, 196, 0, .22) !important;
        border-radius: 1rem;
        padding: 1rem;
    }
}

/* =========================================
   REDUCED HEADER HEIGHT
========================================= */

.modern-header {
    padding: 8px 1rem !important;
}

.modern-header__inner {
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    padding: 8px 16px !important;
    background: #000000 !important;
    box-sizing: border-box;
}

/* LOGO SIZE */
.modern-header__brand {
    min-width: 180px;
    min-height: 60px;
}

.modern-header__brand img {
    width: 180px !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
}

/* NAV ALIGNMENT */
.modern-nav { align-items: center; }

.modern-nav__list > li > a,
.modern-nav__group-label > a { min-height: 42px; }

/* CTA */
.modern-header__cta { min-height: 44px; }

/* MOBILE */
@media (max-width: 1180px) {
    .modern-header__inner {
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
        background: #000000 !important;
    }

    .modern-header__brand {
        min-width: 150px;
        min-height: 55px;
    }

    .modern-header__brand img {
        width: 155px !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* Keep section content aligned across pages while leaving hero sections untouched. */
main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    padding-inline: .75rem !important;
}

@media (min-width: 576px) {
    main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
        max-width: 540px !important;
    }
}

@media (min-width: 768px) {
    main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
        max-width: 720px !important;
    }
}

@media (min-width: 992px) {
    main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
        max-width: 960px !important;
    }
}

@media (min-width: 1200px) {
    main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
        max-width: 1140px !important;
    }
}

@media (min-width: 1400px) {
    main section:not([class*="hero"]) :is(.container, .container-fluid, .sw-container) {
        max-width: 1320px !important;
    }
}