:root {
    --header-height: 78px;
    --header-inline: clamp(22px, 3.2vw, 56px);

    --header-text: #111318;
    --header-bg-top: rgba(255, 255, 255, 0.62);
    --header-bg-scroll: rgba(255, 255, 255, 0.88);
    --header-border: rgba(15, 23, 42, 0.10);

    --panel-width: min(620px, 100vw);

    --ease-main: cubic-bezier(.22, .61, .36, 1);
}


/* HEADER */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1400;

    height: var(--header-height);

    color: var(--header-text);
    background: var(--header-bg-top);

    border-bottom: 1px solid rgba(255, 255, 255, 0.38);

    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);

    transform: translate3d(0, 0, 0);
    will-change: transform;

    transition:
        transform 320ms var(--ease-main),
        background-color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.site-header.is-scrolled {
    background: var(--header-bg-scroll);
    border-bottom-color: var(--header-border);
    box-shadow: 0 10px 34px rgba(15, 23, 42, 0.055);
}

.site-header.is-hidden {
    transform: translate3d(0, calc(-100% - 2px), 0);
}

body.menu-open .site-header {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;

    -webkit-backdrop-filter: none;
    backdrop-filter: none;

    transform: translate3d(0, 0, 0);
}

.site-header__inner {
    width: 100%;
    height: 100%;

    padding: 0 var(--header-inline);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__left,
.site-header__utilities {
    display: flex;
    align-items: center;
}

.site-header__left {
    gap: clamp(16px, 1.8vw, 26px);
}


/* LOGO */

.site-header__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;

    text-decoration: none;
}

.site-header__brand img {
    display: block;

    width: auto;
    height: clamp(25px, 2vw, 31px);
}

body.menu-open .site-header__brand,
body.menu-open .site-header__brand img {
    opacity: 1;
    filter: none;
    -webkit-filter: none;
    transform: none;
}

/* HAMBURGER */

.site-header__menu-toggle {
    width: 44px;
    height: 44px;

    padding: 0;
    margin: 0;

    border: 0;
    outline: 0;
    border-radius: 0;
    box-shadow: none;

    background: transparent;
    color: inherit;

    display: flex;
    align-items: center;
    justify-content: center;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
}

.site-header__menu-toggle:hover,
.site-header__menu-toggle:focus,
.site-header__menu-toggle:active,
.site-header__menu-toggle:focus-visible {
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}

.site-header__menu-icon {
    position: relative;

    display: block;

    width: 28px;
    height: 20px;
}

.site-header__menu-icon .menu-line {
    position: absolute;
    left: 0;

    width: 28px;
    height: 1.5px;

    background: currentColor;
    border-radius: 999px;

    transform-origin: center;
}


/* Hamburger closed */

.menu-line--top {
    top: 2px;

    transition:
        top 220ms cubic-bezier(.4, 0, .2, 1) 140ms,
        transform 260ms cubic-bezier(.4, 0, .2, 1);
}

.menu-line--middle {
    top: 9px;

    transition:
        transform 180ms cubic-bezier(.4, 0, .2, 1),
        opacity 140ms ease;
}

.menu-line--bottom {
    top: 16px;

    transition:
        top 220ms cubic-bezier(.4, 0, .2, 1) 140ms,
        transform 260ms cubic-bezier(.4, 0, .2, 1);
}


/* Hamburger open */

body.menu-open .menu-line--middle {
    opacity: 0;
    transform: translateX(16px);

    transition:
        transform 170ms cubic-bezier(.4, 0, .2, 1),
        opacity 130ms ease;
}

body.menu-open .menu-line--top {
    top: 9px;
    transform: rotate(45deg);

    transition:
        top 220ms cubic-bezier(.4, 0, .2, 1) 120ms,
        transform 260ms cubic-bezier(.4, 0, .2, 1) 330ms;
}

body.menu-open .menu-line--bottom {
    top: 9px;
    transform: rotate(-45deg);

    transition:
        top 220ms cubic-bezier(.4, 0, .2, 1) 120ms,
        transform 260ms cubic-bezier(.4, 0, .2, 1) 330ms;
}


/* LANGUAGE */

