.site-header {
  --header-height: 82px;
  --header-side-gap: clamp(20px, 4vw, 48px);
  --header-text: #f7f3eb;
  --header-muted: rgba(247, 243, 235, 0.74);
  --header-accent: #c7352f;
  --header-bg: rgba(22, 23, 22, 0.82);

  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  color: var(--header-text);
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    backdrop-filter 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  background-color: var(--header-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  --header-height: 72px;
}

.site-header__container {
  display: flex;
  align-items: center;
  width: min(100% - var(--header-side-gap), 1280px);
  min-height: var(--header-height);
  margin-inline: auto;
  gap: 0;
  transition: min-height 300ms ease;
}

.site-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: clamp(118px, 10vw, 150px);
  color: var(--header-text);
  text-decoration: none;
  transition: width 300ms ease;
}

.site-logo__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  pointer-events: none;
}

.site-header.is-scrolled .site-logo {
  width: clamp(108px, 9vw, 136px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(24px, 2.2vw, 30px);
  margin-left: auto;
}

.site-nav__link {
  position: relative;
  color: var(--header-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.site-nav__link::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background-color: var(--header-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--header-text);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: clamp(26px, 2.2vw, 32px);
  min-height: 42px;
  padding: 0 18px;
  gap: 9px;
  color: #ffffff;
  background-color: var(--header-accent);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 180ms ease,
    min-height 300ms ease,
    padding 300ms ease,
    transform 180ms ease;
}

.site-header.is-scrolled .site-header__cta {
  min-height: 38px;
  padding-inline: 16px;
}

.site-header__cta:hover,
.site-header__cta:focus-visible {
  background-color: #a92a26;
  transform: translateY(-1px);
}

.header-radio {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  margin-left: clamp(28px, 2.6vw, 36px);
  color: var(--header-text);
  white-space: nowrap;
}

.header-radio[hidden] {
  display: none;
}

.header-radio .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-radio__live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--header-accent);
  border-radius: 50%;
  animation: header-radio-pulse 2s ease-in-out infinite;
}

