/* The relay keeps its original model and links, with directional signal hardware. */
#contact {
  --signal-cold: #93e9e1;
  --signal-line: #a4dfda5c;
}

#contact .signal-art {
  --signal-run: clamp(140px, 31vw, 480px);
}

#contact .signal-art > img {
  z-index: 1;
  filter: drop-shadow(0 25px 28px #0009) drop-shadow(0 -2px 10px #8bf6e510);
}

#contact .signal-ring,
#contact .signal-path,
#contact .signal-path::before,
#contact .signal-path::after,
#contact .signal-node {
  pointer-events: none;
}

/* Two incomplete arcs leave room for the antenna's direction of transmission. */
#contact .signal-ring-one {
  width: 74%;
  border: 1px solid;
  border-color: #9cece170 transparent transparent #9cece12b;
  transform: rotate(-25deg);
  box-shadow: none;
}

#contact .signal-ring-two {
  width: 97%;
  border: 1px solid;
  border-color: transparent #d3ece63d #d3ece648 transparent;
  transform: rotate(13deg);
}

/* The outer circle becomes a straight directional track with short ticks. */
#contact .signal-ring-three {
  inset: 13% 4% 14% 1%;
  width: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  opacity: .7;
  transform: rotate(-17deg);
  background:
    linear-gradient(#8be4dd50, #8be4dd50) 0 0 / 64% 1px,
    linear-gradient(#8be4dd50, #8be4dd50) 0 0 / 1px 10px,
    linear-gradient(#8be4dd50, #8be4dd50) 24% 0 / 1px 6px,
    linear-gradient(#8be4dd50, #8be4dd50) 48% 0 / 1px 6px,
    linear-gradient(#efb27666, #efb27666) 100% 100% / 20% 1px;
  background-repeat: no-repeat;
}

#contact .signal-path {
  position: absolute;
  top: 23%;
  left: 8%;
  right: 14%;
  height: 1px;
  z-index: -1;
  transform: rotate(-9deg);
  transform-origin: left center;
  background: linear-gradient(90deg, #8be4dd1a, #8be4dd73 30%, #8be4dd26 74%, transparent);
}

#contact .signal-path::before {
  content: "";
  position: absolute;
  left: 17%;
  top: -5px;
  width: 1px;
  height: 11px;
  background: #b3eee250;
  box-shadow: 20px 0 #b3eee250, 24px 0 #b3eee250, 52px 0 #b3eee250;
}

#contact .signal-path::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 8px;
  height: 3px;
  opacity: 0;
  background: #b9fff2;
  box-shadow: 0 0 9px #93e9e1b3;
}

#contact .signal-node {
  width: 7px;
  height: 7px;
  border: 1px solid #d7fff3;
  background: #9bece2;
  box-shadow: 0 0 0 4px #8de0d912, 0 0 15px #87e6d854;
}

#contact .node-two {
  background: #f1b578;
  border-color: #ffe0bd;
  box-shadow: 0 0 0 4px #efb27612, 0 0 15px #efb27645;
}

#contact .node-three {
  border-radius: 0;
  transform: rotate(45deg);
}

#contact .signal-coordinate {
  left: 50%;
  width: max-content;
  max-width: 100%;
  transform: translateX(-50%);
  padding-top: 8px;
  border-top: 1px solid #9edcd73d;
  color: #c4dbd6;
  font-variant-numeric: tabular-nums;
}

/* The native link becomes a terminal key; its text and destination stay intact. */
#contact .light-button {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 260px;
  max-width: 100%;
  border: 1px solid #8ee6dd8f;
  border-left: 3px solid var(--signal-cold);
  background: #0b2b33ed;
  color: #e4f7f0;
  box-shadow: inset 0 1px #dbfff51a;
  transition: background .2s, border-color .2s, box-shadow .2s;
}

#contact .contact-transmit-icon {
  width: 20px;
  height: 20px;
  color: var(--signal-cold);
  flex-shrink: 0;
}

#contact .light-button > span:last-child {
  color: var(--signal-cold);
  font-size: 24px;
}

#contact .light-button:is(:hover, :focus-visible) {
  background: #16414aed;
  border-color: #b7fff0;
  box-shadow: inset 0 1px #dbfff52b, 0 0 20px #8ee6dd10;
}

#contact .light-button:focus-visible {
  outline: 2px solid #cefff5;
  outline-offset: 4px;
}

#contact .light-button:active {
  background: #092028;
  box-shadow: inset 0 2px 8px #0006;
}

#contact .contact-topics {
  gap: 14px 20px;
  border-color: #9edcd747;
}

#contact .contact-topics li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#contact .contact-topics li::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0;
  border: 1px solid #9de5da;
}

#contact .contact-topics li:nth-child(1)::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 4px 3px #9de5da66;
}

#contact .contact-topics li:nth-child(2)::before {
  border-color: #efb276;
  transform: rotate(45deg);
}

#contact .contact-topics li:nth-child(3)::before {
  border: 0;
  background: linear-gradient(#9de5da, #9de5da) center / 7px 1px,
    linear-gradient(#9de5da, #9de5da) center / 1px 7px;
  background-repeat: no-repeat;
}

#contact .contact-topics li:nth-child(4)::before {
  border-radius: 50% 50% 0 0;
  border-color: #efb276;
}

/* A deliberate interaction sends one brief packet, rather than an idle scan loop. */
#contact:focus-within .signal-path::after,
#contact:has(.light-button:hover) .signal-path::after {
  animation: contact-send-packet 1s ease-out both;
}

#contact:focus-within .signal-ring-one,
#contact:has(.light-button:hover) .signal-ring-one {
  animation: contact-arc-pulse .9s ease-out both;
}

@keyframes contact-send-packet {
  0% { opacity: 0; transform: translateX(0); }
  15% { opacity: .9; }
  100% { opacity: 0; transform: translateX(var(--signal-run)); }
}

@keyframes contact-arc-pulse {
  0%, 100% { opacity: .65; }
  35% { opacity: 1; }
}

@media (max-width: 760px) {
  #contact .signal-art { --signal-run: 62vw; }
  #contact .signal-ring-three { inset: 13% 6% 15%; }
  #contact .signal-path { top: 23%; left: 8%; right: 18%; }
  #contact .light-button { width: 100%; min-width: 0; }
  #contact .contact-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  #contact .signal-coordinate { font-size: 6px; letter-spacing: .12em; }
  #contact .light-button { gap: 12px; padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #contact .signal-ring,
  #contact .signal-path::after { animation: none !important; }
  #contact .signal-path::after { display: none; }
  #contact .light-button { transition: none; }
}