.site-header__utilities {
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

body.menu-open .site-header__utilities {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.language-switcher {
    position: relative;
}

.language-switcher__button {
    height: 44px;
    padding: 0;

    border: 0;
    outline: 0;

    background: transparent;
    color: #111318;

    display: inline-flex;
    align-items: center;
    gap: 9px;

    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.055em;

    cursor: pointer;
}

.language-switcher__flag {
    display: block;

    width: 24px;
    height: 17px;

    object-fit: cover;
    border-radius: 2px;
}

.language-switcher__current {
    line-height: 1;
}

.language-switcher__chevron {
    width: 14px;
    height: 14px;

    transition: transform 220ms ease;
}

.language-switcher.is-open .language-switcher__chevron {
    transform: rotate(180deg);
}


/* LANGUAGE DROPDOWN */

.language-switcher__menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;

    width: 260px;
    padding: 10px;

    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px;

    background: rgba(250, 250, 249, 0.98);

    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);

    box-shadow:
        0 18px 50px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.04);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-6px);

    transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease;
}

.language-switcher.is-open .language-switcher__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}

.language-switcher__heading {
    padding: 10px 12px 11px;

    border-bottom: 1px solid rgba(15, 23, 42, 0.09);

    color: #757982;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.language-switcher__menu form {
    display: grid;
    gap: 2px;

    padding-top: 6px;
}

.language-switcher__option {
    width: 100%;
    height: 48px;

    padding: 0 12px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #17191e;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font: inherit;
    font-size: 14px;
    font-weight: 500;

    text-align: left;
    cursor: pointer;

    transition: background-color 150ms ease;
}

.language-switcher__option-main {
    display: flex;
    align-items: center;
    gap: 13px;
}

.language-switcher__option-main img {
    display: block;

    width: 26px;
    height: 18px;

    object-fit: cover;
    border-radius: 2px;
}

.language-switcher__check {
    color: #111318;

    font-size: 14px;
    font-weight: 600;
}

.language-switcher__option.is-active {
    background: rgba(15, 23, 42, 0.055);
}


/* BACKDROP */

.navigation-backdrop {
    position: fixed;
    inset: 0;

    z-index: 1290;

    background: rgba(5, 8, 13, 0.32);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 260ms ease,
        visibility 260ms ease;
}

body.menu-open .navigation-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* MENU PANEL */

.navigation-panel {
    position: fixed;
    inset: 0 auto 0 0;

    z-index: 1350;

    width: var(--panel-width);

    color: #111318;

    background:
        radial-gradient(
            circle at 8% 7%,
            rgba(90, 118, 130, 0.13),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #f8f9f8 0%,
            #eff2f2 52%,
            #e8edef 100%
        );

    border-right: 1px solid rgba(15, 23, 42, 0.10);

    transform: translate3d(-100%, 0, 0);
    visibility: hidden;

    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;

    transition:
        transform 430ms var(--ease-main),
        visibility 430ms;
}

.navigation-panel::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            to right,
            rgba(25, 42, 52, 0.045) 1px,
            transparent 1px
        );

    background-size: 25% 100%;
}

