.footer-directory {
  --channel-ink: #291913;
  --channel-line: #43201840;
  --channel-link-size: 16px;
  --channel-code-size: clamp(66px, 5.4vw, 82px);
  --channel-code-gap: 7px;
  --channel-group-gap: clamp(18px, 2.2vw, 28px);
  display: grid;
  grid-template-columns: minmax(min-content, 1.8fr) repeat(2, minmax(0, .8fr));
  gap: clamp(20px, 3vw, 48px);
  color: var(--channel-ink);
}

.footer-contact__identity {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-contact__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-inline-end: clamp(8px, 1.5vw, 20px);
  color: inherit;
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 650;
  letter-spacing: -.05em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.footer-contact__identity .footer-contact__wordmark img {
  display: block;
  width: auto;
  height: 34px;
}

.footer-contact__action a,
.footer-qr-dialog__header button {
  display: grid;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--channel-line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.footer-contact__action a {
  font-size: var(--channel-link-size);
}

.footer-contact__action a:hover,
.footer-contact__action a:focus-visible,
.footer-qr-dialog__header button:hover {
  background: #fff8ef99;
}

.footer-contact :is(a, button):focus-visible,
.footer-qr-dialog__header button:focus-visible {
  outline: 2px solid var(--channel-ink);
  outline-offset: 2px;
}

.footer-contact__hint {
  display: none;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  background: #362019;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.footer-contact__action[data-hint-visible] .footer-contact__hint,
.footer-contact__identity:not([data-hints-managed]) .footer-contact__action:hover .footer-contact__hint,
.footer-contact__identity:not([data-hints-managed], :has(.footer-contact__action:hover))
  .footer-contact__action:focus-within .footer-contact__hint {
  display: block;
}

.footer-qr {
  display: flex;
  align-items: stretch;
  gap: var(--channel-group-gap);
  margin-block-start: 18px;
}

.footer-qr__group + .footer-qr__group {
  padding-inline-start: var(--channel-group-gap);
  border-inline-start: 1px solid var(--channel-line);
}

.footer-qr__group h2 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.footer-qr__list {
  display: flex;
  gap: var(--channel-code-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-qr__link {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: var(--channel-code-size);
  border-radius: 4px;
  color: inherit;
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}

.footer-qr__link:hover .footer-qr__label {
  text-decoration: underline;
}

.footer-qr__code {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #43201836;
  border-radius: 4px;
  background: white;
}

.footer-qr__label {
  font-weight: 650;
  line-height: 1.3;
}

.site-footer.site-footer--channels,
.site-footer--channels .site-footer__inner {
  min-height: 0;
}

.site-footer--channels .site-footer__inner {
  display: grid;
  gap: clamp(35px, 6vw, 90px);
  padding-block: clamp(36px, 5vw, 76px) 28px;
}

.site-footer--channels .site-footer__top.footer-directory,
.site-footer--channels .site-footer__brand-row,
.site-footer--channels .site-footer__bottom {
  position: static;
  transform: none;
}

.site-footer--channels .site-footer__top.footer-directory {
  --channel-link-size: clamp(16px, 1.15vw, 21px);
  width: 100%;
}

.site-footer--channels .footer-directory .site-footer__nav {
  align-items: flex-start;
  grid-column: auto;
  text-align: start;
}

.site-footer--channels .site-footer__brand-row {
  justify-self: center;
}

.site-footer--channels .site-footer__bottom {
  border-top: 1px solid #43201822;
  padding-top: 18px;
}

.footer-qr-dialog {
  --channel-ink: #291913;
  --channel-line: #43201840;
  box-sizing: border-box;
  width: min(344px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--channel-line);
  border-radius: 16px;
  background: #fff9f2;
  color: var(--channel-ink);
}

.footer-qr-dialog::backdrop {
  background: #3620197a;
}

.footer-qr-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-qr-dialog__header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.footer-qr-dialog__header button {
  padding: 0;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
}

.footer-qr-dialog__code {
  display: block;
  width: min(100%, max(128px, calc(100dvh - 148px)));
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
  background: white;
}

@media (max-width: 860px) {
  .contact-directory.footer-directory,
  .site-footer--channels .site-footer__top.footer-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px clamp(20px, 3vw, 48px);
  }

  .footer-directory > .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .contact-directory.footer-directory {
    --channel-link-size: 14px;
  }

  .site-footer--channels .site-footer__inner {
    padding-block: 42px 22px;
  }
}

@media (max-width: 560px) {
  .site-footer--channels .site-footer__top.footer-directory {
    --channel-link-size: 13px;
  }
}

@media (max-width: 600px) {
  .footer-directory {
    --channel-code-size: clamp(72px, 19vw, 84px);
    --channel-code-gap: 10px;
  }

  .footer-qr {
    flex-direction: column;
    gap: 15px;
  }

  .footer-qr__group + .footer-qr__group {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}
