.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1100;
    transform: translateY(-160%);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    transform: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    background: var(--theme-color);
    color: #fff;
    box-shadow: 0 4px 16px rgb(15 23 42 / 18%);
}

.site-header__inner {
    width: min(var(--content-width), calc(100% - 2rem));
    min-height: var(--header-height);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.brand img {
    width: 11.5rem;
    height: 3.25rem;
    object-fit: contain;
    object-position: left center;
}

.brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.menu-button {
    display: none;
    margin-left: auto;
    gap: 0.35rem;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgb(255 255 255 / 55%);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
}

.menu-button__icon {
    font-size: 1.05rem;
    line-height: 1;
}

.site-navigation {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.header-menu {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu__link {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    color: #e0f2fe;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.header-menu__icon {
    display: grid;
    width: 1.1rem;
    place-items: center;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.header-menu__link:hover,
.header-menu__link[aria-current="page"] {
    background: rgb(255 255 255 / 18%);
    color: #fff;
}

.header-search {
    display: flex;
    flex: 0 1 20rem;
    min-width: 14rem;
    max-width: 20rem;
}

.header-search input[type="search"] {
    min-width: 0;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: #fff;
    color: var(--text);
}

.header-search button {
    padding: 0.45rem 0.7rem;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: #fff;
    color: var(--theme-color);
    font-weight: 800;
    white-space: nowrap;
}

.site-main {
    min-height: calc(100vh - var(--header-height));
    outline: none;
}

.page-container {
    width: min(var(--content-width), calc(100% - 2rem));
    margin-inline: auto;
    padding-block: 2.25rem 4rem;
}

.site-footer {
    padding: 3rem 1rem 1.5rem;
    background: #101827;
    color: #cbd5e1;
}

.site-footer__grid {
    width: min(var(--content-width), 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.site-footer h2 {
    margin: 0 0 0.75rem;
    color: #fff;
    font-size: 1rem;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 0.45rem;
}

.site-footer a {
    color: #cbd5e1;
}

.site-footer__copyright {
    width: min(var(--content-width), 100%);
    margin: 2.5rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.85rem;
}

.page-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    display: grid;
    place-items: center;
    width: 3rem;
    aspect-ratio: 1;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    background: var(--theme-color);
    color: #fff;
    box-shadow: var(--shadow-md);
    font-size: 1.35rem;
}

@media (max-width: 64rem) {
    .site-header__inner {
        flex-wrap: wrap;
        padding-block: 0.8rem;
    }

    .menu-button {
        display: inline-flex;
    }

    .site-navigation {
        display: none;
        flex-basis: 100%;
        align-items: stretch;
        padding: 0.5rem 0 0.25rem;
    }

    .site-navigation.is-open {
        display: flex;
    }

    .header-menu {
        flex: 1 1 auto;
    }

    .header-search {
        margin-left: auto;
    }
}

@media (max-width: 42rem) {
    :root { --header-height: 4rem; }

    .site-header__inner,
    .page-container {
        width: min(100% - 1rem, var(--content-width));
    }

    .brand img {
        width: 9rem;
    }

    .site-navigation.is-open {
        flex-direction: column;
        align-items: stretch;
    }

    .header-menu {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .header-menu__link {
        justify-content: center;
        border: 1px solid rgb(255 255 255 / 25%);
    }

    .header-search {
        flex-basis: auto;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .page-container {
        padding-block: 1.25rem 3rem;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}
