.container__header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    box-shadow: 0 0.0625rem 0 rgba(76, 31, 81, 0.08);

    nav {
        width: 100%;
        min-height: 4rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.5rem var(--page-gutter);
    }

    .header-logo {
        width: 7.25rem;
        flex: 0 0 auto;

        img {
            width: 100%;
            height: auto;
        }
    }

    input {
        width: 1px;
        height: 1px;
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .header-menu-button {
        width: 2rem;
        height: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        cursor: pointer;

        span {
            width: 1.5rem;
            height: 0.1875rem;
            display: block;
            border-radius: 999rem;
            background: var(--aunare-purple);
        }
    }

    .header-links,
    .header-social {
        display: none;
    }

    .header-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem var(--page-gutter) 1.25rem;
        flex-direction: column;
        gap: 0.875rem;
        color: var(--medium-text);
        font-size: 0.875rem;
        font-weight: 500;
        background: var(--white);
        box-shadow: 0 0.75rem 1.5rem rgba(76, 31, 81, 0.08);

        a {
            color: var(--medium-text);
        }

        .header-submenu {
            color: var(--medium-text);

            summary {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                cursor: pointer;
                list-style: none;
            }

            summary::-webkit-details-marker {
                display: none;
            }

            summary:focus-visible {
                outline: 0.125rem solid rgba(76, 31, 81, 0.24);
                outline-offset: 0.25rem;
            }

            .header-submenu-chevron {
                width: 0.5rem;
                height: 0.5rem;
                border-right: 0.0625rem solid currentColor;
                border-bottom: 0.0625rem solid currentColor;
                transform: translateY(-0.125rem) rotate(45deg);
                transition: transform 180ms ease;
            }

            &[open] .header-submenu-chevron {
                transform: translateY(0.125rem) rotate(225deg);
            }

            > div {
                display: grid;
                gap: 0.75rem;
                padding: 0.875rem 0 0.25rem 1rem;
            }
        }
    }

    input:checked ~ .header-links {
        display: flex;
    }
}

@media (min-width: 992px) {
    .container__header {
        height: 6.375rem;
        position: sticky;
        background: transparent;
        box-shadow: none;
        pointer-events: none;

        &::before {
            content: '';
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
            background: var(--white);
            box-shadow: 0 0.0625rem 0 rgba(76, 31, 81, 0.08);
            transition: height 180ms ease;
        }

        nav {
            max-width: var(--page-max);
            min-height: 4.5rem;
            position: relative;
            z-index: 1;
            margin: 0 auto;
            pointer-events: auto;
            transition: min-height 180ms ease, padding 180ms ease;
        }

        .header-logo {
            width: 10rem;
            transition: width 180ms ease;
        }

        .header-menu-button {
            display: none;
        }

        .header-links,
        .header-social {
            display: flex;
            align-items: center;
        }

        .header-links {
            width: auto;
            position: static;
            margin-left: auto;
            padding: 0;
            flex-direction: row;
            gap: 1.5rem;
            box-shadow: none;

            a {
                font-size: 1rem;
                transition: color 180ms ease, font-size 180ms ease;
            }

            a:hover {
                color: var(--aunare-purple);
            }

            .header-submenu {
                position: relative;

                summary {
                    font-size: 1rem;
                    transition: color 180ms ease, font-size 180ms ease;
                }

                summary:hover {
                    color: var(--aunare-purple);
                }

                > div {
                    min-width: 11rem;
                    position: absolute;
                    top: calc(100% + 0.75rem);
                    left: -1rem;
                    gap: 0;
                    padding: 0.5rem 0;
                    border-radius: 0.5rem;
                    background: var(--white);
                    box-shadow: 0 0.75rem 1.5rem rgba(76, 31, 81, 0.14);

                    a {
                        padding: 0.625rem 1rem;
                        white-space: nowrap;
                    }
                }
            }
        }

        .header-social {
            gap: 0.625rem;

            img {
                width: 1.875rem;
                height: 1.875em;
                transition: width 180ms ease, height 180ms ease;
            }
        }

        &.header-compact {
            &::before {
                height: 5.25rem;
            }

            nav {
                min-height: 3.75rem;
                padding-top: 0.25rem;
                padding-bottom: 0.25rem;
            }

            .header-logo {
                width: 8.75rem;
            }

            .header-links {
                a,
                .header-submenu summary {
                    font-size: 0.875rem;
                }
            }

            .header-social img {
                width: 1.5rem;
                height: 1.5rem;
            }
        }
    }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
    .container__header {
        nav,
        &::before,
        .header-logo,
        .header-links a,
        .header-submenu summary,
        .header-social img {
            transition: none;
        }
    }
}
