.youtube-channel-link {
  --channel-navy: #071326;
  --channel-cream: #fff0ca;
  --channel-pink: #ee648c;
  --channel-teal: #4ccbc3;
  position: fixed;
  z-index: 90;
  top: clamp(10.5rem, 20vh, 13rem);
  right: auto;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0.55rem 0.75rem;
  border: 3px solid var(--channel-cream);
  background: var(--channel-pink);
  box-shadow: 4px 4px 0 var(--channel-navy), 7px 7px 0 var(--channel-teal);
  color: var(--channel-navy);
  font-family: "Press Start 2P", monospace;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.youtube-channel-link:hover,
.youtube-channel-link:focus-visible {
  transform: translateX(-50%);
  box-shadow: 6px 6px 0 var(--channel-navy), 10px 10px 0 var(--channel-teal);
  filter: saturate(1.12);
}

.youtube-channel-link:active {
  transform: translateX(-50%);
  box-shadow: 1px 1px 0 var(--channel-navy), 3px 3px 0 var(--channel-teal);
}

.youtube-channel-link__play {
  position: relative;
  width: 2.35rem;
  height: 1.75rem;
  border: 3px solid var(--channel-navy);
  background: var(--channel-cream);
  box-shadow: 2px 2px 0 rgb(7 19 38 / 35%);
}

.youtube-channel-link__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
  border-left: 0.68rem solid var(--channel-pink);
  translate: -40% -50%;
}

.youtube-channel-link__copy {
  display: grid;
  gap: 0.35rem;
}

.youtube-channel-link__lead {
  color: var(--channel-cream);
  font-size: 0.48rem;
  line-height: 1;
}

.youtube-channel-link__name {
  font-size: 0.62rem;
  line-height: 1.15;
}

@media (max-width: 700px) {
  .youtube-channel-link {
    top: clamp(12.75rem, 25vh, 14.5rem);
    right: auto;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.5rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--channel-navy), 5px 5px 0 var(--channel-teal);
  }

  .youtube-channel-link__play {
    width: 1.85rem;
    height: 1.4rem;
    border-width: 2px;
  }

  .youtube-channel-link__lead {
    font-size: 0.4rem;
  }

  .youtube-channel-link__name {
    font-size: 0.48rem;
  }
}

@media (max-width: 430px) {
  .youtube-channel-link__copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
  }

  .youtube-channel-link__lead {
    display: block;
    font-size: 0.34rem;
  }

  .youtube-channel-link__name {
    font-size: 0.47rem;
    white-space: nowrap;
  }

  .youtube-channel-link {
    min-height: 2.75rem;
    max-width: calc(100vw - 1.5rem);
    gap: 0.45rem;
    padding: 0.42rem 0.55rem;
    transform: none;
  }

  .youtube-channel-link:hover,
  .youtube-channel-link:focus-visible {
    transform: none;
  }

  .youtube-channel-link:active {
    transform: none;
  }
}

@media (orientation: landscape) and (min-height: 521px) {
  .youtube-channel-link {
    top: clamp(8.25rem, 22vh, 12rem);
    right: auto;
    left: max(1.25rem, env(safe-area-inset-left));
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.5rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--channel-navy), 5px 5px 0 var(--channel-teal);
    transform: none;
  }

  .youtube-channel-link:hover,
  .youtube-channel-link:focus-visible {
    transform: none;
  }

  .youtube-channel-link:active {
    transform: none;
  }

  .youtube-channel-link__lead {
    display: none;
  }

  .youtube-channel-link__name {
    font-size: 0.48rem;
    white-space: nowrap;
  }

  .youtube-channel-link__play {
    width: 1.85rem;
    height: 1.4rem;
    border-width: 2px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .youtube-channel-link {
    top: max(2.25rem, env(safe-area-inset-top));
    right: auto;
    left: max(0.75rem, env(safe-area-inset-left));
    min-height: auto;
    gap: 0.45rem;
    padding: 0.38rem 0.5rem;
    border-width: 2px;
    transform: none;
  }

  .youtube-channel-link:hover,
  .youtube-channel-link:focus-visible {
    transform: none;
  }

  .youtube-channel-link:active {
    transform: none;
  }

  .youtube-channel-link__copy {
    display: grid;
    gap: 0.12rem;
  }

  .youtube-channel-link__lead {
    display: block;
    font-size: 0.34rem;
  }

  .youtube-channel-link__name {
    font-size: 0.5rem;
    white-space: nowrap;
  }

  .youtube-channel-link__play {
    width: 1.85rem;
    height: 1.4rem;
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .youtube-channel-link {
    transition: none;
  }
}
