html:has(.masthead) {
  --masthead-pearl-base: #f6f3e9;
  --masthead-gap: max(1cm, env(safe-area-inset-top, 0px));
  --masthead-bottom: clamp(.6rem, 1vw, 1rem);
  --masthead-bar-height: clamp(4rem, 4.75vw, 5rem);
  --masthead-space: calc(var(--masthead-gap) + var(--masthead-bar-height) + var(--masthead-bottom));
  --masthead-narrow-by: clamp(2.5rem, 3.5vw, 4rem);
  scroll-padding-top: calc(var(--masthead-space) + .5rem);
}
.masthead-origin {
  height: var(--masthead-space);
  margin-bottom: calc(0px - var(--masthead-space));
  position: relative;
  z-index: 4;
  pointer-events: none;
}
.masthead-origin::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(100% + clamp(2rem, 6vw, 6rem));
  background: #0b0c0e;
  mask-image: linear-gradient(to bottom, #000 var(--masthead-space), transparent 100%);
}
.header.masthead {
  --pearl: linear-gradient(107deg, #e4e0d7, var(--masthead-pearl-base) 24%, #edece6 48%, #fbf8ef 72%, #e7e5df);
  display: block;
  position: sticky;
  top: 0;
  height: auto;
  padding-block: var(--masthead-gap) var(--masthead-bottom);
  z-index: 25;
  border: 0;
  padding-inline: calc(clamp(.75rem, 5vw, 6rem) + var(--masthead-narrow-by));
  background: transparent;
  color: #1c1a1b;
  color-scheme: light;
  pointer-events: none;
}
.masthead-bar {
  --bar-inset: clamp(.65rem, 2.4vw, 2.6rem);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  min-height: var(--masthead-bar-height);
  max-width: calc(86rem - var(--masthead-narrow-by) - var(--masthead-narrow-by));
  pointer-events: auto;
  margin-inline: auto;
  padding-inline: var(--bar-inset);
  border-radius: 3px;
  background: var(--pearl);
  box-shadow: inset 0 1px 1px #ffffffa6, 0 6px 18px #1b141826;
}
.masthead-start, .masthead-end {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2.4vw, 2.5rem);
}
.masthead-end { justify-content: flex-end; }
.masthead-bar > .brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.masthead-bar > .brand .site-logo { width: clamp(8rem, 14vw, 13.5rem); height: auto; }
.masthead-bar > .brand svg.site-logo { color: var(--atrana-fire); }
@keyframes masthead-logo-color {
  0%, 12%, 100% { color: var(--atrana-fire); }
  46%, 58% { color: #101010; }
}
@media (prefers-reduced-motion: no-preference) {
  .masthead-bar > .brand svg.site-logo { animation: masthead-logo-color 8s ease-in-out infinite; }
}
.masthead-bar > .brand:has(.brand-descriptor) .site-logo { width: var(--mark-width); }
.masthead-bar :is(a,summary,button):focus-visible { outline: 2px solid var(--atrana-fire); outline-offset: 2px; }
.masthead-start > a, .masthead-end > a, .masthead-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: 650 .9rem/1.2 var(--cms-font, Arial, sans-serif);
  letter-spacing: .015em;
}
.masthead-menu > summary { gap: .7rem; cursor: pointer; list-style: none; }
.masthead-menu > summary::-webkit-details-marker { display: none; }
.masthead-menu > summary:hover, .masthead-menu[open] > summary,
.masthead-start > a:hover, .masthead-end > a:hover { color: var(--atrana-fire); }
.masthead-icon { display: grid; gap: 4px; width: 20px; }
.masthead-icon i { height: 2px; background: currentColor; }
.masthead-menu[open] .masthead-icon i:first-child { transform: translateY(6px) rotate(45deg); }
.masthead-menu[open] .masthead-icon i:nth-child(2) { opacity: 0; }
.masthead-menu[open] .masthead-icon i:last-child { transform: translateY(-6px) rotate(-45deg); }
.masthead .locale-links { display: flex; gap: 0; align-items: center; }
.masthead .locale-links a {
  display: grid;
  place-items: center;
  min-width: 2.35rem;
  min-height: 44px;
  padding: .25rem;
  color: #565353;
  font: 650 .78rem/1 var(--cms-font, Arial, sans-serif);
}
.header.masthead .locale-links a[aria-current="page"] { background: transparent; color: var(--atrana-fire-dark); font-weight: 800; }
.masthead-panel {
  position: absolute;
  inset: calc(100% + 5px) auto auto 0;
  z-index: 1;
  display: grid;
  width: min(100%, 22rem);
  max-height: min(calc(100dvh - var(--masthead-space) - 1rem), 32rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .75rem;
  background: var(--pearl);
  border-radius: 3px;
  box-shadow: 0 14px 32px #21181935;
}
.masthead-panel :is(a,button) {
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .6rem 1rem;
  text-align: start;
  overflow-wrap: anywhere;
  font: 600 1.05rem/1.3 var(--cms-font, Arial, sans-serif);
}
.masthead-panel :is(a,button):is(:hover,:focus-visible) { background: #f9eeee; color: var(--atrana-fire-dark); }
@media (max-width: 44rem) {
  .masthead-start > a, .masthead-end > a { display: none; }
  .masthead-start, .masthead-end { gap: 0; }
  html:has(.masthead) { --masthead-bar-height: 3.75rem; --masthead-narrow-by: .5rem; }
  .header.masthead { padding-inline: calc(5vw + var(--masthead-narrow-by)); }
  .masthead-bar > .brand .site-logo { width: clamp(6.6rem, 29vw, 9.2rem); }
  .masthead .locale-links a { min-width: 1.75rem; font-size: .73rem; }
  .masthead-menu > summary { justify-content: center; width: 44px; }
  .masthead-menu-label { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
}

@media print { .masthead-origin { display: none; } }

.masthead a { color: inherit; text-decoration: none; }
.masthead-menu { position: static; }
.masthead .site-logo { display: block; }
