.contact-hub {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 110;
  display: grid;
  justify-items: end;
  gap: 10px;
  font-family: var(--font);
  isolation: isolate;
}

.contact-hub::after {
  content: "";
  position: absolute;
  right: -5px;
  left: -5px;
  bottom: -5px;
  z-index: 0;
  width: auto;
  height: 58px;
  pointer-events: none;
  border: 1px solid rgba(201, 165, 108, 0.54);
  border-radius: 15px;
  opacity: 0;
}

.contact-hub-trigger {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 0 17px 0 13px;
  color: #fff;
  background: #101820;
  border: 1px solid rgba(201, 165, 108, 0.5);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(11, 18, 26, 0.22);
  font: 750 14px/1 var(--font);
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.contact-hub-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 24%, rgba(255, 238, 201, 0.22) 46%, rgba(255, 255, 255, 0.08) 54%, transparent 72%);
  transform: translateX(-145%);
}

.contact-hub-trigger:hover {
  background: #172433;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(11, 18, 26, 0.28);
}

.contact-hub-trigger-icon {
  position: relative;
  width: 24px;
  height: 24px;
  color: var(--gold-2);
  display: grid;
  place-items: center;
}

.contact-hub.is-signalling:not(.is-open)::after {
  animation: contact-hub-halo 1.7s cubic-bezier(0.2, 0.72, 0.26, 1) both;
}

.contact-hub.is-signalling:not(.is-open) .contact-hub-trigger::after {
  animation: contact-hub-sheen 1.15s 0.18s cubic-bezier(0.25, 0.7, 0.22, 1) both;
}

.contact-hub-trigger-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-hub-close svg,
.contact-hub-channel-icon svg,
.contact-hub-more svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.contact-hub-panel {
  position: relative;
  z-index: 2;
  width: min(372px, calc(100vw - 36px));
  max-height: min(680px, calc(100vh - 90px));
  padding: 20px;
  color: #f7f4ef;
  background: rgba(13, 20, 28, 0.98);
  border: 1px solid rgba(201, 165, 108, 0.36);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(5, 10, 15, 0.34);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform-origin: right bottom;
  animation: contact-hub-in 0.34s cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.contact-hub-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(225, 190, 126, 0.78), transparent);
  transform: scaleX(0);
  transform-origin: right center;
  animation: contact-hub-line-in 0.62s 0.04s cubic-bezier(0.2, 0.72, 0.24, 1) both;
}

.contact-hub-panel[hidden] {
  display: none;
}

.contact-hub-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}

.contact-hub-head span,
.contact-hub-more > span {
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-hub-head h2 {
  margin: 7px 0 0;
  color: #fff;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.04;
}

.contact-hub-close {
  width: 36px;
  height: 36px;
  padding: 9px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
}

.contact-hub-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.contact-hub-intro {
  margin: 12px 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.contact-hub-channels {
  display: grid;
  gap: 8px;
}

.contact-hub-channel {
  min-height: 62px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.contact-hub-channel:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(201, 165, 108, 0.48);
  transform: translateX(-2px);
}

.contact-hub-channel-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  color: var(--gold-2);
  background: rgba(201, 165, 108, 0.1);
  border-radius: 50%;
}

.contact-hub-channel-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.contact-hub-channel strong,
.contact-hub-more strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
}

.contact-hub-channel small,
.contact-hub-more small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.3;
}

.contact-hub-arrow {
  color: rgba(255, 255, 255, 0.42);
  font-size: 14px;
}

.contact-hub-more {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  display: grid;
  gap: 5px;
}

.contact-hub-more > span {
  margin-bottom: 3px;
}

.contact-hub-more a {
  min-height: 48px;
  padding: 7px 4px;
  color: #fff;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.contact-hub-more a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.contact-hub-more a > svg {
  width: 22px;
  height: 22px;
  color: var(--gold-2);
}

.contact-hub-more a > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.contact-hub-more a > span:last-child {
  color: rgba(255, 255, 255, 0.42);
}

.contact-hub.is-open .contact-hub-head,
.contact-hub.is-open .contact-hub-intro,
.contact-hub.is-open .contact-hub-channels,
.contact-hub.is-open .contact-hub-more {
  animation: contact-hub-item-in 0.38s cubic-bezier(0.2, 0.76, 0.25, 1) both;
}

.contact-hub.is-open .contact-hub-head { animation-delay: 0.04s; }
.contact-hub.is-open .contact-hub-intro { animation-delay: 0.06s; }
.contact-hub.is-open .contact-hub-channels { animation-delay: 0.12s; }
.contact-hub.is-open .contact-hub-more { animation-delay: 0.18s; }

.contact-hub button:focus-visible,
.contact-hub a:focus-visible {
  outline: 3px solid rgba(201, 165, 108, 0.72);
  outline-offset: 3px;
}

@keyframes contact-hub-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); filter: saturate(0.75); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes contact-hub-item-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes contact-hub-line-in {
  0% { opacity: 0; transform: scaleX(0); }
  42% { opacity: 1; }
  100% { opacity: 0.72; transform: scaleX(1); }
}

@keyframes contact-hub-halo {
  0% { opacity: 0; transform: scale(0.96); }
  18% { opacity: 0.72; }
  68% { opacity: 0; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.16); }
}

@keyframes contact-hub-sheen {
  0% { transform: translateX(-145%); }
  72%, 100% { transform: translateX(145%); }
}

@media (max-width: 600px) {
  .contact-hub {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .contact-hub::after {
    right: -4px;
    left: -4px;
    bottom: -4px;
    width: auto;
    height: 54px;
  }

  .contact-hub-panel {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 82px - env(safe-area-inset-bottom));
    padding: 17px;
    border-radius: 10px;
  }

  .contact-hub-trigger {
    min-height: 46px;
    padding: 0 15px 0 12px;
    font-size: 13px;
    border-radius: 11px;
  }

  .contact-hub-close {
    width: 44px;
    height: 44px;
    padding: 13px;
  }

  .contact-hub-head h2 {
    font-size: 24px;
  }

  .contact-hub-channel {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-hub::after,
  .contact-hub-trigger::after,
  .contact-hub-panel::before,
  .contact-hub.is-open .contact-hub-head,
  .contact-hub.is-open .contact-hub-intro,
  .contact-hub.is-open .contact-hub-channels,
  .contact-hub.is-open .contact-hub-more,
  .contact-hub-panel,
  .contact-hub-trigger,
  .contact-hub-channel {
    animation: none;
    transition: none;
  }
}
