/* Navbar styles */
/* ---------- MiSans ---------- */
@font-face {
    font-family: 'MiSans';
    src: url('/fonts/subset/MiSans-ExtraLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MiSans';
    src: url('/fonts/subset/MiSans-Light.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
  font-family: 'MiSans-Demibold';
  src: url('/fonts/subset/MiSans-Demibold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.navbar-module,
.navbar-module * {
    box-sizing: border-box;
}

.navbar-module,
.nav-item,
.nav-menu-toggle {
    font-family: 'MiSans', 'Inter', system-ui, sans-serif;
}

.navbar-module {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 3.125%;
    padding-right: 3.125%;
    background: transparent;
}

.navbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 56px;
}

.navbar-logo img {
    display: block;
    width: auto;
    height: 100%;
    max-height: 56px;
    object-fit: contain;
}

.nav-menu {
    position: relative;
    flex: 0 0 auto;
    width: 153px;
    height: 56px;
    z-index: 1001;
    transition: width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-module.menu-open .nav-menu {
    width: min(452px, 93.75vw);
    transition-duration: 0.58s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-menu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 100%;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 28px;
    background: #fdd212;
    color: #080808;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.0);
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.2s ease;
}

.navbar-module.menu-open .nav-menu-toggle {
    box-shadow: none;
}

.nav-menu-toggle:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.nav-menu-icon {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
}

.nav-menu-icon-line {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: #171717;
    transition: top 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.18s ease;
}

.nav-menu-icon-line:nth-child(1) {
    top: 15px;
}

.nav-menu-icon-line:nth-child(2) {
    top: 21px;
}

.nav-menu-icon-line:nth-child(3) {
    top: 27px;
}

.navbar-module.menu-open .nav-menu-icon-line:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.navbar-module.menu-open .nav-menu-icon-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-module.menu-open .nav-menu-icon-line:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

.nav-menu-label {
    position: absolute;
    top: 0;
    left: 60px;
    width: 96px;
    height: 56px;
    overflow: hidden;
    font-size: 27px;
    font-weight: 500;
    line-height: 56px;
    text-align: left;
    letter-spacing: 0;
}

.nav-menu-word {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    font-family: 'MiSans-Demibold', sans-serif;
}

.nav-menu-word > span {
    display: inline-block;
    transition: opacity 0.16s ease, transform 0.24s ease, filter 0.24s ease;
}

.nav-menu-word-open > span {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu-word-close > span {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(12px);
}

.nav-menu-word > span:nth-child(1) { transition-delay: 0ms; }
.nav-menu-word > span:nth-child(2) { transition-delay: 35ms; }
.nav-menu-word > span:nth-child(3) { transition-delay: 70ms; }
.nav-menu-word > span:nth-child(4) { transition-delay: 105ms; }
.nav-menu-word > span:nth-child(5) { transition-delay: 140ms; }

.navbar-module.menu-open .nav-menu-word-open > span {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(-12px);
}

.navbar-module.menu-open .nav-menu-word-close > span {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.nav-links {
    position: absolute;
    top: 28px;
    right: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: 100%;
    height: 28px;
    padding: 46px 28px 12px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: #ffffff;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top center;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.14s ease 0.12s,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s ease,
                visibility 0s linear 0.34s;
}

.nav-links.mobile-show {
    height: 244px;
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.3);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
    transition: height 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
                opacity 0.18s ease,
                transform 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
                box-shadow 0.3s ease 0.18s,
                visibility 0s linear 0s;
}

.nav-item {
    display: flex;
    align-items: center;
    flex: 0 0 50px;
    width: 100%;
    padding: 0;
    color: #111111;
    font-size: 27px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    opacity: 0;
    transform: translateY(-8px);
    transition: color 0.2s ease, opacity 0.18s ease, transform 0.22s ease;
}

.nav-item:active {
    background: transparent;
}

.nav-links.mobile-show .nav-item {
    opacity: 1;
    transform: translateY(0);
}

.nav-links.mobile-show .nav-item:nth-child(1) { transition-delay: 0.2s; }
.nav-links.mobile-show .nav-item:nth-child(2) { transition-delay: 0.25s; }
.nav-links.mobile-show .nav-item:nth-child(3) { transition-delay: 0.3s; }

.nav-item.active,
.nav-item:hover,
.nav-item:focus-visible {
    color: #ffd000;
}

.nav-item:focus-visible {
    outline: none;
}

@keyframes navSlideIn {
    to {
        transform: translateY(0);
    }
}

@media (max-width: 520px) {
    .navbar-logo {
        transform: scale(0.75);
        transform-origin: left center;
    }

    .nav-menu {
        transform: scale(0.75);
        transform-origin: right center;
    }

    .navbar-module.menu-open .nav-menu {
        /* Reserve room for the 56px logo and a clear gap beside it. */
        width: min(360px, calc(100vw - 100px));
    }

    .nav-links {
        padding-right: 28px;
        padding-left: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .nav-links,
    .nav-item,
    .nav-menu-icon-line,
    .nav-menu-word > span {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}
