﻿/* ==========================================================================
   MIHS Header – new brand palette
   Palette: #008fa5 teal · #89a2b1 dusty blue · #c4b49a sand
            #9e896c bronze · #c7c3bd stone · #90908c warm grey
   The old variable names are kept and re-pointed to the new colours, so every
   other stylesheet that uses var(--mihs-navy / --mihs-amber / --mihs-teal…)
   picks up the palette automatically.
   ========================================================================== */
:root {
    /* dark base (derived from teal + dusty blue) */
    --mihs-navy: #10252e;
    --mihs-navy-dark: #0a1a21;
    --mihs-navy-2: #19343f;
    --mihs-navy-3: #21414e;
    /* brand palette */
    --mihs-teal: #008fa5;
    --mihs-teal-soft: #4cc3d6; /* teal on dark backgrounds */
    --mihs-teal-deep: #00707f; /* teal text on light backgrounds */
    --mihs-blue: #89a2b1;
    --mihs-sand: #c4b49a;
    --mihs-bronze: #9e896c;
    --mihs-stone: #c7c3bd;
    --mihs-grey: #90908c;
    /* legacy names → new colours */
    --mihs-amber: var(--mihs-sand);
    --mihs-amber-dk: var(--mihs-bronze);
    --mihs-gold: var(--mihs-sand);
    --mihs-white: #ffffff;
    --mihs-offwhite: #f5f3ef;
    --mihs-ivory: #f5f3ef;
    --mihs-ink: #10252e;
    --mihs-text: #1a2b32;
    --mihs-muted: #5f6867;
    --mihs-font-display: 'Sora', 'Segoe UI', sans-serif;
    --mihs-font-body: 'Inter', 'Segoe UI', sans-serif;
    --mihs-font-mono: 'IBM Plex Mono', monospace;
}

/* Keyboard focus (visible on the dark nav) */
.mihs-nav a:focus-visible, .mihs-nav button:focus-visible {
    outline: 2px solid var(--mihs-teal-soft);
    outline-offset: 2px;
}

/* ==========================================================================
   Ticker
   ========================================================================== */
.mihs-ticker {
    background: var(--mihs-navy-dark);
    color: #f2efe9;
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--mihs-font-mono);
    font-size: .78rem;
    letter-spacing: .03em;
    border-bottom: 1px solid rgba(196, 180, 154, .30);
}

.mihs-ticker__track {
    display: inline-flex;
    gap: 3.5rem;
    padding: .45rem 0;
    animation: mihs-scroll 28s linear infinite;
    will-change: transform;
}

    .mihs-ticker__track span {
        opacity: .92;
    }

        .mihs-ticker__track span b {
            color: var(--mihs-sand);
            font-weight: 600;
        }

@keyframes mihs-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mihs-ticker__track {
        animation: none;
    }

    .mihs-ticker {
        overflow-x: auto;
    }
}

/* ==========================================================================
   Masthead (always one row)
   ========================================================================== */
.mihs-masthead__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: .55rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    min-height: 96px;
    box-sizing: border-box;
}

.mihs-masthead__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.mihs-masthead__pillars {
    flex: 1 1 auto;
    min-width: 0;
}

    .mihs-masthead__pillars:empty, .mihs-masthead__pillars:has(strong:empty) {
        display: none;
    }

/* Logo */
.mihs-masthead__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.mihs-masthead__logo-img {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.mihs-masthead__logo-img--desktop {
    display: block;
    height: 107px;
    max-width: 240px;
}

.mihs-masthead__logo-img--mobile {
    display: none;
}

/* Partner / promo card */
.mihs-partner-card {
    position: relative;
    width: 300px;
    height: 108px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid rgba(16, 37, 46, .12);
    border-top: 3px solid var(--mihs-teal);
    box-shadow: 0 12px 28px -10px rgba(16, 37, 46, .20);
}

.mihs-partner-card__track {
    display: flex;
    height: 100%;
    transition: transform .5s cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
}

.mihs-partner-card__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, #faf9f6 0%, #fff 100%);
}

.mihs-partner-card__label {
    flex: 0 0 auto;
    display: block;
    margin-bottom: 8px;
    padding: 0 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mihs-teal-deep);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mihs-partner-card__media {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--mihs-offwhite);
    border: 1px solid rgba(16, 37, 46, .07);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mihs-partner-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 6px 10px;
    box-sizing: border-box;
    transition: transform .35s ease;
}

.mihs-partner-card__slide:hover .mihs-partner-card__img {
    transform: scale(1.04);
}

.mihs-partner-card__placeholder {
    font-size: 12px;
    font-weight: 600;
    color: var(--mihs-grey);
}

