@charset "UTF-8";

/*
 * "position: sticky" is what makes FO-HEADER-01 work without a single line of JavaScript: the
 * header sits in the flow on load, so the content starts right below it and is never covered,
 * then it pins itself to the top the moment the scroll brings it there.
 *
 * On the homepage the same rule produces the documented exception: the header follows the 100vh
 * opening board in the DOM, so it simply is not on screen until the visitor scrolls down.
 */

.fo-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: var(--fo-z-header);
    width: 100%;
    background: var(--fo-color-background);
    -webkit-transition: box-shadow 0.4s ease;
    -moz-transition: box-shadow 0.4s ease;
    -o-transition: box-shadow 0.4s ease;
    transition: box-shadow 0.4s ease;
}

.fo-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 80vw;
    margin: 0 auto;
    padding: 1.4rem 0;
}

.fo-header__brand {
    display: block;
    line-height: 0;
}

.fo-header__logo {
    display: block;
    width: 55vw;
    max-width: 350px;
    height: auto;
}

.fo-header__brand-text {
    font-family: var(--fo-font-serif);
    font-size: 1.4rem;
    letter-spacing: 0.3em;
    line-height: normal;
}

.fo-header__burger {
    display: block;
    padding: 0;
    background: none;
    border: 0;
    line-height: 0;
}

.fo-header__burger-icon {
    display: block;
    width: 9vw;
    max-width: 50px;
    height: auto;
}

.fo-header__burger-icon--hidden {
    display: none;
}

.fo-header__menu {
    display: none;
    width: 100%;
    padding-top: 1.5rem;
}

.fo-header__menu--open {
    display: block;
}

.fo-header__list {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.fo-header__item {
    padding: 0.6rem 0;
}

.fo-header__link {
    font-family: var(--fo-font-serif);
    font-size: 6vw;
    -webkit-transition: color 0.4s ease;
    -moz-transition: color 0.4s ease;
    -o-transition: color 0.4s ease;
    transition: color 0.4s ease;
}

.fo-header__link:hover {
    color: var(--fo-color-primary);
}

.fo-header__locales {
    padding-top: 1rem;
    line-height: 0 !important; /* Fixes the locales flag being slightly not centered */
}

.fo-header__locale-button {
    padding: 0;
    background: none;
    border: 0;
    line-height: 0;
}

/*
 * Bootstrap places its dropdowns with Popper, which only ever runs from its own data-API. The
 * selector being driven by a Stimulus controller, the rules Bootstrap gates behind
 * "[data-bs-popper]" never apply: the placement is set here, under the button, aligned on its left
 * edge inside the burger panel and on its right edge once the header lays out in a row.
 */
.fo-header__locale-list {
    /*
     * The menu now holds nothing but flags. Bootstrap reserves 10rem for a dropdown, which left a
     * wide empty strip on the right of every row: the variable it reads is overridden here rather
     * than its "min-width" rule, so the whole cascade stays Bootstrap's.
     */
    --bs-dropdown-min-width: auto;

    top: 100%;
    right: auto;
    /* Centers the dropdown horizontally */
    transform: translateX(-26%);
    left: 0;
    margin-top: 0.4rem;
}

.fo-header__flag {
    display: block;
    width: 9vw;
    max-width: 42px;
    height: auto;
}

.fo-header__locale-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.fo-header__locale-name {
    font-family: var(--fo-font-sans);
}

@media only screen and (min-width: 360px) {
    .fo-header__locale-list {
        transform: translateX(-24%);
    }
}

@media only screen and (min-width: 450px) {
    .fo-header__locale-list {
        transform: translateX(-22%);
    }
}

@media only screen and (min-width: 992px) {
    .fo-header__burger {
        display: none;
    }

    .fo-header__menu {
        display: flex;
        align-items: center;
        gap: 3vw;
        width: auto;
        padding-top: 0;
    }

    .fo-header__list {
        display: flex;
        align-items: center;
        gap: 3vw;
    }

    .fo-header__item {
        padding: 0;
    }

    .fo-header__link {
        font-size: 1.6vw;
    }

    .fo-header__logo {
        width: 18vw;
    }

    .fo-header__locales {
        padding-top: 0;
    }

    .fo-header__locale-list {
        right: 0;
        transform: translateX(22%);
        left: auto;
    }

    .fo-header__flag {
        width: 3vw;
    }
}

@media only screen and (min-width: 1200px) {
    .fo-header__link {
        font-size: 1.3vw;
    }
}
