.site-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: calc(1180px + 2 * var(--gutter));
    margin: 0 auto;
    padding: clamp(14px, 1.6vw, 22px) var(--gutter) clamp(6px, .8vw, 10px);
}

.site-logo { display: inline-flex; flex: none; line-height: 1; }
.site-logo img { width: clamp(180px, 16.5vw, 250px); height: auto; }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.site-header .btn--outline[aria-current="page"] { background: rgba(110, 20, 35, .07); }
.site-header .btn--outline[aria-current="page"]:hover { background: var(--c-accent); }

/* plain text link to an inner page, underlined on hover and on that page */
.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-right: clamp(4px, 1.2vw, 18px);
    color: var(--c-accent);
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: none;
}

.site-nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}

.site-nav-link:hover::after,
.site-nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* basket icon with the number of tickets in it */
.basket-link {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--c-accent);
    transition: background .25s;
}

.basket-link:hover,
.basket-link[aria-current="page"] { background: rgba(110, 20, 35, .08); }
.basket-link svg { width: 26px; height: 26px; }

.basket-link__count {
    position: absolute;
    top: 4px;
    right: 2px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--c-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

/* "Menu" button: opens the site menu */
.menu-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 6px 0 4px;
    border: 0;
    background: none;
    color: var(--c-accent);
    font: 500 1.0625rem var(--font-sans);
    cursor: pointer;
}

.menu-button svg { width: 28px; height: 28px; }
/* the same growing underline as .site-nav-link */
.menu-button__label { position: relative; }

.menu-button__label::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -4px;
    left: 0;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}

.menu-button:hover .menu-button__label::after,
.menu-button[aria-expanded="true"] .menu-button__label::after { transform: scaleX(1); }

/* the site menu: a panel sliding in from the right over a dimmed page */
.site-menu {
    width: min(440px, 100%);
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: var(--c-ivory);
    color: var(--c-ink);
    box-shadow: -30px 0 60px -30px rgba(26, 26, 26, .35);
}

.site-menu::backdrop { background: rgba(26, 26, 26, .45); }

.site-menu[open] { animation: site-menu-in .3s cubic-bezier(.2, .7, .2, 1); }
.site-menu[open]::backdrop { animation: site-menu-fade .3s; }

@keyframes site-menu-in { from { transform: translateX(100%); } }
@keyframes site-menu-fade { from { opacity: 0; } }

.site-menu__panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: 100%;
    padding: 22px clamp(22px, 5vw, 40px) 32px;
}

.site-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-menu__brand {
    margin: 0;
    color: var(--c-accent);
    font: 400 2.125rem/1 var(--font-script);
}

.site-menu__close {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--c-accent);
    cursor: pointer;
    transition: background .25s;
}

.site-menu__close:hover { background: rgba(110, 20, 35, .08); }
.site-menu__close svg { width: 26px; height: 26px; }

.site-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.site-menu__title { margin: 0 0 6px; }

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

.site-menu__link {
    display: block;
    padding: 7px 0;
    color: var(--c-ink-soft);
    font: 500 clamp(1.5rem, 6vw, 1.75rem)/1.2 var(--font-serif);
    text-decoration: none;
    transition: color .2s, transform .2s;
}

.site-menu__link:hover { color: var(--c-accent); transform: translateX(4px); }

.site-menu__link[aria-current="page"] {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 6px;
}

.site-menu__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--c-line);
}

.site-menu__social {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-menu__social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--c-accent);
    transition: background .25s;
}

.site-menu__social a:hover { background: rgba(110, 20, 35, .08); }
.site-menu__social svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
    .site-menu[open], .site-menu[open]::backdrop { animation: none; }
}

/* phones: the text links, Kontakt and Bilety are all in the menu */
@media (max-width: 760px) {
    .site-nav-link,
    .site-header__actions .btn { display: none; }
}

@media (max-width: 560px) {
    .site-header { gap: 10px; }
    .site-logo img { width: 150px; }
    .site-header__actions { gap: 8px; }
    .site-header .btn { min-height: 44px; padding: 10px 14px; gap: 8px; font-size: 0.9375rem; }
    .site-header .btn svg { width: 17px; height: 17px; }
    .basket-link { width: 44px; height: 44px; }
    .basket-link svg { width: 23px; height: 23px; }
}

/* no room for logo, both buttons, the basket and the menu: Kontakt is in the menu */
@media (max-width: 480px) {
    .site-header .btn--outline { display: none; }
    .menu-button { justify-content: center; min-width: 44px; min-height: 44px; padding: 0 2px; }
    .menu-button__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 370px) {
    .site-logo img { width: 132px; }
}