.mihs-partner-card__dots {
    position: absolute;
    right: 10px;
    bottom: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

    .mihs-partner-card__dots button {
        width: 5px;
        height: 5px;
        border-radius: 999px;
        border: none;
        background: rgba(16, 37, 46, .25);
        cursor: pointer;
        padding: 0;
        transition: background .2s ease, width .2s ease;
    }

        .mihs-partner-card__dots button.is-active {
            background: var(--mihs-teal);
            width: 14px;
        }

/* Tablet */
@media (max-width: 1100px) {
    .mihs-masthead__inner {
        min-height: 88px;
        padding: .5rem 1rem;
    }

    .mihs-masthead__logo-img--desktop {
        height: 64px;
        max-width: 210px;
    }

    .mihs-partner-card {
        width: 260px;
        height: 98px;
    }
}

/* Mobile – still one row */
@media (max-width: 860px) {
    .mihs-masthead__inner {
        flex-wrap: nowrap;
        gap: .5rem;
        min-height: 64px;
        padding: .4rem .75rem;
    }

    .mihs-masthead__pillars {
        display: none;
    }

    .mihs-masthead__logo-img--desktop {
        display: none !important;
    }

    .mihs-masthead__logo-img--mobile {
        display: block !important;
        height: 72px;
        max-width: 170px;
    }

    .mihs-partner-card {
        width: min(150px, 42vw);
        height: 70px;
        border-radius: 12px;
    }

    .mihs-partner-card__slide {
        padding: 8px 10px 10px;
    }

    .mihs-partner-card__label {
        font-size: 8px;
        margin-bottom: 6px;
    }

    .mihs-partner-card__img {
        padding: 4px 6px;
    }

    .mihs-partner-card__dots {
        right: 6px;
        bottom: 5px;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .mihs-masthead__inner {
        min-height: 58px;
        padding: .35rem .6rem;
        gap: .4rem;
    }

    .mihs-masthead__logo-img--mobile {
        height: 62px;
        max-width: 150px;
    }

    .mihs-partner-card {
        width: min(135px, 44vw);
        height: 64px;
    }

    .mihs-partner-card__label {
        font-size: 6.5px;
        margin-bottom: 3px;
    }
}

/* ==========================================================================
   Main navigation
   ========================================================================== */
.mihs-nav {
    --nav-height: 60px;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: var(--mihs-navy);
    border-bottom: 1px solid rgba(196, 180, 154, .18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

    .mihs-nav.is-scrolled {
        box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
    }

    .mihs-nav.nav-hidden, .mihs-nav.nav-visible {
        transform: none !important;
    }

.mihs-nav__inner {
    width: 100%;
    max-width: 1380px;
    min-height: var(--nav-height);
    margin: 0 auto;
    padding: 0 clamp(1rem, 2vw, 1.75rem);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
}

/* Menu – gap now scales with screen width so items never collide */
.mihs-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.25rem, 2.2vw, 3rem);
    flex: 1;
    margin: 0;
    padding: 0;
    min-width: 0;
}

    .mihs-menu > li {
        position: relative;
    }

        .mihs-menu > li > a {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .35rem;
            min-height: var(--nav-height);
            padding: 0 .65rem;
            color: rgba(255, 255, 255, .86);
            text-decoration: none;
            font-family: var(--mihs-font-body);
            font-size: .88rem;
            font-weight: 500;
            white-space: nowrap;
            position: relative;
            transition: color .2s ease, background .2s ease;
        }

            .mihs-menu > li > a::after {
                content: "";
                position: absolute;
                left: .65rem;
                right: .65rem;
                bottom: 12px;
                height: 2px;
                background: var(--mihs-teal-soft);
                transform: scaleX(0);
                transform-origin: center;
                transition: transform .2s ease;
            }

            .mihs-menu > li > a:hover, .mihs-menu > li.is-open > a {
                color: #fff;
            }

                .mihs-menu > li > a:hover::after, .mihs-menu > li.is-open > a::after {
                    transform: scaleX(1);
                }

    .mihs-menu .chev {
        width: 10px;
        height: 10px;
        flex-shrink: 0;
        transition: transform .2s ease;
    }

    .mihs-menu > li.is-open > a .chev {
        transform: rotate(180deg);
    }

/* Dropdowns */
.mihs-dropdown, .mihs-flyout {
    list-style: none;
    margin: 0;
    padding: .5rem;
    position: absolute;
    background: var(--mihs-navy-2);
    border: 1px solid rgba(199, 195, 189, .16);
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 6000;
}

.mihs-dropdown {
    top: calc(100% - 2px);
    left: 0;
    min-width: 245px;
    max-width: 300px;
    overflow: visible;
    transform: translateY(8px);
    border-top: 2px solid var(--mihs-teal);
}

.mihs-flyout {
    top: 0;
    left: calc(100% + 8px);
    min-width: 225px;
    transform: translateX(8px);
    border-left: 2px solid var(--mihs-sand);
    z-index: 6100;
}

    .mihs-dropdown li, .mihs-flyout li {
        position: relative;
    }

    .mihs-dropdown a, .mihs-flyout a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        width: 100%;
        min-height: 42px;
        padding: .6rem .75rem;
        box-sizing: border-box;
        border-radius: 8px;
        color: rgba(255, 255, 255, .84);
        text-decoration: none;
        font-family: var(--mihs-font-body);
        font-size: .86rem;
        line-height: 1.3;
        white-space: nowrap;
        transition: background .18s ease, color .18s ease;
    }

        .mihs-dropdown a:hover, .mihs-flyout a:hover {
            background: rgba(76, 195, 214, .14);
            color: #fff;
        }

.chev-right {
    width: 8px;
    height: 12px;
    flex-shrink: 0;
    transition: transform .2s ease;
}

@media (min-width: 861px) {
    .mihs-menu > li.has-kids:hover > .mihs-dropdown, .mihs-menu > li.has-kids:focus-within > .mihs-dropdown,
    .mihs-dropdown > li.has-kids:hover > .mihs-flyout, .mihs-dropdown > li.has-kids:focus-within > .mihs-flyout {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(0, 0);
    }
}

/* CTA buttons */
.mihs-nav__cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-shrink: 0;
}

    .mihs-nav__cta .mihs-btn-ghost {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: .65rem 1.15rem;
        border: 1px solid rgba(255, 255, 255, .55);
        border-radius: 8px;
        background: transparent;
        color: #fff;
        font-family: var(--mihs-font-body);
        font-size: .88rem;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: all .2s ease;
    }

        .mihs-nav__cta .mihs-btn-ghost:hover {
            background: rgba(255, 255, 255, .1);
            border-color: #fff;
            transform: translateY(-2px);
        }

    /* Primary CTA: sand on dark = strongest contrast, ink text */
    .mihs-nav__cta .mihs-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: .65rem 1.25rem;
        border: 1px solid var(--mihs-sand);
        border-radius: 8px;
        background: var(--mihs-sand);
        color: var(--mihs-ink);
        font-family: var(--mihs-font-body);
        font-size: .88rem;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 5px 15px rgba(0, 0, 0, .18);
        transition: all .2s ease;
    }

        .mihs-nav__cta .mihs-btn:hover {
            background: #fff;
            border-color: #fff;
            color: var(--mihs-navy);
            transform: translateY(-2px);
            box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
        }