.header-radio__label {
  color: var(--header-muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
}

.header-radio__label-short {
  display: none;
}

.header-radio__play {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: var(--header-text);
  background: rgba(247, 243, 235, 0.08);
  border: 1px solid rgba(247, 243, 235, 0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, width 300ms ease, height 300ms ease;
}

.site-header.is-scrolled .header-radio {
  gap: 8px;
}

.site-header.is-scrolled .header-radio__play {
  width: 32px;
  height: 32px;
}

.header-radio__play-icon {
  position: relative;
  display: block;
  width: 11px;
  height: 12px;
}

.header-radio__play-icon::before {
  position: absolute;
  inset: 0;
  content: "";
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
  transform: translateX(1px);
}

.header-radio.is-playing .header-radio__play-icon::before,
.header-radio.is-playing .header-radio__play-icon::after {
  position: absolute;
  top: 0;
  width: 3px;
  height: 12px;
  content: "";
  background: currentColor;
  border: 0;
  transform: none;
}

.header-radio.is-playing .header-radio__play-icon::before {
  left: 1px;
}

.header-radio.is-playing .header-radio__play-icon::after {
  right: 1px;
}

.header-radio.is-loading .header-radio__play {
  cursor: progress;
}

.header-radio.is-loading .header-radio__play-icon {
  animation: header-radio-loading 900ms ease-in-out infinite alternate;
}

.header-radio.is-error .header-radio__live-dot {
  animation: none;
  opacity: 0.35;
}

.header-radio__play:hover,
.header-radio__play:focus-visible {
  background: rgba(247, 243, 235, 0.16);
  border-color: rgba(247, 243, 235, 0.42);
}

.header-radio__play:focus-visible {
  outline: 2px solid var(--header-text);
  outline-offset: 3px;
}

@keyframes header-radio-pulse {
  50% { opacity: 0.45; }
}

@keyframes header-radio-loading {
  to { opacity: 0.35; }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .site-nav {
    gap: 18px;
  }

  .header-radio {
    margin-left: 22px;
  }

  .site-header__cta {
    margin-left: 22px;
  }
}

@media (max-width: 980px) and (min-width: 901px) {
  .header-radio__label-full {
    display: none;
  }

  .header-radio__label-short {
    display: inline;
  }
}

.site-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  color: var(--header-text);
  background: rgba(247, 243, 235, 0.08);
  border: 1px solid rgba(247, 243, 235, 0.2);
  border-radius: 999px;
  cursor: pointer;
}

.site-menu-toggle__line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background-color: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.site-header.is-menu-open .site-menu-toggle__line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.site-header.is-menu-open .site-menu-toggle__line:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.site-mobile-nav {
  position: fixed;
  top: var(--header-height);
  right: 0;
  left: 0;
  display: grid;
  width: min(100% - var(--header-side-gap), 1280px);
  margin-inline: auto;
  padding: 8px 0 22px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.site-mobile-nav__links,
.site-mobile-nav__cta,
.site-mobile-nav__caption {
  display: none;
}

.site-header.is-menu-open .site-mobile-nav {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.site-mobile-nav__link {
  padding: 16px 0;
  color: var(--header-text);
  border-top: 1px solid rgba(247, 243, 235, 0.12);
  font-size: 18px;
  font-weight: 650;
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    --header-height: 74px;
  }

  .site-header.is-scrolled {
    --header-height: 66px;
  }

  .site-nav,
  .site-header__cta {
    display: none;
  }

  .header-radio {
    margin-left: auto;
    margin-right: 54px;
    gap: 6px;
  }

  .header-radio__label {
    font-size: 12px;
  }

  .header-radio__label-full {
    display: none;
  }

  .header-radio__label-short {
    display: inline;
  }

  .site-header.is-scrolled .header-radio__play {
    width: 34px;
    height: 34px;
  }

  .site-header.is-menu-open .header-radio {
    visibility: hidden;
  }

  .site-menu-toggle {
    display: block;
    position: fixed;
    top: calc((var(--header-height) - 44px) / 2);
    right: clamp(16px, 4vw, 28px);
    transition:
      top 300ms ease,
      background-color 180ms ease,
      border-color 180ms ease;
  }

  body.menu-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }

  .site-header.is-menu-open {
    --header-height: calc(74px + env(safe-area-inset-top, 0px));

    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(145deg, #202220 0%, #151615 68%, #111211 100%);
    box-shadow: none;
    backdrop-filter: none;
    isolation: isolate;
  }

  .site-header.is-menu-open .site-header__container {
    position: relative;
    z-index: 2;
    width: calc(100% - 40px);
    min-height: var(--header-height);
    padding-top: env(safe-area-inset-top, 0px);
    border-bottom: 1px solid rgba(247, 243, 235, 0.18);
  }

  .site-header.is-menu-open .site-logo {
    transform: none;
  }

  .site-logo {
    width: 116px;
  }

  .site-header.is-scrolled .site-logo {
    width: 108px;
  }

  .site-header.is-menu-open .site-menu-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 13px);
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(247, 243, 235, 0.06);
    border-color: rgba(247, 243, 235, 0.28);
  }

  .site-mobile-nav {
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding:
      calc(var(--header-height) + 18px)
      max(20px, env(safe-area-inset-right, 0px))
      max(24px, env(safe-area-inset-bottom, 0px))
      max(20px, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(145deg, #202220 0%, #151615 68%, #111211 100%);
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 240ms ease,
      transform 240ms ease,
      visibility 240ms ease;
  }

  .site-header.is-menu-open .site-mobile-nav {
    pointer-events: auto;
  }

  .site-mobile-nav__links {
    display: grid;
    border-bottom: 1px solid rgba(247, 243, 235, 0.16);
  }

  .site-mobile-nav__link {
    display: flex;
    align-items: center;
    min-height: 68px;
    padding: 12px 2px;
    border-top: 1px solid rgba(247, 243, 235, 0.16);
    font-size: clamp(24px, 7vw, 30px);
    font-weight: 650;
    line-height: 1.15;
  }

  .site-mobile-nav__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 58px;
    margin-top: 28px;
    padding: 0 20px;
    color: #ffffff;
    background: var(--header-accent);
    font-size: 17px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
  }

  .site-mobile-nav__caption {
    display: block;
    margin: auto 0 0;
    padding-top: 22px;
    color: rgba(247, 243, 235, 0.44);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
  }
}

@media (max-width: 430px) {
  .site-header {
    --header-side-gap: 40px;
  }

  .site-logo {
    width: 112px;
  }

  .site-header.is-scrolled .site-logo {
    width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-logo,
  .site-nav__link,
  .site-nav__link::after,
  .site-header__cta,
  .site-menu-toggle__line,
  .site-mobile-nav {
    transition-duration: 0.01ms;
  }

  .header-radio__live-dot,
  .header-radio__play-icon {
    animation: none;
  }

}