body.menu-open .navigation-panel {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.navigation-panel__inner {
    position: relative;
    z-index: 1;

    min-height: 100%;

    padding:
        calc(var(--header-height) + 24px)
        clamp(34px, 4.5vw, 68px)
        32px;

    display: flex;
    flex-direction: column;
}


/* SEARCH */

.menu-search {
    width: 100%;

    margin-bottom: clamp(28px, 4vh, 42px);
}

.menu-search-box {
    position: relative;

    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid rgba(15, 23, 42, 0.28);

    transition: border-color 170ms ease;
}

.menu-search-box:focus-within {
    border-bottom-color: #111318;
}

.menu-search-icon {
    width: 19px;
    height: 19px;

    flex-shrink: 0;

    margin-right: 13px;

    color: #68717a;
}

.menu-search-input {
    width: 100%;
    min-width: 0;
    height: 100%;

    padding: 0 44px 0 0;

    border: 0;
    outline: 0;

    background: transparent;
    color: #111318;

    font: inherit;
    font-size: 16px;
    font-weight: 450;

    appearance: none;
    -webkit-appearance: none;
}

.menu-search-input::placeholder {
    color: #858d96;
    opacity: 1;
}

.menu-search-input::-webkit-search-decoration,
.menu-search-input::-webkit-search-cancel-button,
.menu-search-input::-webkit-search-results-button,
.menu-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.menu-search-clear {
    position: absolute;
    top: 50%;
    right: 0;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #626a72;

    display: flex;
    align-items: center;
    justify-content: center;

    font: inherit;
    font-size: 24px;
    font-weight: 300;

    cursor: pointer;

    opacity: 0;
    pointer-events: none;

    transform: translateY(-50%);

    transition:
        opacity 150ms ease,
        background-color 150ms ease;
}

.navigation-panel.search-active .menu-search-clear {
    opacity: 1;
    pointer-events: auto;
}

.menu-search-results {
    display: none;

    width: 100%;
    padding-top: 14px;
}

.navigation-panel.search-active .menu-search-results {
    display: grid;
}

.navigation-panel.search-active .navigation-panel__links {
    display: none;
}

.menu-search-result {
    min-height: 64px;

    padding: 12px 8px;

    border-bottom: 1px solid rgba(15, 23, 42, 0.10);

    color: #111318;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;

    transition:
        transform 180ms var(--ease-main),
        color 180ms ease;
}

.menu-search-result-type {
    color: #7d8189;

    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.menu-search-result strong {
    font-size: 15px;
    font-weight: 560;
    line-height: 1.35;
}

.menu-search-loading,
.menu-search-empty {
    padding: 18px 8px;

    color: #777c85;

    font-size: 13px;
    line-height: 1.5;
}


/* MENU LINKS */

.navigation-panel__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 6px;
}

.navigation-panel__link {
    padding: 5px 0;

    color: #15181c;
    text-decoration: none;

    display: inline-block;

    transition:
        transform 280ms var(--ease-main),
        color 220ms ease;
}

.navigation-panel__title {
    display: inline-block;

    font-size: clamp(23px, 2vw, 31px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
}


/* FOCUS */

.language-switcher__button:focus-visible,
.language-switcher__option:focus-visible,
.menu-search-clear:focus-visible,
.navigation-panel__link:focus-visible,
.menu-search-result:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}


/* HOVER */

@media (hover: hover) {

    .language-switcher__option:hover {
        background: rgba(15, 23, 42, 0.04);
    }

    .navigation-panel__link:hover {
        color: #526876;
        transform: translateX(10px);
    }

    .menu-search-result:hover {
        color: #526876;
        transform: translateX(6px);
    }

    .menu-search-clear:hover {
        background: rgba(15, 23, 42, 0.055);
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    :root {
        --header-inline: 28px;
    }

    .navigation-panel {
        width: min(560px, 100vw);
    }

    .navigation-panel__inner {
        padding-left: 36px;
        padding-right: 36px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    :root {
        --header-height: 68px;
        --header-inline: 18px;
    }

    .site-header__left {
        gap: 10px;
    }

    .site-header__brand img {
        height: 24px;
    }

    .site-header__menu-toggle {
        width: 40px;
        height: 40px;
    }

    .site-header__menu-icon {
        width: 24px;
        height: 18px;
    }

    .site-header__menu-icon .menu-line {
        width: 24px;
    }

    .menu-line--top {
        top: 1px;
    }

    .menu-line--middle {
        top: 8px;
    }

    .menu-line--bottom {
        top: 15px;
    }

    body.menu-open .menu-line--top,
    body.menu-open .menu-line--bottom {
        top: 8px;
    }


    /* LANGUAGE */

    .language-switcher__button {
        gap: 7px;
        min-width: 44px;
        justify-content: flex-end;
    }

    .language-switcher__flag {
        width: 22px;
        height: 16px;
    }

    .language-switcher__menu {
        top: calc(100% + 10px);
        width: min(245px, calc(100vw - 36px));
        max-height: calc(100vh - var(--header-height) - 20px);
        overflow-y: auto;
    }


    /* NAVIGATION PANEL */

    .navigation-panel {
        width: 100%;
        border-right: 0;
    }

    .navigation-panel__inner {
        min-height: 100dvh;

        padding:
            calc(var(--header-height) + 18px)
            20px
            24px;
    }


    /* SEARCH */

    .menu-search {
        margin-bottom: 24px;
    }

    .menu-search-box {
        height: 48px;
    }

    .menu-search-input {
        font-size: 16px;
    }


    /* LINKS */

    .navigation-panel__links {
        gap: 6px;
    }

    .navigation-panel__link {
        padding: 6px 0;
    }

    .navigation-panel__title {
        font-size: 27px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    :root {
        --header-inline: 14px;
    }

    .site-header__left {
        gap: 6px;
    }

    .site-header__brand img {
        height: 22px;
    }

    .language-switcher__current {
        display: none;
    }

    .language-switcher__button {
        gap: 5px;
        min-width: 40px;
    }

    .language-switcher__menu {
        right: 0;
        width: min(220px, calc(100vw - 28px));
    }

    .navigation-panel__inner {
        padding:
            calc(var(--header-height) + 16px)
            16px
            22px;
    }

    .navigation-panel__title {
        font-size: 25px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .menu-line,
    .language-switcher__chevron,
    .language-switcher__menu,
    .navigation-backdrop,
    .navigation-panel,
    .menu-search-box,
    .menu-search-clear,
    .navigation-panel__link,
    .menu-search-result {
        transition-duration: 0.01ms !important;
    }
}