/* Hamburger */
.mihs-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
}

    .mihs-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 5px;
        background: #fff;
        transition: transform .25s ease, opacity .2s ease;
    }

    .mihs-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mihs-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .mihs-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* ==========================================================================
   Mobile navigation
   ========================================================================== */
@media (max-width: 860px) {
    .mihs-nav {
        --nav-height: 64px;
    }

    .mihs-toggle {
        display: flex;
    }

    .mihs-nav__cta {
        display: none;
    }

    .mihs-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
        overflow-x: hidden;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: .15rem;
        padding: .75rem 1rem 1.5rem;
        box-sizing: border-box;
        background: var(--mihs-navy);
        border-top: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 20px 40px rgba(0, 0, 0, .38);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }

        .mihs-menu.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0);
        }

        .mihs-menu > li {
            width: 100%;
        }

            .mihs-menu > li > a {
                width: 100%;
                min-height: 48px;
                padding: .75rem .85rem;
                border-radius: 9px;
                justify-content: space-between;
                font-size: .95rem;
                box-sizing: border-box;
            }

                .mihs-menu > li > a::after {
                    display: none;
                }

                .mihs-menu > li > a:hover {
                    background: rgba(255, 255, 255, .07);
                }

    .mihs-dropdown, .mihs-flyout {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: none;
        margin: .1rem 0 .35rem;
        padding: .35rem;
        box-sizing: border-box;
        overflow: visible;
        border: 0;
        border-left: 2px solid rgba(76, 195, 214, .55);
        border-radius: 0 8px 8px 0;
        background: rgba(255, 255, 255, .04);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: none;
    }

        .mihs-menu li.has-kids.is-open > .mihs-dropdown, .mihs-dropdown li.has-kids.is-open > .mihs-flyout {
            display: block;
        }

        .mihs-dropdown a, .mihs-flyout a {
            width: 100%;
            min-height: 43px;
            padding: .65rem .75rem;
            font-size: .86rem;
            white-space: normal;
            box-sizing: border-box;
        }

    .mihs-flyout {
        margin-left: .35rem;
        width: calc(100% - .35rem);
        border-left: 2px solid var(--mihs-sand);
    }

    .mihs-dropdown .chev-right {
        transform: rotate(90deg);
    }

    .mihs-dropdown li.has-kids.is-open > a .chev-right {
        transform: rotate(-90deg);
    }
}

@media (max-width: 480px) {
    .mihs-nav {
        --nav-height: 60px;
    }

    .mihs-nav__inner {
        padding: 0 .75rem;
    }

    .mihs-toggle {
        width: 42px;
        height: 42px;
    }

    .mihs-menu {
        padding: .65rem .75rem 1.25rem;
    }

        .mihs-menu > li > a {
            min-height: 46px;
            padding: .7rem .8rem;
            font-size: .92rem;
        }
}

body.mihs-menu-open {
    overflow: hidden;
}
