:root {
  --fest-header-open: clamp(4.55rem, 6.25vw, 6.5rem);
  --fest-header-small: 4.25rem;
  scroll-padding-block-start: var(--fest-header-open);
}

:root:has(.fest-header-sticky[data-compact]) {
  scroll-padding-block-start: var(--fest-header-small);
}

.fest-header-sticky {
  --fest-header-height: var(--fest-header-open);
  --fest-header-padding: .9rem;
  --fest-header-logo: clamp(7.2rem, 11vw, 10.25rem);
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  min-block-size: var(--fest-header-open);
  pointer-events: none;
}

.fest-header-sticky[data-compact] {
  --fest-header-height: var(--fest-header-small);
  --fest-header-padding: .35rem;
  --fest-header-logo: 6.25rem;
}

.fest-header-surface {
  position: relative;
  background-color: #fff;
  pointer-events: auto;
  transition: box-shadow .24s ease;
}

.fest-header-sticky[data-compact] .fest-header-surface {
  box-shadow: 0 4px 12px rgb(26 21 49 / 14%);
}

.festival .fest-header-sticky .site-header {
  min-height: var(--fest-header-height);
  padding-block: var(--fest-header-padding);
  transition: min-height .24s ease, padding-block .24s ease;
}

.fest-header-sticky .brand img {
  width: var(--fest-header-logo);
  transition: width .24s ease;
}

.festival .skip:focus {
  position: fixed;
  z-index: 11;
}

@media (max-width: 60rem) {
  :root { --fest-header-small: 3.5rem; }
  .fest-header-sticky[data-compact] { --fest-header-logo: 5.5rem; }

  .festival .fest-header-sticky .site-menu-links {
    position: absolute;
    inset: 100% 0 auto;
    margin: 0;
    padding-inline: var(--fest-gutter);
    max-block-size: calc(100vh - var(--fest-header-height));
    max-block-size: calc(100dvh - var(--fest-header-height));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    background-color: #fff;
    box-shadow: 0 4px 12px rgb(26 21 49 / 14%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fest-header-surface,
  .festival .fest-header-sticky .site-header,
  .fest-header-sticky .brand img { transition: none; }
}
