.contact-doc {
  --contact-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: min(760px, 100%);
  margin: 8px auto 72px;
  padding: 8px 4px 0;
}

.contact-header {
  position: relative;
  margin-bottom: 28px;
  padding: 8px 0 32px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.contact-header::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: min(420px, 70vw);
  height: 220px;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%);
  pointer-events: none;
  opacity: 0.9;
}

.contact-eyebrow {
  position: relative;
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-header h1 {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 2.65rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--cream);
}

.contact-lede {
  position: relative;
  margin: 0;
  max-width: 38rem;
  color: var(--cream-dim);
  font-size: 1.05rem;
  line-height: 1.75;
}

.contact-channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.contact-channel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 70%, transparent), var(--panel));
  color: inherit;
  text-decoration: none;
  transition:
    border-color 180ms var(--contact-ease),
    background 180ms var(--contact-ease),
    transform 180ms var(--contact-ease),
    box-shadow 180ms var(--contact-ease);
}

.contact-channel:hover {
  border-color: var(--glow-line);
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--panel-glow-hover);
}

.contact-channel:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.contact-channel-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold) 8%, var(--paper-2));
  color: var(--gold);
  flex: 0 0 auto;
}

.contact-channel-icon svg {
  width: 20px;
  height: 20px;
}

.contact-channel-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.contact-channel-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-channel-title {
  color: var(--cream);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.contact-channel-hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.contact-channel-arrow {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 180ms var(--contact-ease), color 180ms var(--contact-ease);
}

.contact-channel:hover .contact-channel-arrow {
  color: var(--gold-bright);
  transform: translateX(3px);
}

.contact-social {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.contact-social-copy {
  margin-bottom: 14px;
}

.contact-social-copy h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.contact-social-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  width: 100%;
}

/* Contact page: 2×2 so @openingmatrix fits fully in every chip. */
.contact-social .social-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--cream);
  text-decoration: none;
  transition:
    border-color 180ms var(--contact-ease),
    color 180ms var(--contact-ease),
    background 180ms var(--contact-ease),
    transform 180ms var(--contact-ease);
}

.contact-doc .social-chip {
  text-decoration: none;
  color: var(--cream);
  overflow: visible;
}

.contact-social .social-chip {
  min-width: max-content;
  width: 100%;
}

.social-chip:hover,
.contact-doc .social-chip:hover {
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
  color: var(--gold-bright);
  background: color-mix(in srgb, var(--gold) 6%, var(--paper));
  transform: translateY(-1px);
}

.social-chip:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.social-chip svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.social-chip span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-social .social-chip span {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.social-chip small {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .contact-channel,
  .contact-channel-arrow,
  .social-chip {
    transition: none;
  }

  .contact-channel:hover,
  .social-chip:hover {
    transform: none;
  }

  .contact-channel:hover .contact-channel-arrow {
    transform: none;
  }
}

@media (max-width: 820px) {
  .social-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .contact-doc {
    margin-bottom: 48px;
  }

  .contact-channel {
    grid-template-columns: auto 1fr;
    gap: 12px 14px;
  }

  .contact-channel-arrow {
    display: none;
  }

  .social-row {
    grid-template-columns: 1fr 1fr;
  }

  .contact-social .social-row {
    grid-template-columns: 1fr;
  }
}

/* ── Compact social block (homepage) ── */
.home-social-block {
  margin: 0;
}

.home-social-block .home-discord-copy {
  gap: 6px;
  max-width: none;
}

.home-social-block .social-row {
  gap: 6px;
}

.home-social-block .social-chip {
  padding: 10px 14px;
  gap: 8px;
}

.home-social-block .social-chip svg {
  width: 18px;
  height: 18px;
}

.home-social-block .social-chip small {
  font-size: 0.6rem;
}
